slumber-python 4.2.0__tar.gz → 4.2.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 (64) hide show
  1. {slumber_python-4.2.0 → slumber_python-4.2.1}/Cargo.lock +11 -10
  2. {slumber_python-4.2.0 → slumber_python-4.2.1}/Cargo.toml +11 -10
  3. {slumber_python-4.2.0 → slumber_python-4.2.1}/PKG-INFO +1 -1
  4. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/util/Cargo.toml +3 -1
  5. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/util/src/test_util.rs +21 -2
  6. {slumber_python-4.2.0 → slumber_python-4.2.1}/README.md +0 -0
  7. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/config/Cargo.toml +0 -0
  8. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/config/src/cereal.rs +0 -0
  9. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/config/src/lib.rs +0 -0
  10. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/config/src/tui/input.rs +0 -0
  11. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/config/src/tui/mime.rs +0 -0
  12. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/config/src/tui/theme.rs +0 -0
  13. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/config/src/tui.rs +0 -0
  14. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/Cargo.toml +0 -0
  15. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/collection/cereal.rs +0 -0
  16. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/collection/json.rs +0 -0
  17. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/collection/models.rs +0 -0
  18. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/collection/recipe_tree.rs +0 -0
  19. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/collection/schema.rs +0 -0
  20. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/collection.rs +0 -0
  21. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/database/convert.rs +0 -0
  22. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/database/migrations.rs +0 -0
  23. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/database/tests.rs +0 -0
  24. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/database.rs +0 -0
  25. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/http/content_type.rs +0 -0
  26. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/http/curl.rs +0 -0
  27. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/http/models.rs +0 -0
  28. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/http/tests.rs +0 -0
  29. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/http.rs +0 -0
  30. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/lib.rs +0 -0
  31. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/render/functions.rs +0 -0
  32. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/render/tests.rs +0 -0
  33. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/render/util.rs +0 -0
  34. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/render.rs +0 -0
  35. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/test_util.rs +0 -0
  36. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/core/src/util.rs +0 -0
  37. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/macros/Cargo.toml +0 -0
  38. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/macros/src/lib.rs +0 -0
  39. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/python/Cargo.toml +0 -0
  40. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/python/README.md +0 -0
  41. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/python/dev.py +0 -0
  42. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/python/mise.toml +0 -0
  43. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/python/slumber.pyi +0 -0
  44. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/python/src/lib.rs +0 -0
  45. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/python/tests/slumber.yml +0 -0
  46. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/python/tests/test.py +0 -0
  47. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/python/uv.lock +0 -0
  48. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/template/Cargo.toml +0 -0
  49. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/template/proptest-regressions/parse.txt +0 -0
  50. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/template/src/cereal.rs +0 -0
  51. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/template/src/display.rs +0 -0
  52. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/template/src/error.rs +0 -0
  53. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/template/src/expression.rs +0 -0
  54. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/template/src/lib.rs +0 -0
  55. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/template/src/parse.rs +0 -0
  56. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/template/src/test_util.rs +0 -0
  57. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/template/src/tests.rs +0 -0
  58. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/template/src/value.rs +0 -0
  59. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/util/src/lib.rs +0 -0
  60. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/util/src/paths.rs +0 -0
  61. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/util/src/yaml/error.rs +0 -0
  62. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/util/src/yaml/resolve.rs +0 -0
  63. {slumber_python-4.2.0 → slumber_python-4.2.1}/crates/util/src/yaml.rs +0 -0
  64. {slumber_python-4.2.0 → slumber_python-4.2.1}/pyproject.toml +0 -0
