-
Notifications
You must be signed in to change notification settings - Fork 1.5k
drop python<=3.7 support #6459
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
base: main
Are you sure you want to change the base?
drop python<=3.7 support #6459
Conversation
Accordint to https://endoflife.date/python python 3.7 as been EOSed 27 Jun 2023. Fileter all python code over `pupgrade --py38-plus'. Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
Mostly drops unused impors and other automated cleanups. Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
|
Thanks for your contribution. We are intentionally supporting those EOL Python versions. The oldest platform we are targeting is Ubuntu 16.04 and that comes with Python 3.5. But there are some modernization in these changes which could be applied as they are supported by that version. Also there are some changes I do not like in general which I will comment on separately. |
| all_files = args.dumpfile | ||
| if args.file_list: | ||
| with open(args.file_list, 'rt') as f: | ||
| with open(args.file_list) as f: |
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.
I do not like this at all. This should be explicitly specified for various reasons.
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.
I was considering adding pyupgrade to the CI but the open() thing still irked me.
And then I came across asottile/pyupgrade#714.
Given the attitude of the author I will refrain from integrating that tool and would also be reluctant to accept changes which are based on it. Such behavior should be not supported...
| # dumpfile ends with ".dump" | ||
| ctu_info_file = dumpfile[:-4] + "ctu-info" | ||
| with open(ctu_info_file, 'at') as f: | ||
| with open(ctu_info_file, 'a') as f: |
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.
Same as above. "text" vs "binary" might be important in some cases so that should be explicitly stated.
|
An additional note - the CI passes because we are not testing all the parts on those older platform. That was done in the |
|
See #3596 about properly fixating, testing and documenting the targeted platforms. |
Using latest cppcheck on so old version does not make to much sense. |
That is exactly why we need to support it, because people have to do their own build to get the latest version. This could also be mitigated by offering something like an up-to-date (and especially official) Snapcraft package but that is not available on all distros. |
|
What is Also we still support Python 2.7. But that will be removed in 2.16 so we cannot make any changes until then. |
Yes .. typo.
AFAIK there is no even single still supported distro which still uses python 2.7. |
We still had CentOS 7 support a while ago. And we are very few people some things might not be taken care of so Python 2.7 wasn't deprecated until recently. I think most of these changes can also be detected by |
|
Please check which one version of the |
Accordint to https://endoflife.date/python python 3.7 as been EOSed 27 Jun 2023.
Fileter all python code over `pupgrade --py38-plus'.