Skip to content

Commit 633f46f

Browse files
authored
Add support for Python 3.14 (#1073)
* Add support for Python 3.14 * typo fix * exclude musllinux_1_1 from Python 3.14 builds * fix typo in path * make artifact names unique * try with quoted values * use newer Python minor versions in Mac wheel builds * fix dead links * adjust free-threaded python install * revert to 3.13 for 'default' testing jobs * explicitly specify development python versions in CI
1 parent a2fefbb commit 633f46f

File tree

6 files changed

+48
-11
lines changed

6 files changed

+48
-11
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<array>
5+
<dict>
6+
<key>attributeSetting</key>
7+
<integer>1</integer>
8+
<key>choiceAttribute</key>
9+
<string>selected</string>
10+
<key>choiceIdentifier</key>
11+
<string>org.python.Python.PythonTFramework-3.14</string>
12+
</dict>
13+
</array>
14+
</plist>

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ jobs:
9494
- {VERSION: "3.12", NOXSESSION: "tests"}
9595
- {VERSION: "3.13", NOXSESSION: "tests"}
9696
- {VERSION: "3.13t", NOXSESSION: "tests"}
97+
- {VERSION: "3.14-dev", NOXSESSION: "tests"}
98+
- {VERSION: "3.14t-dev", NOXSESSION: "tests"}
9799
- {VERSION: "pypy-3.9", NOXSESSION: "tests"}
98100
- {VERSION: "pypy-3.10", NOXSESSION: "tests"}
99101
- {VERSION: "pypy-3.11", NOXSESSION: "tests"}

.github/workflows/wheel-builder.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
- { VERSION: "cp39-cp39", ABI_VERSION: 'cp39' }
5252
- { VERSION: "pp311-pypy311_pp73" }
5353
- { VERSION: "cp313-cp313t" }
54+
- { VERSION: "cp314-cp314t" }
5455
MANYLINUX:
5556
- { NAME: "manylinux2014_x86_64", CONTAINER: "cryptography-manylinux2014:x86_64", RUNNER: "ubuntu-latest" }
5657
- { NAME: "manylinux_2_28_x86_64", CONTAINER: "cryptography-manylinux_2_28:x86_64", RUNNER: "ubuntu-latest"}
@@ -86,6 +87,18 @@ jobs:
8687
# No PyPy on armv7l either
8788
- PYTHON: { VERSION: "pp311-pypy311_pp73" }
8889
MANYLINUX: { NAME: "manylinux_2_31_armv7l", CONTAINER: "cryptography-manylinux_2_31:armv7l", RUNNER: "ubuntu-24.04-arm" }
90+
91+
# No Python 3.14 on musllinux_1_1
92+
- Python: { VERSION: "cp314-cp314"}
93+
MANYLINUX: { NAME: "musllinux_1_1_x86_64", CONTAINER: "cryptography-musllinux_1_1:x86_64", RUNNER: "ubuntu-latest"}
94+
- Python: { VERSION: "cp314-cp314"}
95+
MANYLINUX: { NAME: "musllinux_1_1_aarch64", CONTAINER: "cryptography-musllinux_1_1:aarch64", RUNNER: "ubuntu-24.04-arm" }
96+
97+
- Python: { VERSION: "cp314-cp314t"}
98+
MANYLINUX: { NAME: "musllinux_1_1_x86_64", CONTAINER: "cryptography-musllinux_1_1:x86_64", RUNNER: "ubuntu-latest"}
99+
- Python: { VERSION: "cp314-cp314t"}
100+
MANYLINUX: { NAME: "musllinux_1_1_aarch64", CONTAINER: "cryptography-musllinux_1_1:aarch64", RUNNER: "ubuntu-24.04-arm" }
101+
89102
name: "${{ matrix.PYTHON.VERSION }} for ${{ matrix.MANYLINUX.NAME }}"
90103
container:
91104
image: ghcr.io/pyca/${{ matrix.MANYLINUX.CONTAINER }}
@@ -129,7 +142,7 @@ jobs:
129142
- run: mv wheelhouse/bcrypt*.whl bcrypt-wheelhouse/
130143
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
131144
with:
132-
name: "bcrypt-${{ github.event.inputs.version }}-${{ matrix.MANYLINUX.NAME }} -${{ matrix.PYTHON.VERSION }}"
145+
name: "bcrypt-${{ github.event.inputs.version }}-${{ matrix.MANYLINUX.NAME }}-${{ matrix.PYTHON.VERSION }}${{ matrix.PYTHON.ABI_VERSION }}"
133146
path: bcrypt-wheelhouse/
134147

135148
macos:
@@ -141,34 +154,38 @@ jobs:
141154
PYTHON:
142155
- VERSION: '3.11'
143156
ABI_VERSION: 'cp38'
144-
DOWNLOAD_URL: 'https://www.python.org/ftp/python/3.11.3/python-3.11.3-macos11.pkg'
157+
DOWNLOAD_URL: 'https://www.python.org/ftp/python/3.11.9/python-3.11.9-macos11.pkg'
145158
BIN_PATH: '/Library/Frameworks/Python.framework/Versions/3.11/bin/python3'
146159
- VERSION: '3.11'
147160
ABI_VERSION: 'cp39'
148-
DOWNLOAD_URL: 'https://www.python.org/ftp/python/3.11.3/python-3.11.3-macos11.pkg'
161+
DOWNLOAD_URL: 'https://www.python.org/ftp/python/3.11.9/python-3.11.9-macos11.pkg'
149162
BIN_PATH: '/Library/Frameworks/Python.framework/Versions/3.11/bin/python3'
150163
- VERSION: '3.13t'
151-
DOWNLOAD_URL: 'https://www.python.org/ftp/python/3.13.1/python-3.13.1-macos11.pkg'
164+
DOWNLOAD_URL: 'https://www.python.org/ftp/python/3.13.7/python-3.13.7-macos11.pkg'
152165
BIN_PATH: '/Library/Frameworks/PythonT.framework/Versions/3.13/bin/python3.13t'
166+
- VERSION: '3.14t'
167+
DOWNLOAD_URL: 'https://www.python.org/ftp/python/3.14.0/python-3.14.0rc2-macos11.pkg'
168+
BIN_PATH: '/Library/Frameworks/PythonT.framework/Versions/3.14/bin/python3.14t'
153169
name: "Python ${{ matrix.PYTHON.VERSION }} ${{ matrix.PYTHON.ABI_VERSION }} on macOS"
154170
steps:
155171
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v4.2.2
156172
with:
157173
# The tag to build or the tag received by the tag event
158174
ref: ${{ github.event.inputs.version || github.ref }}
159175
sparse-checkout: |
160-
.github/config/macos-pkg-choices-freethreaded.xml
176+
.github/config/macos-pkg-choices-freethreaded-3.13t.xml
177+
.github/config/macos-pkg-choices-freethreaded-3.14t.xml
161178
persist-credentials: false
162179
- name: Install Python
163-
if: matrix.PYTHON.VERSION != '3.13t'
180+
if: ${{ !endsWith(matrix.PYTHON.VERSION, 't') }}
164181
run: |
165182
curl "${{ matrix.PYTHON.DOWNLOAD_URL }}" -o python.pkg
166183
sudo installer -pkg python.pkg -target /
167-
- name: Install Python
168-
if: matrix.PYTHON.VERSION == '3.13t'
184+
- name: Install Python (free-threaded)
185+
if: ${{ endsWith(matrix.PYTHON.VERSION, 't') }}
169186
run: |
170187
curl "${{ matrix.PYTHON.DOWNLOAD_URL }}" -o python.pkg
171-
sudo installer -pkg python.pkg -applyChoiceChangesXML .github/config/macos-pkg-choices-freethreaded.xml -target /
188+
sudo installer -pkg python.pkg -applyChoiceChangesXML .github/config/macos-pkg-choices-freethreaded-${{ matrix.PYTHON.VERSION }}.xml -target /
172189
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
173190
with:
174191
toolchain: stable
@@ -200,7 +217,7 @@ jobs:
200217
- run: mv wheelhouse/bcrypt*.whl bcrypt-wheelhouse/
201218
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
202219
with:
203-
name: "bcrypt-${{ github.event.inputs.version }}-macOS-${{ matrix.PYTHON.ABI_VERSION }}"
220+
name: "bcrypt-${{ github.event.inputs.version }}-macOS-${{ matrix.PYTHON.VERSION }}${{ matrix.PYTHON.ABI_VERSION }}"
204221
path: bcrypt-wheelhouse/
205222

206223
windows:
@@ -217,6 +234,7 @@ jobs:
217234
- {VERSION: "3.11", ABI_VERSION: "cp38"}
218235
- {VERSION: "3.11", ABI_VERSION: "cp39"}
219236
- {VERSION: "3.13t"}
237+
- {VERSION: "3.14t-dev"}
220238
name: "${{ matrix.PYTHON.VERSION }} ${{ matrix.PYTHON.ABI_VERSION }} ${{ matrix.WINDOWS.ARCH }}"
221239
steps:
222240
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
@@ -251,5 +269,5 @@ jobs:
251269
- run: move wheelhouse\bcrypt*.whl bcrypt-wheelhouse\
252270
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
253271
with:
254-
name: "bcrypt-${{ github.event.inputs.version }}-${{ matrix.WINDOWS.ARCH }}-${{ matrix.PYTHON.ABI_VERSION }}"
272+
name: "bcrypt-${{ github.event.inputs.version }}-${{ matrix.WINDOWS.ARCH }}-${{ matrix.PYTHON.VERSION }}${{ matrix.PYTHON.ABI_VERSION }}"
255273
path: bcrypt-wheelhouse\

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Unreleased
5555
----------
5656

5757
* Bumped MSRV to 1.74.
58+
* Added support for Python 3.14 and free-threaded Python 3.14.
5859

5960
4.3.0
6061
-----

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ classifiers = [
3030
"Programming Language :: Python :: 3.11",
3131
"Programming Language :: Python :: 3.12",
3232
"Programming Language :: Python :: 3.13",
33+
"Programming Language :: Python :: 3.14",
34+
"Programming Language :: Python :: Free Threading :: 3 - Stable",
3335
]
3436
requires-python = ">= 3.8"
3537
dynamic = ["readme"]

0 commit comments

Comments
 (0)