diff --git a/.github/workflows/install-from-conda.yml b/.github/workflows/install-from-conda.yml index 951a91328a..88e78619ea 100644 --- a/.github/workflows/install-from-conda.yml +++ b/.github/workflows/install-from-conda.yml @@ -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 @@ -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 }} diff --git a/.github/workflows/install-from-condalock-file.yml b/.github/workflows/install-from-condalock-file.yml index 3838387fa8..fbc4a71903 100644 --- a/.github/workflows/install-from-condalock-file.yml +++ b/.github/workflows/install-from-condalock-file.yml @@ -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: diff --git a/.github/workflows/install-from-pypi.yml b/.github/workflows/install-from-pypi.yml index cd49eed089..1e326c89eb 100644 --- a/.github/workflows/install-from-pypi.yml +++ b/.github/workflows/install-from-pypi.yml @@ -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 @@ -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 }} diff --git a/.github/workflows/install-from-source.yml b/.github/workflows/install-from-source.yml index a4aa9b8e01..7cb8c7d629 100644 --- a/.github/workflows/install-from-source.yml +++ b/.github/workflows/install-from-source.yml @@ -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: @@ -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 }} diff --git a/.github/workflows/run-tests-monitor.yml b/.github/workflows/run-tests-monitor.yml index 561516a3e2..160bdd2850 100644 --- a/.github/workflows/run-tests-monitor.yml +++ b/.github/workflows/run-tests-monitor.yml @@ -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: @@ -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 }} diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9cf1d6308b..ac294e9f44 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -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: @@ -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 }} diff --git a/doc/quickstart/install.rst b/doc/quickstart/install.rst index 4c9305dec7..7ef5015fe3 100644 --- a/doc/quickstart/install.rst +++ b/doc/quickstart/install.rst @@ -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: diff --git a/environment.yml b/environment.yml index 8796a8fa4e..6ccab6b155 100644 --- a/environment.yml +++ b/environment.yml @@ -18,7 +18,6 @@ dependencies: - fire - geopy - humanfriendly - - importlib_metadata # required for Python < 3.10 - iris >=3.9.0 - iris-esmf-regrid >=0.10.0 # github.com/SciTools-incubator/iris-esmf-regrid/pull/342 - iris-grib @@ -37,7 +36,7 @@ dependencies: - psutil - py-cordex - pybtex - - python >=3.9 + - python >=3.10 - python-stratify >=0.3 - pyyaml - requests diff --git a/setup.cfg b/setup.cfg index 3bf09d26f9..e558e6860e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -36,7 +36,7 @@ include_trailing_comma = true [mypy] # see mypy.readthedocs.io/en/stable/command_line.html -python_version = 3.9 +python_version = 3.12 ignore_missing_imports = True files = esmvalcore, tests diff --git a/setup.py b/setup.py index d1d6e49b55..1964fad345 100755 --- a/setup.py +++ b/setup.py @@ -39,7 +39,6 @@ 'fire', 'geopy', 'humanfriendly', - "importlib_metadata;python_version<'3.10'", 'iris-grib', 'isodate', 'jinja2', @@ -218,9 +217,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', diff --git a/tests/unit/preprocessor/_regrid_esmpy/test_regrid_esmpy.py b/tests/unit/preprocessor/_regrid_esmpy/test_regrid_esmpy.py index 371ab49684..44f138d68a 100644 --- a/tests/unit/preprocessor/_regrid_esmpy/test_regrid_esmpy.py +++ b/tests/unit/preprocessor/_regrid_esmpy/test_regrid_esmpy.py @@ -1,5 +1,4 @@ """Unit tests for the esmvalcore.preprocessor._regrid_esmpy module.""" -import sys from unittest import mock import cf_units @@ -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 = [ @@ -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 = [ @@ -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)