Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.0] Fix conditional Image imports #17899

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Apr 4, 2024

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added this to the 24.1 milestone Apr 4, 2024
@mvdbeek mvdbeek force-pushed the fix_basic_tool_util branch from f557402 to d331cc2 Compare April 4, 2024 13:06
Copy link
Contributor

@bernt-matthias bernt-matthias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just stumbled over the same in the failing planemo tests. Thanks

@mvdbeek
Copy link
Member Author

mvdbeek commented Apr 4, 2024

I was looking at that ;). I did release a new planemo version with the current master branch though, we can re-run the qiime2 workflow tests to see if that's rendered properly now.

@mvdbeek mvdbeek merged commit 46c20cd into galaxyproject:release_24.0 Apr 4, 2024
47 of 49 checks passed
@nsoranzo nsoranzo deleted the fix_basic_tool_util branch April 4, 2024 14:45
@@ -31,7 +31,7 @@
try:
from PIL import Image
except ImportError:
pass
Image = None # type: ignore[assignment]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this to pass on purpose since in the rest of this file we are not handling the case where Image is None (as we instead do in lib/galaxy/util/image_util.py), so a NameError: name 'Image' is not defined exception is better than a AttributeError: 'NoneType' object has no attribute 'open' one.

No need to change it back anyway, and thanks for the other fix (backport of #17749 ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants