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

Remove pkg_resources import (deprecated module) #1072

Merged
merged 3 commits into from
Jan 8, 2025

Conversation

furechan
Copy link
Contributor

@furechan furechan commented Dec 25, 2024

Summary of Changes

  • pkg_resources is deprecated and causing import warnings in recent python versions
  • pkg_resources was used only to fetch the package version as VERSION
  • The version can be fetched directly from the __version__ submodule
  • There is no need for pkg_resources or importlib.metadata
  • Fixes pkg_resources is deprecated #1071

Checklist

  • Code follows the style guidelines of this project
  • Added tests for new functionality
  • Update HISTORY.rst with an entry summarizing your change
  • Tag a project maintainer

Copy link
Owner

@hydrosquall hydrosquall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Looks like this will fix #1071

@@ -19,15 +18,15 @@
MissingRequiredArgumentError,
)

from tiingo.__version__ import __version__ as VERSION
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why we couldn't have used this syntax to begin with 😅 . Assuming all unit tests pass, this looks good to me. Thank you!

@hydrosquall hydrosquall merged commit ac20d7f into hydrosquall:master Jan 8, 2025
9 checks passed
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.

pkg_resources is deprecated
2 participants