django-vcache 3.0.0__tar.gz → 3.1.1__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 (22) hide show
  1. {django_vcache-3.0.0 → django_vcache-3.1.1}/Cargo.lock +164 -198
  2. {django_vcache-3.0.0 → django_vcache-3.1.1}/Cargo.toml +2 -2
  3. {django_vcache-3.0.0 → django_vcache-3.1.1}/PKG-INFO +1 -1
  4. {django_vcache-3.0.0 → django_vcache-3.1.1}/crates/vcache-pyo3/src/async_bridge.rs +70 -7
  5. {django_vcache-3.0.0 → django_vcache-3.1.1}/crates/vcache-pyo3/src/client.rs +2 -2
  6. {django_vcache-3.0.0 → django_vcache-3.1.1}/crates/vcache-pyo3/src/lib.rs +4 -0
  7. {django_vcache-3.0.0 → django_vcache-3.1.1}/pyproject.toml +1 -1
  8. {django_vcache-3.0.0 → django_vcache-3.1.1}/LICENSE +0 -0
  9. {django_vcache-3.0.0 → django_vcache-3.1.1}/README.md +0 -0
  10. {django_vcache-3.0.0 → django_vcache-3.1.1}/crates/vcache-core/Cargo.toml +0 -0
  11. {django_vcache-3.0.0 → django_vcache-3.1.1}/crates/vcache-core/examples/bench.rs +0 -0
  12. {django_vcache-3.0.0 → django_vcache-3.1.1}/crates/vcache-core/examples/standalone.rs +0 -0
  13. {django_vcache-3.0.0 → django_vcache-3.1.1}/crates/vcache-core/src/connection.rs +0 -0
  14. {django_vcache-3.0.0 → django_vcache-3.1.1}/crates/vcache-core/src/lib.rs +0 -0
  15. {django_vcache-3.0.0 → django_vcache-3.1.1}/crates/vcache-core/src/result.rs +0 -0
  16. {django_vcache-3.0.0 → django_vcache-3.1.1}/crates/vcache-core/src/runtime.rs +0 -0
  17. {django_vcache-3.0.0 → django_vcache-3.1.1}/crates/vcache-core/tests/runtime_provider.rs +0 -0
  18. {django_vcache-3.0.0 → django_vcache-3.1.1}/crates/vcache-pyo3/Cargo.toml +0 -0
  19. {django_vcache-3.0.0 → django_vcache-3.1.1}/crates/vcache-pyo3/src/completion.rs +0 -0
  20. {django_vcache-3.0.0 → django_vcache-3.1.1}/django_vcache/__init__.py +0 -0
  21. {django_vcache-3.0.0 → django_vcache-3.1.1}/django_vcache/backend.py +0 -0
  22. {django_vcache-3.0.0 → django_vcache-3.1.1}/django_vcache/exceptions.py +0 -0
@@ -10,9 +10,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
10
10
 
11
11
  [[package]]
12
12
  name = "arc-swap"
13
- version = "1.9.1"
13
+ version = "1.9.2"
14
14
  source = "registry+https://github.com/rust-lang/crates.io-index"
15
- checksum = "6a3a1fd6f75306b68087b831f025c712524bcb19aad54e557b1129cfa0a2b207"
15
+ checksum = "c049c0be4daef0b145cb3555416b3b8ef5b7888a38aea1a3a155801fe7b0810b"
16
16
  dependencies = [
17
17
  "rustversion",
18
18
  ]
