-
Notifications
You must be signed in to change notification settings - Fork 34
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
drop python<=3.7 support #71
base: develop
Are you sure you want to change the base?
Conversation
According to https://endoflife.date/python python 3.7 support has been EOSed 27 Jun 2023. Pass all code over `pyupgrade --py38`. Signed-off-by: Tomasz Kłoczko <[email protected]>
Signed-off-by: Tomasz Kłoczko <[email protected]>
I know, it's crazy, but I don't want to drop support for old versions of Python in the '1.2.x' version. |
OK I understand .. please let me know if you will make decision about this PR. |
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.
Can you change string_types
to str
?
You should also update the project metadata. In particular, older versions of Python should be removed from the classifiers
section of the setup.py
file.
Of course, you'll also need to update the documentation: a good rereading is necessary. In particular, there's the introductory sentence in the `installation.rst' document. I'm sure there are other places to correct...
@@ -29,7 +28,7 @@ | |||
else: | |||
_class_stacklevel = 3 | |||
|
|||
string_types = (type(b''), type(u'')) | |||
string_types = (bytes, str) |
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.
With Python 2.7, it was common practice to use a definition such as string_types = (bytes, str)
to manage str
and byte
arrays. However, this backward compatibility is no longer necessary, as Python 3 has clearly differentiated between str
(Unicode text) and bytes
(binary data).
To modernize the code, we should eliminate string_types
and use str
directly.
According to https://endoflife.date/python python 3.7 support has been EOSed 27 Jun 2023.
Pass all code over
pyupgrade --py38
.