-
Notifications
You must be signed in to change notification settings - Fork 36.5k
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
Bump minimum python version to 3.7 #26226
The head ref may contain hidden characters: "2210-py37-\u{1F510}"
Conversation
Concept ACK, Python 3.6 had EOL 23 Dec 2021. https://endoflife.date/python |
0e5f637
to
de4ffcf
Compare
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
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.
Concept ACK
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.
Concept ACK modulo #26226 (comment)
It would be useful to include a build system release note when dependencies like this are updated, rather than leaving it hidden among the change-log sea; but that's aside this pr.
Concept ACK for 25.x |
fa0a0bb
to
19361d0
Compare
EOL of python shouldn't affect us, as we only use it to run the tests. Though, operating systems that ship with it going EOL would affect us. |
I don't get the argument to do this now when nothing has changed since #24017... |
No strong opinions. Paging @luke-jr. |
Right, there is no rush, so I guess I better close this. It just has to be done at some point in the future and I thought having a working patch couldn't hurt. |
Thanks. I did take a look at this the other day. My notes are that 3.6 was for RHEL, but it appears RHEL has since moved on. Personally, 3.6 is slightly more convenient to me since I have no easy way to get 3.7 anymore for testing (nor 3.6, but it's already installed) - Gentoo's oldest is 3.8. But I can adapt if need be. |
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.
Concept ACK
@@ -12,7 +12,7 @@ | |||
|
|||
def git_grep(params: [], error_msg: ""): | |||
try: | |||
output = subprocess.check_output(["git", "grep", *params], universal_newlines=True, encoding="utf8") | |||
output = subprocess.check_output(["git", "grep", *params], text=True, encoding="utf8") |
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 think encoding
is now unnecessary to specify in this line (and many others below) because text
ensures stdout is a string and strings in Python 3 are by default unicode.
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.
Heh, no. This only changed in Python 3.7, see https://docs.python.org/3/library/os.html#utf8-mode
I guess text
/universal_newlines
is not needed when specifying encoding
, so might as well remove them completely.
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.
Why wouldn't they be needed? Windows still has non-standard newlines.
Closing for now until there is a more pressing reason |
I hereby volunteer to provide the code necessary to generate a container sufficient to run the functional tests for anyone both (i) yelling and (ii) running an ancient version of Python. :) |
Right, Ubuntu Bionic will be EOL before the next release anyway. Centos Stream 8 runs until May 31st, 2024 , but they can install |
(Force pushed minimum to 3.7.16 and "maximum" to 3.12) |
The ci/lint system is separate from the ci/test system, so you should be able to get a test failure by reverting the image or packages in ci/test |
ACK fa1dbe0 |
This reverts commit be59bd1 because the changes are no longer needed.
-BEGIN VERIFY SCRIPT- sed -i 's/universal_newlines/text/g' $(git grep -l universal_newlines) -END VERIFY SCRIPT-
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.
ACK fa8fe5b
ACK fa8fe5b Looks ready to go to me! |
As a follow-up I'm betting we can drop all the changes that use |
No, we also need git2.34 or later, which is only shipped in Ubuntu Jammy |
Post merge ACK. FWIW my version of |
|
While there is nothing that requires a bump, it may require less maintenance to drop python3.6 support. Python3.7 is available through the package manager on all currently supported operating systems.