Skip to content

Commit 8b9f0a3

Browse files
authored
Bump pyo3 to 0.25, update supported Python versions (#198)
1 parent 6ed1f88 commit 8b9f0a3

File tree

5 files changed

+20
-57
lines changed

5 files changed

+20
-57
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- uses: actions/checkout@v4
5454

5555
- name: set up python
56-
uses: quansight-labs/setup-python@v5
56+
uses: actions/setup-python@v5
5757
with:
5858
python-version: ${{ matrix.python-version }}
5959

@@ -98,7 +98,7 @@ jobs:
9898
- uses: actions/checkout@v4
9999

100100
- name: set up python
101-
uses: quansight-labs/setup-python@v5
101+
uses: actions/setup-python@v5
102102
with:
103103
python-version: ${{ matrix.python-version }}
104104

@@ -265,15 +265,15 @@ jobs:
265265
- os: linux
266266
manylinux: auto
267267
target: armv7
268-
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
268+
interpreter: 3.9 3.10 3.11 3.12 3.13 3.14
269269
- os: linux
270270
manylinux: auto
271271
target: ppc64le
272-
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
272+
interpreter: 3.9 3.10 3.11 3.12 3.13 3.14
273273
- os: linux
274274
manylinux: auto
275275
target: s390x
276-
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
276+
interpreter: 3.9 3.10 3.11 3.12 3.13 3.14
277277

278278
# musllinux
279279
- os: linux
@@ -290,14 +290,14 @@ jobs:
290290
target: x86_64
291291
- os: macos
292292
target: aarch64
293-
interpreter: 3.8 3.9
293+
interpreter: '3.9'
294294

295295
# windows;
296296
# aarch64 only 3.11 and up, also not PGO optimized
297297
- os: windows
298298
target: i686
299299
python-architecture: x86
300-
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
300+
interpreter: 3.9 3.10 3.11 3.12 3.13 3.14
301301
# FIXME had link failures, needs investigation
302302
# - os: windows
303303
# target: aarch64
@@ -323,7 +323,7 @@ jobs:
323323
with:
324324
target: ${{ matrix.target }}
325325
manylinux: ${{ matrix.manylinux }}
326-
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 3.13' }}
326+
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.9 3.10 3.11 3.12 3.13 3.14' }}
327327
rust-toolchain: stable
328328
working-directory: crates/jiter-python
329329

@@ -346,7 +346,7 @@ jobs:
346346
fail-fast: false
347347
matrix:
348348
os: [linux, windows, macos]
349-
interpreter: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"]
349+
interpreter: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t"]
350350
include:
351351
# standard runners with override for macos arm
352352
- os: linux
@@ -358,8 +358,6 @@ jobs:
358358
runs-on: macos-latest
359359
exclude:
360360
# macos arm only supported from 3.10 and up
361-
- os: macos
362-
interpreter: "3.8"
363361
- os: macos
364362
interpreter: "3.9"
365363

@@ -369,7 +367,7 @@ jobs:
369367

370368
- id: setup-python
371369
name: set up python
372-
uses: quansight-labs/setup-python@v5
370+
uses: actions/setup-python@v5
373371
with:
374372
python-version: ${{ matrix.interpreter }}
375373
allow-prereleases: true
@@ -402,10 +400,9 @@ jobs:
402400

403401
- id: setup-python
404402
name: set up python
405-
uses: quansight-labs/setup-python@v5
403+
uses: actions/setup-python@v5
406404
with:
407405
python-version: 3.12
408-
allow-prereleases: true
409406

410407
- name: install rust nightly
411408
uses: dtolnay/rust-toolchain@master

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ inherits = "release"
2929
debug = true
3030

3131
[workspace.dependencies]
32-
pyo3 = { version = "0.24.1" }
33-
pyo3-build-config = { version = "0.24" }
32+
pyo3 = { version = "0.25" }
33+
pyo3-build-config = { version = "0.25" }

crates/jiter-python/pyproject.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "maturin"
55
[project]
66
name = "jiter"
77
description = "Fast iterable JSON parser."
8-
requires-python = ">=3.8"
8+
requires-python = ">=3.9"
99
authors = [
1010
{name = "Samuel Colvin", email = "[email protected]"}
1111
]
@@ -16,11 +16,12 @@ classifiers = [
1616
"Programming Language :: Python",
1717
"Programming Language :: Python :: 3",
1818
"Programming Language :: Python :: 3 :: Only",
19-
"Programming Language :: Python :: 3.8",
2019
"Programming Language :: Python :: 3.9",
2120
"Programming Language :: Python :: 3.10",
2221
"Programming Language :: Python :: 3.11",
2322
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
24+
"Programming Language :: Python :: 3.14",
2425
"Intended Audience :: Developers",
2526
"Intended Audience :: Information Technology",
2627
"Intended Audience :: System Administrators",
@@ -39,5 +40,8 @@ module-name = "jiter"
3940
bindings = "pyo3"
4041
features = ["pyo3/extension-module", "pyo3/generate-import-lib"]
4142

43+
[tool.ruff]
44+
target-version = "py39"
45+
4246
[tool.ruff.format]
43-
quote-style = 'single'
47+
quote-style = "single"

crates/jiter/src/number_decoder.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -122,19 +122,6 @@ pub enum NumberAny {
122122
Float(f64),
123123
}
124124

125-
#[cfg(feature = "python")]
126-
#[allow(deprecated)] // kept around for downstream sake
127-
impl pyo3::ToPyObject for NumberAny {
128-
fn to_object(&self, py: pyo3::Python<'_>) -> pyo3::PyObject {
129-
match self {
130-
Self::Int(NumberInt::Int(int)) => int.to_object(py),
131-
#[cfg(feature = "num-bigint")]
132-
Self::Int(NumberInt::BigInt(big_int)) => big_int.to_object(py),
133-
Self::Float(float) => float.to_object(py),
134-
}
135-
}
136-
}
137-
138125
impl From<NumberAny> for f64 {
139126
fn from(num: NumberAny) -> Self {
140127
match num {

crates/jiter/src/value.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,6 @@ pub type JsonArray<'s> = Arc<Vec<JsonValue<'s>>>;
3333
/// It is up to the user to handle this case and decide how to proceed.
3434
pub type JsonObject<'s> = Arc<Vec<(Cow<'s, str>, JsonValue<'s>)>>;
3535

36-
#[cfg(feature = "python")]
37-
#[allow(deprecated)] // keeping around for sake of allowing downstream to migrate
38-
impl pyo3::ToPyObject for JsonValue<'_> {
39-
fn to_object(&self, py: pyo3::Python<'_>) -> pyo3::PyObject {
40-
use pyo3::prelude::*;
41-
match self {
42-
Self::Null => py.None().to_object(py),
43-
Self::Bool(b) => b.to_object(py),
44-
Self::Int(i) => i.to_object(py),
45-
#[cfg(feature = "num-bigint")]
46-
Self::BigInt(b) => b.to_object(py),
47-
Self::Float(f) => f.to_object(py),
48-
Self::Str(s) => s.to_object(py),
49-
Self::Array(v) => pyo3::types::PyList::new_bound(py, v.iter().map(|v| v.to_object(py))).to_object(py),
50-
Self::Object(o) => {
51-
let dict = pyo3::types::PyDict::new_bound(py);
52-
for (k, v) in o.iter() {
53-
dict.set_item(k, v.to_object(py)).unwrap();
54-
}
55-
dict.to_object(py)
56-
}
57-
}
58-
}
59-
}
60-
6136
#[cfg(feature = "python")]
6237
impl<'py> pyo3::IntoPyObject<'py> for JsonValue<'_> {
6338
type Error = pyo3::PyErr;

0 commit comments

Comments
 (0)