cachebox 6.2.6__tar.gz → 6.2.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. {cachebox-6.2.6 → cachebox-6.2.8}/.github/workflows/CI.yml +23 -17
  2. {cachebox-6.2.6 → cachebox-6.2.8}/.github/workflows/docs.yml +2 -2
  3. {cachebox-6.2.6 → cachebox-6.2.8}/.github/workflows/python-test.yml +2 -2
  4. {cachebox-6.2.6 → cachebox-6.2.8}/.gitignore +0 -1
  5. cachebox-6.2.8/AGENTS.md +42 -0
  6. {cachebox-6.2.6 → cachebox-6.2.8}/Cargo.lock +53 -40
  7. {cachebox-6.2.6 → cachebox-6.2.8}/Cargo.toml +16 -17
  8. {cachebox-6.2.6 → cachebox-6.2.8}/PKG-INFO +14 -11
  9. {cachebox-6.2.6 → cachebox-6.2.8}/README.md +3 -0
  10. {cachebox-6.2.6 → cachebox-6.2.8}/cachebox/__init__.py +3 -1
  11. {cachebox-6.2.6 → cachebox-6.2.8}/cachebox/_cachebox.py +0 -1
  12. {cachebox-6.2.6 → cachebox-6.2.8}/cachebox/_core.pyi +182 -284
  13. {cachebox-6.2.6 → cachebox-6.2.8}/cachebox/_wrappers.py +8 -6
  14. {cachebox-6.2.6 → cachebox-6.2.8}/cachebox/utils.py +39 -24
  15. {cachebox-6.2.6 → cachebox-6.2.8}/docs/docs/algorithms.md +15 -15
  16. {cachebox-6.2.6 → cachebox-6.2.8}/docs/docs/faq.md +5 -3
  17. {cachebox-6.2.6 → cachebox-6.2.8}/docs/docs/getting-started.md +36 -11
  18. {cachebox-6.2.6 → cachebox-6.2.8}/docs/docs/index.md +2 -0
  19. {cachebox-6.2.6 → cachebox-6.2.8}/docs/docs/migration.md +5 -0
  20. {cachebox-6.2.6 → cachebox-6.2.8}/docs/docs/tips.md +19 -7
  21. cachebox-6.2.8/pyproject.toml +83 -0
  22. {cachebox-6.2.6 → cachebox-6.2.8}/src/hashbrown/raw.rs +29 -19
  23. {cachebox-6.2.6 → cachebox-6.2.8}/src/internal/onceinit.rs +18 -14
  24. {cachebox-6.2.6 → cachebox-6.2.8}/src/internal/utils.rs +5 -5
  25. {cachebox-6.2.6 → cachebox-6.2.8}/src/lib.rs +2 -0
  26. {cachebox-6.2.6 → cachebox-6.2.8}/src/policies/fifopolicy.rs +8 -4
  27. {cachebox-6.2.6 → cachebox-6.2.8}/src/policies/lfupolicy.rs +8 -4
  28. {cachebox-6.2.6 → cachebox-6.2.8}/src/policies/lrupolicy.rs +2 -2
  29. {cachebox-6.2.6 → cachebox-6.2.8}/src/policies/nopolicy.rs +9 -2
  30. {cachebox-6.2.6 → cachebox-6.2.8}/src/policies/rrpolicy.rs +9 -2
  31. {cachebox-6.2.6 → cachebox-6.2.8}/src/policies/traits.rs +1 -1
  32. {cachebox-6.2.6 → cachebox-6.2.8}/src/policies/ttlpolicy.rs +8 -4
  33. {cachebox-6.2.6 → cachebox-6.2.8}/src/policies/vttlpolicy.rs +8 -4
  34. {cachebox-6.2.6 → cachebox-6.2.8}/src/policies/wrapped.rs +28 -11
  35. {cachebox-6.2.6 → cachebox-6.2.8}/src/pyclasses/cache.rs +97 -83
  36. {cachebox-6.2.6 → cachebox-6.2.8}/src/pyclasses/fifocache.rs +91 -85
  37. {cachebox-6.2.6 → cachebox-6.2.8}/src/pyclasses/lfucache.rs +93 -87
  38. {cachebox-6.2.6 → cachebox-6.2.8}/src/pyclasses/lrucache.rs +99 -87
  39. {cachebox-6.2.6 → cachebox-6.2.8}/src/pyclasses/rrcache.rs +95 -83
  40. {cachebox-6.2.6 → cachebox-6.2.8}/src/pyclasses/ttlcache.rs +103 -96
  41. {cachebox-6.2.6 → cachebox-6.2.8}/src/pyclasses/vttlcache.rs +97 -90
  42. cachebox-6.2.8/tests/__init__.py +0 -0
  43. cachebox-6.2.8/tests/conftest.py +29 -0
  44. {cachebox-6.2.6 → cachebox-6.2.8}/tests/mixins.py +191 -19
  45. {cachebox-6.2.6 → cachebox-6.2.8}/tests/test_impls.py +81 -31
  46. {cachebox-6.2.6 → cachebox-6.2.8}/tests/test_utils.py +43 -24
  47. {cachebox-6.2.6 → cachebox-6.2.8}/typos.toml +1 -7
  48. cachebox-6.2.8/uv.lock +1529 -0
  49. cachebox-6.2.6/pyproject.toml +0 -80
  50. cachebox-6.2.6/tests/conftest.py +0 -9
  51. cachebox-6.2.6/uv.lock +0 -1025
  52. {cachebox-6.2.6 → cachebox-6.2.8}/.github/dependabot.yaml +0 -0
  53. {cachebox-6.2.6 → cachebox-6.2.8}/LICENSE +0 -0
  54. {cachebox-6.2.6 → cachebox-6.2.8}/LICENSE-THIRD-PARTY +0 -0
  55. {cachebox-6.2.6 → cachebox-6.2.8}/build.rs +0 -0
  56. cachebox-6.2.6/tests/__init__.py → cachebox-6.2.8/cachebox/py.typed +0 -0
  57. {cachebox-6.2.6 → cachebox-6.2.8}/docs/docs/api/impls.md +0 -0
  58. {cachebox-6.2.6 → cachebox-6.2.8}/docs/docs/api/index.md +0 -0
  59. {cachebox-6.2.6 → cachebox-6.2.8}/docs/docs/api/utils.md +0 -0
  60. {cachebox-6.2.6 → cachebox-6.2.8}/docs/docs/installation.md +0 -0
  61. {cachebox-6.2.6 → cachebox-6.2.8}/docs/mkdocs.yml +0 -0
  62. {cachebox-6.2.6 → cachebox-6.2.8}/rust-toolchain.toml +0 -0
  63. {cachebox-6.2.6 → cachebox-6.2.8}/rustfmt.toml +0 -0
  64. {cachebox-6.2.6 → cachebox-6.2.8}/src/hashbrown/alloc.rs +1 -1
  65. {cachebox-6.2.6 → cachebox-6.2.8}/src/hashbrown/control/bitmask.rs +0 -0
  66. {cachebox-6.2.6 → cachebox-6.2.8}/src/hashbrown/control/group/generic.rs +0 -0
  67. {cachebox-6.2.6 → cachebox-6.2.8}/src/hashbrown/control/group/lsx.rs +0 -0
  68. {cachebox-6.2.6 → cachebox-6.2.8}/src/hashbrown/control/group/mod.rs +0 -0
  69. {cachebox-6.2.6 → cachebox-6.2.8}/src/hashbrown/control/group/neon.rs +0 -0
  70. {cachebox-6.2.6 → cachebox-6.2.8}/src/hashbrown/control/group/sse2.rs +0 -0
  71. {cachebox-6.2.6 → cachebox-6.2.8}/src/hashbrown/control/mod.rs +0 -0
  72. {cachebox-6.2.6 → cachebox-6.2.8}/src/hashbrown/control/tag.rs +0 -0
  73. {cachebox-6.2.6 → cachebox-6.2.8}/src/hashbrown/mod.rs +0 -0
  74. {cachebox-6.2.6 → cachebox-6.2.8}/src/hashbrown/scopeguard.rs +0 -0
  75. {cachebox-6.2.6 → cachebox-6.2.8}/src/hashbrown/util.rs +0 -0
  76. {cachebox-6.2.6 → cachebox-6.2.8}/src/internal/alias.rs +0 -0
  77. {cachebox-6.2.6 → cachebox-6.2.8}/src/internal/lazyheap.rs +0 -0
  78. {cachebox-6.2.6 → cachebox-6.2.8}/src/internal/linked_list.rs +0 -0
  79. {cachebox-6.2.6 → cachebox-6.2.8}/src/internal/mod.rs +0 -0
  80. {cachebox-6.2.6 → cachebox-6.2.8}/src/internal/pickle.rs +0 -0
  81. {cachebox-6.2.6 → cachebox-6.2.8}/src/macro_rules.rs +0 -0
  82. {cachebox-6.2.6 → cachebox-6.2.8}/src/policies/common.rs +0 -0
  83. {cachebox-6.2.6 → cachebox-6.2.8}/src/policies/mod.rs +0 -0
  84. {cachebox-6.2.6 → cachebox-6.2.8}/src/pyclasses/base.rs +0 -0
  85. {cachebox-6.2.6 → cachebox-6.2.8}/src/pyclasses/mod.rs +0 -0
  86. {cachebox-6.2.6 → cachebox-6.2.8}/src/typeref.rs +0 -0
