10000 Update base.py to remove setuptools and use standard library by justinpolygon · Pull Request #694 · polygon-io/client-python · GitHub
[go: up one dir, main page]

Skip to content

Update base.py to remove setuptools and use standard library #694

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

Merged
merged 3 commits into from
Jul 1, 2024

Conversation

justinpolygon
Copy link
Contributor

This PR updates the method for retrieving the version number of the polygon-api-client package. It replaces the use of pkg_resources from setuptools with importlib.metadata, which is part of the standard library in Python 3.8 and newer.

Changes

  • Removed import pkg_resources and replaced it with from importlib.metadata import version, PackageNotFoundError.
  • Updated the version retrieval logic to use importlib.metadata.version instead of pkg_resources.require.

Benefits