Skip to content

Commit 2837b4f

Browse files
committed
Build Python 3.14 wheels
1 parent f70419c commit 2837b4f

6 files changed

Lines changed: 21 additions & 34 deletions

File tree

.circleci/config.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,14 @@ commands:
99
parameters:
1010
cibw-version:
1111
type: string
12-
default: 2.23.2
12+
default: 3.1.2
1313
steps:
1414
- run:
1515
name: run cibuildwheel
1616
shell: bash -eo pipefail
1717
command: |
18-
if [[ $OS == Windows_NT ]]; then
19-
python -m pip install --user cibuildwheel==<< parameters.cibw-version >>
20-
python -m cibuildwheel --output-dir dist
21-
else
22-
python3 -m pip install --user cibuildwheel==<< parameters.cibw-version >>
23-
python3 -m cibuildwheel --output-dir dist
24-
fi
18+
python -m pip install --user cibuildwheel==<< parameters.cibw-version >>
19+
python -m cibuildwheel --output-dir dist
2520
2621
- store_artifacts: &store-artifacts
2722
path: ./dist
@@ -39,7 +34,7 @@ jobs:
3934
type: string
4035

4136
docker:
42-
- image: cimg/python:3.9
37+
- image: cimg/python:3.13 # just need a version that can install cibuildwheel
4338

4439
environment:
4540
<<: *global-environment
@@ -72,7 +67,7 @@ jobs:
7267

7368
python-linux-debug:
7469
docker:
75-
- image: cimg/python:3.9
70+
- image: cimg/python:3.10
7671

7772
steps:
7873
- checkout
@@ -111,7 +106,7 @@ jobs:
111106
112107
python-macOS:
113108
macos:
114-
xcode: 16.1.0
109+
xcode: 16.4.0 # latest as of August 2025
115110
resource_class: macos.m1.medium.gen1
116111

117112
parameters:
@@ -149,7 +144,7 @@ jobs:
149144

150145
python-sdist:
151146
docker:
152-
- image: cimg/python:3.9
147+
- image: cimg/python:3.10
153148

154149
steps:
155150
- checkout
@@ -324,7 +319,7 @@ jobs:
324319
325320
deploy:
326321
docker:
327-
- image: cimg/python:3.9
322+
- image: cimg/python:3.10
328323

329324
steps:
330325
- attach_workspace:
@@ -348,7 +343,7 @@ workflows:
348343
matrix:
349344
parameters:
350345
# versions are built with ~= so the patch version doesn't matter
351-
python-version: &python-versions [3.9.0, 3.10.0, 3.11.0, 3.12.0, 3.13.0]
346+
python-version: &python-versions [3.9.0, 3.10.0, 3.11.0, 3.12.0, 3.13.0, 3.14.0]
352347
filters: &tags
353348
# also run on tags so the deploy pipeline works
354349
tags:
@@ -377,7 +372,7 @@ workflows:
377372
- python-linux
378373
- python-dependencies:
379374
name: python-dependencies-latest
380-
python-version: "3.12" # should be updated to 3.13 once there is a non-rc image
375+
python-version: "3.13" # should be updated to 3.14 once there is a non-rc image
381376
dependency-versions: numpy
382377
only-binary: numpy
383378
requires:

meson.build

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,6 @@ else
7272
)
7373
endif
7474

75-
# Cython allows the creation of a "shared" file for some of their datastructures
76-
# See https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html#shared-module
77-
py.extension_module(
78-
'_cyutility',
79-
custom_target(
80-
output: '_cyutility.c',
81-
command: [meson.get_compiler('cython').cmd_array()[0], '--generate-shared', '@OUTPUT0@'],
82-
),
83-
install: true,
84-
install_rpath: '$ORIGIN',
85-
subdir: 'dwave/optimization/',
86-
)
87-
8875
py.extension_module(
8976
'_model',
9077
'dwave/optimization/_model.pyx',
@@ -93,7 +80,7 @@ py.extension_module(
9380
install: true,
9481
install_rpath: '$ORIGIN',
9582
override_options : ['cython_language=cpp'],
96-
cython_args : ['--shared=dwave.optimization._cyutility'],
83+
cython_args : ['-Xfreethreading_compatible=True'],
9784
subdir: 'dwave/optimization/',
9885
)
9986

@@ -105,7 +92,7 @@ py.extension_module(
10592
install: true,
10693
install_rpath: '$ORIGIN',
10794
override_options : ['cython_language=cpp'],
108-
cython_args : ['--shared=dwave.optimization._cyutility'],
95+
cython_args : ['-Xfreethreading_compatible=True'],
10996
subdir: 'dwave/optimization/',
11097
)
11198

@@ -117,7 +104,7 @@ py.extension_module(
117104
install: true,
118105
install_rpath: '$ORIGIN',
119106
override_options : ['cython_language=cpp'],
120-
cython_args : ['--shared=dwave.optimization._cyutility'],
107+
cython_args : ['-Xfreethreading_compatible=True'],
121108
subdir: 'dwave/optimization/',
122109
)
123110

@@ -128,7 +115,7 @@ py.extension_module(
128115
install: true,
129116
install_rpath: '$ORIGIN',
130117
override_options : ['cython_language=cpp'],
131-
# cython_args : ['--shared=dwave.optimization._cyutility'], # throws compiler warnings as of May 2025
118+
cython_args : ['-Xfreethreading_compatible=True'],
132119
subdir: 'dwave/optimization/',
133120
)
134121

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ classifiers = [
2626
"Programming Language :: Python :: 3.11",
2727
"Programming Language :: Python :: 3.12",
2828
"Programming Language :: Python :: 3.13",
29+
"Programming Language :: Python :: 3.14",
2930
"Programming Language :: Python :: 3 :: Only",
3031
'Programming Language :: Python :: Implementation :: CPython',
3132
]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
features:
3+
- Add support for Python 3.14.

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Install requirements
22
numpy==1.21.6; python_version < '3.10' # support numpy.typing
3-
numpy==2.1.0; python_version >= '3.10'
3+
numpy==2.1.0; python_version >= '3.10' and python_version < '3.14'
4+
numpy==2.3.2; python_version >= '3.14' # first that supports 3.14
45

56
# Build requirements
67
cython~=3.1.0

tests/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dimod==0.12.17
1+
dimod==0.12.17; python_version < '3.14'

0 commit comments

Comments
 (0)