-
Notifications
You must be signed in to change notification settings - Fork 165
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
Add pre-commit pypgrade hook and update supported versions #124
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Would you mind setting this up as a pre-commit hook? I just checked the link you shared and it has support for it https://github.com/asottile/pyupgrade#as-a-pre-commit-hook. Would be nice to have all following commits respect this same style. Please test this manually.
Side note: I think adding the python_requires
line can be considered a breaking change, since even if those version should no longer be used, people can still be using them and thus they won't be able to migrate to this next version.
Yes, I'll add the pre-commit hook. Shall I remove the |
Here's a test after
Add something that would fail pyupgrade:
diff --git a/setup.py b/setup.py
index dc7ba8a..afb41f4 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ def find_version():
setup(
name='auth0-python',
version=find_version(),
- description='Auth0 Python SDK',
+ description='Auth0 Python SDK {0}'.format(123),
author='Auth0',
author_email='support@auth0.com',
license='MIT',
diff --git a/setup.py b/setup.py
index afb41f4..1e41f7b 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ def find_version():
setup(
name='auth0-python',
version=find_version(),
- description='Auth0 Python SDK {0}'.format(123),
+ description='Auth0 Python SDK {}'.format(123),
author='Auth0',
author_email='support@auth0.com',
license='MIT', Now try and commit again:
Success! 🎆 |
@hugovk Thanks for all the details. ✨ I'd like to review the security issue introduced with this Regarding |
… to still install for those versions
Something like the last two commits?
Because those don't mean that Python 2.0 and 3.0 are supported, but that at least one 2.x and 3.x versions are supported. For example, the most-downloaded package pip has these classifiers: "Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7", But I can remove them if you like. |
@hugovk Yup. All good. Security has approved the PR as well. Thanks for the changes 👍 |
They're also little used.
Upgrade Python syntax with pyupgrade https://github.com/asottile/pyupgrade
Fix flake8 warnings