From e2a2a877590963d9042f4e825b8e383e57f86a21 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Mon, 9 Jan 2023 20:33:21 -0600 Subject: [PATCH 1/9] Remove support for python 3.8 --- .appveyor.yml | 4 ++-- .github/workflows/cibuildsdist.yml | 2 +- .github/workflows/cibuildwheel.yml | 15 +-------------- .github/workflows/circleci.yml | 6 +++--- .github/workflows/reviewdog.yml | 2 +- .github/workflows/tests.yml | 12 ++++-------- azure-pipelines.yml | 22 +++++++++++----------- doc/devel/dependencies.rst | 3 +-- requirements/testing/extra.txt | 2 +- setup.py | 3 +-- 10 files changed, 26 insertions(+), 45 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 63801100307d..94209c5a07ba 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -22,10 +22,10 @@ environment: --cov-report= --cov=lib --log-level=DEBUG matrix: - - PYTHON_VERSION: "3.8" + - PYTHON_VERSION: "3.9" CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64" TEST_ALL: "no" - - PYTHON_VERSION: "3.9" + - PYTHON_VERSION: "3.11" CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64" TEST_ALL: "no" diff --git a/.github/workflows/cibuildsdist.yml b/.github/workflows/cibuildsdist.yml index d583fe1cfbcb..b322f8ecb212 100644 --- a/.github/workflows/cibuildsdist.yml +++ b/.github/workflows/cibuildsdist.yml @@ -37,7 +37,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.9', '3.10', '3.11'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 9e55193f82d2..da40faf39de4 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -100,23 +100,10 @@ jobs: MPL_DISABLE_FH4: "yes" CIBW_ARCHS: ${{ matrix.cibw_archs }} - - name: Build wheels for CPython 3.8 - uses: pypa/cibuildwheel@v2.11.4 - env: - CIBW_BUILD: "cp38-*" - CIBW_SKIP: "*-musllinux*" - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010 - CIBW_MANYLINUX_I686_IMAGE: manylinux2010 - CIBW_BEFORE_BUILD: >- - pip install certifi numpy==1.19.2 && - git clean -fxd build - MPL_DISABLE_FH4: "yes" - CIBW_ARCHS: ${{ matrix.cibw_archs }} - - name: Build wheels for PyPy uses: pypa/cibuildwheel@v2.11.4 env: - CIBW_BUILD: "pp38-* pp39-*" + CIBW_BUILD: "pp39-*" CIBW_SKIP: "*-musllinux*" CIBW_BEFORE_BUILD: >- pip install certifi oldest-supported-numpy && diff --git a/.github/workflows/circleci.yml b/.github/workflows/circleci.yml index 3dbb3b2b377e..6c8e176ce1e8 100644 --- a/.github/workflows/circleci.yml +++ b/.github/workflows/circleci.yml @@ -3,7 +3,7 @@ name: "CircleCI artifact handling" on: [status] jobs: circleci_artifacts_redirector_job: - if: "${{ github.event.context == 'ci/circleci: docs-python38' }}" + if: "${{ github.event.context == 'ci/circleci: docs-python39' }}" permissions: statuses: write runs-on: ubuntu-latest @@ -14,11 +14,11 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} artifact-path: 0/doc/build/html/index.html - circleci-jobs: docs-python38 + circleci-jobs: docs-python39 job-title: View the built docs post_warnings_as_review: - if: "${{ github.event.context == 'ci/circleci: docs-python38' }}" + if: "${{ github.event.context == 'ci/circleci: docs-python39' }}" permissions: contents: read checks: write diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index cd862f11f1d6..659eedb8d383 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.9 - name: Install flake8 run: pip3 install -r requirements/testing/flake8.txt diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 78dfefdbe7aa..c30ed373ce2c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,17 +37,13 @@ jobs: include: - name-suffix: "(Minimum Versions)" os: ubuntu-20.04 - python-version: 3.8 + python-version: 3.9 extra-requirements: '-c requirements/testing/minver.txt' - pyqt5-ver: '==5.11.2 sip==5.0.0' # oldest versions with a Py3.8 wheel. + pyqt5-ver: '==5.12.2 sip==5.0.0' # oldest versions with a Py3.9 wheel. pyqt6-ver: '==6.1.0 PyQt6-Qt6==6.1.0' - pyside2-ver: '==5.14.0' # oldest version with working Py3.8 wheel. + pyside2-ver: '==5.15.1' # oldest version with working Py3.9 wheel. pyside6-ver: '==6.0.0' delete-font-cache: true - - os: ubuntu-20.04 - python-version: 3.8 - extra-requirements: '-r requirements/testing/extra.txt' - CFLAGS: "-fno-lto" # Ensure that disabling LTO works. - os: ubuntu-20.04 python-version: 3.9 extra-requirements: '-r requirements/testing/extra.txt' @@ -57,7 +53,7 @@ jobs: - os: ubuntu-20.04 python-version: '3.11' - os: macos-latest - python-version: 3.8 + python-version: 3.9 steps: - uses: actions/checkout@v3 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 640136a00e9b..bef44758e972 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -38,33 +38,33 @@ stages: - job: Pytest strategy: matrix: - Linux_py38: - vmImage: 'ubuntu-20.04' # keep one job pinned to the oldest image - python.version: '3.8' Linux_py39: - vmImage: 'ubuntu-latest' + vmImage: 'ubuntu-20.04' # keep one job pinned to the oldest image python.version: '3.9' Linux_py310: vmImage: 'ubuntu-latest' python.version: '3.10' - macOS_py38: - vmImage: 'macOS-latest' - python.version: '3.8' + Linux_py311: + vmImage: 'ubuntu-latest' + python.version: '3.11' macOS_py39: vmImage: 'macOS-latest' python.version: '3.9' macOS_py310: vmImage: 'macOS-latest' python.version: '3.10' - Windows_py38: - vmImage: 'windows-2019' # keep one job pinned to the oldest image - python.version: '3.8' + macOS_py310: + vmImage: 'macOS-latest' + python.version: '3.11' Windows_py39: - vmImage: 'windows-latest' + vmImage: 'windows-2019' # keep one job pinned to the oldest image python.version: '3.9' Windows_py310: vmImage: 'windows-latest' python.version: '3.10' + Windows_py311: + vmImage: 'windows-latest' + python.version: '3.11' maxParallel: 4 pool: vmImage: '$(vmImage)' diff --git a/doc/devel/dependencies.rst b/doc/devel/dependencies.rst index 4463b10b679a..031d9a26db61 100644 --- a/doc/devel/dependencies.rst +++ b/doc/devel/dependencies.rst @@ -15,7 +15,7 @@ When installing through a package manager like ``pip`` or ``conda``, the mandatory dependencies are automatically installed. This list is mainly for reference. -* `Python `_ (>= 3.8) +* `Python `_ (>= 3.9) * `contourpy `_ (>= 1.0.1) * `cycler `_ (>= 0.10.0) * `dateutil `_ (>= 2.7) @@ -180,7 +180,6 @@ Minimum pip / manylinux support (linux) Matplotlib publishes `manylinux wheels `_ which have a minimum version of pip which will recognize the wheels -- Python 3.8: ``manylinx2010`` / pip >= 19.0 - Python 3.9+: ``manylinx2014`` / pip >= 19.3 In all cases the required version of pip is embedded in the CPython source. diff --git a/requirements/testing/extra.txt b/requirements/testing/extra.txt index 8d314a141218..6058d3dcb22c 100644 --- a/requirements/testing/extra.txt +++ b/requirements/testing/extra.txt @@ -1,4 +1,4 @@ -# Extra pip requirements for the Python 3.8+ builds +# Extra pip requirements for the Python 3.9+ builds --prefer-binary ipykernel diff --git a/setup.py b/setup.py index 490850ad6203..259b7b3aba36 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ # and/or pip. import sys -py_min_version = (3, 8) # minimal supported python version +py_min_version = (3, 9) # minimal supported python version since_mpl_version = (3, 6) # py_min_version is required since this mpl version if sys.version_info < py_min_version: @@ -293,7 +293,6 @@ def make_release_tree(self, base_dir, files): 'License :: OSI Approved :: Python Software Foundation License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', From a74596448962e17337eb60bf383253d5a0288126 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Mon, 9 Jan 2023 20:40:59 -0600 Subject: [PATCH 2/9] Add development release note --- doc/api/next_api_changes/development/24919-KS.rst | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/api/next_api_changes/development/24919-KS.rst diff --git a/doc/api/next_api_changes/development/24919-KS.rst b/doc/api/next_api_changes/development/24919-KS.rst new file mode 100644 index 000000000000..fc4e9e91a517 --- /dev/null +++ b/doc/api/next_api_changes/development/24919-KS.rst @@ -0,0 +1,4 @@ +Support for Python 3.8 dropped +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For Matplotlib 3.8, the minimum supported version of Python is 3.9. From d03f8c93097e06950337b695c296b151867f0f19 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Mon, 9 Jan 2023 20:48:53 -0600 Subject: [PATCH 3/9] Update circle config, missed originally --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9c1f09172060..d79f244e052c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -205,9 +205,9 @@ commands: # jobs: - docs-python38: + docs-python39: docker: - - image: cimg/python:3.8 + - image: cimg/python:3.9 resource_class: large steps: - checkout @@ -250,4 +250,4 @@ workflows: jobs: # NOTE: If you rename this job, then you must update the `if` condition # and `circleci-jobs` option in `.github/workflows/circleci.yml`. - - docs-python38 + - docs-python39 From 63e9d7f8f11234e7e10650d734b04a3b1741a851 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Mon, 9 Jan 2023 22:11:56 -0600 Subject: [PATCH 4/9] Add back no-lto test --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c30ed373ce2c..c66ccc0203cf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -47,6 +47,7 @@ jobs: - os: ubuntu-20.04 python-version: 3.9 extra-requirements: '-r requirements/testing/extra.txt' + CFLAGS: "-fno-lto" # Ensure that disabling LTO works. - os: ubuntu-20.04 python-version: '3.10' extra-requirements: '-r requirements/testing/extra.txt' From 22a6a2e06512244185ff22d2a97877cbd6226e88 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Tue, 10 Jan 2023 11:19:35 -0600 Subject: [PATCH 5/9] bump since_mpl_version Co-authored-by: Oscar Gustafsson --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 259b7b3aba36..afef9262c808 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ import sys py_min_version = (3, 9) # minimal supported python version -since_mpl_version = (3, 6) # py_min_version is required since this mpl version +since_mpl_version = (3, 8) # py_min_version is required since this mpl version if sys.version_info < py_min_version: error = """ From c0ed024ee1c33199173dc3a15780adea62951c97 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Tue, 10 Jan 2023 14:12:36 -0600 Subject: [PATCH 6/9] Bump kiwisolver and pillow minvers --- .../next_api_changes/development/24919-KS.rst | 20 ++++++++++++++++--- requirements/testing/minver.txt | 4 ++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/doc/api/next_api_changes/development/24919-KS.rst b/doc/api/next_api_changes/development/24919-KS.rst index fc4e9e91a517..29cf1db12955 100644 --- a/doc/api/next_api_changes/development/24919-KS.rst +++ b/doc/api/next_api_changes/development/24919-KS.rst @@ -1,4 +1,18 @@ -Support for Python 3.8 dropped -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Increase to minimum supported versions of dependencies +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -For Matplotlib 3.8, the minimum supported version of Python is 3.9. +For Matplotlib 3.8, the :ref:`minimum supported versions ` are +being bumped: + ++------------+-----------------+---------------+ +| Dependency | min in mpl3.7 | min in mpl3.8 | ++============+=================+===============+ +| Python | 3.8 | 3.9 | ++------------+-----------------+---------------+ +| kiwisolver | 1.0.1 | 1.3.1 | ++------------+-----------------+---------------+ +| Pillow | 6.2.1 | 8.0 | ++------------+-----------------+---------------+ + +This is consistent with our :ref:`min_deps_policy` and `NEP29 +`__ diff --git a/requirements/testing/minver.txt b/requirements/testing/minver.txt index 2eb2f958af96..bcc19d8bc07f 100644 --- a/requirements/testing/minver.txt +++ b/requirements/testing/minver.txt @@ -2,11 +2,11 @@ contourpy==1.0.1 cycler==0.10 -kiwisolver==1.0.1 +kiwisolver==1.3.1 importlib-resources==3.2.0 numpy==1.20.0 packaging==20.0 -pillow==6.2.1 +pillow==8.0.0 pyparsing==2.3.1 python-dateutil==2.7 fonttools==4.22.0 From 11f572fd27070d69627e350a880f0b029b69c762 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Tue, 10 Jan 2023 14:16:35 -0600 Subject: [PATCH 7/9] Update dependencies docs --- doc/devel/dependencies.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/devel/dependencies.rst b/doc/devel/dependencies.rst index 031d9a26db61..0f2eeb5cf86f 100644 --- a/doc/devel/dependencies.rst +++ b/doc/devel/dependencies.rst @@ -20,10 +20,10 @@ reference. * `cycler `_ (>= 0.10.0) * `dateutil `_ (>= 2.7) * `fontTools `_ (>= 4.22.0) -* `kiwisolver `_ (>= 1.0.1) +* `kiwisolver `_ (>= 1.3.1) * `NumPy `_ (>= 1.20) * `packaging `_ (>= 20.0) -* `Pillow `_ (>= 6.2) +* `Pillow `_ (>= 8.0) * `pyparsing `_ (>= 2.3.1) * `setuptools `_ * `pyparsing `_ (>= 2.3.1) From 4b0f4998005502aa135c446697a531f93df0ded6 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Tue, 10 Jan 2023 16:59:43 -0600 Subject: [PATCH 8/9] drop 3.11 to 3.10 on appveyor --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 94209c5a07ba..c58b8e7812e2 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -25,7 +25,7 @@ environment: - PYTHON_VERSION: "3.9" CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64" TEST_ALL: "no" - - PYTHON_VERSION: "3.11" + - PYTHON_VERSION: "3.10" CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64" TEST_ALL: "no" From cc39e215ee1cdafbce261094e149a87f549adbaf Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Wed, 11 Jan 2023 12:14:03 -0600 Subject: [PATCH 9/9] Add ImportWarning filter for get_attr test (needed for gtk4) --- lib/matplotlib/tests/test_getattr.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/matplotlib/tests/test_getattr.py b/lib/matplotlib/tests/test_getattr.py index 8fcb981746b2..a34e82ed81ba 100644 --- a/lib/matplotlib/tests/test_getattr.py +++ b/lib/matplotlib/tests/test_getattr.py @@ -18,6 +18,7 @@ @pytest.mark.parametrize('module_name', module_names) @pytest.mark.filterwarnings('ignore::DeprecationWarning') +@pytest.mark.filterwarnings('ignore::ImportWarning') def test_getattr(module_name): """ Test that __getattr__ methods raise AttributeError for unknown keys.