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

feat: Improve version checking for cvdupdate package #67

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

steve-mays
Copy link

@steve-mays steve-mays commented Nov 20, 2024

Adressess #66.

Retrieve the latest cvdupdate package version directly from PyPI using
the JSON API (https://pypi.org/pypi/cvdupdate/json) for more robust
and accurate comparisons.

This change also removes the dependency on the deprecated
pkg_resources module, replacing it with the recommended
importlib.metadata module.

This change also reorders the imports to improve readability.

These improvements enhance the reliability of version checking and
ensure compatibility with future Python releases.

Use of pkg_resources is deprecated in favor of importlib.resources, importlib.metadata and their backports (importlib_resources, importlib_metadata).

refactor: Reorder of imports to improve readability.
Retrieve the latest cvdupdate package version directly from PyPI using
the JSON API (`https://pypi.org/pypi/cvdupdate/json`) for more robust
and accurate comparisons.

This change also removes the dependency on the deprecated
`pkg_resources` module, replacing it with the recommended
`importlib.metadata` module.

This change also reorders the imports to improve readability.

These improvements enhance the reliability of version checking and
ensure compatibility with future Python releases.
Copy link
Contributor

@micahsnyder micahsnyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow this looks great. I just tested it and it worked nicely as well.

Thank you for the help!

@micahsnyder
Copy link
Contributor

@steve-mays Our org mandated commit signing so I'm unable to merge it as-is. Would you like to sign the commits? Alternatively, I can do it for you. I wanted to ask before I did so.

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