From a4d0b53b14261fac9517ee989a14bdd3be59a4d0 Mon Sep 17 00:00:00 2001 From: Miranda Mundt <55767766+mrmundt@users.noreply.github.com> Date: Mon, 18 Nov 2024 08:25:29 -0700 Subject: [PATCH] Revert "Remove Python 3.8 support" --- .coin-or/projDesc.xml | 2 +- .github/workflows/release_wheel_creation.yml | 12 ++++++--- .github/workflows/test_branches.yml | 22 ++++++++++------ .github/workflows/test_pr_and_main.yml | 26 ++++++++++++------- README.md | 2 +- .../getting_started/installation.rst | 2 +- setup.py | 3 ++- 7 files changed, 44 insertions(+), 25 deletions(-) diff --git a/.coin-or/projDesc.xml b/.coin-or/projDesc.xml index c8176bef9eb..180d366a1fd 100644 --- a/.coin-or/projDesc.xml +++ b/.coin-or/projDesc.xml @@ -287,7 +287,7 @@ Carl D. Laird, Chair, Pyomo Management Committee, claird at andrew dot cmu dot e Any - Python 3.9, 3.10, 3.11, 3.12, 3.13 + Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 diff --git a/.github/workflows/release_wheel_creation.yml b/.github/workflows/release_wheel_creation.yml index 2637a315878..8af5bd93151 100644 --- a/.github/workflows/release_wheel_creation.yml +++ b/.github/workflows/release_wheel_creation.yml @@ -29,9 +29,12 @@ jobs: matrix: os: [ubuntu-22.04, windows-latest, macos-latest] arch: [all] - wheel-version: ['cp39*', 'cp310*', 'cp311*', 'cp312*', 'cp313*'] + wheel-version: ['cp38*', 'cp39*', 'cp310*', 'cp311*', 'cp312*', 'cp313*'] include: + - wheel-version: 'cp38*' + TARGET: 'py38' + GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions" - wheel-version: 'cp39*' TARGET: 'py39' GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions" @@ -93,9 +96,12 @@ jobs: matrix: os: [ubuntu-22.04] arch: [all] - wheel-version: ['cp39*', 'cp310*', 'cp311*', 'cp312*', 'cp313*'] + wheel-version: ['cp38*', 'cp39*', 'cp310*', 'cp311*', 'cp312*', 'cp313*'] include: + - wheel-version: 'cp38*' + TARGET: 'py38' + GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions" - wheel-version: 'cp39*' TARGET: 'py39' GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions" @@ -179,7 +185,7 @@ jobs: include: - os: ubuntu-latest TARGET: generic_tarball - python-version: [3.9] + python-version: [3.8] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index 3315c5250df..4b25fd858e7 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -75,6 +75,12 @@ jobs: other: [""] category: [""] + # win/3.8 conda builds no longer work due to environment not being able + # to resolve. We are skipping it now. + exclude: + - os: windows-latest + python: 3.8 + include: - os: ubuntu-latest python: '3.13' @@ -82,7 +88,7 @@ jobs: PYENV: pip - os: macos-latest - python: '3.11' + python: '3.10' TARGET: osx PYENV: pip @@ -119,7 +125,7 @@ jobs: PACKAGES: cython - os: windows-latest - python: '3.10' + python: 3.8 other: /pip skip_doctest: 1 TARGET: win @@ -687,17 +693,17 @@ jobs: bare-python-env: - name: linux/3.9/bare-env + name: linux/3.8/bare-env runs-on: ubuntu-latest timeout-minutes: 10 steps: - name: Checkout Pyomo source uses: actions/checkout@v4 - - name: Set up Python 3.9 + - name: Set up Python 3.8 uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.8 - name: Install Pyomo run: | @@ -755,17 +761,17 @@ jobs: # id: pip-cache # with: # path: cache/pip - # key: pip-${{env.CACHE_VER}}.0-${{runner.os}}-3.9 + # key: pip-${{env.CACHE_VER}}.0-${{runner.os}}-3.8 - name: Download build artifacts uses: actions/download-artifact@v4 with: path: artifacts - - name: Set up Python 3.9 + - name: Set up Python 3.8 uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.8 - name: Install Python Packages (pip) shell: bash # DO NOT REMOVE: see note above diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 98ec7fd933b..19174ea42c8 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -68,10 +68,16 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python: [ 3.9, '3.10', '3.11', '3.12', '3.13' ] + python: [ 3.8, 3.9, '3.10', '3.11', '3.12', '3.13' ] other: [""] category: [""] + # win/3.8 conda builds no longer work due to environment not being able + # to resolve. We are skipping it now. + exclude: + - os: windows-latest + python: 3.8 + include: - os: ubuntu-latest TARGET: linux @@ -113,7 +119,7 @@ jobs: PACKAGES: cython - os: windows-latest - python: 3.9 + python: 3.8 other: /pip skip_doctest: 1 TARGET: win @@ -128,7 +134,7 @@ jobs: PYENV: pip - os: ubuntu-latest - python: 3.9 + python: 3.8 other: /slim slim: 1 skip_doctest: 1 @@ -145,7 +151,7 @@ jobs: PACKAGES: "gurobipy dill numpy>2.0 scipy networkx" - os: ubuntu-latest - python: '3.10' + python: 3.9 other: /pyutilib TARGET: linux PYENV: pip @@ -721,7 +727,7 @@ jobs: bare-python-env: - name: linux/3.9/bare-env + name: linux/3.8/bare-env needs: lint # the linter job is a prerequisite for PRs runs-on: ubuntu-latest timeout-minutes: 10 @@ -729,10 +735,10 @@ jobs: - name: Checkout Pyomo source uses: actions/checkout@v4 - - name: Set up Python 3.9 + - name: Set up Python 3.8 uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.8 - name: Install Pyomo run: | @@ -790,17 +796,17 @@ jobs: # id: pip-cache # with: # path: cache/pip - # key: pip-${{env.CACHE_VER}}.0-${{runner.os}}-3.9 + # key: pip-${{env.CACHE_VER}}.0-${{runner.os}}-3.8 - name: Download build artifacts uses: actions/download-artifact@v4 with: path: artifacts - - name: Set up Python 3.9 + - name: Set up Python 3.8 uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.8 - name: Install Python Packages (pip) shell: bash # DO NOT REMOVE: see note above diff --git a/README.md b/README.md index 1cb773788f2..29b900261e5 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Pyomo is available under the BSD License - see the Pyomo is currently tested with the following Python implementations: -* CPython: 3.9, 3.10, 3.11, 3.12, 3.13 +* CPython: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 * PyPy: 3.9 _Testing and support policy_: diff --git a/doc/OnlineDocs/getting_started/installation.rst b/doc/OnlineDocs/getting_started/installation.rst index 0495dfb4490..e36d83d4f8a 100644 --- a/doc/OnlineDocs/getting_started/installation.rst +++ b/doc/OnlineDocs/getting_started/installation.rst @@ -3,7 +3,7 @@ Installation Pyomo currently supports the following versions of Python: -* CPython: 3.9, 3.10, 3.11, 3.12, 3.13 +* CPython: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 * PyPy: 3 At the time of the first Pyomo release after the end-of-life of a minor Python diff --git a/setup.py b/setup.py index a76a8dc9442..a2c7a2e00a2 100644 --- a/setup.py +++ b/setup.py @@ -234,6 +234,7 @@ def __ne__(self, other): 'Operating System :: Unix', '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', @@ -244,7 +245,7 @@ def __ne__(self, other): 'Topic :: Scientific/Engineering :: Mathematics', 'Topic :: Software Development :: Libraries :: Python Modules', ], - python_requires='>=3.9', + python_requires='>=3.8', install_requires=['ply'], extras_require={ # There are certain tests that also require pytest-qt, but because those