@@ -42,7 +42,7 @@ jobs:
42
42
  python-version: "3.14"
43
43
 
44
44
  - name: "Install uv"
45
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
45
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
46
46
  with:
47
47
  # zizmor: ignore[cache-poisoning]
48
48
  enable-cache: ${{ github.event_name == 'pull_request' }}
@@ -58,21 +58,24 @@ jobs:
58
58
  strategy:
59
59
  matrix:
60
60
  platform:
61
- - { target: x86_64, interpreter: *interpreters }
62
- - { target: x86, interpreter: *interpreters }
63
- - { target: aarch64, interpreter: *interpreters }
64
- - { target: armv7, interpreter: *interpreters }
65
- - { target: s390x, interpreter: *interpreters }
66
- - { target: ppc64le, interpreter: *interpreters }
61
+ - { target: x86_64-unknown-linux-gnu, arch: x86_64, interpreter: *interpreters }
62
+ - { target: i686-unknown-linux-gnu, arch: x86, interpreter: *interpreters }
63
+ - { target: aarch64-unknown-linux-gnu, arch: aarch64, interpreter: *interpreters }
64
+ - { target: armv7-unknown-linux-gnueabihf, arch: armv7, interpreter: *interpreters }
65
+ - { target: s390x-unknown-linux-gnu, arch: s390x, interpreter: *interpreters }
66
+ - { target: powerpc64le-unknown-linux-gnu, arch: ppc64le, interpreter: *interpreters }
67
+ - { target: riscv64gc-unknown-linux-gnu, arch: riscv64, interpreter: *interpreters }
67
68
 
