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

[v2.11.1] Remove support for Python 3.9 #2447

Merged
merged 18 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
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 @@ -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
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.9
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'",
'iris-grib',
'isodate',
'jinja2',
Expand Down Expand Up @@ -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',
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