Deprecate skimage.io plugin infrastructure#7353
Deprecate skimage.io plugin infrastructure#7353jarrodmillman merged 10 commits intoscikit-image:mainfrom
skimage.io plugin infrastructure#7353Conversation
|
@lagru @stefanv did you know that And, I believe, because of their long-form documentation about image processing applications, the use of |
but keep imread, imsave and imread_collection around to work as simple wrappers for imageio down the line.
Even if a parameter is deprecated, a value passed to it must be preserved during the deprecation cycle! Othwerwise, we effectively remove the deprecated behavior before the cycle is complete. This is only relevant if there's no replacement for the deprecated parameter. In that case, the given value preserved and passed to the replacing parameter, and the deprecated one can be overwritten with `DEPRECATED`.
0509863 to
70ed9c2
Compare
|
Alright, I pushed an alternative deprecation approach that keeps #7552 should be merged before this one because it is required for the test suite to pass. To see whether this PR passes I temporarily included the changes from the other PR in 70ed9c2. |
we are looking for something that we can pass to `**plugin_args` to check whether a deprecation warning is raised.
|
Very quick glance; sorry if I missed some detail. Are we still using The deprecations look good, thanks. I didn't run this branch, but checking that Checking: the todo says to remove all plugins, but probably requires moving imageio plugin directly into |
Yes, I changed nothing about our plugin infrastructure besides tacking on deprecation warnings, whenever something uses a function or parameter directly related to it. As far as I'm aware, imageio defaults to tifffile if it is available. E.g. after applying the following diff diff --git a/skimage/io/_io.py b/skimage/io/_io.py
--- a/skimage/io/_io.py (revision 99c1e625ff02d478963e7c8f17d14b5a5631bf63)
+++ b/skimage/io/_io.py (date 1727522910971)
@@ -76,7 +76,7 @@
if plugin is None and hasattr(fname, 'lower'):
if fname.lower().endswith(('.tiff', '.tif')):
- plugin = 'tifffile'
+ plugin = 'imageio'
with file_or_url_context(fname) as fname, _hide_plugin_deprecation_warnings():
img = call_plugin('imread', fname, plugin=plugin, **plugin_args)the test suite passes, except that test using
I don't follow. What is the reason to keep supporting
Yes, seeing that we have some custom code about making sure that we return an editable array in there. I'll reword the TODO slightly. |
You're right; that's a fine route to take. |
|
Converting to draft, since #7552 should go in before this one. |
|
@stefanv, @jarrodmillman, are you intentionally holding of on the merge because of the release preparation? |
I was holding off to see if you had anything else you wanted to do before this was merged. |
|
Errr. Sorry, I clicked the wrong button.... |
|
No, unless the CI picks something up last minute, this should be fine to go in. :) |
Description
Still very much a work in progress and trying to understand the problem better. See inline comments below.
See also
Checklist
./doc/examplesfor new featuresRelease note
We use changelist to compile each pull request into an item of the release notes. Please refer to the instructions and past release notes for guidance and examples.