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

Make Python 3.8 the new default #2299

Merged
merged 4 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/setup-defaults.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

version=${1:-3.7.15}
version=${1:-3.8.17}

# To install pyenv and virtualenv plugin
function install_pyenv(){
Expand Down
2 changes: 1 addition & 1 deletion dev/venv-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../

version=${1:-3.7.15}
version=${1:-3.8.17}

# Check if the directory for the Python version does not exist and if so,
# install the right Python version through pyenv
Expand Down
2 changes: 1 addition & 1 deletion dev/venv-delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
set -e
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../

version=${1:-3.7.15}
version=${1:-3.8.17}

pyenv uninstall -f flower-$version
2 changes: 1 addition & 1 deletion dev/venv-reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../

version=${1:-3.7.15}
version=${1:-3.8.17}

# Delete caches, venv, and lock file
./dev/rm-caches.sh
Expand Down
8 changes: 4 additions & 4 deletions doc/locales/fr/LC_MESSAGES/framework-docs.po
Original file line number Diff line number Diff line change
Expand Up @@ -1971,24 +1971,24 @@ msgid ""
"Second, create a virtual environment (and activate it). If you chose to "
"use :code:`pyenv` (with the :code:`pyenv-virtualenv` plugin) and already "
"have it installed , you can use the following convenience script (by "
"default it will use :code:`Python 3.7.15`, but you can change it by "
"default it will use :code:`Python 3.8.17`, but you can change it by "
"providing a specific :code:`<version>`)::"
msgstr ""
"Deuxièmement, créer un environnement virtuel (et l'activer). Si vous "
"choisissez d'utiliser :code:`pyenv` (avec le plugin :code:`pyenv-virtualenv`)"
" et que vous l'avez déjà installé, vous pouvez utiliser le script suivant ("
"par défaut il utilisera:code:`Python 3.7.15`, mais vous pouvez le changer en "
"par défaut il utilisera:code:`Python 3.8.17`, mais vous pouvez le changer en "
charlesbvll marked this conversation as resolved.
Show resolved Hide resolved
"fournissant une :code:`<version>` spécifique)::"

#: ../../source/contributor-tutorial-get-started-as-a-contributor.rst:33
msgid ""
"If you don't have :code:`pyenv` installed, you can use the following "
"script that will install pyenv, set it up and create the virtual "
"environment (with :code:`Python 3.7.15` by default)::"
"environment (with :code:`Python 3.8.17` by default)::"
msgstr ""
"Si vous n'avez pas :code:`pyenv` installé, vous pouvez utiliser le script "
"suivant qui l'installera, le configurera et créera l'environnement virtuel ("
"avec :code:`Python 3.7.15` par défaut)::"
"avec :code:`Python 3.8.17` par défaut)::"

#: ../../source/contributor-tutorial-get-started-as-a-contributor.rst:39
msgid ""
Expand Down
14 changes: 7 additions & 7 deletions doc/source/contributor-how-to-set-up-a-virtual-env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ You can follow the instructions or choose your preferred setup.
Python Version
--------------

Flower requires `Python 3.7 <https://docs.python.org/3.7/>`_ or above, we recommend `Python 3.8 <https://docs.python.org/3.8/>`_.
Flower requires at least `Python 3.8 <https://docs.python.org/3.8/>`_, but `Python 3.10 <https://docs.python.org/3.10/>`_ or above is recommended.

Virutualenv with Pyenv/Virtualenv
---------------------------------

One of the recommended virtual environment is `pyenv <https:/pyenv/pyenv>`_/`virtualenv <https:/pyenv/pyenv-virtualenv>`_. Please see `Flower examples <https:/adap/flower/tree/main/examples/>`_ for details.

Once Pyenv is set up, you can use it to install `Python Version 3.7 <https://docs.python.org/3.7/>`_ or above:
Once Pyenv is set up, you can use it to install `Python Version 3.10 <https://docs.python.org/3.10/>`_ or above:

.. code-block:: shell

pyenv install 3.7.13
pyenv install 3.10.12

Create the virtualenv with:

.. code-block:: shell

pyenv virtualenv 3.7.13 flower-3.7.13
pyenv virtualenv 3.10.12 flower-3.10.12


Activate the virtualenv by running the following command:

.. code-block:: shell

echo flower-3.7.13 > .python-version
echo flower-3.10.12 > .python-version


Virtualenv with Poetry
Expand All @@ -58,13 +58,13 @@ If you prefer to use Anaconda for your virtual environment then install and setu

.. code-block:: shell

conda create -n flower-3.7.13 python=3.7.13
conda create -n flower-3.10.12 python=3.10.12

and activate the virtual environment with:

.. code-block:: shell

conda activate flower-3.7.13
conda activate flower-3.10.12


And then?
Expand Down
Copy link
Member

Choose a reason for hiding this comment

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

Should we also update line 7 in this file?

Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ GitHub::

Second, create a virtual environment (and activate it). If you chose to use
:code:`pyenv` (with the :code:`pyenv-virtualenv` plugin) and already have it installed
, you can use the following convenience script (by default it will use :code:`Python 3.7.15`,
, you can use the following convenience script (by default it will use :code:`Python 3.8.17`,
but you can change it by providing a specific :code:`<version>`)::

$ ./dev/venv-create.sh <version>

If you don't have :code:`pyenv` installed,
you can use the following script that will install pyenv,
set it up and create the virtual environment (with :code:`Python 3.7.15` by default)::
set it up and create the virtual environment (with :code:`Python 3.8.17` by default)::

$ ./dev/setup-defaults.sh <version>

Expand All @@ -55,8 +55,8 @@ Create/Delete Virtual Environment

::

$ ./dev/venv-create.sh <version> # Default is 3.7.15
$ ./dev/venv-delete.sh <version> # Default is 3.7.15
$ ./dev/venv-create.sh <version> # Default is 3.8.17
$ ./dev/venv-delete.sh <version> # Default is 3.8.17

Compile ProtoBuf Definitions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion doc/source/how-to-install-flower.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Install Flower
Python version
--------------

Flower requires at least `Python 3.7 <https://docs.python.org/3.7/>`_, but `Python 3.8 <https://docs.python.org/3.7/>`_ or above is recommended.
Flower requires at least `Python 3.8 <https://docs.python.org/3.8/>`_, but `Python 3.10 <https://docs.python.org/3.10/>`_ or above is recommended.


Install stable release
Expand Down
2 changes: 1 addition & 1 deletion doc/source/ref-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

### Incompatible changes

- **Remove support for Python 3.7** ([#2280](https:/adap/flower/pull/2280))
- **Remove support for Python 3.7** ([#2280](https:/adap/flower/pull/2280), [#2299](https:/adap/flower/pull/2299))

Python 3.7 support was deprecated in Flower 1.5, and this release removes support. Flower now requires Python 3.8.

Expand Down
Loading