diff --git a/.github/workflows/test_python.yml b/.github/workflows/test_python.yml index e47b978ae1ad3..7c52022c01293 100644 --- a/.github/workflows/test_python.yml +++ b/.github/workflows/test_python.yml @@ -28,7 +28,7 @@ jobs: fail-fast: false # Don't cancel all jobs if one fails. matrix: type: [ Pure, C++] - version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13.0rc2"] include: - type: Pure targets: //python/... //python:python_version_test @@ -48,6 +48,9 @@ jobs: - version: "3.10" continuous-only: true - version: "3.11" + - version: "3.12" + - version: "3.13.0rc2" + continuous-only: true name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} Linux ${{ matrix.type }} ${{ matrix.version }} runs-on: ubuntu-latest @@ -61,7 +64,7 @@ jobs: if: ${{ !matrix.continuous-only || inputs.continuous-run }} uses: protocolbuffers/protobuf-ci/bazel-docker@v3 with: - image: ${{ matrix.image || format('us-docker.pkg.dev/protobuf-build/containers/test/linux/python:6.4.0-{0}-27cf7b86212020d7e552bc13b1e084abb971da75', matrix.version) }} + image: ${{ matrix.image || format('us-docker.pkg.dev/protobuf-build/containers/test/linux/python:6.4.0-{0}-2920199ab0090ed427413a8e422e62695c8392a8', matrix.version) }} credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} bazel-cache: python_linux/${{ matrix.type }}_${{ matrix.version }} bazel: test ${{ matrix.targets }} ${{ matrix.flags }} --test_env=KOKORO_PYTHON_VERSION @@ -73,8 +76,7 @@ jobs: fail-fast: false # Don't cancel all jobs if one fails. matrix: type: [ Pure, C++] - # TODO Consider expanding this set of versions. - version: [ "3.12" ] + version: [ "3.12", "3.13.0-rc.2" ] include: - type: Pure targets: //python/... //python:python_version_test @@ -91,11 +93,12 @@ jobs: ref: ${{ inputs.safe-checkout }} - name: Pin Python version - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f #v5.1.1 with: python-version: ${{ matrix.version }} cache: pip cache-dependency-path: 'python/requirements.txt' + allow-prereleases: true - name: Validate version run: python3 --version | grep ${{ matrix.version }} || (echo "Invalid Python version - $(python3 --version)" && exit 1) diff --git a/.github/workflows/test_upb.yml b/.github/workflows/test_upb.yml index 46e5abef1ce68..03f996985530c 100644 --- a/.github/workflows/test_upb.yml +++ b/.github/workflows/test_upb.yml @@ -87,10 +87,11 @@ jobs: uses: protocolbuffers/protobuf-ci/checkout@v3 with: ref: ${{ inputs.safe-checkout }} - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f #v5.1.1 with: cache: pip cache-dependency-path: 'python/requirements.txt' + allow-prereleases: true - name: Run tests uses: protocolbuffers/protobuf-ci/bazel@v3 with: @@ -114,10 +115,11 @@ jobs: uses: protocolbuffers/protobuf-ci/checkout@v3 with: ref: ${{ inputs.safe-checkout }} - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f #v5.1.1 with: cache: pip cache-dependency-path: 'python/requirements.txt' + allow-prereleases: true - name: Run tests uses: protocolbuffers/protobuf-ci/bazel@v3 with: @@ -189,10 +191,14 @@ jobs: - { os: macos-12, python-version: "3.8", architecture: x64, type: 'binary' } - { os: ubuntu-latest, python-version: "3.12", architecture: x64, type: 'binary' } - { os: macos-13, python-version: "3.12", architecture: x64, type: 'binary' } + - { os: ubuntu-latest, python-version: "3.13.0-rc.2", architecture: x64, type: 'binary', continuous-only: true } + - { os: macos-13, python-version: "3.13.0-rc.2", architecture: x64, type: 'binary', continuous-only: true } - { os: ubuntu-latest, python-version: "3.8", architecture: x64, type: 'source', continuous-only: true } - { os: macos-12, python-version: "3.8", architecture: x64, type: 'source', continuous-only: true } - { os: ubuntu-latest, python-version: "3.12", architecture: x64, type: 'source', continuous-only: true } - { os: macos-13, python-version: "3.12", architecture: x64, type: 'source', continuous-only: true } + - { os: ubuntu-latest, python-version: "3.13.0-rc.2", architecture: x64, type: 'source', continuous-only: true } + - { os: macos-13, python-version: "3.13.0-rc.2", architecture: x64, type: 'source', continuous-only: true } # Windows uses the full API up until Python 3.10. - { os: windows-2019, python-version: "3.8", architecture: x86, type: 'binary', continuous-only: true } @@ -200,11 +206,13 @@ jobs: - { os: windows-2019, python-version: "3.10", architecture: x86, type: 'binary', continuous-only: true } - { os: windows-2019, python-version: "3.11", architecture: x86, type: 'binary', continuous-only: true } - { os: windows-2019, python-version: "3.12", architecture: x86, type: 'binary', continuous-only: true } + - { os: windows-2019, python-version: "3.13.0-rc.2", architecture: x86, type: 'binary', continuous-only: true } - { os: windows-2019, python-version: "3.8", architecture: x64, type: 'binary' } - { os: windows-2019, python-version: "3.9", architecture: x64, type: 'binary', continuous-only: true } - { os: windows-2019, python-version: "3.10", architecture: x64, type: 'binary', continuous-only: true } - { os: windows-2019, python-version: "3.11", architecture: x64, type: 'binary', continuous-only: true } - { os: windows-2019, python-version: "3.12", architecture: x64, type: 'binary' } + - { os: windows-2019, python-version: "3.13.0-rc.2", architecture: x64, type: 'binary', continuous-only: true } name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} Test Wheels Python ${{ matrix.python-version }} ${{ matrix.os }} ${{ matrix.architecture }} ${{ matrix.type }} needs: build_wheels runs-on: ${{ matrix.os }} @@ -225,11 +233,12 @@ jobs: with: name: requirements path: requirements - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f #v5.1.1 if: ${{ !matrix.continuous-only || inputs.continuous-run }} with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} + allow-prereleases: true - name: Setup Python venv if: ${{ !matrix.continuous-only || inputs.continuous-run }} run: | @@ -275,7 +284,7 @@ jobs: strategy: fail-fast: false # Don't cancel all jobs if one fails. matrix: - python-version: ["3.8", "3.12"] + python-version: ["3.8", "3.12", "3.13.0-rc.2"] runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request_target' }} steps: @@ -286,9 +295,10 @@ jobs: path: wheels - name: Delete Binary Wheels run: find wheels -type f | grep -v none-any | xargs rm - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f #v5.1.1 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Python venv run: | python -m pip install --upgrade pip diff --git a/python/dist/BUILD.bazel b/python/dist/BUILD.bazel index 764fc7054d670..04adff19ce0f4 100644 --- a/python/dist/BUILD.bazel +++ b/python/dist/BUILD.bazel @@ -315,6 +315,7 @@ py_wheel( "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13.Orc2", ], distribution = "protobuf", extra_distinfo_files = { @@ -376,6 +377,7 @@ py_wheel( "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13.Orc2", ], distribution = "protobuf", extra_distinfo_files = { diff --git a/python/dist/setup.py b/python/dist/setup.py index 3ace6a88185da..800c651d91cb7 100755 --- a/python/dist/setup.py +++ b/python/dist/setup.py @@ -58,6 +58,7 @@ def GetVersion(): 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', ], namespace_packages=['google'], packages=find_packages(), diff --git a/python/protobuf_distutils/setup.py b/python/protobuf_distutils/setup.py index e7a499803b9ee..a44ad818d7365 100644 --- a/python/protobuf_distutils/setup.py +++ b/python/protobuf_distutils/setup.py @@ -35,6 +35,7 @@ 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13.Orc2', 'Topic :: Software Development :: Code Generators', ], description=( diff --git a/python/requirements.txt b/python/requirements.txt index dd0ac27ce2ee1..153a5054dde13 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -1,2 +1,2 @@ -numpy<=1.26.1 +numpy<=2.1.0 setuptools<=70.3.0