68
69
  steps:
69
70
  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
70
71
  with:
71
72
  persist-credentials: false
72
73
 
73
- - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
74
+ - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
74
75
  with:
75
- python-version: "3.x"
76
+ activate-environment: true
77
+ enable-cache: false
78
+ python-version: "3"
76
79
 
77
80
  - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
78
81
  # zizmor: ignore[cache-poisoning]
@@ -88,7 +91,7 @@ jobs:
88
91
 
89
92
  - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
90
93
  with:
91
- name: wheels-linux-${{ matrix.platform.target }}
94
+ name: wheels-linux-${{ matrix.platform.arch }}
92
95
  path: dist
93
96
 
94
97
  build-musllinux:
@@ -96,19 +99,22 @@ jobs:
96
99
  strategy:
97
100
  matrix:
98
101
  platform:
99
- - { target: x86_64, interpreter: *interpreters }
100
- - { target: x86, interpreter: *interpreters }
101
- - { target: aarch64, interpreter: *interpreters }
102
- - { target: armv7, interpreter: *interpreters }
102
+ - { target: x86_64-unknown-linux-musl, arch: x86_64, interpreter: *interpreters }
103
+ - { target: i686-unknown-linux-musl, arch: x86, interpreter: *interpreters }
104
+ - { target: aarch64-unknown-linux-musl, arch: aarch64, interpreter: *interpreters }
105
+ - { target: armv7-unknown-linux-musleabihf, arch: armv7, interpreter: *interpreters }
106
+ - { target: riscv64gc-unknown-linux-musl, arch: riscv64, interpreter: *interpreters }
103
107
 
104
108
  steps:
105
109
  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
106
110
  with:
