diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index b7a6b9ba1..5f864a9b6 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -35,11 +35,11 @@ jobs: fail-fast: false matrix: config: - - {os: ubuntu-24.04, python: "3.14", ffmpeg: "8.1.2", extras: true} - - {os: ubuntu-24.04, python: "3.11", ffmpeg: "8.0.3"} - - {os: ubuntu-24.04, python: "3.13", ffmpeg: "9.0"} - - {os: macos-14, python: "3.12", ffmpeg: "8.0.3"} - - {os: macos-14, python: "3.14", ffmpeg: "8.1.2"} + - {os: ubuntu-24.04, python: "3.14", ffmpeg: "9.0.1", extras: true} + - {os: ubuntu-24.04, python: "3.12", ffmpeg: "8.1.2"} + - {os: ubuntu-24.04, python: "3.13", ffmpeg: "9.0.1"} + - {os: macos-14, python: "3.12", ffmpeg: "8.1.2"} + - {os: macos-14, python: "3.14", ffmpeg: "9.0.1"} env: PYAV_PYTHON: python${{ matrix.config.python }} @@ -122,7 +122,7 @@ jobs: fail-fast: false matrix: config: - - {os: windows-latest, python: "3.11", ffmpeg: "latest"} + - {os: windows-latest, python: "3.12", ffmpeg: "latest"} steps: - name: Checkout @@ -163,27 +163,27 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v7 - - name: Set up host Python 3.11 + - name: Set up host Python 3.12 uses: actions/setup-python@v6 with: - python-version: "3.11" + python-version: "3.12" - name: Set up host Python 3.14t uses: actions/setup-python@v6 with: python-version: "3.14t" - name: Install build tooling run: | - for py in python3.11 python3.14t; do + for py in python3.12 python3.14t; do $py -m pip install -U "cython>=3.1.0,<4" "setuptools>=77.0" wheel done # patchelf 0.18 (ubuntu-24.04's system version) corrupts ELF files # with large p_align; pin <0.18 for auditwheel to use. - python3.11 -m pip install -U ziglang auditwheel 'patchelf<0.18' + python3.12 -m pip install -U ziglang auditwheel 'patchelf<0.18' - name: Cross-compile armv7l wheels with zig env: - HOST_PY311: python3.11 + HOST_PY312: python3.12 HOST_PY314T: python3.14t - TOOLS_PY: python3.11 + TOOLS_PY: python3.12 run: bash scripts/build-armv7l-cross.sh - name: Set up QEMU uses: docker/setup-qemu-action@v4 @@ -193,7 +193,7 @@ jobs: run: | docker run --rm --platform linux/arm/v7 -v "$PWD/dist:/dist:ro" \ quay.io/pypa/manylinux_2_31_armv7l bash -ceu ' - for py in /opt/python/cp311-cp311 /opt/python/cp314-cp314t; do + for py in /opt/python/cp312-cp312 /opt/python/cp314-cp314t; do echo "::group::$("$py/bin/python" --version)" "$py/bin/pip" install --no-index --find-links /dist av "$py/bin/python" -m av --version diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6fb97330a..074c06636 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -63,7 +63,7 @@ jobs: CIBW_ENVIRONMENT_MACOS: PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig LDFLAGS=-headerpad_max_install_names CIBW_ENVIRONMENT_WINDOWS: INCLUDE=C:\\cibw\\vendor\\include LIB=C:\\cibw\\vendor\\lib PYAV_SKIP_TESTS=unicode_filename CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair --add-path C:\cibw\vendor\bin -w {dest_dir} {wheel} - CIBW_BUILD: "cp311* cp314t*" + CIBW_BUILD: "cp312* cp314t*" CIBW_TEST_COMMAND: mv {project}/av {project}/av.disabled && python -m pytest {package}/tests && mv {project}/av.disabled {project}/av CIBW_TEST_REQUIRES: pytest numpy run: | @@ -83,27 +83,27 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v7 - - name: Set up host Python 3.11 + - name: Set up host Python 3.12 uses: actions/setup-python@v6 with: - python-version: "3.11" + python-version: "3.12" - name: Set up host Python 3.14t uses: actions/setup-python@v6 with: python-version: "3.14t" - name: Install build tooling run: | - for py in python3.11 python3.14t; do + for py in python3.12 python3.14t; do $py -m pip install -U "cython>=3.1.0,<4" "setuptools>=77.0" wheel done # patchelf 0.18 (ubuntu-24.04's system version) corrupts ELF files # with large p_align; pin <0.18 for auditwheel to use. - python3.11 -m pip install -U ziglang auditwheel 'patchelf<0.18' + python3.12 -m pip install -U ziglang auditwheel 'patchelf<0.18' - name: Cross-compile armv7l wheels with zig env: - HOST_PY311: python3.11 + HOST_PY312: python3.12 HOST_PY314T: python3.14t - TOOLS_PY: python3.11 + TOOLS_PY: python3.12 run: bash scripts/build-armv7l-cross.sh - name: Upload wheels uses: actions/upload-artifact@v6 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 128710496..cf05a5e5f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -31,6 +31,10 @@ We are operating with `semantic versioning `_. v19.0.0 (Unreleased) -------------------- +Major: + +- Drop support for Python 3.11. Binary wheels are now built for Python 3.12 and later. + Fixes: - diff --git a/README.md b/README.md index 8e66d98be..fc89e0f02 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ But where you can't work without it, PyAV is a critical tool. Installation ------------ -PyAV requires Python 3.11 or later. Binary wheels are provided on [PyPI][pypi] for Linux, macOS, and Windows with FFmpeg bundled. You can install these wheels by running: +PyAV requires Python 3.12 or later. Binary wheels are provided on [PyPI][pypi] for Linux, macOS, and Windows with FFmpeg bundled. You can install these wheels by running: ```bash pip install av @@ -74,7 +74,7 @@ On Windows, use a Conda environment and the FFmpeg development files maintained ```powershell git clone https://github.com/PyAV-Org/PyAV.git cd PyAV -conda create --name pyav-dev --channel conda-forge python=3.11 cython setuptools numpy pillow pytest +conda create --name pyav-dev --channel conda-forge python=3.12 cython setuptools numpy pillow pytest conda activate pyav-dev $ffmpegDir = Join-Path $env:CONDA_PREFIX "Library" python scripts\fetch-vendor.py --config-file scripts\ffmpeg-latest.json $ffmpegDir diff --git a/docs/overview/installation.rst b/docs/overview/installation.rst index 30d5b0370..0fe2cb62d 100644 --- a/docs/overview/installation.rst +++ b/docs/overview/installation.rst @@ -4,7 +4,7 @@ Installation Binary wheels ------------- -PyAV requires Python 3.11 or later. Binary wheels are provided on PyPI for Linux, macOS, and Windows with FFmpeg bundled. The most straightforward way to install PyAV is to run: +PyAV requires Python 3.12 or later. Binary wheels are provided on PyPI for Linux, macOS, and Windows with FFmpeg bundled. The most straightforward way to install PyAV is to run: .. code-block:: bash @@ -63,7 +63,7 @@ The Windows build uses FFmpeg development files maintained by the PyAV project. .. code-block:: powershell - conda create --name pyav-dev --channel conda-forge python=3.11 cython setuptools numpy pillow pytest + conda create --name pyav-dev --channel conda-forge python=3.12 cython setuptools numpy pillow pytest conda activate pyav-dev $ffmpegDir = Join-Path $env:CONDA_PREFIX "Library" python scripts\fetch-vendor.py --config-file scripts\ffmpeg-latest.json $ffmpegDir diff --git a/pyproject.toml b/pyproject.toml index 035e4b489..a3086da9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ authors = [ {name = "WyattBlue", email = "wyattblue@auto-editor.com"}, {name = "Jeremy Lainé", email = "jeremy.laine@m4x.org"}, ] -requires-python = ">=3.11" +requires-python = ">=3.12" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -20,7 +20,6 @@ classifiers = [ "Operating System :: Unix", "Operating System :: Microsoft :: Windows", "Programming Language :: Cython", - "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", diff --git a/scripts/activate.sh b/scripts/activate.sh index 78eb08620..2948b758c 100755 --- a/scripts/activate.sh +++ b/scripts/activate.sh @@ -21,7 +21,7 @@ if [[ ! "$PYAV_LIBRARY" ]]; then return 1 fi else - PYAV_LIBRARY=ffmpeg-8.1.2 + PYAV_LIBRARY=ffmpeg-9.0.1 echo "No \$PYAV_LIBRARY set; defaulting to $PYAV_LIBRARY" fi fi diff --git a/scripts/build-armv7l-cross.sh b/scripts/build-armv7l-cross.sh index f7e97ec42..f7928cc1f 100755 --- a/scripts/build-armv7l-cross.sh +++ b/scripts/build-armv7l-cross.sh @@ -7,9 +7,9 @@ # armv7l without running any armv7l code. The target Python trees + system libs # are copied out of the manylinux armv7l image with `docker cp` (no execution). # -# Builds two manylinux (glibc) wheels: cp311-abi3 (covers 3.11-3.13) and cp314t. -# musllinux armv7l is skipped: the musl FFmpeg needs system libs (libdrm, -# libxcb*, libbz2) the musllinux image doesn't ship for auditwheel to bundle. +# Builds two manylinux (glibc) wheels: cp312-abi3 and cp314t. +# musllinux armv7l is skipped: musl ffmpeg needs system libs (libdrm, libxcb*, +# libbz2) the musllinux image doesn't ship for auditwheel to bundle. set -euo pipefail @@ -17,9 +17,9 @@ here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" root="$(cd "$here/.." && pwd)" cd "$root" -# Host interpreters that drive each build (must match the wheel's Python: 3.11 -# emits cp311-abi3, 3.14t emits cp314t). zig/auditwheel run from TOOLS_PY. -HOST_PY311="${HOST_PY311:-python3.11}" +# Host interpreters that drive each build (must match the wheel's Python: 3.12 +# emits cp312-abi3, 3.14t emits cp314t). zig/auditwheel run from TOOLS_PY. +HOST_PY312="${HOST_PY312:-python3.12}" HOST_PY314T="${HOST_PY314T:-python3.14t}" TOOLS_PY="${TOOLS_PY:-python3}" @@ -132,7 +132,7 @@ build_one() { } extract_image -build_one "$HOST_PY311" "cp311-cp311" +build_one "$HOST_PY312" "cp312-cp312" build_one "$HOST_PY314T" "cp314*-cp314t" echo diff --git a/scripts/ffmpeg-latest.json b/scripts/ffmpeg-latest.json index 58dc5ae29..f595e2283 100644 --- a/scripts/ffmpeg-latest.json +++ b/scripts/ffmpeg-latest.json @@ -1,3 +1,3 @@ { - "url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/8.1.2-1/ffmpeg-{platform}.tar.gz" + "url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/9.0.1-1/ffmpeg-{platform}.tar.gz" } diff --git a/setup.py b/setup.py index 872c5f8e8..61a77447b 100644 --- a/setup.py +++ b/setup.py @@ -21,10 +21,10 @@ "swresample", ] -if sys.implementation.name == "cpython" and (3, 14) > sys.version_info > (3, 11): +if sys.implementation.name == "cpython" and (3, 14) > sys.version_info >= (3, 12): py_limited_api = True - options = {"bdist_wheel": {"py_limited_api": "cp311"}} - define_macros = [("Py_LIMITED_API", 0x030B0000)] + options = {"bdist_wheel": {"py_limited_api": "cp312"}} + define_macros = [("Py_LIMITED_API", 0x030C0000)] else: py_limited_api = False options = {}