slumber-python 5.4.2__tar.gz → 5.4.4__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 (69) hide show
  1. {slumber_python-5.4.2 → slumber_python-5.4.4}/Cargo.lock +82 -49
  2. {slumber_python-5.4.2 → slumber_python-5.4.4}/Cargo.toml +12 -10
  3. {slumber_python-5.4.2 → slumber_python-5.4.4}/PKG-INFO +1 -1
  4. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/database/tests.rs +17 -7
  5. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/database.rs +38 -7
  6. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/http/models.rs +16 -0
  7. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/python/Cargo.toml +2 -2
  8. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/python/src/lib.rs +7 -5
  9. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/util/Cargo.toml +1 -1
  10. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/util/src/lib.rs +5 -14
  11. {slumber_python-5.4.2 → slumber_python-5.4.4}/README.md +0 -0
  12. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/config/Cargo.toml +0 -0
  13. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/config/src/cereal.rs +0 -0
  14. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/config/src/default.yml +0 -0
  15. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/config/src/default_old.yml +0 -0
  16. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/config/src/lib.rs +0 -0
  17. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/config/src/tui/cereal.rs +0 -0
  18. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/config/src/tui/input.rs +0 -0
  19. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/config/src/tui/mime.rs +0 -0
  20. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/config/src/tui/theme.rs +0 -0
  21. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/config/src/tui.rs +0 -0
  22. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/console/Cargo.toml +0 -0
  23. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/console/src/lib.rs +0 -0
  24. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/Cargo.toml +0 -0
  25. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/collection/cereal.rs +0 -0
  26. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/collection/models.rs +0 -0
  27. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/collection/recipe_tree.rs +0 -0
  28. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/collection/schema.rs +0 -0
  29. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/collection/value_template.rs +0 -0
  30. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/collection.rs +0 -0
  31. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/database/convert.rs +0 -0
  32. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/database/migrations.rs +0 -0
  33. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/http/curl.rs +0 -0
  34. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/http/tests.rs +0 -0
  35. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/http.rs +0 -0
  36. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/lib.rs +0 -0
  37. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/render/functions.rs +0 -0
  38. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/render/tests.rs +0 -0
  39. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/render/util.rs +0 -0
  40. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/render.rs +0 -0
  41. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/test_util.rs +0 -0
  42. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/util/json.rs +0 -0
  43. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/core/src/util.rs +0 -0
  44. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/macros/Cargo.toml +0 -0
  45. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/macros/src/lib.rs +0 -0
  46. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/python/README.md +0 -0
  47. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/python/dev.py +0 -0
  48. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/python/mise.toml +0 -0
  49. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/python/slumber.pyi +0 -0
  50. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/python/tests/slumber.yml +0 -0
  51. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/python/tests/test.py +0 -0
  52. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/python/uv.lock +0 -0
  53. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/template/Cargo.toml +0 -0
  54. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/template/proptest-regressions/parse.txt +0 -0
  55. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/template/src/cereal.rs +0 -0
  56. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/template/src/display.rs +0 -0
  57. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/template/src/error.rs +0 -0
  58. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/template/src/expression.rs +0 -0
  59. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/template/src/lib.rs +0 -0
  60. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/template/src/parse.rs +0 -0
  61. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/template/src/test_util.rs +0 -0
  62. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/template/src/tests.rs +0 -0
  63. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/template/src/value.rs +0 -0
  64. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/util/src/paths.rs +0 -0
  65. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/util/src/test_util.rs +0 -0
  66. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/util/src/yaml/error.rs +0 -0
  67. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/util/src/yaml/resolve.rs +0 -0
  68. {slumber_python-5.4.2 → slumber_python-5.4.4}/crates/util/src/yaml.rs +0 -0
  69. {slumber_python-5.4.2 → slumber_python-5.4.4}/pyproject.toml +0 -0
@@ -192,9 +192,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
192
192
 
193
193
  [[package]]
194
194
  name = "aws-lc-rs"
195
- version = "1.15.3"
195
+ version = "1.18.2"
196
196
  source = "registry+https://github.com/rust-lang/crates.io-index"
197
- checksum = "e84ce723ab67259cfeb9877c6a639ee9eb7a27b28123abd71db7f0d5d0cc9d86"
197
+ checksum = "faac5829c2b74c28f830747e7818ccfb684261b5f48a1118b1e2a13d36dfab13"
198
198
  dependencies = [
199
199
  "aws-lc-sys",
200
200
  "zeroize",
@@ -202,21 +202,22 @@ dependencies = [
202
202
 
203
203
  [[package]]
204
204
  name = "aws-lc-sys"
205
- version = "0.36.0"
205
+ version = "0.46.0"
206
206
  source = "registry+https://github.com/rust-lang/crates.io-index"
207
- checksum = "43a442ece363113bd4bd4c8b18977a7798dd4d3c3383f34fb61936960e8f4ad8"
207
+ checksum = "f1622d8446a2d4b2ce0c7eefc73dd43a99779028d5ee5c2dd8073a658ba8a2bc"
208
208
  dependencies = [
209
209
  "cc",
210
210
  "cmake",
211
211
  "dunce",
212
212
  "fs_extra",
213
+ "pkg-config",
213
214
  ]
214
215
 
215
216
  [[package]]
216
217
  name = "axum"
217
- version = "0.8.8"
218
+ version = "0.8.9"
218
219
  source = "registry+https://github.com/rust-lang/crates.io-index"
219
- checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8"
220
+ checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90"
220
221
  dependencies = [
221
222
  "axum-core",
222
223
  "bytes",
@@ -224,6 +225,8 @@ dependencies = [
224
225
  "http",
225
226
  "http-body",
226
227
  "http-body-util",
228
+ "hyper",
229
+ "hyper-util",
227
230
  "itoa",
228
231
  "matchit",
229
232
  "memchr",
@@ -232,6 +235,7 @@ dependencies = [
232
235
  "pin-project-lite",
233
236
  "serde_core",
234
237
  "sync_wrapper",
238
+ "tokio",
235
239
  "tower",
236
240
  "tower-layer",
237
241
  "tower-service",
@@ -282,6 +286,12 @@ version = "0.22.1"
282
286
  source = "registry+https://github.com/rust-lang/crates.io-index"
283
287
  checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
284
288
 
289
+ [[package]]
290
+ name = "base64"
291
+ version = "0.23.1"
292
+ source = "registry+https://github.com/rust-lang/crates.io-index"
293
+ checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
294
+
285
295
  [[package]]
286
296
  name = "bit-set"
287
297
  version = "0.5.3"
@@ -877,7 +887,7 @@ dependencies = [
877
887
 
878
888
  [[package]]
879
889
  name = "doc_utils"
880
- version = "5.4.2"
890
+ version = "5.4.4"
881
891
  dependencies = [
882
892
  "anyhow",
883
893
  "clap",
@@ -2404,36 +2414,33 @@ dependencies = [
2404
2414
 
2405
2415
  [[package]]
2406
2416
  name = "pyo3"
2407
- version = "0.27.2"
2417
+ version = "0.30.1"
2408
2418
  source = "registry+https://github.com/rust-lang/crates.io-index"
2409
- checksum = "ab53c047fcd1a1d2a8820fe84f05d6be69e9526be40cb03b73f86b6b03e6d87d"
2419
+ checksum = "229ca13b8a15bb0d1487b81ab975bfcd97513416499a8312011b6036e42e0de4"
2410
2420
  dependencies = [
2411
2421
  "indexmap",
2412
- "indoc",
2413
2422
  "libc",
2414
- "memoffset",
2415
2423
  "once_cell",
2416
2424
  "portable-atomic",
2417
2425
  "pyo3-build-config",
2418
2426
  "pyo3-ffi",
2419
2427
  "pyo3-macros",
2420
- "unindent",
2421
2428
  ]
2422
2429
 
2423
2430
  [[package]]
2424
2431
  name = "pyo3-build-config"
2425
- version = "0.27.2"
2432
+ version = "0.30.1"
2426
2433
  source = "registry+https://github.com/rust-lang/crates.io-index"
2427
- checksum = "b455933107de8642b4487ed26d912c2d899dec6114884214a0b3bb3be9261ea6"
2434
+ checksum = "70130e2b6dd1ee589a8788026a429561ca5c40fa7a2fa7914c2282eddae24700"
2428
2435
  dependencies = [
2429
2436
  "target-lexicon",
2430
2437
  ]
2431
2438
 
2432
2439
  [[package]]
2433
2440
  name = "pyo3-ffi"
2434
- version = "0.27.2"
2441
+ version = "0.30.1"
2435
2442
  source = "registry+https://github.com/rust-lang/crates.io-index"
2436
- checksum = "1c85c9cbfaddf651b1221594209aed57e9e5cff63c4d11d1feead529b872a089"
2443
+ checksum = "5e7ff73c555c286d212d4ce7e5fbda845a973c4f61bd5f160f5f2c3c2a04d1c4"
2437
2444
  dependencies = [
2438
2445
  "libc",
2439
2446
  "pyo3-build-config",
@@ -2441,27 +2448,26 @@ dependencies = [
2441
2448
 
2442
2449
  [[package]]
2443
2450
  name = "pyo3-macros"
2444
- version = "0.27.2"
2451
+ version = "0.30.1"
2445
2452
  source = "registry+https://github.com/rust-lang/crates.io-index"
2446
- checksum = "0a5b10c9bf9888125d917fb4d2ca2d25c8df94c7ab5a52e13313a07e050a3b02"
2453
+ checksum = "c46d2e5862c7bb8207e3b639f713dda3c499933444784154c11d013c5a691b60"
2447
2454
  dependencies = [
2448
2455
  "proc-macro2",
2449
2456
  "pyo3-macros-backend",
2450
2457
  "quote",
2451
- "syn 2.0.114",
2458
+ "syn 3.0.9",
2452
2459
  ]
2453
2460
 
2454
2461
  [[package]]
2455
2462
  name = "pyo3-macros-backend"
2456
- version = "0.27.2"
2463
+ version = "0.30.1"
2457
2464
  source = "registry+https://github.com/rust-lang/crates.io-index"
2458
- checksum = "03b51720d314836e53327f5871d4c0cfb4fb37cc2c4a11cc71907a86342c40f9"
2465
+ checksum = "38b89f066f2ae72a2aef52d1537ca2fcd104440ebfadee06e97aa90738a25b9b"
2459
2466
  dependencies = [
2460
2467
  "heck",
2461
2468
  "proc-macro2",
2462
- "pyo3-build-config",
2463
2469
  "quote",
2464
- "syn 2.0.114",
2470
+ "syn 3.0.9",
2465
2471
  ]
2466
2472
 
2467
2473
  [[package]]
@@ -2752,11 +2758,11 @@ checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2"
2752
2758
 
2753
2759
  [[package]]
2754
2760
  name = "reqwest"
2755
- version = "0.13.1"
2761
+ version = "0.13.5"
2756
2762
  source = "registry+https://github.com/rust-lang/crates.io-index"
2757
- checksum = "04e9018c9d814e5f30cc16a0f03271aeab3571e609612d9fe78c1aa8d11c2f62"
2763
+ checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029"
2758
2764
  dependencies = [
2759
- "base64 0.22.1",
2765
+ "base64 0.23.1",
2760
2766
  "bytes",
2761
2767
  "futures-core",
2762
2768
  "futures-util",
@@ -2783,7 +2789,7 @@ dependencies = [
2783
2789
  "tokio-rustls",
2784
2790
  "tokio-util",
2785
2791
  "tower",
2786
- "tower-http",
2792
+ "tower-http 0.6.8",
2787
2793
  "tower-service",
2788
2794
  "url",
2789
2795
  "wasm-bindgen",
@@ -2981,9 +2987,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f"
2981
2987
 
2982
2988
  [[package]]
2983
2989
  name = "rustls-webpki"
2984
- version = "0.103.9"
2990
+ version = "0.103.16"
2985
2991
  source = "registry+https://github.com/rust-lang/crates.io-index"
2986
- checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53"
2992
+ checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281"
2987
2993
  dependencies = [
2988
2994
  "aws-lc-rs",
2989
2995
  "ring",
@@ -3348,7 +3354,7 @@ checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"
3348
3354
 
3349
3355
  [[package]]
3350
3356
  name = "slumber"
3351
- version = "5.4.2"
3357
+ version = "5.4.4"
3352
3358
  dependencies = [
3353
3359
  "anyhow",
3354
3360
  "slumber_cli",
@@ -3360,7 +3366,7 @@ dependencies = [
3360
3366
 
3361
3367
  [[package]]
3362
3368
  name = "slumber_cli"
3363
- version = "5.4.2"
3369
+ version = "5.4.4"
3364
3370
  dependencies = [
3365
3371
  "anyhow",
3366
3372
  "assert_cmd",
@@ -3388,14 +3394,13 @@ dependencies = [
3388
3394
  "slumber_util",
3389
3395
  "tokio",
3390
3396
  "tracing",
3391
- "url",
3392
3397
  "uuid",
3393
3398
  "wiremock",
3394
3399
  ]
3395
3400
 
3396
3401
  [[package]]
3397
3402
  name = "slumber_config"
3398
- version = "5.4.2"
3403
+ version = "5.4.4"
3399
3404
  dependencies = [
3400
3405
  "derive_more",
3401
3406
  "dirs",
@@ -3420,7 +3425,7 @@ dependencies = [
3420
3425
 
3421
3426
  [[package]]
3422
3427
  name = "slumber_console"
3423
- version = "5.4.2"
3428
+ version = "5.4.4"
3424
3429
  dependencies = [
3425
3430
  "anyhow",
3426
3431
  "async-trait",
@@ -3434,7 +3439,7 @@ dependencies = [
3434
3439
 
3435
3440
  [[package]]
3436
3441
  name = "slumber_core"
3437
- version = "5.4.2"
3442
+ version = "5.4.4"
3438
3443
  dependencies = [
3439
3444
  "async-trait",
3440
3445
  "base64 0.22.1",
@@ -3482,7 +3487,7 @@ dependencies = [
3482
3487
 
3483
3488
  [[package]]
3484
3489
  name = "slumber_import"
3485
- version = "5.4.2"
3490
+ version = "5.4.4"
3486
3491
  dependencies = [
3487
3492
  "anyhow",
3488
3493
  "base64 0.22.1",
@@ -3514,16 +3519,33 @@ dependencies = [
3514
3519
 
3515
3520
  [[package]]
3516
3521
  name = "slumber_macros"
3517
- version = "5.4.2"
3522
+ version = "5.4.4"
3518
3523
  dependencies = [
3519
3524
  "proc-macro2",
3520
3525
  "quote",
3521
3526
  "syn 2.0.114",
3522
3527
  ]
3523
3528
 
3529
+ [[package]]
3530
+ name = "slumber_mock"
3531
+ version = "0.1.2"
3532
+ dependencies = [
3533
+ "anyhow",
3534
+ "axum",
3535
+ "clap",
3536
+ "itertools",
3537
+ "reqwest",
3538
+ "slumber_core",
3539
+ "tokio",
3540
+ "tower-http 0.7.1",
3541
+ "tracing",
3542
+ "tracing-subscriber",
3543
+ "url",
3544
+ ]
3545
+
3524
3546
  [[package]]
3525
3547
  name = "slumber_python"
3526
- version = "5.4.2"
3548
+ version = "5.4.4"
3527
3549
  dependencies = [
3528
3550
  "async-trait",
3529
3551
  "indexmap",
@@ -3537,7 +3559,7 @@ dependencies = [
3537
3559
 
3538
3560
  [[package]]
3539
3561
  name = "slumber_template"
3540
- version = "5.4.2"
3562
+ version = "5.4.4"
3541
3563
  dependencies = [
3542
3564
  "bytes",
3543
3565
  "derive_more",
@@ -3564,7 +3586,7 @@ dependencies = [
3564
3586
 
3565
3587
  [[package]]
3566
3588
  name = "slumber_tui"
3567
- version = "5.4.2"
3589
+ version = "5.4.4"
3568
3590
  dependencies = [
3569
3591
  "anyhow",
3570
3592
  "async-trait",
@@ -3606,7 +3628,7 @@ dependencies = [
3606
3628
 
3607
3629
  [[package]]
3608
3630
  name = "slumber_util"
3609
- version = "5.4.2"
3631
+ version = "5.4.4"
3610
3632
  dependencies = [
3611
3633
  "console-subscriber",
3612
3634
  "derive_more",
@@ -4144,6 +4166,23 @@ dependencies = [
4144
4166
  "tower-service",
4145
4167
  ]
4146
4168
 
4169
+ [[package]]
4170
+ name = "tower-http"
4171
+ version = "0.7.1"
4172
+ source = "registry+https://github.com/rust-lang/crates.io-index"
4173
+ checksum = "08a05a66a4fdd61cbbe0a1d755ffe0ca6aba159dd4820936a0ff8a8278245b9c"
4174
+ dependencies = [
4175
+ "bitflags 2.10.0",
4176
+ "bytes",
4177
+ "http",
4178
+ "http-body",
4179
+ "percent-encoding",
4180
+ "pin-project-lite",
4181
+ "tower-layer",
4182
+ "tower-service",
4183
+ "tracing",
4184
+ ]
4185
+
4147
4186
  [[package]]
4148
4187
  name = "tower-layer"
4149
4188
  version = "0.3.3"
@@ -4313,12 +4352,6 @@ version = "0.2.6"
4313
4352
  source = "registry+https://github.com/rust-lang/crates.io-index"
4314
4353
  checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
4315
4354
 
4316
- [[package]]
4317
- name = "unindent"
4318
- version = "0.2.4"
4319
- source = "registry+https://github.com/rust-lang/crates.io-index"
4320
- checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
4321
-
4322
4355
  [[package]]
4323
4356
  name = "unsafe-libyaml"
4324
4357
  version = "0.2.11"
@@ -4506,9 +4539,9 @@ dependencies = [
4506
4539
 
4507
4540
  [[package]]
4508
4541
  name = "wasm-streams"
4509
- version = "0.4.2"
4542
+ version = "0.5.0"
4510
4543
  source = "registry+https://github.com/rust-lang/crates.io-index"
4511
- checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65"
4544
+ checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb"
4512
4545
  dependencies = [
4513
4546
  "futures-util",
4514
4547
  "js-sys",
@@ -9,7 +9,7 @@ homepage = "https://slumber.lucaspickering.me"
9
9
  keywords = ["rest", "http", "terminal", "tui"]
10
10
  license = "MIT"
11
11
  repository = "https://github.com/LucasPickering/slumber"
12
- version = "5.4.2"
12
+ version = "5.4.4"
13
13
  # Keep in sync w/ rust-toolchain.toml
14
14
  rust-version = "1.99.0"
15
15
 
@@ -43,15 +43,16 @@ serde_json = {version = "1.0.120", default-features = false, features = ["preser
43
43
  serde_json_path = "0.7.1"
44
44
  serde_test = "1.0.176"
45
45
  serde_yaml = {version = "0.9.0", default-features = false}
46
- slumber_cli = {path = "./crates/cli", version = "5.4.2" }
47
- slumber_config = {path = "./crates/config", version = "5.4.2", default-features = false}
48
- slumber_console = {path = "./crates/console", version = "5.4.2" }
49
- slumber_core = {path = "./crates/core", version = "5.4.2" }
50
- slumber_import = {path = "./crates/import", version = "5.4.2" }
51
- slumber_macros = {path = "./crates/macros", version = "5.4.2" }
52
- slumber_template = {path = "./crates/template", version = "5.4.2" }
53
- slumber_tui = {path = "./crates/tui", version = "5.4.2" }
54
- slumber_util = {path = "./crates/util", version = "5.4.2" }
46
+ slumber_cli = {path = "./crates/cli", version = "5.4.4" }
47
+ slumber_config = {path = "./crates/config", version = "5.4.4", default-features = false}
48
+ slumber_console = {path = "./crates/console", version = "5.4.4" }
49
+ slumber_core = {path = "./crates/core", version = "5.4.4" }
50
+ slumber_import = {path = "./crates/import", version = "5.4.4" }
51
+ slumber_macros = {path = "./crates/macros", version = "5.4.4" }
52
+ slumber_mock = {path = "./crates/mock", version = "0.1.2" }
53
+ slumber_template = {path = "./crates/template", version = "5.4.4" }
54
+ slumber_tui = {path = "./crates/tui", version = "5.4.4" }
55
+ slumber_util = {path = "./crates/util", version = "5.4.4" }
55
56
  strum = {version = "0.27.0", default-features = false}
56
57
  syn = "2.0.101"
57
58
  terminput = "0.5.3"
@@ -59,6 +60,7 @@ thiserror = "2.0.12"
59
60
  tokio = {version = "1.39.2", default-features = false}
60
61
  tokio-util = "0.7.13"
61
62
  tracing = "0.1.40"
63
+ tracing-subscriber = {version = "0.3.17", default-features = false}
62
64
  url = "2.0.0"
63
65
  uuid = {version = "1.10.0", default-features = false}
64
66
  winnow = "0.7.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: slumber-python
3
- Version: 5.4.2
3
+ Version: 5.4.4
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -112,7 +112,7 @@ fn test_collection_delete(collection_file: CollectionFile) {
112
112
  collection.insert_command("jq .").unwrap();
113
113
 
114
114
  // Sanity checks
115
- assert_eq!(collection.get_all_requests().unwrap().len(), 1);
115
+ assert_eq!(collection.get_all_exchange_summaries().unwrap().len(), 1);
116
116
  assert_eq!(
117
117
  collection.get_ui(key_type, ui_key).unwrap(),
118
118
  Some("value1".into())
@@ -126,7 +126,7 @@ fn test_collection_delete(collection_file: CollectionFile) {
126
126
 
127
127
  // All gone!
128
128
  assert_eq!(database.get_collections().unwrap(), []);
129
- assert_eq!(database.get_all_requests().unwrap(), []);
129
+ assert_eq!(database.get_all_exchange_summaries().unwrap(), []);
130
130
  assert_eq!(collection.get_ui(key_type, ui_key).unwrap(), None);
131
131
  assert_eq!(collection.get_commands("jq").unwrap(), [""; 0]);
132
132
  }
@@ -240,7 +240,14 @@ fn test_collection_merge(
240
240
  /// Test fetching all requests for the whole DB
241
241
  #[rstest]
242
242
  fn test_database_get_all_requests(request_db: RequestDb) {
243
- assert_eq!(request_db.database.get_all_requests().unwrap().len(), 12);
243
+ assert_eq!(
244
+ request_db
245
+ .database
246
+ .get_all_exchange_summaries()
247
+ .unwrap()
248
+ .len(),
249
+ 12
250
+ );
244
251
  }
245
252
 
246
253
  /// Test getting most recent request by recipe/profile
@@ -303,8 +310,8 @@ fn test_request_body(#[case] body: RequestBody) {
303
310
  #[rstest]
304
311
  fn test_collection_get_all_requests(request_db: RequestDb) {
305
312
  let [collection1, collection2] = request_db.collections;
306
- assert_eq!(collection1.get_all_requests().unwrap().len(), 6);
307
- assert_eq!(collection2.get_all_requests().unwrap().len(), 6);
313
+ assert_eq!(collection1.get_all_exchange_summaries().unwrap().len(), 6);
314
+ assert_eq!(collection2.get_all_exchange_summaries().unwrap().len(), 6);
308
315
  }
309
316
 
310
317
  /// Test fetching all requests for a single recipe
@@ -349,7 +356,10 @@ fn test_get_recipe_requests() {
349
356
  // Leave the Option here so a non-match will trigger a handy
350
357
  // assertion error
351
358
  let ids = database
352
- .get_recipe_requests(profile_id.as_ref().into(), &recipe_id)
359
+ .get_recipe_exchange_summaries(
360
+ profile_id.as_ref().into(),
361
+ &recipe_id,
362
+ )
353
363
  .unwrap()
354
364
  .into_iter()
355
365
  .map(|exchange| exchange.id)
@@ -370,7 +380,7 @@ fn test_get_recipe_requests() {
370
380
  // Load all requests for a recipe (across all profiles)
371
381
  let recipe_id = "recipe1".into();
372
382
  let ids = database
373
- .get_recipe_requests(ProfileFilter::All, &recipe_id)
383
+ .get_recipe_exchange_summaries(ProfileFilter::All, &recipe_id)
374
384
  .unwrap()
375
385
  .into_iter()
376
386
  .map(|exchange| exchange.id)
@@ -9,7 +9,7 @@ mod tests;
9
9
  use crate::{
10
10
  collection::{Collection, CollectionFile, ProfileId, RecipeId},
11
11
  database::convert::{CollectionPath, SqlWrap},
12
- http::{Exchange, ExchangeSummary, RequestId},
12
+ http::{Exchange, ExchangeSummary, HttpMethod, RequestId},
13
13
  };
14
14
  use chrono::Utc;
15
15
  use rusqlite::{Connection, OptionalExtension, named_params};
@@ -25,6 +25,7 @@ use std::{
25
25
  use strum::IntoDiscriminant;
26
26
  use thiserror::Error;
27
27
  use tracing::{debug, info};
28
+ use url::Url;
28
29
  use uuid::Uuid;
29
30
 
30
31
  /// Maximum number of commands to store in history **per collection**. When we
@@ -268,8 +269,8 @@ impl Database {
268
269
  Ok(())
269
270
  }
270
271
 
271
- /// Get all requests for all collections
272
- pub fn get_all_requests(
272
+ /// Get all exchanges for all collections
273
+ pub fn get_all_exchange_summaries(
273
274
  &self,
274
275
  ) -> Result<Vec<ExchangeSummary>, DatabaseError> {
275
276
  // Wish we had try blocks ¯\_(ツ)_/¯
@@ -455,8 +456,8 @@ impl CollectionDatabase {
455
456
  .traced()
456
457
  }
457
458
 
458
- /// Get a list of all requests for a profile+recipe combo
459
- pub fn get_recipe_requests(
459
+ /// Get a list of all exchanges for a profile+recipe combo
460
+ pub fn get_recipe_exchange_summaries(
460
461
  &self,
461
462
  profile_filter: ProfileFilter,
462
463
  recipe_id: &RecipeId,
@@ -493,8 +494,8 @@ impl CollectionDatabase {
493
494
  .map_err(DatabaseError::add_context("Extracting request history"))
494
495
  }
495
496
 
496
- /// Get all requests for this collection
497
- pub fn get_all_requests(
497
+ /// Get all exchanges for this collection
498
+ pub fn get_all_exchange_summaries(
498
499
  &self,
499
500
  ) -> Result<Vec<ExchangeSummary>, DatabaseError> {
500
501
  self.database
@@ -518,6 +519,36 @@ impl CollectionDatabase {
518
519
  .traced()
519
520
  }
520
521
 
522
+ /// Get request data for all requests for this collection
523
+ pub fn get_all_requests(
524
+ &self,
525
+ ) -> Result<Vec<(RequestId, HttpMethod, Url)>, DatabaseError> {
526
+ self.database
527
+ .connection()
528
+ .prepare(
529
+ "SELECT id, method, url FROM requests_v2
530
+ WHERE collection_id = :collection_id ORDER BY start_time DESC",
531
+ )
532
+ .and_then(|mut stmt| {
533
+ stmt.query_map(
534
+ named_params! {":collection_id": self.collection_id},
535
+ |row| {
536
+ Ok((
537
+ row.get("id")?,
538
+ row.get("method")?,
539
+ row.get::<_, SqlWrap<_>>("url")?.0,
540
+ ))
541
+ },
542
+ )?
543
+ .collect::<rusqlite::Result<Vec<_>>>()
544
+ })
545
+ .map_err(DatabaseError::add_context(format!(
546
+ "Error loading requests for collection `{}`",
547
+ self.collection_id
548
+ )))
549
+ .traced()
550
+ }
551
+
521
552
  /// Add a new exchange to history. The HTTP engine is responsible for
522
553
  /// inserting its own exchanges. Only requests that received a valid HTTP
523
554
  /// response should be stored. In-flight requests, invalid requests, and
@@ -242,6 +242,22 @@ impl TryFrom<String> for HttpMethod {
242
242
  }
243
243
  }
244
244
 
245
+ impl PartialEq<reqwest::Method> for HttpMethod {
246
+ fn eq(&self, other: &reqwest::Method) -> bool {
247
+ match self {
248
+ Self::Connect => other == reqwest::Method::CONNECT,
249
+ Self::Delete => other == reqwest::Method::DELETE,
250
+ Self::Get => other == reqwest::Method::GET,
251
+ Self::Head => other == reqwest::Method::HEAD,
252
+ Self::Options => other == reqwest::Method::OPTIONS,
253
+ Self::Patch => other == reqwest::Method::PATCH,
254
+ Self::Post => other == reqwest::Method::POST,
255
+ Self::Put => other == reqwest::Method::PUT,
256
+ Self::Trace => other == reqwest::Method::TRACE,
257
+ }
258
+ }
259
+ }
260
+
245
261
  #[derive(Debug, Error)]
246
262
  #[error(
247
263
  "Invalid HTTP method `{input}`. Must be one of: {}",
@@ -18,13 +18,13 @@ release = false
18
18
  tag = false
19
19
 
20
20
  [lib]
21
- name = "slumber"
22
21
  crate-type = ["cdylib"]
22
+ name = "slumber"
23
23
 
24
24
  [dependencies]
25
25
  async-trait = {workspace = true}
26
26
  indexmap = {workspace = true}
27
- pyo3 = {version = "0.27.2", features = ["experimental-async", "indexmap"]}
27
+ pyo3 = {version = "0.30", features = ["experimental-async", "indexmap"]}
28
28
  slumber_config = {workspace = true}
29
29
  slumber_console = {workspace = true}
30
30
  slumber_core = {workspace = true}
@@ -1,8 +1,8 @@
1
1
  use async_trait::async_trait;
2
2
  use indexmap::IndexMap;
3
3
  use pyo3::{
4
- PyErr, PyResult,
5
- exceptions::{PyRuntimeError, PyValueError},
4
+ Py, PyErr, PyResult, Python,
5
+ exceptions::{PyRuntimeError, PyUnicodeDecodeError, PyValueError},
6
6
  pyclass, pymethods, pymodule,
7
7
  };
8
8
  use slumber_config::Config;
@@ -21,7 +21,6 @@ use std::{
21
21
  error::Error,
22
22
  fmt::{self, Display},
23
23
  path::PathBuf,
24
- str::Utf8Error,
25
24
  sync::{Arc, LazyLock},
26
25
  };
27
26
  use tokio::{
@@ -228,8 +227,11 @@ impl Response {
228
227
 
229
228
  /// Response content decoded as UTF-8
230
229
  #[getter]
231
- fn text(&self) -> Result<&str, Utf8Error> {
232
- std::str::from_utf8(self.response.body.bytes())
230
+ fn text(&self, py: Python<'_>) -> Result<&str, PyErr> {
231
+ let bytes = self.response.body.bytes();
232
+ std::str::from_utf8(bytes).map_err(|error| {
233
+ PyUnicodeDecodeError::new_err_from_utf8(py, bytes, error)
234
+ })
233
235
  }
234
236
 
235
237
  /// If the response status code is >= 400, raise an exception
@@ -26,7 +26,7 @@ serde = {workspace = true}
26
26
  serde_yaml = {workspace = true}
27
27
  thiserror = {workspace = true}
28
28
  tracing = {workspace = true}
29
- tracing-subscriber = {version = "0.3.17", default-features = false, features = ["ansi", "fmt", "registry"]}
29
+ tracing-subscriber = {workspace = true, features = ["ansi", "fmt", "registry"]}
30
30
  uuid = {workspace = true, features = ["v4"]}
31
31
  winnow = {workspace = true}
32
32
 
@@ -350,21 +350,12 @@ pub fn initialize_tracing(level_filter: LevelFilter, has_stderr: bool) {
350
350
  LevelFilter::OFF
351
351
  });
352
352
 
353
+ let registry = tracing_subscriber::registry()
354
+ .with(file_subscriber)
355
+ .with(stderr_subscriber);
353
356
  #[cfg(feature = "tokio_tracing")]
354
- {
355
- tracing_subscriber::registry()
356
- .with(file_subscriber)
357
- .with(stderr_subscriber)
358
- .with(console_subscriber::spawn())
359
- .init();
360
- }
361
- #[cfg(not(feature = "tokio_tracing"))]
362
- {
363
- tracing_subscriber::registry()
364
- .with(file_subscriber)
365
- .with(stderr_subscriber)
366
- .init();
367
- }
357
+ let registry = registry.with(console_subscriber::spawn());
358
+ registry.init();
368
359
  }
369
360
 
370
361
  /// Serialize a list of tuples as a mapping
File without changes