Skip to content

silx.resources: Fixed not existing resource file access #4324

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

t20100
Copy link
Member

@t20100 t20100 commented May 16, 2025

Checklist:


This PR fixes an issue spotted with meson editable install (but actually not related to it): silx was calling importlib.resources.as_file on a non-existing resource file and this raises an exception in this case.
It works with the default resource management from Python, but we are miss-using the as_file.

For later, we should consider relying on importlib.resources directly now that it's standard rather than wrapping it in silx.resources.

@t20100 t20100 added this to the Next major release milestone May 16, 2025
@t20100 t20100 marked this pull request as draft May 16, 2025 12:25
@t20100 t20100 closed this May 19, 2025
@t20100 t20100 deleted the fix-resoures branch May 19, 2025 07:39
@t20100 t20100 restored the fix-resoures branch May 19, 2025 08:16
@t20100 t20100 reopened this May 19, 2025
@t20100 t20100 marked this pull request as ready for review May 20, 2025 15:11
@t20100 t20100 marked this pull request as draft June 3, 2025 07:16
@t20100 t20100 marked this pull request as ready for review June 3, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant