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

feat: Drop support for Python 3.8 [ES-8947] #1893

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

favilo
Copy link
Contributor

@favilo favilo commented Nov 14, 2024

This will allow us to make some long desired tech debt changes in the future.

@favilo favilo requested a review from a team November 14, 2024 19:06
@gbanasiak
Copy link
Contributor

@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
Copy link
Member

@pquentin pquentin left a 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 in docs/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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Member

@pquentin pquentin Nov 21, 2024

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:

Suggested change
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']
Copy link
Member

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?

Suggested change
target-version = ['py39', 'py310', 'py311']
target-version = ['py39', 'py310', 'py311', 'py312']

Copy link
Contributor Author

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

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.

3 participants