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

drop python<=3.7 support #71

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

kloczek
Copy link

@kloczek kloczek commented Mar 9, 2024

According to https://endoflife.date/python python 3.7 support has been EOSed 27 Jun 2023.
Pass all code over pyupgrade --py38.

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]>
@kloczek kloczek changed the title from python<=3.7 support drom python<=3.7 support Mar 9, 2024
@kloczek kloczek changed the title drom python<=3.7 support drop python<=3.7 support Mar 9, 2024
@laurent-laporte-pro
Copy link
Owner

I know, it's crazy, but I don't want to drop support for old versions of Python in the '1.2.x' version.
Can you consider rebasing your branch on the develop branch?

@kloczek
Copy link
Author

kloczek commented Nov 14, 2024

OK I understand .. please let me know if you will make decision about this PR.

@laurent-laporte-pro laurent-laporte-pro changed the base branch from master to develop November 15, 2024 15:04
@laurent-laporte-pro laurent-laporte-pro changed the base branch from develop to master November 15, 2024 15:04
@laurent-laporte-pro laurent-laporte-pro changed the base branch from master to develop November 15, 2024 15:06
Copy link
Owner

@laurent-laporte-pro laurent-laporte-pro left a 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)

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.

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