Skip to content

replace deprecated pkg_resources with importlib.resources #13

Merged
hover2pi merged 1 commit into
hover2pi:masterfrom
zacharyburnett:remove_pkg_resources
May 8, 2026
Merged

replace deprecated pkg_resources with importlib.resources #13
hover2pi merged 1 commit into
hover2pi:masterfrom
zacharyburnett:remove_pkg_resources

Conversation

@zacharyburnett
Copy link
Copy Markdown
Contributor

pkg_resources is deprecated and was recently removed from setuptools>81

This change replaces usages of pkg_resources with importlib.resources (see https://importlib-resources.readthedocs.io/en/latest/migration.html)

@zacharyburnett
Copy link
Copy Markdown
Contributor Author

zacharyburnett commented May 6, 2026

tests pass locally:

zburnett@ankhmorpork ~/p/hotsoss (y|remove_pkg_resources)> uv run --with=pytest pytest
============================== test session starts ===============================
platform darwin -- Python 3.14.2, pytest-9.0.3, pluggy-1.6.0
rootdir: /Users/zburnett/projects/hotsoss
configfile: setup.cfg
collected 36 items                                                               

tests/test_crossdispersion.py .....                                        [ 13%]
tests/test_locate_trace.py .....                                           [ 27%]
tests/test_plotting.py ..............                                      [ 66%]
tests/test_utils.py ............                                           [100%]
...
======================== 36 passed, 10 warnings in 12.83s ========================

@zacharyburnett
Copy link
Copy Markdown
Contributor Author

oh sorry I forgot to ping @hover2pi 😅

@bhilbert4
Copy link
Copy Markdown

Just adding a quick note to say that the motivation behind this is the updating of the packaging and testing for Mirage, which surprisingly, still has a few users. Some solar system folks are using it to insert fake asteroids/TNOs into their data in order to measure recovery rates vs magnitude.

@hover2pi hover2pi merged commit c6368c6 into hover2pi:master May 8, 2026
1 of 2 checks passed
@hover2pi
Copy link
Copy Markdown
Owner

hover2pi commented May 8, 2026

Merged! Thanks for the fix @zacharyburnett !

@zacharyburnett zacharyburnett deleted the remove_pkg_resources branch May 8, 2026 18:23
@zacharyburnett
Copy link
Copy Markdown
Contributor Author

great! If we can get a new release to PyPI then this will solve our dependency issue 😄

@hover2pi
Copy link
Copy Markdown
Owner

hover2pi commented May 8, 2026

@zacharyburnett Uploaded to PyPI: https://pypi.org/project/hotsoss/0.1.11/

Thanks again!

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.

3 participants