107
111
  persist-credentials: false
108
112
 
109
- - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
113
+ - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
110
114
  with:
111
- python-version: "3.x"
115
+ activate-environment: true
116
+ enable-cache: false
117
+ python-version: "3"
112
118
 
113
119
  - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
114
120
  # zizmor: ignore[cache-poisoning]
@@ -124,7 +130,7 @@ jobs:
124
130
 
125
131
  - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
126
132
  with:
127
- name: wheels-musllinux-${{ matrix.platform.target }}
133
+ name: wheels-musllinux-${{ matrix.platform.arch }}
128
134
  path: dist
129
135
 
130
136
  build-windows:
@@ -20,7 +20,7 @@ jobs:
20
20
  python-version: 3.14
21
21
 
22
22
  - name: "Install uv"
23
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
23
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
24
24
  with:
25
25
  enable-cache: false
26
26
 
@@ -52,4 +52,4 @@ jobs:
52
52
  path: "."
53
53
 
54
54
  - id: deployment
55
- uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
55
+ uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
@@ -52,7 +52,7 @@ jobs:
52
52
  allow-prereleases: true
53
53
 
54
54
  - name: "Install uv"
55
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
55
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
56
56
  with:
57
57
  enable-cache: false
58
58
 
@@ -93,7 +93,7 @@ jobs:
93
93
  python-version: "3.13"
94
94
 
95
95
  - name: "Install uv"
96
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
96
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
97
97
  with:
98
98
  enable-cache: false
99
99
 
@@ -5,6 +5,5 @@ __pycache__
5
5
  /.coverage
6
6
  /.pytest_cache
7
7
  /htmlcov
8
- /backup
9
8
  /.benchmarks
10
9
  /.hypothesis
@@ -0,0 +1,42 @@
1
+ # cachebox
2
+
3
+ In-memory cache for Python. The hot path is a PyO3 extension (`cachebox._core`); `cachebox/` is the public package.
4
+
5
+ ## Working rules
6
+
7
+ - Keep diffs small and match the surrounding style. Do not add a new language, framework, or packaging tool.
8
+ - After a behavior change, rebuild with maturin and run pytest.
9
+ - Do not edit `target/`, `*.so`, `__pycache__`, `.venv`, or other build output. Do not edit `Cargo.lock` or `uv.lock` unless a dependency changed.
10
+ - Do not read or write secrets or `.env`.
11
+ - `src/hashbrown/` is vendored hashbrown (see `LICENSE-THIRD-PARTY`). Change it only when the table itself must change.
12
+ - v6 is the public API. A breaking change needs a note in `docs/docs/migration.md` and a matching update to `cachebox/_core.pyi` and the MkDocs pages.
13
+ - `use-small-offset` is a test-only Cargo feature. Release and publish builds must not enable it.
14
+
15
+ ## Layout
16
+
17
+ - `src/policies/` — eviction (Cache, FIFO, RR, LRU, LFU, TTL, VTTL).
18
+ - `src/pyclasses/` — one PyO3 class per policy, plus key/value/item iterators.
19
+ - `src/internal/` — pickle, `OnceInit` (`__new__` / `__init__`), linked list, hash helpers.
20
+ - `cachebox/_cachebox.py` — public `TTLCache` and `VTTLCache` (subclasses of the Rust types). Other classes are re-exported from `_core`.
21
+ - `cachebox/utils.py` and `_wrappers.py` — `@cached`, key makers, stampede locks.
22
+ - `tests/` — pytest mixins shared across implementations. Rust `#[cfg(test)]` covers the vendored table only.
23
+
24
+ ## Commands
25
+
26
+ ```bash
27
+ uv venv .venv && uv pip install --group ci
28
+ maturin develop --features use-small-offset # local tests; CI does this
29
+ pytest -v -n auto # CI also sets HYPOTHESIS_PROFILE=slow
30
+ typos --config typos.toml
31
+ zizmor .github/
32
+ mkdocs serve --config-file docs/mkdocs.yml
33
+ ```
34
+
35
+ `maturin develop --release` is the documented source install. Wheels are built only by `.github/workflows/CI.yml` on a tag.
36
+
37
+ ## Style
38
+
39
+ - `rustfmt.toml` sets `imports_granularity = "Item"`.
40
+ - Rust edition is whatever `Cargo.toml` says. Edition 2024 denies `unsafe_op_in_unsafe_fn`; the crate allows it in `src/lib.rs`.
41
+ - Python docstrings are Google style. MkDocs (`mkdocstrings`) renders them.
42
+ - Clippy warns on `dbg!` and `print!`. Clippy, rustfmt, and mypy are not CI jobs.
@@ -25,9 +25,9 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
25
25
 
