Closed
Conversation
(Cherry-picked from WIP #7109) It seems that as of imageio v2.16, they offer new and old apis, which must be imported as imageio.v3 or imageio.v2 respectively; if you just import and use the naked imageio but have 2.16+ installed, you get a noisy and puzzling deprecation warning emitted to stdout, which is not great, especially for tutorials. All the options here seem bad: - We could just leave stuff as-is, but that would mean that folks running with a newer (Feb 2022 +) install of imageio would get a distracting deprecation warning - We could play nicely with both older and newer versions of imageio by wrapping the import in a try block; that would work, but would be a distracting wart at the top of each tutorial - We could settle on using either the v2 or v3 API, but that means that folks with older imageio installs fail outright - For the moment, I settled on the last one (using v2), along with requirements.txt... which forced me to upgrade the version on all the buildbots, since they were mostly running 2.9. I'd welcome feedback on this.
Contributor
Author
|
(Adding @jiawen here to get comments from a Pythonista... our main Python go-to on the team, Alex Reinking, is taking time away from the project to finish his PhD thesis) |
Contributor
Author
|
(This is probably obsoleted by #7125 -- don't land this without checking on that first.) |
Contributor
Author
|
Obsoleted by #7125 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Cherry-picked from WIP #7109)
It seems that as of imageio v2.16, they offer new and old apis, which must be imported as imageio.v3 or imageio.v2 respectively; if you just import and use the naked imageio but have 2.16+ installed, you get a noisy and puzzling deprecation warning emitted to stdout, which is not great, especially for tutorials.
All the options here seem bad:
We could just leave stuff as-is, but that would mean that folks running with a newer (Feb 2022 +) install of imageio would get a distracting deprecation warning
We could play nicely with both older and newer versions of imageio by wrapping the import in a try block; that would work, but would be a distracting wart at the top of each tutorial
We could settle on using either the v2 or v3 API, but that means that folks with older imageio installs fail outright
For the moment, I settled on the last one (using v2), along with requirements.txt... which forced me to upgrade the version on all the buildbots, since they were mostly running 2.9.
I'd welcome feedback on this.