@@ -36,15 +36,15 @@ dependencies = [
36
36
 
37
37
  [[package]]
38
38
  name = "autocfg"
39
- version = "1.5.0"
39
+ version = "1.5.1"
40
40
  source = "registry+https://github.com/rust-lang/crates.io-index"
41
- checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
41
+ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
42
42
 
43
43
  [[package]]
44
44
  name = "aws-lc-rs"
45
- version = "1.16.2"
45
+ version = "1.17.3"
46
46
  source = "registry+https://github.com/rust-lang/crates.io-index"
47
- checksum = "a054912289d18629dc78375ba2c3726a3afe3ff71b4edba9dedfca0e3446d1fc"
47
+ checksum = "00bdb5da18dac48ca2cc7cd4a98e533e8635a58e2361d13a1a4ee3888e0d72f1"
48
48
  dependencies = [
49
49
  "aws-lc-sys",
50
50
  "zeroize",
@@ -52,14 +52,15 @@ dependencies = [
52
52
 
53
53
  [[package]]
54
54
  name = "aws-lc-sys"
55
- version = "0.39.1"
55
+ version = "0.43.0"
56
56
  source = "registry+https://github.com/rust-lang/crates.io-index"
57
- checksum = "83a25cf98105baa966497416dbd42565ce3a8cf8dbfd59803ec9ad46f3126399"
57
+ checksum = "43103168cc76fe62678a375e722fc9cb3a0146159ac5828bc4f0dfd755c2224c"
58
58
  dependencies = [
59
59
  "cc",
60
60
  "cmake",
61
61
  "dunce",
62
62
  "fs_extra",
63
+ "pkg-config",
63
64
  ]
64
65
 
65
66
  [[package]]
@@ -73,21 +74,21 @@ dependencies = [
73
74
 
74
75
  [[package]]
75
76
  name = "bitflags"
76
- version = "2.11.0"
77
+ version = "2.13.1"
77
78
  source = "registry+https://github.com/rust-lang/crates.io-index"
78
- checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
79
+ checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
79
80
 
80
81
  [[package]]
81
82
  name = "bytes"
82
- version = "1.11.1"
83
+ version = "1.12.1"
83
84
  source = "registry+https://github.com/rust-lang/crates.io-index"
84
- checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
85
+ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
85
86
 
86
87
  [[package]]
87
88
  name = "cc"
88
- version = "1.2.59"
89
+ version = "1.4.0"
89
90
  source = "registry+https://github.com/rust-lang/crates.io-index"
90
- checksum = "b7a4d3ec6524d28a329fc53654bbadc9bdd7b0431f5d65f1a56ffb28a1ee5283"
91
+ checksum = "5add81bb678e6cb321aff7fa0dc7689ad82b112dbc032cea19f91d6b8e3582b9"
91
92
  dependencies = [
92
93
  "find-msvc-tools",
93
94
  "jobserver",
@@ -101,6 +102,17 @@ version = "1.0.4"
101
102
  source = "registry+https://github.com/rust-lang/crates.io-index"
102
103
  checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
103
104
 
105
+ [[package]]
106
+ name = "chacha20"
107
+ version = "0.10.1"
108
+ source = "registry+https://github.com/rust-lang/crates.io-index"
109
+ checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81"
110
+ dependencies = [
111
+ "cfg-if",
112
+ "cpufeatures",
113
+ "rand_core",
114
+ ]
115
+
104
116
  [[package]]
105
117
  name = "cmake"
106
118
  version = "0.1.58"
@@ -124,15 +136,6 @@ dependencies = [
124
136
  "tokio-util",
125
137
  ]
126
138
 
127
- [[package]]
128
- name = "concurrent-queue"
129
- version = "2.5.0"
130
- source = "registry+https://github.com/rust-lang/crates.io-index"
131
- checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973"
132
- dependencies = [
133
- "crossbeam-utils",
134
- ]
135
-
136
139
  [[package]]
137
140
  name = "core-foundation"
138
141
  version = "0.10.1"
@@ -150,26 +153,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
150
153
  checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
151
154
 
152
155
  [[package]]
153
- name = "crc16"
154
- version = "0.4.0"
156
+ name = "cpufeatures"
157
+ version = "0.3.0"
155
158
  source = "registry+https://github.com/rust-lang/crates.io-index"
156
- checksum = "338089f42c427b86394a5ee60ff321da23a5c89c9d89514c829687b26359fcff"
159
+ checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
160
+ dependencies = [
161
+ "libc",
162
+ ]
157
163
 
158
164
  [[package]]
159
- name = "crossbeam-utils"
160
- version = "0.8.21"
165
+ name = "crc16"
166
+ version = "0.4.0"
161
167
  source = "registry+https://github.com/rust-lang/crates.io-index"
162
- checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
168
+ checksum = "338089f42c427b86394a5ee60ff321da23a5c89c9d89514c829687b26359fcff"
163
169
 
164
170
  [[package]]
165
171
  name = "displaydoc"
166
- version = "0.2.5"
172
+ version = "0.2.7"
167
173
  source = "registry+https://github.com/rust-lang/crates.io-index"
168
- checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
174
+ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8"
169
175
  dependencies = [
170
176
  "proc-macro2",
171
177
  "quote",
172
- "syn",
178
+ "syn 3.0.3",
173
179
  ]
174
180
 
175
181
  [[package]]
@@ -186,11 +192,10 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
186
192
 
187
193
  [[package]]
188
194
  name = "event-listener"
189
- version = "5.4.1"
195
+ version = "5.4.2"
190
196
  source = "registry+https://github.com/rust-lang/crates.io-index"
191
- checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab"
197
+ checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2"
192
198
  dependencies = [
193
- "concurrent-queue",
194
199
  "parking",
195
200
  "pin-project-lite",
196
201
  ]
@@ -207,9 +212,9 @@ dependencies = [
207
212
 
208
213
  [[package]]
209
214
  name = "fastrand"
210
- version = "2.4.1"
215
+ version = "2.5.0"
211
216
  source = "registry+https://github.com/rust-lang/crates.io-index"
212
- checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
217
+ checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
213
218
 
214
219
  [[package]]
215
220
  name = "find-msvc-tools"
@@ -240,36 +245,36 @@ checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
240
245
 
241
246
  [[package]]
242
247
  name = "futures-channel"
243
- version = "0.3.32"
248
+ version = "0.3.33"
244
249
  source = "registry+https://github.com/rust-lang/crates.io-index"
245
- checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
250
+ checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae"
246
251
  dependencies = [
247
252
  "futures-core",
248
253
  ]
249
254
 
250
255
  [[package]]
251
256
  name = "futures-core"
252
- version = "0.3.32"
257
+ version = "0.3.33"
253
258
  source = "registry+https://github.com/rust-lang/crates.io-index"
254
- checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
259
+ checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7"
255
260
 
256
261
  [[package]]
257
262
  name = "futures-sink"
258
- version = "0.3.32"
263
+ version = "0.3.33"
259
264
  source = "registry+https://github.com/rust-lang/crates.io-index"
260
- checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"
265
+ checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307"
261
266
 
262
267
  [[package]]
263
268
  name = "futures-task"
264
- version = "0.3.32"
269
+ version = "0.3.33"
265
270
  source = "registry+https://github.com/rust-lang/crates.io-index"
266
- checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
271
+ checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109"
267
272
 
268
273
  [[package]]
269
274
  name = "futures-util"
270
- version = "0.3.32"
275
+ version = "0.3.33"
271
276
  source = "registry+https://github.com/rust-lang/crates.io-index"
272
- checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
277
+ checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa"
273
278
  dependencies = [
274
279
  "futures-core",
275
280
  "futures-sink",
@@ -291,21 +296,21 @@ dependencies = [
291
296
 
292
297
  [[package]]
293
298
  name = "getrandom"
294
- version = "0.3.4"
299
+ version = "0.4.3"
295
300
  source = "registry+https://github.com/rust-lang/crates.io-index"
296
- checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
301
+ checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
297
302
  dependencies = [
298
303
  "cfg-if",
299
304
  "libc",
300
305
  "r-efi",
301
- "wasip2",
306
+ "rand_core",
302
307
  ]
303
308
 
304
309
  [[package]]
305
310
  name = "hashbrown"
306
- version = "0.16.1"
311
+ version = "0.17.1"
307
312
  source = "registry+https://github.com/rust-lang/crates.io-index"
308
- checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
313
+ checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
309
314
  dependencies = [
310
315
  "allocator-api2",
311
316
  "equivalent",
@@ -413,9 +418,9 @@ dependencies = [
413
418
 
414
419
  [[package]]
415
420
  name = "idna_adapter"
416
- version = "1.2.1"
421
+ version = "1.2.2"
417
422
  source = "registry+https://github.com/rust-lang/crates.io-index"
418
- checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344"
423
+ checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714"
419
424
  dependencies = [
420
425
  "icu_normalizer",
421
426
  "icu_properties",
@@ -429,19 +434,19 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
429
434
 
430
435
  [[package]]
431
436
  name = "jobserver"
432
- version = "0.1.34"
437
+ version = "0.1.35"
433
438
  source = "registry+https://github.com/rust-lang/crates.io-index"
434
- checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
439
+ checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3"
435
440
  dependencies = [
436
- "getrandom 0.3.4",
441
+ "getrandom 0.4.3",
437
442
  "libc",
438
443
  ]
439
444
 
440
445
  [[package]]
441
446
  name = "libc"
442
- version = "0.2.184"
447
+ version = "0.2.189"
443
448
  source = "registry+https://github.com/rust-lang/crates.io-index"
444
- checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af"
449
+ checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
445
450
 
446
451
  [[package]]
447
452
  name = "litemap"
@@ -451,30 +456,30 @@ checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
451
456
 
452
457
  [[package]]
453
458
  name = "log"
454
- version = "0.4.29"
459
+ version = "0.4.33"
455
460
  source = "registry+https://github.com/rust-lang/crates.io-index"
456
- checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
461
+ checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
457
462
 
458
463
  [[package]]
459
464
  name = "lru"
460
- version = "0.16.3"
465
+ version = "0.18.1"
461
466
  source = "registry+https://github.com/rust-lang/crates.io-index"
462
- checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593"
467
+ checksum = "0b6180140927ee907000b0aa540091f6ea512ead4447c92b8fc35bc72788a5a6"
463
468
  dependencies = [
464
469
  "hashbrown",
465
470
  ]
466
471
 
467
472
  [[package]]
468
473
  name = "memchr"
469
- version = "2.8.0"
474
+ version = "2.8.3"
470
475
  source = "registry+https://github.com/rust-lang/crates.io-index"
471
- checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
476
+ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
472
477
 
473
478
  [[package]]
474
479
  name = "mio"
475
- version = "1.2.0"
480
+ version = "1.2.2"
476
481
  source = "registry+https://github.com/rust-lang/crates.io-index"
477
- checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"
482
+ checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427"
478
483
  dependencies = [
479
484
  "libc",
480
485
  "wasi",
@@ -483,9 +488,9 @@ dependencies = [
483
488
 
484
489
  [[package]]
485
490
  name = "num-bigint"
486
- version = "0.4.6"
491
+ version = "0.4.8"
487
492
  source = "registry+https://github.com/rust-lang/crates.io-index"
488
- checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
493
+ checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367"
489
494
  dependencies = [
490
495
  "num-integer",
491
496
  "num-traits",
@@ -539,11 +544,17 @@ version = "0.2.17"
539
544
  source = "registry+https://github.com/rust-lang/crates.io-index"
540
545
  checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
541
546
 
547
+ [[package]]
548
+ name = "pkg-config"
549
+ version = "0.3.33"
550
+ source = "registry+https://github.com/rust-lang/crates.io-index"
551
+ checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
552
+
542
553
  [[package]]
543
554
  name = "portable-atomic"
544
- version = "1.13.1"
555
+ version = "1.14.0"
545
556
  source = "registry+https://github.com/rust-lang/crates.io-index"
546
- checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
557
+ checksum = "3d20d5497ef88037a52ff98267d066e7f11fcc5e99bbfbd58a42336193aacec3"
547
558
 
548
559
  [[package]]
549
560
  name = "potential_utf"
@@ -554,29 +565,20 @@ dependencies = [
554
565
  "zerovec",
555
566
  ]
556
567
 
557
- [[package]]
558
- name = "ppv-lite86"
559
- version = "0.2.21"
560
- source = "registry+https://github.com/rust-lang/crates.io-index"
561
- checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
562
- dependencies = [
563
- "zerocopy",
564
- ]
565
-
566
568
  [[package]]
567
569
  name = "proc-macro2"
568
- version = "1.0.106"
570
+ version = "1.0.107"
569
571
  source = "registry+https://github.com/rust-lang/crates.io-index"
570
- checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
572
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
571
573
  dependencies = [
572
574
  "unicode-ident",
573
575
  ]
574
576
 
575
577
  [[package]]
576
578
  name = "pyo3"
577
- version = "0.28.3"
579
+ version = "0.29.0"
578
580
  source = "registry+https://github.com/rust-lang/crates.io-index"
579
- checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
581
+ checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c"
580
582
  dependencies = [
581
583
  "libc",
582
584
  "once_cell",
@@ -588,18 +590,18 @@ dependencies = [
588
590
 
589
591
  [[package]]
590
592
  name = "pyo3-build-config"
591
- version = "0.28.3"
593
+ version = "0.29.0"
592
594
  source = "registry+https://github.com/rust-lang/crates.io-index"
593
- checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
595
+ checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078"
594
596
  dependencies = [
595
597
  "target-lexicon",
596
598
  ]
597
599
 
598
600
  [[package]]
599
601
  name = "pyo3-ffi"
600
- version = "0.28.3"
602
+ version = "0.29.0"
601
603
  source = "registry+https://github.com/rust-lang/crates.io-index"
602
- checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
604
+ checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b"
603
605
  dependencies = [
604
606
  "libc",
605
607
  "pyo3-build-config",
@@ -607,78 +609,65 @@ dependencies = [
607
609
 
608
610
  [[package]]
609
611
  name = "pyo3-macros"
610
- version = "0.28.3"
612
+ version = "0.29.0"
611
613
  source = "registry+https://github.com/rust-lang/crates.io-index"
612
- checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
614
+ checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771"
613
615
  dependencies = [
614
616
  "proc-macro2",
615
617
  "pyo3-macros-backend",
616
618
  "quote",
617
- "syn",
619
+ "syn 2.0.119",
618
620
  ]
619
621
 
620
622
  [[package]]
621
623
  name = "pyo3-macros-backend"
622
- version = "0.28.3"
624
+ version = "0.29.0"
623
625
  source = "registry+https://github.com/rust-lang/crates.io-index"
624
- checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
626
+ checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362"
625
627
  dependencies = [
626
628
  "heck",
627
629
  "proc-macro2",
628
- "pyo3-build-config",
629
630
  "quote",
630
- "syn",
631
+ "syn 2.0.119",
631
632
  ]
632
633
 
633
634
  [[package]]
634
635
  name = "quote"
635
- version = "1.0.45"
636
+ version = "1.0.47"
636
637
  source = "registry+https://github.com/rust-lang/crates.io-index"
637
- checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
638
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
638
639
  dependencies = [
639
640
  "proc-macro2",
640
641
  ]
641
642
 
642
643
  [[package]]
643
644
  name = "r-efi"
644
- version = "5.3.0"
645
+ version = "6.0.0"
645
646
  source = "registry+https://github.com/rust-lang/crates.io-index"
646
- checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
647
+ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
647
648
 
648
649
  [[package]]
649
650
  name = "rand"
650
- version = "0.9.2"
651
+ version = "0.10.2"
651
652
  source = "registry+https://github.com/rust-lang/crates.io-index"
652
- checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
653
+ checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
653
654
  dependencies = [
654
- "rand_chacha",
655
- "rand_core",
656
- ]
657
-
658
- [[package]]
659
- name = "rand_chacha"
660
- version = "0.9.0"
661
- source = "registry+https://github.com/rust-lang/crates.io-index"
662
- checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
663
- dependencies = [
664
- "ppv-lite86",
655
+ "chacha20",
656
+ "getrandom 0.4.3",
665
657
  "rand_core",
666
658
  ]
667
659
 
668
660
  [[package]]
669
661
  name = "rand_core"
670
- version = "0.9.5"
662
+ version = "0.10.1"
671
663
  source = "registry+https://github.com/rust-lang/crates.io-index"
672
- checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
673
- dependencies = [
674
- "getrandom 0.3.4",
675
- ]
664
+ checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
676
665
 
677
666
  [[package]]
678
667
  name = "redis"
679
- version = "1.2.0"
668
+ version = "1.4.1"
680
669
  source = "registry+https://github.com/rust-lang/crates.io-index"
681
- checksum = "f44e94c96d8870a387d88ce3de3fdd608cbfc0705f03cb343cdde91509d3e49a"
670
+ checksum = "b0b9503711b03773e43b31668c7b5bd279ee7cd9b7d18cff7c23a42cc1d08e5a"
682
671
  dependencies = [
683
672
  "arc-swap",
684
673
  "arcstr",
@@ -725,7 +714,7 @@ dependencies = [
725
714
 
726
715
  [[package]]
727
716
  name = "rlib-link-test"
728
- version = "3.0.0"
717
+ version = "3.1.1"
729
718
  dependencies = [
730
719
  "pyo3",
731
720
  "vcache-pyo3",
@@ -733,9 +722,9 @@ dependencies = [
733
722
 
734
723
  [[package]]
735
724
  name = "rustls"
736
- version = "0.23.37"
725
+ version = "0.23.42"
737
726
  source = "registry+https://github.com/rust-lang/crates.io-index"
738
- checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4"
727
+ checksum = "3c54fcab019b409d04215d3a17cb438fd7fbf192ee61461f20f4fe18704bc138"
739
728
  dependencies = [
740
729
  "aws-lc-rs",
741
730
  "log",
@@ -749,9 +738,9 @@ dependencies = [
749
738
 
750
739
  [[package]]
751
740
  name = "rustls-native-certs"
752
- version = "0.8.3"
741
+ version = "0.8.4"
753
742
  source = "registry+https://github.com/rust-lang/crates.io-index"
754
- checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63"
743
+ checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d"
755
744
  dependencies = [
756
745
  "openssl-probe",
757
746
  "rustls-pki-types",
@@ -761,18 +750,18 @@ dependencies = [
761
750
 
762
751
  [[package]]
763
752
  name = "rustls-pki-types"
764
- version = "1.14.0"
753
+ version = "1.15.1"
765
754
  source = "registry+https://github.com/rust-lang/crates.io-index"
766
- checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd"
755
+ checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96"
767
756
  dependencies = [
768
757
  "zeroize",
769
758
  ]
770
759
 
771
760
  [[package]]
772
761
  name = "rustls-webpki"
773
- version = "0.103.10"
762
+ version = "0.103.13"
774
763
  source = "registry+https://github.com/rust-lang/crates.io-index"
775
- checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef"
764
+ checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e"
776
765
  dependencies = [
777
766
  "aws-lc-rs",
778
767
  "ring",
@@ -782,9 +771,9 @@ dependencies = [
782
771
 
783
772
  [[package]]
784
773
  name = "rustversion"
785
- version = "1.0.22"
774
+ version = "1.0.23"
786
775
  source = "registry+https://github.com/rust-lang/crates.io-index"
787
- checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
776
+ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
788
777
 
789
778
  [[package]]
790
779
  name = "ryu"
@@ -826,31 +815,31 @@ dependencies = [
826
815
 
827
816
  [[package]]
828
817
  name = "serde"
829
- version = "1.0.228"
818
+ version = "1.0.229"
830
819
  source = "registry+https://github.com/rust-lang/crates.io-index"
831
- checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
820
+ checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
832
821
  dependencies = [
833
822
  "serde_core",
834
823
  ]
835
824
 
836
825
  [[package]]
837
826
  name = "serde_core"
838
- version = "1.0.228"
827
+ version = "1.0.229"
839
828
  source = "registry+https://github.com/rust-lang/crates.io-index"
840
- checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
829
+ checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
841
830
  dependencies = [
842
831
  "serde_derive",
843
832
  ]
844
833
 
845
834
  [[package]]
846
835
  name = "serde_derive"
847
- version = "1.0.228"
836
+ version = "1.0.229"
848
837
  source = "registry+https://github.com/rust-lang/crates.io-index"
849
- checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
838
+ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
850
839
  dependencies = [
851
840
  "proc-macro2",
852
841
  "quote",
853
- "syn",
842
+ "syn 3.0.3",
854
843
  ]
855
844
 
856
845
  [[package]]
@@ -861,9 +850,9 @@ checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d"
861
850
 
862
851
  [[package]]
863
852
  name = "shlex"
864
- version = "1.3.0"
853
+ version = "2.0.1"
865
854
  source = "registry+https://github.com/rust-lang/crates.io-index"
866
- checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
855
+ checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
867
856
 
868
857
  [[package]]
869
858
  name = "slab"
@@ -873,15 +862,15 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
873
862
 
874
863
  [[package]]
875
864
  name = "smallvec"
876
- version = "1.15.1"
865
+ version = "1.15.2"
877
866
  source = "registry+https://github.com/rust-lang/crates.io-index"
878
- checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
867
+ checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
879
868
 
880
869
  [[package]]
881
870
  name = "socket2"
882
- version = "0.6.3"
871
+ version = "0.6.5"
883
872
  source = "registry+https://github.com/rust-lang/crates.io-index"
884
- checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e"
873
+ checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4"
885
874
  dependencies = [
886
875
  "libc",
887
876
  "windows-sys 0.61.2",
@@ -901,9 +890,20 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
901
890
 
902
891
  [[package]]
903
892
  name = "syn"
904
- version = "2.0.117"
893
+ version = "2.0.119"
905
894
  source = "registry+https://github.com/rust-lang/crates.io-index"
906
- checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
895
+ checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
896
+ dependencies = [
897
+ "proc-macro2",
898
+ "quote",
899
+ "unicode-ident",
900
+ ]
901
+
902
+ [[package]]
903
+ name = "syn"
904
+ version = "3.0.3"
905
+ source = "registry+https://github.com/rust-lang/crates.io-index"
906
+ checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
907
907
  dependencies = [
908
908
  "proc-macro2",
909
909
  "quote",
@@ -918,7 +918,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
918
918
  dependencies = [
919
919
  "proc-macro2",
920
920
  "quote",
921
- "syn",
921
+ "syn 2.0.119",
922
922
  ]
923
923
 
924
924
  [[package]]
@@ -939,9 +939,9 @@ dependencies = [
939
939
 
940
940
  [[package]]
941
941
  name = "tokio"
942
- version = "1.51.0"
942
+ version = "1.53.1"
943
943
  source = "registry+https://github.com/rust-lang/crates.io-index"
944
- checksum = "2bd1c4c0fc4a7ab90fc15ef6daaa3ec3b893f004f915f2392557ed23237820cd"
944
+ checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed"
945
945
  dependencies = [
946
946
  "libc",
947
947
  "mio",
@@ -962,13 +962,14 @@ dependencies = [
962
962
 
963
963
  [[package]]
964
964
  name = "tokio-util"
965
- version = "0.7.18"
965
+ version = "0.7.19"
966
966
  source = "registry+https://github.com/rust-lang/crates.io-index"
967
- checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098"
967
+ checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52"
968
968
  dependencies = [
969
969
  "bytes",
970
970
  "futures-core",
971
971
  "futures-sink",
972
+ "libc",
972
973
  "pin-project-lite",
973
974
  "tokio",
974
975
  ]
@@ -1005,7 +1006,7 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
1005
1006
 
1006
1007
  [[package]]
1007
1008
  name = "vcache-core"
1008
- version = "3.0.0"
1009
+ version = "3.1.1"
1009
1010
  dependencies = [
1010
1011
  "redis",
1011
1012
  "rustls",
@@ -1014,7 +1015,7 @@ dependencies = [
1014
1015
 
1015
1016
  [[package]]
1016
1017
  name = "vcache-pyo3"
1017
- version = "3.0.0"
1018
+ version = "3.1.1"
1018
1019
  dependencies = [
1019
1020
  "pyo3",
1020
1021
  "redis",
@@ -1029,15 +1030,6 @@ version = "0.11.1+wasi-snapshot-preview1"
1029
1030
  source = "registry+https://github.com/rust-lang/crates.io-index"
1030
1031
  checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
1031
1032
 
1032
- [[package]]
1033
- name = "wasip2"
1034
- version = "1.0.2+wasi-0.2.9"
1035
- source = "registry+https://github.com/rust-lang/crates.io-index"
1036
- checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
1037
- dependencies = [
1038
- "wit-bindgen",
1039
- ]
1040
-
1041
1033
  [[package]]
1042
1034
  name = "windows-link"
1043
1035
  version = "0.2.1"
@@ -1126,12 +1118,6 @@ version = "0.52.6"
1126
1118
  source = "registry+https://github.com/rust-lang/crates.io-index"
1127
1119
  checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
1128
1120
 
1129
- [[package]]
1130
- name = "wit-bindgen"
1131
- version = "0.51.0"
1132
- source = "registry+https://github.com/rust-lang/crates.io-index"
1133
- checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
1134
-
1135
1121
  [[package]]
1136
1122
  name = "writeable"
1137
1123
  version = "0.6.3"
@@ -1140,15 +1126,15 @@ checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4"
1140
1126
 
1141
1127
  [[package]]
1142
1128
  name = "xxhash-rust"
1143
- version = "0.8.15"
1129
+ version = "0.8.18"
1144
1130
  source = "registry+https://github.com/rust-lang/crates.io-index"
1145
- checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3"
1131
+ checksum = "aee1b19627c7c60102ab80d3a9cbe18de90bfe03bfa6c3715447681f0e8c8af6"
1146
1132
 
1147
1133
  [[package]]
1148
1134
  name = "yoke"
1149
- version = "0.8.2"
1135
+ version = "0.8.3"
1150
1136
  source = "registry+https://github.com/rust-lang/crates.io-index"
1151
- checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca"
1137
+ checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5"
1152
1138
  dependencies = [
1153
1139
  "stable_deref_trait",
1154
1140
  "yoke-derive",
@@ -1163,35 +1149,15 @@ checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e"
1163
1149
  dependencies = [
1164
1150
  "proc-macro2",
1165
1151
  "quote",
1166
- "syn",
1152
+ "syn 2.0.119",
1167
1153
  "synstructure",
1168
1154
  ]
1169
1155
 
1170
- [[package]]
1171
- name = "zerocopy"
1172
- version = "0.8.48"
1173
- source = "registry+https://github.com/rust-lang/crates.io-index"
1174
- checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9"
1175
- dependencies = [
1176
- "zerocopy-derive",
1177
- ]
1178
-
1179
- [[package]]
1180
- name = "zerocopy-derive"
1181
- version = "0.8.48"
1182
- source = "registry+https://github.com/rust-lang/crates.io-index"
1183
- checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4"
1184
- dependencies = [
1185
- "proc-macro2",
1186
- "quote",
1187
- "syn",
1188
- ]
1189
-
1190
1156
  [[package]]
1191
1157
  name = "zerofrom"
1192
- version = "0.1.7"
1158
+ version = "0.1.8"
1193
1159
  source = "registry+https://github.com/rust-lang/crates.io-index"
1194
- checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df"
1160
+ checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272"
1195
1161
  dependencies = [
1196
1162
  "zerofrom-derive",
1197
1163
  ]
@@ -1204,15 +1170,15 @@ checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1"
1204
1170
  dependencies = [
1205
1171
  "proc-macro2",
1206
1172
  "quote",
1207
- "syn",
1173
+ "syn 2.0.119",
1208
1174
  "synstructure",
1209
1175
  ]
1210
1176
 
1211
1177
  [[package]]
1212
1178
  name = "zeroize"
1213
- version = "1.8.2"
1179
+ version = "1.9.0"
1214
1180
  source = "registry+https://github.com/rust-lang/crates.io-index"
1215
- checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
1181
+ checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e"
1216
1182
 
1217
1183
  [[package]]
1218
1184
  name = "zerotrie"
@@ -1244,5 +1210,5 @@ checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555"
1244
1210
  dependencies = [
1245
1211
  "proc-macro2",
1246
1212
  "quote",
1247
- "syn",
1213
+ "syn 2.0.119",
1248
1214
  ]
@@ -3,7 +3,7 @@ resolver = "2"
3
3
  members = ["crates/vcache-core", "crates/vcache-pyo3"]
4
4
 
5
5
  [workspace.package]
6
- version = "3.0.0"
6
+ version = "3.1.1"
7
7
  edition = "2024"
8
8
 
9
9
  [workspace.dependencies]
@@ -14,7 +14,7 @@ rustls = { version = "0.23", features = ["ring"] }
14
14
  # the `extension-module` feature skips libpython linking. If a future
15
15
  # member is a bin or test harness that embeds Python, drop this feature
16
16
  # and re-add it in each cdylib crate's own [dependencies] block.
17
- pyo3 = { version = "0.28", features = ["extension-module"] }
17
+ pyo3 = { version = "0.29", features = ["extension-module"] }
18
18
 
19
19
  [profile.release]
20
20
  lto = true
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-vcache
3
- Version: 3.0.0
3
+ Version: 3.1.1
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Framework :: Django
6
6
  Classifier: Framework :: Django :: 5.0
@@ -77,6 +77,38 @@ pub fn raw_result_into_py(raw: RawResult, py: Python<'_>) -> Result<Py<PyAny>, P
77
77
  }
78
78
  }
79
79
 
80
+ /// Closure that materializes a Python value on the event-loop thread
81
+ /// (GIL held) — the payload of [`BridgeValue::Custom`].
82
+ ///
83
+ /// Constraint: must not capture Python objects. The closure is not
84
+ /// reachable from `__traverse__`, so a captured `Py<...>` would be
85
+ /// invisible to the cyclic GC; build Python values only inside the call.
86
+ pub type ProduceValue = Box<dyn FnOnce(Python<'_>) -> PyResult<Py<PyAny>> + Send>;
87
+
88
+ /// Payload the op task sends through the oneshot channel.
89
+ ///
90
+ /// `Raw` is the driver's own result enum. `Custom` lets rlib consumers
91
+ /// (e.g. gt_rust's ingest pipeline) route arbitrary results through this
92
+ /// same awaitable — busy-yield, completion pipe, cancel-abort and GC
93
+ /// support included — instead of hand-rolling their own Future protocol.
94
+ pub enum BridgeValue {
95
+ Raw(RawResult),
96
+ Custom(ProduceValue),
97
+ }
98
+
99
+ impl From<RawResult> for BridgeValue {
100
+ fn from(raw: RawResult) -> Self {
101
+ BridgeValue::Raw(raw)
102
+ }
103
+ }
104
+
105
+ fn bridge_value_into_py(value: BridgeValue, py: Python<'_>) -> Result<Py<PyAny>, PyErr> {
106
+ match value {
107
+ BridgeValue::Raw(raw) => raw_result_into_py(raw, py),
108
+ BridgeValue::Custom(produce) => produce(py),
109
+ }
110
+ }
111
+
80
112
  // =========================================================================
81
113
  // RustAwaitable — deferred-callback async bridge
82
114
  //
@@ -116,7 +148,7 @@ struct DoneCallback {
116
148
  struct CallbackState {
117
149
  event_loop: Py<PyAny>,
118
150
  callbacks: Vec<DoneCallback>,
119
- result_slot: Arc<Mutex<Option<Result<RawResult, ()>>>>,
151
+ result_slot: Arc<Mutex<Option<Result<BridgeValue, ()>>>>,
120
152
  /// Completion-pipe registration, removed on cancel so the strong
121
153
  /// reference the registry holds doesn't outlive the awaitable's use.
122
154
  pipe: Arc<LoopPipe>,
@@ -134,7 +166,7 @@ const MISS_STREAK_THRESHOLD: u8 = 8;
134
166
 
135
167
  #[pyclass]
136
168
  pub struct RustAwaitable {
137
- rx: Option<oneshot::Receiver<RawResult>>,
169
+ rx: Option<oneshot::Receiver<BridgeValue>>,
138
170
  /// Successful result value — stored for result() after StopIteration delivery.
139
171
  value: Option<Py<PyAny>>,
140
172
  /// Error exception object — raised by result() for the Task to propagate.
@@ -318,7 +350,7 @@ impl RustAwaitable {
318
350
  if let Some(raw_result) = maybe {
319
351
  this.cb = None;
320
352
  return match raw_result {
321
- Ok(raw) => match raw_result_into_py(raw, py) {
353
+ Ok(raw) => match bridge_value_into_py(raw, py) {
322
354
  Ok(val) => deliver_value(&mut this, py, val),
323
355
  Err(e) => deliver_error(&mut this, py, e),
324
356
  },
@@ -347,7 +379,7 @@ impl RustAwaitable {
347
379
  hint.store(0, std::sync::atomic::Ordering::Relaxed);
348
380
  }
349
381
  let pending = std::mem::take(&mut this.pending_callbacks);
350
- let result = match raw_result_into_py(raw, py) {
382
+ let result = match bridge_value_into_py(raw, py) {
351
383
  Ok(val) => deliver_value(&mut this, py, val),
352
384
  Err(e) => deliver_error(&mut this, py, e),
353
385
  };
@@ -550,12 +582,12 @@ impl RustAwaitable {
550
582
  }
551
583
 
552
584
  impl RustAwaitable {
553
- pub fn new(rx: oneshot::Receiver<RawResult>) -> Self {
585
+ pub fn new(rx: oneshot::Receiver<BridgeValue>) -> Self {
554
586
  Self::new_with_hint(rx, None)
555
587
  }
556
588
 
557
589
  pub fn new_with_hint(
558
- rx: oneshot::Receiver<RawResult>,
590
+ rx: oneshot::Receiver<BridgeValue>,
559
591
  hint: Option<Arc<std::sync::atomic::AtomicU8>>,
560
592
  ) -> Self {
561
593
  use std::sync::atomic::Ordering;
@@ -604,7 +636,7 @@ impl RustAwaitable {
604
636
  };
605
637
  let maybe = cb.result_slot.lock().unwrap().take();
606
638
  match maybe {
607
- Some(Ok(raw)) => match raw_result_into_py(raw, py) {
639
+ Some(Ok(raw)) => match bridge_value_into_py(raw, py) {
608
640
  Ok(val) => {
609
641
  this.resolved = true;
610
642
  this.value = Some(val);
@@ -641,3 +673,34 @@ impl RustAwaitable {
641
673
  }
642
674
  }
643
675
  }
676
+
677
+ /// Test-only: an awaitable resolving to `value` through the
678
+ /// [`BridgeValue::Custom`] path after `delay_ms`. The Raw path is covered
679
+ /// by every driver op; this is the only in-tree producer of Custom, which
680
+ /// otherwise exists for rlib consumers. `delay_ms=0` exercises the
681
+ /// busy-yield fast path, larger delays the completion pipe; `error=True`
682
+ /// delivers a ValueError through the closure instead.
683
+ #[pyfunction]
684
+ #[pyo3(signature = (value, delay_ms = 0, error = false))]
685
+ pub fn _testing_custom_awaitable(
686
+ py: Python<'_>,
687
+ value: String,
688
+ delay_ms: u64,
689
+ error: bool,
690
+ ) -> PyResult<Py<PyAny>> {
691
+ let (tx, rx) = oneshot::channel();
692
+ let mut awaitable = RustAwaitable::new(rx);
693
+ let handle = get_runtime().spawn(async move {
694
+ if delay_ms > 0 {
695
+ tokio::time::sleep(std::time::Duration::from_millis(delay_ms)).await;
696
+ }
697
+ let produce: ProduceValue = if error {
698
+ Box::new(move |_py| Err(pyo3::exceptions::PyValueError::new_err(value)))
699
+ } else {
700
+ Box::new(move |py| Ok(PyString::new(py, &value).into_any().unbind()))
701
+ };
702
+ let _ = tx.send(BridgeValue::Custom(produce));
703
+ });
704
+ awaitable.set_abort_handle(handle.abort_handle());
705
+ Ok(awaitable.into_pyobject(py)?.into_any().unbind())
706
+ }
@@ -3,7 +3,7 @@ use pyo3::types::PyBytes;
3
3
  use std::sync::atomic::AtomicU8;
4
4
  use std::sync::Arc;
5
5
 
6
- use crate::async_bridge::{raw_result_into_py, RustAwaitable};
6
+ use crate::async_bridge::{raw_result_into_py, BridgeValue, RustAwaitable};
7
7
  use vcache_core::connection::{
8
8
  connect_cluster, connect_sentinel, connect_standard, ClientCacheOpts, MasterAuth, TlsOpts,
9
9
  ValkeyConn,
@@ -51,7 +51,7 @@ macro_rules! async_op_inner {
51
51
  let mut $conn = $self.connection.clone();
52
52
  let handle = get_runtime().spawn(async move {
53
53
  let result: RawResult = async { $body }.await;
54
- let _ = tx.send(result);
54
+ let _ = tx.send(BridgeValue::Raw(result));
55
55
  });
56
56
  awaitable.set_abort_handle(handle.abort_handle());
57
57
  Ok(awaitable.into_pyobject($py)?.into_any().unbind())
@@ -28,5 +28,9 @@ fn _driver(m: &Bound<'_, PyModule>) -> PyResult<()> {
28
28
  install_crypto_provider();
29
29
  m.add_class::<RustValkeyDriver>()?;
30
30
  m.add_class::<RustAwaitable>()?;
31
+ m.add_function(pyo3::wrap_pyfunction!(
32
+ async_bridge::_testing_custom_awaitable,
33
+ m
34
+ )?)?;
31
35
  Ok(())
32
36
  }
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "django-vcache"
7
- version = "3.0.0"
7
+ version = "3.1.1"
8
8
  description = "A specialized, lightweight Django cache backend for Valkey."
9
9
  readme = "README.md"
10
10
  authors = [{ name = "David Burke", email = "david@burkesoftware.com" }]
File without changes
File without changes