Fix DeprecationWarning on import, switch to hatchling build system#128
Merged
Fix DeprecationWarning on import, switch to hatchling build system#128
Conversation
Codecov Report
@@ Coverage Diff @@
## main #128 +/- ##
==========================================
+ Coverage 65.27% 65.29% +0.01%
==========================================
Files 17 17
Lines 1846 1841 -5
==========================================
- Hits 1205 1202 -3
+ Misses 641 639 -2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Need this to keep `dscim.__version__`.
kemccusker
approved these changes
Aug 10, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the DeprecationWarning about the
pkg_resourcespackage whendscimis imported. The warning comes from the system used to get the package version intodscim.__version__. With this fix, the version info is written tosrc/dscim/_version.pywhenever the package is built by hatchling, andsrc/dscim/__init__.py.doesfrom dscim._version import __version__and that's it.This switches the build system from
setuptoolstohatchling. This is an internal change. Generally, people shouldn't notice this change. We prob would have switched build systems at some point anyways so might as well do it here.Close #112