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

Make version-checking compatible with updated Packaging library. #62

Merged
merged 1 commit into from
Dec 16, 2022

Conversation

avnishks
Copy link
Contributor

Recently the packaging library removed the LegacyVersion class [1]. This has resulted in Neurite's setup.py script throwing the following error at installation time:
AttributeError: module 'packaging.version' has no attribute 'LegacyVersion'

Proposed fix:
Instead of checking if the (parsed) version string is a LegacyVersion object, use the packaging.version.parse(version) function to parse the version string and catch any InvalidVersion exception. If an exception is raised, then its not a valid version string according to the PEP 440 specification.

[1] pypa/packaging#530

@ahoopes ahoopes merged commit 152368b into adalca:dev Dec 16, 2022
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