8000 Made it compatible with Python 3.12 and above by invictusaman · Pull Request #4 · csyezheng/coursera-helper · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Made it compatible with Python 3.12 and above #4

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

invictusaman
Copy link
@invictusaman invictusaman commented Oct 23, 2024

Proposed changes

This pull request updates the version comparison method from distutils.version.LooseVersion to packaging.version.Version. This change is necessary because distutils is deprecated in Python 3.10 and removed in Python 3.12. The packaging library provides a more robust and maintained solution for version comparison.

Additionally, I've added packaging>=24.1 to the requirements.txt file to ensure the new dependency is properly installed.

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask. We're here
to help! This is simply a reminder of what we are going to look for before
merging your code.

  • I have read the CONTRIBUTING doc
  • I agree to contribute my changes under the project's LICENSE
  • I have checked that the unit tests pass locally with my changes
  • I have checked the style of the new code (lint/pep).
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

This change is a proactive measure to ensure the project's compatibility with Python versions 3.12 and above and to use a more maintained library for version comparison. The packaging library is widely used and recommended for version parsing and comparison tasks.

@invictusaman
Copy link
Author

This change ensures compatibility with future Python versions and aligns with best practices for version handling in Python projects.

@invictusaman invictusaman changed the title Made it compatible with Python 3.13.0 Made it compatible with Python 3.12 and above Oct 23, 2024
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
0