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

Avoid distutils deprecation warning + a few other small fixes #32

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

chromy
Copy link

@chromy chromy commented Apr 8, 2023

Hi! Thanks for the library it is very useful 😃

Recently in my code I have started getting the following warnings:

.env/lib/python3.11/site-packages/money/money.py:24
<...>/.env/lib/python3.11/site-packages/money/money.py:24: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    BABEL_VERSION = StrictVersion(babel.__version__)

This PR updates the code to use packaging.version if it is available avoiding the warning. Also while I had the code there I fixed a few other tests and formatting issues.

The three commits are:

Happy to split them into separate PRs if that would be better.

Cheers!
Hector

Using distutils.StrictVersion now results in ugly warnings:

DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.

Use the suggested replacement if possible.
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.

1 participant