-
Notifications
You must be signed in to change notification settings - Fork 80
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
WIP: remove version retrieval exception handling code #2491
Conversation
Codecov Report
@@ Coverage Diff @@
## latest #2491 +/- ##
==========================================
+ Coverage 84.72% 92.52% +7.80%
==========================================
Files 132 103 -29
Lines 14731 11936 -2795
Branches 2503 2503
==========================================
- Hits 12481 11044 -1437
+ Misses 1948 590 -1358
Partials 302 302
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -16,6 +16,7 @@ class MinHash - hash sketch class | |||
BSD 3-Clause license. | |||
""" | |||
from deprecation import deprecated | |||
from pkg_resources import get_distribution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from pkg_resources import get_distribution | |
from importlib.metadata import version |
(maybe add fallbacks for py3.8 too)
"This might be because you are installing from GitHub's tarballs, " | ||
"use the PyPI ones." | ||
) | ||
VERSION = get_distribution(__name__).version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VERSION = get_distribution(__name__).version | |
VERSION = version(__name__) |
Close #2491 Similar to dib-lab/screed#100 but also dealing with `entry_points` (and the differences in stdlib for [`importlib.metadata`](https://pypi.org/project/backports.entry-points-selectable/)...)
Found some outdated code per #2425 (comment), looking to see what happens if I remove it ;).