Skip to content

Commit ab4b45d

Browse files
committed
Bump pyo3 to 0.29.0, support CPython 3.15, drop support for CPython 3.13-freethreaded (#58)
1 parent 8177c02 commit ab4b45d

12 files changed

Lines changed: 80 additions & 96 deletions

File tree

.github/workflows/CI.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,27 @@ jobs:
1919
platform:
2020
- {
2121
target: x86_64,
22-
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
22+
interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11",
2323
}
2424
- {
2525
target: x86,
26-
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
26+
interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11",
2727
}
2828
- {
2929
target: aarch64,
30-
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
30+
interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11",
3131
}
3232
- {
3333
target: armv7,
34-
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
34+
interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11",
3535
}
3636
- {
3737
target: s390x,
38-
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
38+
interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11",
3939
}
4040
- {
4141
target: ppc64le,
42-
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
42+
interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11",
4343
}
4444

4545
steps:
@@ -71,19 +71,19 @@ jobs:
7171
platform:
7272
- {
7373
target: x86_64,
74-
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
74+
interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11",
7575
}
7676
- {
7777
target: x86,
78-
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
78+
interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11",
7979
}
8080
- {
8181
target: aarch64,
82-
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
82+
interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11",
8383
}
8484
- {
8585
target: armv7,
86-
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
86+
interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11",
8787
}
8888

8989
steps:
@@ -115,9 +115,9 @@ jobs:
115115
platform:
116116
- {
117117
target: x64,
118-
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
118+
interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11",
119119
}
120-
- { target: x86, interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t" }
120+
- { target: x86, interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t" }
121121

122122
steps:
123123
- uses: actions/checkout@v6.0.2
@@ -148,11 +148,11 @@ jobs:
148148
platform:
149149
- {
150150
target: x86_64,
151-
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
151+
interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11",
152152
}
153153
- {
154154
target: aarch64,
155-
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
155+
interpreter: "3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11",
156156
}
157157

158158
steps:

.github/workflows/python-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
- "3.11"
2828
- "3.12"
2929
- "3.13"
30-
- "3.13t"
3130
- "3.14"
3231
- "3.14t"
32+
- "3.15"
3333
- "pypy3.11"
3434

3535
steps:

Cargo.lock

Lines changed: 32 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ cfg-if = "1.0.4"
2626
chrono = "0.4.44"
2727
fastrand = "2.4.1"
2828
parking_lot = {version="0.12.5", default-features=false}
29-
pyo3 = {version="0.28.3", default-features=false, features=["macros", "generate-import-lib", "chrono"]}
29+
pyo3 = {version="0.29", default-features=false, features=["macros", "chrono"]}
3030
# tokio = {version="1.52.3", default-features=false, features=["sync"]}
3131

3232
[build-dependencies]
33-
pyo3-build-config = {version="0.28.3", default-features=false, features=["resolve-config"]}
33+
pyo3-build-config = {version="0.29", default-features=false, features=["resolve-config"]}
3434

3535
[features]
3636
default = ["inline-more", "extension-module"]

src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,19 @@ mod _core {
7474
use crate::pyclasses::ttlcache::PyTTLCacheKeys;
7575
#[pymodule_export]
7676
use crate::pyclasses::ttlcache::PyTTLCacheValues;
77+
#[pymodule_export]
78+
use crate::pyclasses::ttlcache::PyTTLCacheItemsWithExpire;
7779

7880
#[pymodule_export]
7981
use crate::pyclasses::vttlcache::PyVTTLCache;
82+
#[pymodule_export]
83+
use crate::pyclasses::vttlcache::PyVTTLCacheItems;
84+
#[pymodule_export]
85+
use crate::pyclasses::vttlcache::PyVTTLCacheKeys;
86+
#[pymodule_export]
87+
use crate::pyclasses::vttlcache::PyVTTLCacheValues;
88+
#[pymodule_export]
89+
use crate::pyclasses::vttlcache::PyVTTLCacheItemsWithExpire;
8090

8191
#[pymodule_init]
8292
pub fn init(m: &pyo3::Bound<'_, pyo3::types::PyModule>) -> pyo3::PyResult<()> {

src/pyclasses/cache.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,9 @@ impl PyCache {
5757
fn __new__(
5858
args: alias::ArgsType,
5959
kwds: Option<alias::KwdsType>,
60-
) -> (Self, crate::pyclasses::base::PyBaseCacheImpl) {
61-
(
62-
Self(onceinit::OnceInit::uninit()),
63-
crate::pyclasses::base::PyBaseCacheImpl,
64-
)
60+
) -> pyo3::PyClassInitializer<Self> {
61+
pyo3::PyClassInitializer::from(crate::pyclasses::base::PyBaseCacheImpl)
62+
.add_subclass(Self(onceinit::OnceInit::uninit()))
6563
}
6664

6765
/// Initialize a new `Cache` instance.

src/pyclasses/fifocache.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,9 @@ impl PyFIFOCache {
6363
fn __new__(
6464
args: alias::ArgsType,
6565
kwds: Option<alias::KwdsType>,
66-
) -> (Self, crate::pyclasses::base::PyBaseCacheImpl) {
67-
(
68-
Self(onceinit::OnceInit::uninit()),
69-
crate::pyclasses::base::PyBaseCacheImpl,
70-
)
66+
) -> pyo3::PyClassInitializer<Self> {
67+
pyo3::PyClassInitializer::from(crate::pyclasses::base::PyBaseCacheImpl)
68+
.add_subclass(Self(onceinit::OnceInit::uninit()))
7169
}
7270

7371
/// Initialize a new `FIFOCache` instance.

src/pyclasses/lfucache.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,9 @@ impl PyLFUCache {
7979
fn __new__(
8080
args: alias::ArgsType,
8181
kwds: Option<alias::KwdsType>,
82-
) -> (Self, crate::pyclasses::base::PyBaseCacheImpl) {
83-
(
84-
Self(onceinit::OnceInit::uninit()),
85-
crate::pyclasses::base::PyBaseCacheImpl,
86-
)
82+
) -> pyo3::PyClassInitializer<Self> {
83+
pyo3::PyClassInitializer::from(crate::pyclasses::base::PyBaseCacheImpl)
84+
.add_subclass(Self(onceinit::OnceInit::uninit()))
8785
}
8886

8987
/// Initialize a new `LFUCache` instance.

0 commit comments

Comments
 (0)