Skip to content

Fixes categorized package data for packaging drop of LegacyVersion #26

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

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

nezhar
Copy link
Owner

@nezhar nezhar commented Dec 12, 2022

This is a fix in order to be compatible with packaging and the drop of LegacyVersion introduced in 22.0. The package now alows only versions compatible with PEP 440.

Without this fix, the package would have problems parsing releases such as https://pypi.org/project/pytz/2004d/

  File "/usr/local/lib/python3.7/site-packages/updatable/utils.py", line 251, in get_package_update_list
    categorized_package_data = get_categorized_package_data(package_data, package_version)
  File "/usr/local/lib/python3.7/site-packages/updatable/utils.py", line 89, in get_categorized_package_data
    parsed_release = parse(release)
  File "/usr/local/lib/python3.7/site-packages/packaging/version.py", line 52, in parse
    return Version(version)
  File "/usr/local/lib/python3.7/site-packages/packaging/version.py", line 197, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '2004d'

@nezhar nezhar merged commit e10c6e3 into master Dec 12, 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.

1 participant