Skip to content

Commit

Permalink
[Merge after v2.11.0 Release] Remove support for Python 3.9 (#2447)
Browse files Browse the repository at this point in the history
Co-authored-by: Bouwe Andela <[email protected]>
  • Loading branch information
schlunma and bouweandela committed Nov 25, 2024
1 parent 0f9fc64 commit da1f5dc
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 27 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 @@ -39,7 +39,7 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
# fail-fast set to False allows all other tests
# in the workflow to run regardless of any fail
fail-fast: false
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
runs-on: "macos-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
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/install-from-condalock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
name: Linux Python ${{ matrix.python-version }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/install-from-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
# fail-fast set to False allows all other tests
# in the workflow to run regardless of any fail
fail-fast: false
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
runs-on: "macos-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
architecture: ["x64"] # need to force Intel, arm64 builds have issues
fail-fast: false
name: OSX Python ${{ matrix.python-version }}
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 @@ -37,7 +37,7 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
name: Linux Python ${{ matrix.python-version }}
steps:
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
runs-on: "macos-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
architecture: ["x64"] # need to force Intel, arm64 builds have issues
fail-fast: false
name: OSX Python ${{ matrix.python-version }}
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 @@ -22,7 +22,7 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
name: Linux Python ${{ matrix.python-version }}
steps:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
runs-on: "macos-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
architecture: ["x64"] # need to force Intel, arm64 builds have issues
fail-fast: false
name: OSX Python ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
name: Linux Python ${{ matrix.python-version }}
steps:
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
runs-on: "macos-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
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 doc/quickstart/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ and install ESMValCore into it with a single command:

.. code-block:: bash
conda create --name esmvalcore -c conda-forge esmvalcore 'python=3.10'
conda create --name esmvalcore -c conda-forge esmvalcore
Don't forget to activate the newly created environment after the installation:

Expand Down
3 changes: 1 addition & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ dependencies:
- fire
- geopy
- humanfriendly
- importlib_metadata # required for Python < 3.10
- iris >=3.10.0
- iris-esmf-regrid >=0.11.0
- isodate >=0.7.0 # incompatible with very old 0.6.1
Expand All @@ -37,7 +36,7 @@ dependencies:
- psutil
- py-cordex
- pybtex
- python >=3.9
- python >=3.10
- python-stratify >=0.3
- pyyaml
- requests
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ include_trailing_comma = true

[mypy]
# see mypy.readthedocs.io/en/stable/command_line.html
python_version = 3.10
python_version = 3.12
ignore_missing_imports = True
files = esmvalcore, tests

Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
'fire',
'geopy',
'humanfriendly',
"importlib_metadata;python_version<'3.10'",
'isodate>=0.7.0', # incompatible with very old 0.6.1
'jinja2',
'nc-time-axis', # needed by iris.plot
Expand Down Expand Up @@ -217,9 +216,9 @@ 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',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Atmospheric Science',
'Topic :: Scientific/Engineering :: GIS',
Expand Down
10 changes: 0 additions & 10 deletions tests/unit/preprocessor/_regrid_esmpy/test_regrid_esmpy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Unit tests for the esmvalcore.preprocessor._regrid_esmpy module."""
import sys
from unittest import mock

import cf_units
Expand Down Expand Up @@ -381,9 +380,6 @@ def test_coords_iris_to_esmpy_2d_non_circular(self):
self.assert_array_equal(esmpy_lon_corners,
self.expected_esmpy_lon_corners)

@pytest.mark.skipif(sys.version_info.major == 3
and sys.version_info.minor == 9,
reason="bug in mock.py for Python 3.9.0 and 3.9.1")
def test_get_grid_circular(self):
"""Test building of ESMF grid from iris cube circular longitude."""
expected_get_coords_calls = [
Expand All @@ -405,9 +401,6 @@ def test_get_grid_circular(self):
mg.add_item.assert_called_once_with(mock.sentinel.gi_mask,
mock.sentinel.sl_center)

@pytest.mark.skipif(sys.version_info.major == 3
and sys.version_info.minor == 9,
reason="bug in mock.py for Python 3.9.0 and 3.9.1")
def test_get_grid_non_circular(self):
"""Test building of ESMF grid from iris cube non circular longitude."""
expected_get_coords_calls = [
Expand Down Expand Up @@ -465,9 +458,6 @@ def test_is_lon_circular_2d_aux_coords_non_circ(self):

@mock.patch('esmvalcore.preprocessor._regrid_esmpy.esmpy.Grid', MockGrid)
@mock.patch('esmvalcore.preprocessor._regrid_esmpy.esmpy.Field')
@pytest.mark.skipif(sys.version_info.major == 3
and sys.version_info.minor == 9,
reason="bug in mock.py for Python 3.9.0 and 3.9.1")
def test_cube_to_empty_field(self, mock_field):
"""Test building of empty field from iris cube."""
field = cube_to_empty_field(self.cube)
Expand Down

0 comments on commit da1f5dc

Please sign in to comment.