-
Notifications
You must be signed in to change notification settings - Fork 313
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
feat: Drop support for Python 3.8 [ES-8947] #1893
base: master
Are you sure you want to change the base?
Conversation
@favilo I've removed 3.8 from required checks in GH branch protections to unblock this PR. |
This will allow us to make some long desired tech debt changes in the future.
- Install black as dev dependency - format esrally/utils/net.py, since black's new configuration didn't like the old one. - Fix doc warning in docs/migrate.rst
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.
Thanks!
- Should we suggest using a more recent version of Python in the
docker run
command indocs/docker.rst
? - Should we remove the
remove_prefix
function in esrally/driver/runner.py? - Should we switch to
--py39-plus
in.pre-commit-config.yml
? - Is there a specific setup to do on the night-rally environments?
Minimum Python version is 3.9.0 | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Rally 2.12.0 requires Python 3.9.0. Check the :ref:`updated installation instructions <install_python>` for more details. |
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.
Rally 2.12.0 requires Python 3.9.0. Check the :ref:`updated installation instructions <install_python>` for more details. | |
Rally 2.12.0 requires Python 3.9.0 or above. Check the :ref:`updated installation instructions <install_python>` for more details. |
@@ -73,8 +73,8 @@ | |||
|
|||
|
|||
def check_python_version(): | |||
if sys.version_info.major != 3 or sys.version_info.minor < 8: | |||
raise RuntimeError("Rally requires at least Python 3.8 but you are using:\n\nPython %s" % str(sys.version)) | |||
if sys.version_info.major != 3 or sys.version_info.minor < 9: |
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.
Not related to the pull request, but this can be simplified as sys.version_info
is a named tuple:
if sys.version_info.major != 3 or sys.version_info.minor < 9: | |
if sys.version_info < (3, 9): |
@@ -138,7 +139,7 @@ esrallyd = "esrally.rallyd:main" | |||
|
|||
[tool.black] | |||
line-length = 140 | |||
target-version = ['py38'] | |||
target-version = ['py39', 'py310', 'py311'] |
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.
TIL that all supported versions should be included. Which means Python 3.12 should be there too?
target-version = ['py39', 'py310', 'py311'] | |
target-version = ['py39', 'py310', 'py311', 'py312'] |
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.
That wasn't recognized as a valid target when I originally tried it, however, I would guess we could get it to work by upgrading the version of black we have installed
This will allow us to make some long desired tech debt changes in the future.
make check-all
successfully?