@@ -3505,7 +3505,7 @@ dependencies = [
3505
3505
 
3506
3506
  [[package]]
3507
3507
  name = "slumber"
3508
- version = "4.2.0"
3508
+ version = "4.2.1"
3509
3509
  dependencies = [
3510
3510
  "anyhow",
3511
3511
  "console-subscriber",
@@ -3519,7 +3519,7 @@ dependencies = [
3519
3519
 
3520
3520
  [[package]]
3521
3521
  name = "slumber_cli"
3522
- version = "4.2.0"
3522
+ version = "4.2.1"
3523
3523
  dependencies = [
3524
3524
  "anyhow",
3525
3525
  "assert_cmd",
@@ -3552,7 +3552,7 @@ dependencies = [
3552
3552
 
3553
3553
  [[package]]
3554
3554
  name = "slumber_config"
3555
- version = "4.2.0"
3555
+ version = "4.2.1"
3556
3556
  dependencies = [
3557
3557
  "derive_more 1.0.0",
3558
3558
  "dirs",
@@ -3577,7 +3577,7 @@ dependencies = [
3577
3577
 
3578
3578
  [[package]]
3579
3579
  name = "slumber_core"
3580
- version = "4.2.0"
3580
+ version = "4.2.1"
3581
3581
  dependencies = [
3582
3582
  "async-trait",
3583
3583
  "base64 0.22.1",
@@ -3624,7 +3624,7 @@ dependencies = [
3624
3624
 
3625
3625
  [[package]]
3626
3626
  name = "slumber_import"
3627
- version = "4.2.0"
3627
+ version = "4.2.1"
3628
3628
  dependencies = [
3629
3629
  "anyhow",
3630
3630
  "base64 0.22.1",
@@ -3656,7 +3656,7 @@ dependencies = [
3656
3656
 
3657
3657
  [[package]]
3658
3658
  name = "slumber_macros"
3659
- version = "4.2.0"
3659
+ version = "4.2.1"
3660
3660
  dependencies = [
3661
3661
  "proc-macro2",
3662
3662
  "quote",
@@ -3665,7 +3665,7 @@ dependencies = [
3665
3665
 
3666
3666
  [[package]]
3667
3667
  name = "slumber_python"
3668
- version = "4.2.0"
3668
+ version = "4.2.1"
3669
3669
  dependencies = [
3670
3670
  "async-trait",
3671
3671
  "dialoguer",
@@ -3678,7 +3678,7 @@ dependencies = [
3678
3678
 
3679
3679
  [[package]]
3680
3680
  name = "slumber_template"
3681
- version = "4.2.0"
3681
+ version = "4.2.1"
3682
3682
  dependencies = [
3683
3683
  "bytes",
3684
3684
  "derive_more 1.0.0",
@@ -3705,7 +3705,7 @@ dependencies = [
3705
3705
 
3706
3706
  [[package]]
3707
3707
  name = "slumber_tui"
3708
- version = "4.2.0"
3708
+ version = "4.2.1"
3709
3709
  dependencies = [
3710
3710
  "anyhow",
3711
3711
  "async-trait",
@@ -3747,7 +3747,7 @@ dependencies = [
3747
3747
 
3748
3748
  [[package]]
3749
3749
  name = "slumber_util"
3750
- version = "4.2.0"
3750
+ version = "4.2.1"
3751
3751
  dependencies = [
3752
3752
  "derive_more 1.0.0",
3753
3753
  "dirs",
@@ -3763,6 +3763,7 @@ dependencies = [
3763
3763
  "serde_yaml",
3764
3764
  "thiserror 2.0.12",
3765
3765
  "tracing",
3766
+ "tracing-subscriber",
3766
3767
  "uuid",
3767
3768
  "winnow",
3768
3769
  ]
@@ -20,7 +20,7 @@ homepage = "https://slumber.lucaspickering.me"
20
20
  keywords = ["rest", "http", "terminal", "tui"]
21
21
  license = "MIT"
22
22
  repository = "https://github.com/LucasPickering/slumber"
23
- version = "4.2.0"
23
+ version = "4.2.1"
24
24
  # Keep in sync w/ rust-toolchain.toml
25
25
  rust-version = "1.88.0"
26
26
 
@@ -54,14 +54,14 @@ serde_json = {version = "1.0.120", default-features = false, features = ["preser
54
54
  serde_json_path = "0.7.1"
55
55
  serde_test = "1.0.176"
56
56
  serde_yaml = {version = "0.9.0", default-features = false}
57
- slumber_cli = {path = "./crates/cli", version = "4.2.0" }
58
- slumber_config = {path = "./crates/config", version = "4.2.0" }
59
- slumber_core = {path = "./crates/core", version = "4.2.0" }
60
- slumber_import = {path = "./crates/import", version = "4.2.0" }
61
- slumber_macros = {path = "./crates/macros", version = "4.2.0" }
62
- slumber_template = {path = "./crates/template", version = "4.2.0" }
63
- slumber_tui = {path = "./crates/tui", version = "4.2.0" }
64
- slumber_util = {path = "./crates/util", version = "4.2.0" }
57
+ slumber_cli = {path = "./crates/cli", version = "4.2.1" }
58
+ slumber_config = {path = "./crates/config", version = "4.2.1" }
59
+ slumber_core = {path = "./crates/core", version = "4.2.1" }
60
+ slumber_import = {path = "./crates/import", version = "4.2.1" }
61
+ slumber_macros = {path = "./crates/macros", version = "4.2.1" }
62
+ slumber_template = {path = "./crates/template", version = "4.2.1" }
63
+ slumber_tui = {path = "./crates/tui", version = "4.2.1" }
64
+ slumber_util = {path = "./crates/util", version = "4.2.1" }
65
65
  strum = {version = "0.26.3", default-features = false}
66
66
  syn = "2.0.101"
67
67
  terminput = "0.5.3"
@@ -69,6 +69,7 @@ thiserror = "2.0.12"
69
69
  tokio = {version = "1.39.2", default-features = false}
70
70
  tokio-util = "0.7.13"
71
71
  tracing = "0.1.40"
72
+ tracing-subscriber = {version = "0.3.17", default-features = false, features = ["ansi", "fmt", "registry"]}
72
73
  url = "2.0.0"
73
74
  uuid = {version = "1.10.0", default-features = false}
74
75
  winnow = "0.7.0"
@@ -111,7 +112,7 @@ slumber_tui = {workspace = true, optional = true}
111
112
  slumber_util = {workspace = true}
112
113
  tokio = {workspace = true, features = ["macros", "rt", "tracing"]}
113
114
  tracing = {workspace = true}
114
- tracing-subscriber = {version = "0.3.17", default-features = false, features = ["ansi", "fmt", "registry"]}
115
+ tracing-subscriber = {workspace = true}
115
116
 
116
117
  [features]
117
118
  default = ["cli", "tui"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: slumber-python
3
- Version: 4.2.0
3
+ Version: 4.2.1
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -26,6 +26,7 @@ serde_path_to_error = "0.1.16"
26
26
  serde_yaml = {workspace = true}
27
27
  thiserror = {workspace = true}
28
28
  tracing = {workspace = true}
29
+ tracing-subscriber = {workspace = true, optional = true}
29
30
  uuid = {workspace = true, features = ["v4"], optional = true}
30
31
  winnow = {workspace = true}
31
32
 
@@ -34,10 +35,11 @@ env-lock = {workspace = true}
34
35
  pretty_assertions = {workspace = true}
35
36
  rstest = {workspace = true}
36
37
  serde = {workspace = true, features = ["derive"]}
38
+ tracing-subscriber = {workspace = true}
37
39
  uuid = {workspace = true, features = ["v4"]}
38
40
 
39
41
  [features]
40
- test = ["dep:rstest", "dep:uuid"]
42
+ test = ["dep:rstest", "dep:uuid", "dep:tracing-subscriber"]
41
43
 
42
44
  [lints]
43
45
  workspace = true
@@ -4,11 +4,15 @@ use std::{
4
4
  env,
5
5
  error::Error,
6
6
  fmt::Debug,
7
- fs,
7
+ fs, io,
8
8
  ops::Deref,
9
9
  path::{Path, PathBuf},
10
10
  };
11
- use tracing::error;
11
+ use tracing::{error, level_filters::LevelFilter};
12
+ use tracing_subscriber::{
13
+ Layer, filter::Targets, fmt::format::FmtSpan, layer::SubscriberExt,
14
+ util::SubscriberInitExt,
15
+ };
12
16
  use uuid::Uuid;
13
17
 
14
18
  /// Test-only trait to build a placeholder instance of a struct. This is similar
@@ -135,6 +139,21 @@ pub fn assert_result<TA, TE, E>(
135
139
  }
136
140
  }
137
141
 
142
+ /// Enable tracing output. Call this in a test to enable logging
143
+ pub fn initialize_tracing() {
144
+ let subscriber = tracing_subscriber::fmt::layer()
145
+ .with_writer(io::stderr)
146
+ .with_target(false)
147
+ .with_span_events(FmtSpan::NONE)
148
+ .without_time()
149
+ .with_filter(
150
+ Targets::new()
151
+ .with_target("slumber", LevelFilter::TRACE)
152
+ .with_default(LevelFilter::WARN),
153
+ );
154
+ tracing_subscriber::registry().with(subscriber).init();
155
+ }
156
+
138
157
  /// Stringify an error with all its causes
139
158
  fn format_error_chain(error: impl Error) -> String {
140
159
  let mut s = error.to_string();
File without changes