From 4d68dcf872b196a1b9ff17f536d5d59720baf77b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 5 Aug 2025 16:29:35 -0500 Subject: [PATCH 1/4] INTPYTHON-710 Add Python 3.14 support --- .github/workflows/dist.yml | 45 +------------------------------------- pyproject.toml | 5 ++++- 2 files changed, 5 insertions(+), 45 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 4375f53..4423241 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -32,7 +32,7 @@ jobs: name: Build CPython-${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: pypa/cibuildwheel@faf86a6ed7efa889faf6996aa23820831055001a # v2.23.3 + - uses: pypa/cibuildwheel@352e01339f0a173aa2a3eb57f01492e341e83865 # v3.13.3 env: CIBW_ARCHS_MACOS: x86_64 universal2 CIBW_TEST_SKIP: '*universal2:arm64' @@ -42,49 +42,6 @@ jobs: name: ${{ matrix.os }}-wheel path: ./wheelhouse/*.whl if-no-files-found: error - test_non_linux_wheels: - needs: build_wheels - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-latest, windows-latest] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - name: Test CPython ${{ matrix.python-version }}-${{ matrix.os }} - steps: - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - name: Download a previously created wheel - uses: actions/download-artifact@v4 - with: - name: ${{ matrix.os }}-wheel - - name: Test wheel - shell: bash - run: | - python -m pip install -U pip - python -m pip install --no-index --find-links=./ python_bsonjs - python -m pip list | grep python-bsonjs - python -c "from bsonjs import dumps" - # Linux - test_manylinux_wheels: - runs-on: ${{ matrix.os }} - needs: build_wheels - strategy: - matrix: - os: [ubuntu-latest] - container: ['manylinux2014_i686', 'manylinux2014_x86_64'] - python-version: ['cp39-cp39', 'cp310-cp310', 'cp311-cp311', 'cp312-cp312', 'cp313-cp313'] - name: Test CPython ${{ matrix.python-version }}-${{ matrix.container }} - steps: - - name: Download a previously created wheel - uses: actions/download-artifact@v4 - with: - name: ${{ matrix.os }}-wheel - - name: Test wheel - run: | - docker run --rm --volume `pwd`:/python quay.io/pypa/${{ matrix.container }} /bin/bash -c "/opt/python/${{ matrix.python-version }}/bin/python -m pip install -U pip && /opt/python/${{ matrix.python-version }}/bin/python -m pip install --find-links=/python/ --no-index python_bsonjs && /opt/python/${{ matrix.python-version }}/bin/python -m pip list | grep python-bsonjs && /opt/python/${{ matrix.python-version }}/bin/python -c 'from bsonjs import dumps'" make_sdist: name: Make SDist runs-on: ubuntu-latest diff --git a/pyproject.toml b/pyproject.toml index a251220..a314103 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,4 +41,7 @@ classifiers = [ Homepage = "https://github.com/mongodb-labs/python-bsonjs" [project.optional-dependencies] -test = ["pymongo>=4", "pytest"] \ No newline at end of file +test = ["pymongo>=4", "pytest"] + +[tool.cibuildwheel] +test-command = "python -c 'from bsonjs import dumps'" \ No newline at end of file From d2bdbee6c9f60f51b56e947bcf5204ff4031b547 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 5 Aug 2025 16:31:26 -0500 Subject: [PATCH 2/4] update tests --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fa1dc49..77a27c9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,8 +16,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, ubuntu-latest, windows-2019] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + os: [macos-latest, ubuntu-latest, windows-latest] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v4 From 6a78a628982c347413c5d4476a1745e14cafbb97 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 5 Aug 2025 16:35:50 -0500 Subject: [PATCH 3/4] update test command --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a314103..96c67af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,4 +44,5 @@ Homepage = "https://github.com/mongodb-labs/python-bsonjs" test = ["pymongo>=4", "pytest"] [tool.cibuildwheel] -test-command = "python -c 'from bsonjs import dumps'" \ No newline at end of file +test-command = "pytest {package}/test" +test-requires = "pytest" \ No newline at end of file From 298cffb0bdc1a2ced160f8167cf889ec5cc0022f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 5 Aug 2025 16:38:57 -0500 Subject: [PATCH 4/4] update test command --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 96c67af..4e158a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,4 +45,4 @@ test = ["pymongo>=4", "pytest"] [tool.cibuildwheel] test-command = "pytest {package}/test" -test-requires = "pytest" \ No newline at end of file +test-extras = ["test"] \ No newline at end of file