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

Python compat path removal based on Django’s PY* constants #289

Open
adamchainz opened this issue Nov 5, 2022 · 0 comments
Open

Python compat path removal based on Django’s PY* constants #289

adamchainz opened this issue Nov 5, 2022 · 0 comments

Comments

@adamchainz
Copy link
Owner

Description

Django has private constants for Python version:

https://github.com/django/django/blob/84206607d6bfd61e7f7a88b51163ffd4153e3b5a/django/utils/version.py#L9-L18

We could copy pyupgrade’s old version removal feature for these constants.

Taking an extra argument with the target Python version might be a bit of feature creep. Perhaps we could instead take the minimum supporte Python version from the target Django version (each Django version’s release notes lists the supported Python version, we’d need that data in django-upgrade).

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

No branches or pull requests

1 participant