26
26
  [[package]]
27
27
  name = "bitflags"
28
- version = "2.13.1"
28
+ version = "2.13.2"
29
29
  source = "registry+https://github.com/rust-lang/crates.io-index"
30
- checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
30
+ checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
31
31
 
32
32
  [[package]]
33
33
  name = "bumpalo"
@@ -37,7 +37,7 @@ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
37
37
 
38
38
  [[package]]
39
39
  name = "cachebox"
40
- version = "6.2.6"
40
+ version = "6.2.8"
41
41
  dependencies = [
42
42
  "allocator-api2",
43
43
  "cfg-if",
@@ -50,9 +50,9 @@ dependencies = [
50
50
 
51
51
  [[package]]
52
52
  name = "cc"
53
- version = "1.4.4"
53
+ version = "1.6.0"
54
54
  source = "registry+https://github.com/rust-lang/crates.io-index"
55
- checksum = "0ad534f4357a5264cce5019c989cf66a4f0dc4e0d1b1d15f8aacec0ff7360273"
55
+ checksum = "f74872d07caf508b30a21f6836e7d7016a2eaf7d9ff4f48deaa58cd8a0407630"
56
56
  dependencies = [
57
57
  "find-msvc-tools",
58
58
  "shlex",
@@ -60,9 +60,9 @@ dependencies = [
60
60
 
61
61
  [[package]]
62
62
  name = "cfg-if"
63
- version = "1.0.4"
63
+ version = "1.0.5"
64
64
  source = "registry+https://github.com/rust-lang/crates.io-index"
65
- checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
65
+ checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
66
66
 
67
67
  [[package]]
68
68
  name = "chrono"
@@ -91,9 +91,9 @@ checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
91
91
 
92
92
  [[package]]
93
93
  name = "find-msvc-tools"
94
- version = "0.1.11"
94
+ version = "0.1.14"
95
95
  source = "registry+https://github.com/rust-lang/crates.io-index"
96
- checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890"
96
+ checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484"
97
97
 
98
98
  [[package]]
99
99
  name = "futures-core"
@@ -151,9 +151,9 @@ dependencies = [
151
151
 
152
152
  [[package]]
153
153
  name = "js-sys"
154
- version = "0.3.104"
154
+ version = "0.3.106"
155
155
  source = "registry+https://github.com/rust-lang/crates.io-index"
156
- checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a"
156
+ checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5"
157
157
  dependencies = [
158
158
  "cfg-if",
159
159
  "futures-util",
@@ -162,9 +162,9 @@ dependencies = [
162
162
 
163
163
  [[package]]
164
164
  name = "libc"
165
- version = "0.2.189"
165
+ version = "0.2.190"
166
166
  source = "registry+https://github.com/rust-lang/crates.io-index"
167
- checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
167
+ checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
168
168
 
169
169
  [[package]]
170
170
  name = "lock_api"
@@ -242,13 +242,15 @@ dependencies = [
242
242
 
243
243
  [[package]]
244
244
  name = "pyo3"
245
- version = "0.29.2"
245
+ version = "0.29.3"
246
246
  source = "registry+https://github.com/rust-lang/crates.io-index"
247
- checksum = "4688ddedf473e32662b9b067670129a8afb8c18e351482c70d62ba4a88171e8b"
247
+ checksum = "700d18fa267b73b9b521fd7e13580e2f446916f176cacee1ab63fcc8191f1655"
248
248
  dependencies = [
249
249
  "chrono",
250
250
  "libc",
251
+ "lock_api",
251
252
  "once_cell",
253
+ "parking_lot",
252
254
  "portable-atomic",
253
255
  "pyo3-build-config",
254
256
  "pyo3-ffi",
@@ -257,18 +259,18 @@ dependencies = [
257
259
 
258
260
  [[package]]
259
261
  name = "pyo3-build-config"
260
- version = "0.29.2"
262
+ version = "0.29.3"
261
263
  source = "registry+https://github.com/rust-lang/crates.io-index"
262
- checksum = "f41027e41b4bd03f6e60f9f417fe24a6341a6bb744edd62b6f709f2a52ea30e9"
264
+ checksum = "7b3fc0c4d08f6bb10e71fe39dfb9e2f59c6eb6854e22ec8092f50c69a4499adb"
263
265
  dependencies = [
264
266
  "target-lexicon",
265
267
  ]
266
268
 
267
269
  [[package]]
268
270
  name = "pyo3-ffi"
269
- version = "0.29.2"
271
+ version = "0.29.3"
270
272
  source = "registry+https://github.com/rust-lang/crates.io-index"
271
- checksum = "e591a95526fead067432c3b3a33fc74770b87b1e04e73671090d9c2055a2b327"
273
+ checksum = "dfc0b8e19df29aad7086cf977bb0c2a2f143e30567eb113e9cf72b62ca698330"
272
274
  dependencies = [
273
275
  "libc",
274
276
  "pyo3-build-config",
@@ -276,26 +278,26 @@ dependencies = [
276
278
 
277
279
  [[package]]
278
280
  name = "pyo3-macros"
279
- version = "0.29.2"
281
+ version = "0.29.3"
280
282
  source = "registry+https://github.com/rust-lang/crates.io-index"
281
- checksum = "73225868fc1cd84eef2c3c230ddb91273bf1de46aeb8a4248da76d32a0924a1c"
283
+ checksum = "6100e8a4b5eba53afaa5ed078364851a0b2499c553a44c31026b929049b49dc6"
282
284
  dependencies = [
283
285
  "proc-macro2",
284
286
  "pyo3-macros-backend",
285
287
  "quote",
286
- "syn",
288
+ "syn 2.0.119",
287
289
  ]
288
290
 
289
291
  [[package]]
290
292
  name = "pyo3-macros-backend"
291
- version = "0.29.2"
293
+ version = "0.29.3"
292
294
  source = "registry+https://github.com/rust-lang/crates.io-index"
293
- checksum = "571575aa3749fa6216757dd47d2a3e7ef360f329a40f0666a9fbd14889024952"
295
+ checksum = "6143877a16e82b5a727b7127ff4cd86858a24a28d745d72f43e6f227c7b1bdb3"
294
296
  dependencies = [
295
297
  "heck",
296
298
  "proc-macro2",
297
299
  "quote",
298
- "syn",
300
+ "syn 2.0.119",
299
301
  ]
300
302
 
301
303
  [[package]]
@@ -342,9 +344,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
342
344
 
343
345
  [[package]]
344
346
  name = "smallvec"
345
- version = "1.15.2"
347
+ version = "1.16.2"
346
348
  source = "registry+https://github.com/rust-lang/crates.io-index"
347
- checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
349
+ checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e"
348
350
 
349
351
  [[package]]
350
352
  name = "syn"
@@ -357,6 +359,17 @@ dependencies = [
357
359
  "unicode-ident",
358
360
  ]
359
361
 
362
+ [[package]]
363
+ name = "syn"
364
+ version = "3.0.6"
365
+ source = "registry+https://github.com/rust-lang/crates.io-index"
366
+ checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee"
367
+ dependencies = [
368
+ "proc-macro2",
369
+ "quote",
370
+ "unicode-ident",
371
+ ]
372
+
360
373
  [[package]]
361
374
  name = "target-lexicon"
362
375
  version = "0.13.5"
@@ -365,15 +378,15 @@ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
365
378
 
366
379
  [[package]]
367
380
  name = "unicode-ident"
368
- version = "1.0.24"
381
+ version = "1.0.26"
369
382
  source = "registry+https://github.com/rust-lang/crates.io-index"
370
- checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
383
+ checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
371
384
 
372
385
  [[package]]
373
386
  name = "wasm-bindgen"
374
- version = "0.2.127"
387
+ version = "0.2.129"
375
388
  source = "registry+https://github.com/rust-lang/crates.io-index"
376
- checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70"
389
+ checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409"
377
390
  dependencies = [
378
391
  "cfg-if",
379
392
  "once_cell",
@@ -384,9 +397,9 @@ dependencies = [
384
397
 
385
398
  [[package]]
386
399
  name = "wasm-bindgen-macro"
387
- version = "0.2.127"
400
+ version = "0.2.129"
388
401
  source = "registry+https://github.com/rust-lang/crates.io-index"
389
- checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1"
402
+ checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535"
390
403
  dependencies = [
391
404
  "quote",
392
405
  "wasm-bindgen-macro-support",
@@ -394,22 +407,22 @@ dependencies = [
394
407
 
395
408
  [[package]]
396
409
  name = "wasm-bindgen-macro-support"
397
- version = "0.2.127"
410
+ version = "0.2.129"
398
411
  source = "registry+https://github.com/rust-lang/crates.io-index"
399
- checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284"
412
+ checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7"
400
413
  dependencies = [
401
414
  "bumpalo",
402
415
  "proc-macro2",
403
416
  "quote",
404
- "syn",
417
+ "syn 3.0.6",
405
418
  "wasm-bindgen-shared",
406
419
  ]
407
420
 
408
421
  [[package]]
409
422
  name = "wasm-bindgen-shared"
410
- version = "0.2.127"
423
+ version = "0.2.129"
411
424
  source = "registry+https://github.com/rust-lang/crates.io-index"
412
- checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf"
425
+ checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6"
413
426
  dependencies = [
414
427
  "unicode-ident",
415
428
  ]
@@ -435,7 +448,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
435
448
  dependencies = [
436
449
  "proc-macro2",
437
450
  "quote",
438
- "syn",
451
+ "syn 2.0.119",
439
452
  ]
440
453
 
441
454
  [[package]]
@@ -446,7 +459,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
446
459
  dependencies = [
447
460
  "proc-macro2",
448
461
  "quote",
449
- "syn",
462
+ "syn 2.0.119",
450
463
  ]
451
464
 
452
465
  [[package]]
@@ -1,25 +1,16 @@
1
1
  [package]
2
2
  name = "cachebox"
3
- version = "6.2.6"
4
- edition = "2021"
3
+ version = "6.2.8"
4
+ edition = "2024"
5
5
  description = "The fastest memoizing and caching Python library written in Rust"
6
6
  readme = "README.md"
7
- license = "MIT"
8
7
  homepage = "https://github.com/awolverp/cachebox"
9
8
  repository = "https://github.com/awolverp/cachebox.git"
10
- authors = ["Ali Pooralijan <awolverp@gmail.com>"]
9
+ license = "MIT"
11
10
 
12
11
  [lib]
13
- name = "cachebox"
14
12
  crate-type = ["cdylib", "rlib"]
15
-
16
- [profile.release]
17
- codegen-units = 1
18
- debug = false
19
- incremental = false
20
- lto = true
21
- panic = "abort"
22
- strip = true
13
+ name = "cachebox"
23
14
 
24
15
  [dependencies]
25
16
  allocator-api2 = "0.4.0"
@@ -27,15 +18,15 @@ cfg-if = "1.0.4"
27
18
  chrono = "0.4.45"
28
19
  fastrand = "2.5.0"
29
20
  parking_lot = { version = "0.12.5", default-features = false }
30
- pyo3 = { version = "0.29.2", default-features = false, features = ["macros", "chrono"] }
21
+ pyo3 = { version = "0.29.3", default-features = false, features = ["chrono", "macros", "parking_lot"] }
31
22
 
32
23
  [build-dependencies]
33
- pyo3-build-config = { version = "0.29.2", default-features = false, features = ["resolve-config"] }
24
+ pyo3-build-config = { version = "0.29.3", default-features = false, features = ["resolve-config"] }
34
25
 
35
26
  [features]
36
- default = ["inline-more", "extension-module"]
37
- inline-more = []
27
+ default = ["extension-module", "inline-more"]
38
28
  extension-module = ["pyo3/extension-module"]
29
+ inline-more = []
39
30
 
40
31
  # testing features
41
32
  use-small-offset = []
@@ -43,3 +34,11 @@ use-small-offset = []
43
34
  [lints.clippy]
44
35
  dbg_macro = "warn"
45
36
  print_stdout = "warn"
37
+
38
+ [profile.release]
39
+ debug = false
40
+ strip = true
41
+ lto = true
42
+ panic = "abort"
43
+ incremental = false
44
+ codegen-units = 1
@@ -1,7 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cachebox
3
- Version: 6.2.6
4
- Classifier: Programming Language :: Rust
3
+ Version: 6.2.8
4
+ Classifier: Development Status :: 5 - Production/Stable
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: License :: OSI Approved :: MIT License
7
+ Classifier: Operating System :: MacOS
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Operating System :: POSIX :: Linux
5
10
  Classifier: Programming Language :: Python
6
11
  Classifier: Programming Language :: Python :: 3
7
12
  Classifier: Programming Language :: Python :: 3 :: Only
@@ -11,20 +16,15 @@ Classifier: Programming Language :: Python :: 3.12
11
16
  Classifier: Programming Language :: Python :: 3.13
12
17
  Classifier: Programming Language :: Python :: 3.14
13
18
  Classifier: Programming Language :: Python :: 3.15
14
- Classifier: Programming Language :: Python :: Implementation :: PyPy
15
19
  Classifier: Programming Language :: Python :: Implementation :: CPython
16
- Classifier: Intended Audience :: Developers
17
- Classifier: License :: OSI Approved :: MIT License
18
- Classifier: Operating System :: POSIX :: Linux
19
- Classifier: Operating System :: Microsoft :: Windows
20
- Classifier: Operating System :: MacOS
21
- Classifier: Typing :: Typed
20
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
21
+ Classifier: Programming Language :: Rust
22
22
  Classifier: Topic :: Software Development :: Libraries
23
- Classifier: Development Status :: 5 - Production/Stable
23
+ Classifier: Typing :: Typed
24
24
  License-File: LICENSE
25
25
  License-File: LICENSE-THIRD-PARTY
26
26
  Summary: The fastest memoizing and caching Python library written in Rust
27
- Keywords: caching,cached,cachebox,cache,in-memory-caching,memoizing
27
+ Keywords: cache,cachebox,cached,caching,in-memory-caching,memoizing
28
28
  Home-Page: https://github.com/awolverp/cachebox
29
29
  Author-email: awolverp <awolverp@gmail.com>
30
30
  License: MIT
@@ -133,6 +133,7 @@ The simplest example of **cachebox** could look like this:
133
133
  ```python
134
134
  import cachebox
135
135
 
136
+
136
137
  @cachebox.cached(cachebox.FIFOCache(maxsize=128))
137
138
  def factorial(number: int) -> int:
138
139
  fact = 1
@@ -140,8 +141,10 @@ def factorial(number: int) -> int:
140
141
  fact *= num
141
142
  return fact
142
143
 
144
+
143
145
  assert factorial(5) == 125
144
146
 
147
+
145
148
  # coroutines are also supported
146
149
  @cachebox.cached(cachebox.LRUCache(maxsize=128))
147
150
  async def make_request(method: str, url: str) -> dict:
@@ -97,6 +97,7 @@ The simplest example of **cachebox** could look like this:
97
97
  ```python
98
98
  import cachebox
99
99
 
100
+
100
101
  @cachebox.cached(cachebox.FIFOCache(maxsize=128))
101
102
  def factorial(number: int) -> int:
102
103
  fact = 1
@@ -104,8 +105,10 @@ def factorial(number: int) -> int:
104
105
  fact *= num
105
106
  return fact
106
107
 
108
+
107
109
  assert factorial(5) == 125
108
110
 
111
+
109
112
  # coroutines are also supported
110
113
  @cachebox.cached(cachebox.LRUCache(maxsize=128))
111
114
  async def make_request(method: str, url: str) -> dict:
@@ -23,4 +23,6 @@ from .utils import make_typed_key as make_typed_key
23
23
  from .utils import postprocess_copy as postprocess_copy
24
24
  from .utils import postprocess_copy_mutables as postprocess_copy_mutables
25
25
  from .utils import postprocess_deepcopy as postprocess_deepcopy
26
- from .utils import postprocess_deepcopy_mutables as postprocess_deepcopy_mutables
26
+ from .utils import (
27
+ postprocess_deepcopy_mutables as postprocess_deepcopy_mutables,
28
+ )
@@ -1,5 +1,4 @@
1
1
  import threading
2
- import time
3
2
  import typing
4
3
  from datetime import datetime, timedelta
5
4