-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 support for Python 3.7 #10009
Drop support for Python 3.7 #10009
Conversation
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
This updates our documentation and build processes to set Python 3.8 as the oldest support version of Python, consistent with our policy on Python support. This commit also removes remaining Python-version gating, since we were principally using this to account for differences between 3.7 and 3.8. Several backport packages are no longer required for any suppported Python version, because of this change.
Heh, we've entered the domain where no supported version of python will run multiprocessing on macOS by default, and that's causing a test to fail: https://dev.azure.com/qiskit-ci/qiskit-terra/_build/results?buildId=45813&view=logs&j=80763036-ed5e-5d3e-143d-8ae8edc29f03&t=0b590cc4-1220-55fc-f610-714bdf68abc8&l=23469 |
With Python 3.7 support now dropped, there are no versions of Python on macOS that we expect to support with multiprocessing again. There's no guarantee that the hypothetical Python 10.11 (???) that this test was previously checking would be any more valid than existing versions.
Yeah, that test was testing that we said we'd support Python 10.11?? Pretty odd. I've removed the test in 1140a03. |
Just out of curiosity I ran |
Yeah, I just tried that. A bunch of its changes actually look not totally related to Python 3.8 - there's a lot of stuff like removing quotes from delayed annotations in files that already have |
Pull Request Test Coverage Report for Build 4894490478
💛 - Coveralls |
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.
This LGTM, thanks for doing this. I think we should probably hold off on merging this until after the final 0.24.0 release though, just in case there is a potential version issue during the 2 weeks of overlap while we're developing for both releases at the same time.
I'm fine doing that, although technically we're developing 0.24 throughout its entire lifecycle, so there'd still be overlap. There is more risk during the rc period, though, for sure. |
* Drop support for Python 3.7 This updates our documentation and build processes to set Python 3.8 as the oldest support version of Python, consistent with our policy on Python support. This commit also removes remaining Python-version gating, since we were principally using this to account for differences between 3.7 and 3.8. Several backport packages are no longer required for any suppported Python version, because of this change. * Remove test for multiprocessing on Mac With Python 3.7 support now dropped, there are no versions of Python on macOS that we expect to support with multiprocessing again. There's no guarantee that the hypothetical Python 10.11 (???) that this test was previously checking would be any more valid than existing versions. --------- Co-authored-by: Matthew Treinish <[email protected]>
* Drop support for Python 3.7 This updates our documentation and build processes to set Python 3.8 as the oldest support version of Python, consistent with our policy on Python support. This commit also removes remaining Python-version gating, since we were principally using this to account for differences between 3.7 and 3.8. Several backport packages are no longer required for any suppported Python version, because of this change. * Remove test for multiprocessing on Mac With Python 3.7 support now dropped, there are no versions of Python on macOS that we expect to support with multiprocessing again. There's no guarantee that the hypothetical Python 10.11 (???) that this test was previously checking would be any more valid than existing versions. --------- Co-authored-by: Matthew Treinish <[email protected]>
* Drop support for Python 3.7 This updates our documentation and build processes to set Python 3.8 as the oldest support version of Python, consistent with our policy on Python support. This commit also removes remaining Python-version gating, since we were principally using this to account for differences between 3.7 and 3.8. Several backport packages are no longer required for any suppported Python version, because of this change. * Remove test for multiprocessing on Mac With Python 3.7 support now dropped, there are no versions of Python on macOS that we expect to support with multiprocessing again. There's no guarantee that the hypothetical Python 10.11 (???) that this test was previously checking would be any more valid than existing versions. --------- Co-authored-by: Matthew Treinish <[email protected]>
* Drop support for Python 3.7 This updates our documentation and build processes to set Python 3.8 as the oldest support version of Python, consistent with our policy on Python support. This commit also removes remaining Python-version gating, since we were principally using this to account for differences between 3.7 and 3.8. Several backport packages are no longer required for any suppported Python version, because of this change. * Remove test for multiprocessing on Mac With Python 3.7 support now dropped, there are no versions of Python on macOS that we expect to support with multiprocessing again. There's no guarantee that the hypothetical Python 10.11 (???) that this test was previously checking would be any more valid than existing versions. --------- Co-authored-by: Matthew Treinish <[email protected]>
Summary
This updates our documentation and build processes to set Python 3.8 as the oldest support version of Python, consistent with our policy on Python support.
This commit also removes remaining Python-version gating, since we were principally using this to account for differences between 3.7 and 3.8. Several backport packages are no longer required for any suppported Python version, because of this change.
Details and comments
New niceties that are now valid for inclusion in Terra:
assignment expressions using
:=
(the walrus operator). Use these sparingly; it's easy to write illegible code with them that technically passes the style check. The archetypal clean usage of it is for checking a variable that's created and only used within theif
branch, likepositional-only parameters in functions. These arguments cannot be passed as keyword arguments. When there's no reason that an argument should be passed as a keyword at all, it's a good idea to use this, because it means that the name of that variable isn't leaked into the public API, so changing its name doesn't need any deprecations (for example if the accepted types / objects are going to expand, and the original name doesn't make sense any more).
You can also use positional-only keyword arguments to allow a function that takes
**kwargs
to accept any name:The Python 3.8+ standard library uses lots of these, as do extension modules. They're often a good idea.
Lots of parts of the
typing
module are now available without needing the backporttyping_extensions
importlib.metadata
is available without its backportimportlib_metadata
Two additions to
functools
are now stabilised (cached_property
andsingledispatchmethod
) (andlru_cache
no longer needs amaxsize
explicitly setting)multiprocessing.shared_memory
is now available.