Skip to content

Commit db4aef5

Browse files
committed
- Bump version to 5.0.3
- Better support for Python 3.14 - Use `immutable_type` feature for Python 3.14 - Some improvements - Thanks to [@chirizxc](https://github.com/chirizxc) - Bump rust dependencies - Use Rust nightly - Use `parking_lot::Mutex` instead of duplicating its code !test
1 parent 687efb8 commit db4aef5

18 files changed

Lines changed: 103 additions & 110 deletions

.github/workflows/CI.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
args: --release --out dist --find-interpreter
3939
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
4040
manylinux: auto
41+
rust-toolchain: nightly
42+
4143
- name: Upload wheels
4244
uses: actions/upload-artifact@v4
4345
with:
@@ -71,6 +73,8 @@ jobs:
7173
args: --release --out dist --find-interpreter
7274
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
7375
manylinux: musllinux_1_2
76+
rust-toolchain: nightly
77+
7478
- name: Upload wheels
7579
uses: actions/upload-artifact@v4
7680
with:
@@ -100,6 +104,8 @@ jobs:
100104
target: ${{ matrix.platform.target }}
101105
args: --release --out dist --find-interpreter
102106
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
107+
rust-toolchain: nightly
108+
103109
- name: Upload wheels
104110
uses: actions/upload-artifact@v4
105111
with:
@@ -128,6 +134,8 @@ jobs:
128134
target: ${{ matrix.platform.target }}
129135
args: --release --out dist --find-interpreter
130136
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
137+
rust-toolchain: nightly
138+
131139
- name: Upload wheels
132140
uses: actions/upload-artifact@v4
133141
with:
@@ -143,6 +151,8 @@ jobs:
143151
with:
144152
command: sdist
145153
args: --out dist
154+
rust-toolchain: nightly
155+
146156
- name: Upload sdist
147157
uses: actions/upload-artifact@v4
148158
with:
@@ -175,3 +185,4 @@ jobs:
175185
with:
176186
command: upload
177187
args: --non-interactive --skip-existing wheels-*/*
188+
rust-toolchain: nightly

.github/workflows/python-test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333

3434
- name: install rust stable
3535
uses: dtolnay/rust-toolchain@stable
36+
with:
37+
toolchain: nightly
3638

3739
- name: set up python
3840
uses: actions/setup-python@v5
@@ -68,6 +70,8 @@ jobs:
6870

6971
- name: install rust stable
7072
uses: dtolnay/rust-toolchain@stable
73+
with:
74+
toolchain: nightly
7175

7276
- name: set up python
7377
uses: actions/setup-python@v5

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## v5.0.3 - 2025-10-10
9+
### Changed
10+
- Better support for Python 3.14
11+
- Use `immutable_type` feature for Python 3.14
12+
- Some improvements
13+
14+
### Thanks
15+
- thanks to [@chirizxc](https://github.com/chirizxc)
16+
17+
### Internal
18+
- Bump rust dependencies
19+
- Use Rust nightly
20+
- Use `parking_lot::Mutex` instead of duplicating its code
21+
822
## v5.0.2 - 2025-09-14
923
### Changed
1024
- Support Python 3.14 ( for linux )

Cargo.lock

Lines changed: 11 additions & 71 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 & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cachebox"
3-
version = "5.0.2"
3+
version = "5.0.3"
44
edition = "2021"
55
description = "The fastest memoizing and caching Python library written in Rust"
66
readme = "README.md"
@@ -38,11 +38,7 @@ features = ["macros", "extension-module"]
3838
version = "1.0.3"
3939

4040
[dependencies.parking_lot]
41-
version = "0.12.4"
42-
43-
[dependencies.lock_api]
44-
version = "0.4.13"
45-
default-features = false
41+
version = "0.12.5"
4642

4743
[build-dependencies.pyo3-build-config]
4844
version = "0.26.0"

src/bridge/cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::common::Entry;
22
use crate::common::ObservedIterator;
33
use crate::common::PreHashObject;
44

5-
#[pyo3::pyclass(module = "cachebox._core", frozen)]
5+
#[pyo3::pyclass(module = "cachebox._core", frozen, immutable_type)]
66
pub struct Cache {
77
raw: crate::common::Mutex<crate::policies::nopolicy::NoPolicy>,
88
}

src/bridge/fifocache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::common::Entry;
22
use crate::common::ObservedIterator;
33
use crate::common::PreHashObject;
44

5-
#[pyo3::pyclass(module = "cachebox._core", frozen)]
5+
#[pyo3::pyclass(module = "cachebox._core", frozen, immutable_type)]
66
pub struct FIFOCache {
77
raw: crate::common::Mutex<crate::policies::fifo::FIFOPolicy>,
88
}

src/bridge/lfucache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::common::Entry;
22
use crate::common::ObservedIterator;
33
use crate::common::PreHashObject;
44

5-
#[pyo3::pyclass(module = "cachebox._core", frozen)]
5+
#[pyo3::pyclass(module = "cachebox._core", frozen, immutable_type)]
66
pub struct LFUCache {
77
raw: crate::common::Mutex<crate::policies::lfu::LFUPolicy>,
88
}

src/bridge/lrucache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::common::Entry;
22
use crate::common::ObservedIterator;
33
use crate::common::PreHashObject;
44

5-
#[pyo3::pyclass(module = "cachebox._core", frozen)]
5+
#[pyo3::pyclass(module = "cachebox._core", frozen, immutable_type)]
66
pub struct LRUCache {
77
raw: crate::common::Mutex<crate::policies::lru::LRUPolicy>,
88
}

src/bridge/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use pyo3::types::PyTypeMethods;
33

44
create_exception!(cachebox._core, CoreKeyError, pyo3::exceptions::PyException);
55

6-
#[pyo3::pyclass(module = "cachebox._cachebox", subclass, frozen)]
6+
#[pyo3::pyclass(module = "cachebox._cachebox", subclass, frozen, immutable_type)]
77
pub struct BaseCacheImpl {}
88

99
#[pyo3::pymethods]
@@ -38,7 +38,7 @@ impl BaseCacheImpl {
3838
}
3939
}
4040

41-
#[pyo3::pyclass(module = "cachebox._core", frozen)]
41+
#[pyo3::pyclass(module = "cachebox._core", frozen, immutable_type)]
4242
pub struct TTLPair {
4343
key: pyo3::Py<pyo3::PyAny>,
4444
value: pyo3::Py<pyo3::PyAny>,

0 commit comments

Comments
 (0)