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

Package depends on setuptools but doesn't specify this in dependencies #8

Open
takkaria opened this issue Oct 1, 2024 · 1 comment

Comments

@takkaria
Copy link

takkaria commented Oct 1, 2024

I ran into an issue where ssm-parameter-store was failing to run in a Python 3.12 venv because setuptools wasn't installed:

2024-09-27T14:31:10   File "/app/config/settings/base.py", line 24, in <module>
2024-09-27T14:31:10     from ssm_parameter_store import EC2ParameterStore
2024-09-27T14:31:10   File "/usr/local/lib/python3.12/site-packages/ssm_parameter_store/__init__.py", line 2, in <module>
2024-09-27T14:31:10     from .version import __version__
2024-09-27T14:31:10   File "/usr/local/lib/python3.12/site-packages/ssm_parameter_store/version.py", line 1, in <module>
2024-09-27T14:31:10     from pkg_resources import get_distribution, DistributionNotFound
2024-09-27T14:31:10 ModuleNotFoundError: No module named 'pkg_resources'

Since Python 3.8 the preferred way to get the package's installed version is from importlib.metadata import version, which doesn't require extra packages to be installed.

I can make a PR to update to support Python 3.8+ if you are interested in that. (3.8 goes EOL in about a month at the time of writing so at this point it seems pretty safe to rely on it.)

@christippett
Copy link
Owner

Hey @takkaria, thanks for raising this. I'd absolutely appreciate a PR. It's been awhile since I've worked on this codebase and as you've pointed out there's a few contemporary Python features that it could no doubt benefit from!

I should probably look at the PyPI stats before making a call on what minimum Python version to support, but targeting 3.8+ seems reasonable.

Thank you 😊

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

No branches or pull requests

2 participants