diff --git a/.github/workflows/integtests.yaml b/.github/workflows/integtests.yaml index f89169c..cd1b305 100644 --- a/.github/workflows/integtests.yaml +++ b/.github/workflows/integtests.yaml @@ -8,11 +8,30 @@ on: jobs: + # Single source of truth: the oldest supported Python is whatever setup.py + # declares in `python_requires`. Every job below derives its cross-version + # target from this output instead of hardcoding a version. + min-python: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.minpy.outputs.version }} + steps: + - uses: actions/checkout@v4 + - name: Read minimum supported Python from setup.py + id: minpy + run: | + version=$(grep python_requires setup.py | grep -oE '[0-9]+\.[0-9]+' | head -1) + echo "Minimum supported Python: $version" + echo "version=$version" >> "$GITHUB_OUTPUT" + archlinux: + needs: min-python runs-on: ubuntu-latest container: - # Use https://github.com/gilgamezh/archlinux-python39 to save the python build time - image: gilgamezh/archlinux-python39:latest + # archlinux:latest ships the newest CPython (rolling release), so this + # job exercises fades against the bleeding-edge Python. An older + # interpreter for the cross-version test is provided via uv at runtime. + image: archlinux:latest volumes: - ${{ github.workspace }}:/fades steps: @@ -22,16 +41,22 @@ jobs: fetch-depth: 0 - name: Install dependencies run: | - pacman -Suy --noconfirm python3 python-packaging - - name: Simple fades run + pacman -Suy --noconfirm python3 python-packaging uv git + - name: Simple fades run (newest Python) run: | cd /fades bin/fades -v -d pytest -x pytest --version - - name: Using a different Python + - name: Using the oldest supported Python + env: + OLDEST: ${{ needs.min-python.outputs.version }} run: | - python bin/fades -v --python=python3.9 -d pytest -x pytest -v --integtest-pyversion=3.9 tests/integtest.py + cd /fades + uv python install "$OLDEST" + OLD=$(uv python find "$OLDEST") + python bin/fades -v --python="$OLD" -d pytest -x pytest -v --integtest-pyversion="$OLDEST" tests/integtest.py fedora: + needs: min-python runs-on: ubuntu-latest container: image: fedora:latest @@ -44,25 +69,29 @@ jobs: fetch-depth: 0 - name: Install dependencies run: | - yum install --assumeyes python3.13 python-packaging + dnf install --assumeyes python3 python3-packaging uv git - name: Simple fades run run: | cd /fades bin/fades -v -d pytest -x pytest --version - - name: Using a different Python + - name: Using the oldest supported Python + env: + OLDEST: ${{ needs.min-python.outputs.version }} run: | - yum install --assumeyes python3.9 cd /fades - python3.13 bin/fades -v --python=python3.9 -d pytest -x pytest -v --integtest-pyversion=3.9 tests/integtest.py + uv python install "$OLDEST" + OLD=$(uv python find "$OLDEST") + python3 bin/fades -v --python="$OLD" -d pytest -x pytest -v --integtest-pyversion="$OLDEST" tests/integtest.py native-windows: + needs: min-python strategy: matrix: # just a selection otherwise it's too much # - latest OS (left here even if it's only one to simplify upgrading later) - # - oldest and newest Python + # - oldest (from setup.py) and newest Python os: [windows-2025] - python-version: [3.8, "3.13"] + python-version: ["${{ needs.min-python.outputs.version }}", "3.13"] runs-on: ${{ matrix.os }} steps: @@ -74,11 +103,11 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Also set up Python 3.10 for cross-Python test + - name: Also set up the oldest supported Python for cross-Python test uses: actions/setup-python@v5 id: otherpy with: - python-version: "3.10" + python-version: ${{ needs.min-python.outputs.version }} - name: Install dependencies run: | @@ -89,16 +118,17 @@ jobs: - name: Using a different Python run: | - ${{ steps.matrixpy.outputs.python-path }} bin/fades -v --python=${{ steps.otherpy.outputs.python-path }} -d pytest -x pytest -v --integtest-pyversion=3.10 tests/integtest.py + ${{ steps.matrixpy.outputs.python-path }} bin/fades -v --python=${{ steps.otherpy.outputs.python-path }} -d pytest -x pytest -v --integtest-pyversion=${{ needs.min-python.outputs.version }} tests/integtest.py native-generic: + needs: min-python strategy: matrix: # just a selection otherwise it's too much # - latest OSes - # - oldest and newest Python + # - oldest (from setup.py) and newest Python os: [ubuntu-24.04, macos-15] - python-version: [3.8, "3.13"] + python-version: ["${{ needs.min-python.outputs.version }}", "3.13"] runs-on: ${{ matrix.os }} steps: @@ -110,10 +140,11 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Also set up Python 3.10 for cross-Python test + - name: Also set up the oldest supported Python for cross-Python test uses: actions/setup-python@v5 + id: otherpy with: - python-version: "3.10" + python-version: ${{ needs.min-python.outputs.version }} - name: Install dependencies run: | @@ -124,4 +155,4 @@ jobs: - name: Using a different Python run: | - ${{ steps.matrixpy.outputs.python-path }} bin/fades -v --python=python3.10 -d pytest -x pytest -v --integtest-pyversion=3.10 tests/integtest.py + ${{ steps.matrixpy.outputs.python-path }} bin/fades -v --python=${{ steps.otherpy.outputs.python-path }} -d pytest -x pytest -v --integtest-pyversion=${{ needs.min-python.outputs.version }} tests/integtest.py diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f62c772..4376ab5 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -14,7 +14,7 @@ jobs: strategy: matrix: os: [ubuntu-22.04, ubuntu-24.04, macos-14, macos-15, windows-2022, windows-2025] - python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13"] runs-on: ${{ matrix.os }} steps: diff --git a/README.rst b/README.rst index 4e44b78..55d30ec 100644 --- a/README.rst +++ b/README.rst @@ -239,8 +239,8 @@ be installed in your system, but you can control exactly which one to use. No matter which way you're executing the script (see above), you can pass a ``-p`` or ``--python`` argument, indicating the Python version to -be used just with the number (``3.9``), the whole name (``python3.9``) or -the whole path (``/usr/bin/python3.9``). +be used just with the number (``3.11``), the whole name (``python3.11``) or +the whole path (``/usr/bin/python3.11``). Other detail is the verbosity of *fades* when telling what is doing. By default, *fades* only will use stderr to tell if a virtual environment is being diff --git a/man/fades.1 b/man/fades.1 index 9f09fdc..273ab28 100644 --- a/man/fades.1 +++ b/man/fades.1 @@ -82,7 +82,7 @@ Read the dependencies from a file. Format in each line is the same than dependen .TP .BR -p " " \fIversion\fR ", " --python=\fIversion\fR -Select which Python version to be used; the argument can be just the number (3.9), the whole name (python3.9) or the whole path (/usr/bin/python3.9). Of course, the corresponding version of Python needs to be installed in your system. +Select which Python version to be used; the argument can be just the number (3.11), the whole name (python3.11) or the whole path (/usr/bin/python3.11). Of course, the corresponding version of Python needs to be installed in your system. The dependencies can be indicated in multiple places (in the Python source file, with a comment besides the import, in a \fIrequirements\fRfile, and/or through command line. In case of multiple definitions of the same dependency, command line overrides everything else, and requirements file overrides what is specified in the source code. diff --git a/setup.py b/setup.py index b5ee8fb..737ea0a 100755 --- a/setup.py +++ b/setup.py @@ -106,7 +106,7 @@ def finalize_options(self): install_requires=['setuptools'], tests_require=['logassert', 'pyxdg', 'pyuca', 'pytest', 'flake8', 'pep257', 'rst2html5'], # what unittests require - python_requires='>=3.6', # Minimum Python version supported. + python_requires='>=3.10', # Minimum Python version supported. extras_require={ 'pyxdg': 'pyxdg', 'packaging': 'packaging', @@ -140,13 +140,10 @@ def finalize_options(self): 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Programming Language :: Python :: Implementation', 'Programming Language :: Python :: Implementation :: CPython',