-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PYTHON-4450 Support free-threaded Python 3.13t with no-GIL (#1906)
- Loading branch information
1 parent
2895e84
commit 8f26f43
Showing
8 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,11 +51,18 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
python-version: ["3.9", "pypy-3.9", "3.13"] | ||
python-version: ["3.9", "pypy-3.9", "3.13", "3.13t"] | ||
name: CPython ${{ matrix.python-version }}-${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
- if: ${{ matrix.python-version == '3.13t' }} | ||
name: Setup free-threaded Python | ||
uses: deadsnakes/[email protected] | ||
with: | ||
python-version: 3.13 | ||
nogil: true | ||
- if: ${{ matrix.python-version != '3.13t' }} | ||
name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
@@ -65,9 +72,13 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
pip install -U pip | ||
if [ "${{ matrix.python-version }}" == "3.13" ]; then | ||
if [[ "${{ matrix.python-version }}" == "3.13" ]]; then | ||
pip install --pre cffi setuptools | ||
pip install --no-build-isolation hatch | ||
elif [[ "${{ matrix.python-version }}" == "3.13t" ]]; then | ||
# Hatch can't be installed on 3.13t, use pytest directly. | ||
pip install . | ||
pip install -r requirements/test.txt | ||
else | ||
pip install hatch | ||
fi | ||
|
@@ -77,7 +88,11 @@ jobs: | |
mongodb-version: 6.0 | ||
- name: Run tests | ||
run: | | ||
hatch run test:test | ||
if [[ "${{ matrix.python-version }}" == "3.13t" ]]; then | ||
pytest -v --durations=5 --maxfail=10 | ||
else | ||
hatch run test:test | ||
fi | ||
doctest: | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters