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

Support Pint 0.20 and Pint 0.21 #74

Merged
merged 1 commit into from
Aug 14, 2023
Merged

Conversation

quentinmit
Copy link
Contributor

Pint 0.20 removes the (unsupported) pint.unit and pint.converters packages. Pint 0.21 adds a native percent unit.

This PR checks if the percent unit exists, and defines it in a Pint 0.19+0.20-compatible way if it does not.

BTW, in general you shouldn't use == version dependencies in a library like this, because it can conflict with downstream users of the library. Only end-user apps should have exact version dependencies.

@natekspencer
Copy link
Collaborator

This PR checks if the percent unit exists, and defines it in a Pint 0.19+0.20-compatible way if it does not.

Awesome, thanks!

BTW, in general you shouldn't use == version dependencies in a library like this, because it can conflict with downstream users of the library. Only end-user apps should have exact version dependencies.

Where are you seeing a == version constraint?

@natekspencer natekspencer merged commit 663605f into briis:main Aug 14, 2023
4 checks passed
@quentinmit
Copy link
Contributor Author

BTW, in general you shouldn't use == version dependencies in a library like this, because it can conflict with downstream users of the library. Only end-user apps should have exact version dependencies.

Where are you seeing a == version constraint?

Sorry, I should have said "^ version dependencies with a minor version" instead of just ==. Basically, the previous Pint = "^0.19" meant that it couldn't be used with any other minor version of Pint. In this case 0.20 wasn't compatible without this patch, but in general that won't be the case and the ^ dependency will be the only thing stopping someone from combining this library with other code that wants a newer version of Pint/another library.

@natekspencer
Copy link
Collaborator

Ahh thanks for the clarification, and yeah that makes sense!

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.

2 participants