-
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
Bump minimum Python version to 3.8 #934
Merged
danielmitterdorfer
merged 4 commits into
elastic:master
from
danielmitterdorfer:drop-py-36
Mar 23, 2020
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{ | ||
"python_versions": { | ||
"PY38": "3.8.0", | ||
"PY37": "3.7.5", | ||
"PY36": "3.6.9" | ||
"PY37": "3.7.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,35 +13,29 @@ Prerequisites | |
|
||
Rally does not support Windows and is only actively tested on MacOS and Linux. Install the following packages first. | ||
|
||
.. _install_python: | ||
|
||
Python | ||
~~~~~~ | ||
|
||
* Python 3.6 or better available as `python3` on the path. Verify with: ``python3 --version``. | ||
* Python 3.7 or better available as ``python3`` on the path. Verify with: ``python3 --version``. | ||
* Python3 header files (included in the Python3 development package). | ||
* ``pip3`` available on the path. Verify with ``pip3 --version``. | ||
|
||
**Debian / Ubuntu** | ||
|
||
:: | ||
|
||
sudo apt-get install gcc python3-pip python3.6-dev | ||
|
||
|
||
**RHEL / CentOS 6 and 7** | ||
|
||
Please refer to the `installation instructions for Python 3.6 in the Red Hat Software Collections <https://www.softwarecollections.org/en/scls/rhscl/rh-python36/>`_. | ||
We recommend to use `pyenv <https://github.com/pyenv/pyenv>`_ to manage installation of Python. For details refer to their `installation instructions <https://github.com/pyenv/pyenv#installation>`_ and `ensure that all of pyenv's prerequisites are installed <https://github.com/pyenv/pyenv/wiki/common-build-problems#prerequisites>`_. | ||
|
||
**Amazon Linux** | ||
Once ``pyenv`` is installed, install a compatible Python version:: | ||
|
||
:: | ||
|
||
sudo yum install -y gcc python3-pip.noarch python3-devel.x86_64 | ||
|
||
**MacOS** | ||
# Install Python | ||
pyenv install 3.8.0 | ||
|
||
We recommend that you use `Homebrew <https://brew.sh/>`_:: | ||
# select that version for the current user | ||
# see https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-global for details | ||
pyenv global 3.8.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Initially I wondered if this is too invasive i.e. will change the default version of Python for the user leading to surprises. However, as these instructions are targeted also for released versions, I think this is ok. Otherwise we'd suggest something like:
|
||
|
||
brew install python3 | ||
# Install pip3 | ||
curl -s https://bootstrap.pypa.io/get-pip.py -o get-pip.py | ||
python3 get-pip.py --user | ||
|
||
git | ||
~~~ | ||
|
@@ -104,7 +98,7 @@ Non-sudo Install | |
If you don't want to use ``sudo`` when installing Rally, installation is still possible but a little more involved: | ||
|
||
1. Specify the ``--user`` option when installing Rally (step 2 above), so the command to be issued is: ``python3 setup.py develop --user``. | ||
2. Check the output of the install script or lookup the `Python documentation on the variable site.USER_BASE <https://docs.python.org/3.5/library/site.html#site.USER_BASE>`_ to find out where the script is located. On Linux, this is typically ``~/.local/bin``. | ||
2. Check the output of the install script or lookup the `Python documentation on the variable site.USER_BASE <https://docs.python.org/3/library/site.html#site.USER_BASE>`_ to find out where the script is located. On Linux, this is typically ``~/.local/bin``. | ||
|
||
You can now either add ``~/.local/bin`` to your path or invoke Rally via ``~/.local/bin/esrally`` instead of just ``esrally``. | ||
|
||
|
@@ -119,13 +113,6 @@ You can also use Virtualenv to install Rally into an isolated Python environment | |
|
||
Whenever you want to use Rally, run the activation script (step 2 above) first. When you are done, simply execute ``deactivate`` in the shell to exit the virtual environment. | ||
|
||
PyEnv Install | ||
------------------ | ||
|
||
Rally can be tested with different Python versions and it uses pyenv to manage them. | ||
|
||
Please refer to PyEnv `installation instructions <https://github.com/pyenv/pyenv#installation>`_. | ||
|
||
Docker | ||
------ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should we mention specifically the system package prerequisites(for compiling python) as mandatory? These are listed nicely here: https://github.com/pyenv/pyenv/wiki/common-build-problems#prerequisites
Without the packages present, one can hit issues like:
which are a bit hard to diagnose.
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 pondered doing this but this is also linked from Pyenv's installation instructions which is the reason I thought of not replicating it here. But you have a point...
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.
addressed in 60193d8
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. I'd personally emphasize with bold as below, but it's a personal preference (to ensure maximum visibility for users)
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.
Addressed in 726f890.