8000 Remove `pkg_resources` by ndmlny-qs · Pull Request #294 · sqlalchemy-redshift/sqlalchemy-redshift · GitHub
[go: up one dir, main page]

Skip to content

Remove pkg_resources #294

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

ndmlny-qs
Copy link

This commit removes pkg_resources requirements as they are deprecated with more recent versions of Python.

  • importlib.metadata.distribution is used in place of pkg_resources.get_distribution
  • importlib.metadata.version is used in place of pkg_resources.version
  • ModuleNotFoundError is used instead of pkg_resources.DistributionNotFound

Todos

  • MIT compatible
  • Tests
  • Documentation
  • Updated CHANGES.rst

This commit removes `pkg_resources` requirements as they are deprecated
with more recent versions of Python.

- `importlib.metadata.distribution` is used in place of
  `pkg_resources.get_distribution`
- `importlib.metadata.version` is used in place of
  `pkg_resources.version`
- `ModuleNotFoundError` is used instead of
  `pkg_resources.DistributionNotFound`
This commit removes all references to `pkg_resources`.

- Bumped version numbers for found in `requirements-docs` in order to
  build the documentation using `tox`.
- Removed all references to `pkg_resources` in
  `sqlalchemy_redshift/__init__.py` and
  `sqlalchemy_redshift/dialect.py`.
- Updated the `tests/test_default_ssl.py` to no longer use
  `pkg_resources`.
@ndmlny-qs
Copy link
Author

@Brooke-white is there someone I should ping to look at this PR, or is this also meant to be a part of the work being done in #264?

Thanks again for the tool, yours and everyone else's work with it has been greatly appreciated.

@peytondmurray
Copy link

Hey all, I'm interested in getting this merged. Is there anything I can do to help get this across the line?

@jaellis
Copy link
jaellis commented Feb 11, 2025

Bump

perrito666 added a commit to Shiphero/sqlalchemy-redshift that referenced this pull request Apr 15, 2025
… with more recent versions of Python.

importlib.metadata.distribution is used in place of pkg_resources.get_distribution importlib.metadata.version is used in place of pkg_resources.version ModuleNotFoundError is used instead of pkg_resources.DistributionNotFound

Port of sqlalchemy-redshift#294
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.

4 participants
0