-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support Python 3.12+ as well as switching to the latest pint #11
Conversation
In python 3.12 these are now Syntax Errors instead of Deprecation warnings.
…that come with pint.
…a unify dash. The tests previously weren't working correctly. Specifically when doing Quantity('-123') with a unify dash, pint would actually return the Quantity('123'). The test doesn't catch this, as the test is effectively doing Quantity($input) == Quantity($input). With Python 3.12, the internals of Quantity changed, to explictly reject unify dashes, instead of silently skipping them.
In pint 0.21 ppm was officially added, named ppm, instead of parts_per_million.
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.
Look good! Thanks for the fix!
@@ -10,7 +10,7 @@ jobs: | |||
runs-on: ubuntu-latest | |||
strategy: | |||
matrix: | |||
python-version: ["3.7", "3.10", "3.11"] | |||
python-version: ["3.8", "3.10", "3.11"] |
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.
Should 3.12 be added to the list?
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.
Yes, I will add it to a new PR that I have coming
unit_parse did not work with Python 3.12 (due to #9 / hgrecco/pint#1974), which required bumping to the latest version of Pint.
I made appropriate changes, and ensured all tests continue to pass.
Fixes #9