Skip to content

Commit

Permalink
[Merge after v2.11.0 Release] Retire support for Python 3.9 (#3683)
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriupredoi authored Jul 10, 2024
1 parent 9633fbe commit e83ba66
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 50 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/install-from-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: conda-incubator/setup-miniconda@v3
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
# runs-on: "macos-latest"
# strategy:
# matrix:
# python-version: ["3.9", "3.10", "3.11"]
# python-version: ["3.10", "3.11"]
# fail-fast: false
# name: OSX Python ${{ matrix.python-version }}
# steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install-from-condalock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]
fail-fast: false
name: Linux Python ${{ matrix.python-version }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/install-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]
fail-fast: false
name: Linux Python ${{ matrix.python-version }}
steps:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
# runs-on: "macos-latest"
# strategy:
# matrix:
# python-version: ["3.9", "3.10", "3.11"]
# python-version: ["3.10", "3.11"]
# fail-fast: false
# name: OSX Python ${{ matrix.python-version }}
# steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-tests-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
runs-on: "macos-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]
architecture: ["x64"] # need to force Intel, arm64 builds have issues
fail-fast: false
name: OSX Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
runs-on: "macos-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]
architecture: ["x64"] # need to force Intel, arm64 builds have issues
fail-fast: false
name: OSX Python ${{ matrix.python-version }}
Expand Down
40 changes: 3 additions & 37 deletions doc/sphinx/source/quickstart/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Installation
ESMValTool now uses `mamba` instead of `conda` for the recommended installation.
For more information about the change, have a look at :ref:`Move to Mamba<move-to-mamba>`.

ESMValTool supports Python 3.9 and later and requires Linux or MacOS.
ESMValTool supports Python 3.10 and later and requires Linux or MacOS.
Successful usage on Windows has been reported by following the Linux
installation instructions with
`WSL <https://learn.microsoft.com/en-us/windows/wsl/install>`__.
Expand Down Expand Up @@ -489,7 +489,7 @@ To check that the installation was successful, run
this should show the directory of the source code that you just downloaded.

If the command above shows a directory inside your conda environment instead,
e.g. ``~/mambaforge/envs/esmvaltool/lib/python3.9/site-packages/esmvalcore``,
e.g. ``~/mambaforge/envs/esmvaltool/lib/python3.11/site-packages/esmvalcore``,
you may need to manually remove that directory and run
``pip install --editable '.[develop]'`` again.

Expand Down Expand Up @@ -684,40 +684,6 @@ repository, a direct download link can be found `here <https://raw.githubusercon
Common installation problems and their solutions
================================================

Mamba fails to solve the environment
------------------------------------
If you see the text ``Solving environment:`` with the characters ``-\|/`` rotating
behind it for more than 10 minutes, mamba may be having problems finding a
working combination of versions of the packages that the ESMValTool depends on.
Because the ESMValTool is a community tool, there is no strict selection of
which tools can be used and installing the ESMValTool requires installing almost
any package that is available for processing climate data.
To help mamba solve the environment, you can try the following.

Always use the latest version of mamba, as problems have been reported by people
using older versions, to update, run:

.. code-block:: bash
mamba update --name base mamba
Usually mamba is much better at solving new environments than updating older
environments, so it is often a good idea to create a new environment if updating
does not work.

It can help mamba if you let it know what version of certain packages you want,
for example by running

.. code-block:: bash
mamba create -n esmvaltool esmvaltool 'python=3.11'
you ask for Python 3.11 specifically and that makes it much easier for mamba to
solve the environment, because now it can ignore any packages that were built
for other Python versions. Note that, since the esmvaltool package is built
with Python>=3.9, asking for an older Python version, e.g. `python=3.7`, in
this way, it will result in installation failure.

Problems with proxies
---------------------
If you are installing ESMValTool from source from behind a proxy that does not
Expand Down Expand Up @@ -778,7 +744,7 @@ Problems when updating the conda environment
--------------------------------------------
Usually mamba is much better at solving new environments than updating older
environments, so it is often a good idea to create a new environment if updating
does not work. See also `Mamba fails to solve the environment`_.
does not work.

Do not run ``mamba update --update-all`` in the ``esmvaltool``
environment since that will update some packages that are pinned to
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies:
- psy-simple
- pyproj >=2.1
- pys2index # only from conda-forge
- python >=3.9
- python >=3.10
- python-cdo
- python-dateutil
- pyyaml
Expand Down
2 changes: 1 addition & 1 deletion environment_osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies:
- psy-simple
- pyproj >=2.1
- pys2index # only from conda-forge
- python >=3.9
- python >=3.10
- python-cdo
- python-dateutil
- pyyaml
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ def read_description(filename):
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering',
Expand Down

0 comments on commit e83ba66

Please sign in to comment.