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

DM-39938: Replace pkg_resources with importlib.resources #35

Merged
merged 5 commits into from Sep 11, 2023

Conversation

timj
Copy link
Member

@timj timj commented Aug 22, 2023

The API here is possibly dangerous in that resources can refer to ZIP files which might lead to the file path being returned to a temporary file that will be deleted.

In all our common scenarios this is not an issue but a real fix would be to allow a URI to be returned that can be resolved later.

In particular ap_association should be using a URI and then internally resolving it with lsst.resources.ResourcePath.

The API here is possibly dangerous in that resources can
refer to ZIP files which might lead to the file path being
returned to a temporary file that will be deleted.

In all our common scenarios this is not an issue but a
real fix would be to allow a URI to be returned that can
be resolved later.
Does not use ResourcePath in order to minimize dependencies.
The from_uri() method is complicated by fastavro requiring that
all referenced schemas be available locally.
@timj timj merged commit 6041bd2 into main Sep 11, 2023
5 checks passed
@timj timj deleted the tickets/DM-39938 branch September 11, 2023 20:39
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.

None yet

2 participants