polyxml 0.32.0__tar.gz → 0.33.0__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 (73) hide show
  1. {polyxml-0.32.0 → polyxml-0.33.0}/Cargo.lock +6 -6
  2. {polyxml-0.32.0 → polyxml-0.33.0}/Cargo.toml +1 -1
  3. {polyxml-0.32.0 → polyxml-0.33.0}/PKG-INFO +1 -1
  4. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/rust/mod.rs +12 -8
  5. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_rust_codegen.rs +4 -4
  6. {polyxml-0.32.0 → polyxml-0.33.0}/pyproject.toml +1 -1
  7. {polyxml-0.32.0 → polyxml-0.33.0}/README.md +0 -0
  8. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/Cargo.toml +0 -0
  9. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/README.md +0 -0
  10. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/benches/core_benchmarks.rs +0 -0
  11. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/benches/support/tag_dispatch_fixtures.rs +0 -0
  12. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/benches/tag_dispatch.rs +0 -0
  13. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/cpp/mod.rs +0 -0
  14. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/csharp/mod.rs +0 -0
  15. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/go/mod.rs +0 -0
  16. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/java/codec.rs +0 -0
  17. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/java/mod.rs +0 -0
  18. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/java/models.rs +0 -0
  19. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/mod.rs +0 -0
  20. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/python/aot.rs +0 -0
  21. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/python/mod.rs +0 -0
  22. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/typescript/mod.rs +0 -0
  23. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/converters.rs +0 -0
  24. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/error.rs +0 -0
  25. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/ir/chunker.rs +0 -0
  26. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/ir/mod.rs +0 -0
  27. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/ir/tarjan.rs +0 -0
  28. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/json.rs +0 -0
  29. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/lib.rs +0 -0
  30. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/parser.rs +0 -0
  31. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/schema.rs +0 -0
  32. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/schema_parser/mod.rs +0 -0
  33. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/serializer.rs +0 -0
  34. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/transcoder.rs +0 -0
  35. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/value.rs +0 -0
  36. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/fixtures/lexical_union.xsd +0 -0
  37. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/fixtures/mixed_content.xsd +0 -0
  38. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/fixtures/ts_mixed_content_inheritance.xsd +0 -0
  39. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_adversarial_identifiers.rs +0 -0
  40. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_conformance.rs +0 -0
  41. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_core.rs +0 -0
  42. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_cpp_codegen.rs +0 -0
  43. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_csharp_codegen.rs +0 -0
  44. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_go_codegen.rs +0 -0
  45. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_java_codegen.rs +0 -0
  46. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_json.rs +0 -0
  47. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_lexical_union_codegen.rs +0 -0
  48. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_mixed_content.rs +0 -0
  49. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_pattern_codegen.rs +0 -0
  50. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_python_codegen.rs +0 -0
  51. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_rust_codecs.rs +0 -0
  52. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_schema_audit.rs +0 -0
  53. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_schema_ir.rs +0 -0
  54. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_security.rs +0 -0
  55. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_transcoder.rs +0 -0
  56. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_ts_codegen.rs +0 -0
  57. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_unbounded_choice.rs +0 -0
  58. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_xsi_type.rs +0 -0
  59. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/Cargo.toml +0 -0
  60. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/README.md +0 -0
  61. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/benches/aot_vs_dataclass.py +0 -0
  62. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/src/lib.rs +0 -0
  63. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/tests/test_conformance.py +0 -0
  64. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/tests/test_generated_models.py +0 -0
  65. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/tests/test_json.py +0 -0
  66. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/tests/test_mixed_content.py +0 -0
  67. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/tests/test_polyxml.py +0 -0
  68. {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/tests/test_xsi_type.py +0 -0
  69. {polyxml-0.32.0 → polyxml-0.33.0}/python/polyxml/AGENT_GUIDE.md +0 -0
  70. {polyxml-0.32.0 → polyxml-0.33.0}/python/polyxml/__init__.py +0 -0
  71. {polyxml-0.32.0 → polyxml-0.33.0}/python/polyxml/compat/__init__.py +0 -0
  72. {polyxml-0.32.0 → polyxml-0.33.0}/python/polyxml/compat/xsdata.py +0 -0
  73. {polyxml-0.32.0 → polyxml-0.33.0}/python/polyxml/py.typed +0 -0
@@ -608,7 +608,7 @@ dependencies = [
608
608
 
609
609
  [[package]]
610
610
  name = "polyxml"
611
- version = "0.32.0"
611
+ version = "0.33.0"
612
612
  dependencies = [
613
613
  "criterion",
614
614
  "heck",
@@ -629,14 +629,14 @@ dependencies = [
629
629
 
630
630
  [[package]]
631
631
  name = "polyxml-c"
632
- version = "0.32.0"
632
+ version = "0.33.0"
633
633
  dependencies = [
634
634
  "polyxml",
635
635
  ]
636
636
 
637
637
  [[package]]
638
638
  name = "polyxml-cli"
639
- version = "0.32.0"
639
+ version = "0.33.0"
640
640
  dependencies = [
641
641
  "clap",
642
642
  "glob",
@@ -650,7 +650,7 @@ dependencies = [
650
650
 
651
651
  [[package]]
652
652
  name = "polyxml-js"
653
- version = "0.32.0"
653
+ version = "0.33.0"
654
654
  dependencies = [
655
655
  "napi",
656
656
  "napi-build",
@@ -660,7 +660,7 @@ dependencies = [
660
660
 
661
661
  [[package]]
662
662
  name = "polyxml-python"
663
- version = "0.32.0"
663
+ version = "0.33.0"
664
664
  dependencies = [
665
665
  "lexical-core",
666
666
  "polyxml",
@@ -670,7 +670,7 @@ dependencies = [
670
670
 
671
671
  [[package]]
672
672
  name = "polyxml-wasm"
673
- version = "0.32.0"
673
+ version = "0.33.0"
674
674
  dependencies = [
675
675
  "polyxml",
676
676
  "quick-xml",
@@ -3,7 +3,7 @@ resolver = "2"
3
3
  members = ["crates/polyxml-core", "crates/polyxml-python"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.32.0"
6
+ version = "0.33.0"
7
7
  edition = "2021"
8
8
  rust-version = "1.80"
9
9
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polyxml
3
- Version: 0.32.0
3
+ Version: 0.33.0
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -42,7 +42,7 @@ pub struct RustOptions {
42
42
  pub pyo3_module_name: Option<String>,
43
43
  /// Custom header text to prepend to generated files (default: None).
44
44
  pub custom_header: Option<String>,
45
- /// Split oversized modules into bounded topological chunks (default: None, auto-split if > 400 types).
45
+ /// Split oversized modules into bounded topological chunks (optional setting, default: false).
46
46
  #[serde(default)]
47
47
  pub split_units: Option<bool>,
48
48
  /// Target maximum types per compilation unit chunk (default: 250).
@@ -304,16 +304,14 @@ impl RustCodegen {
304
304
  }
305
305
 
306
306
  /// Generate a multi-file or single-file module representation.
307
- /// When `split_units` is requested or the type count exceeds the threshold,
308
- /// emits topologically sorted, bounded chunk modules (`chunk_00.rs`, `chunk_01.rs`, ...)
309
- /// and a parent `mod.rs` that re-exports all chunks.
307
+ /// When `split_units` is requested, emits topologically sorted, bounded chunk modules
308
+ /// (`chunk_00.rs`, `chunk_01.rs`, ...) and a parent `mod.rs` that re-exports all chunks.
310
309
  pub fn generate_files(&self, ir: &SchemaIR, base_name: &str) -> Vec<(String, String)> {
311
310
  set_type_name_map(build_type_name_map(ir, |local| {
312
311
  AsPascalCase(local).to_string()
313
312
  }));
314
313
 
315
- let emitted_count = ir.types.keys().filter(|q| !ir.is_external_type(q)).count();
316
- let should_split = self.options.split_units.unwrap_or(emitted_count > 400);
314
+ let should_split = self.options.split_units.unwrap_or(false);
317
315
  let chunk_size = self.options.chunk_size.unwrap_or(250);
318
316
 
319
317
  if !should_split {
@@ -354,7 +352,7 @@ impl RustCodegen {
354
352
  let mut files = Vec::new();
355
353
 
356
354
  // 1. Chunks
357
- for chunk in &plan.chunks {
355
+ for (chunk_idx, chunk) in plan.chunks.iter().enumerate() {
358
356
  let mut out = String::new();
359
357
  if let Some(ref header) = self.options.custom_header {
360
358
  let trimmed = header.trim();
@@ -371,7 +369,13 @@ impl RustCodegen {
371
369
  );
372
370
 
373
371
  self.emit_imports(&mut out, !types_with_lifetime.is_empty());
374
- out.push_str("\nuse super::*;\n");
372
+ out.push('\n');
373
+ if self.options.emit_codecs {
374
+ out.push_str("use super::{read_element_text, skip_xml_element};\n");
375
+ }
376
+ for prev in &plan.chunks[..chunk_idx] {
377
+ let _ = writeln!(out, "use super::{}::*;", prev.name);
378
+ }
375
379
 
376
380
  for qname in &chunk.types {
377
381
  if let Some(type_def) = ir.types.get(qname) {
@@ -1265,12 +1265,12 @@ fn test_rust_topological_scc_chunking() {
1265
1265
 
1266
1266
  // chunk_00 must contain Leaf
1267
1267
  assert!(files[0].1.contains("pub type Leaf"));
1268
- // chunk_01 must contain Mid and use super::*
1268
+ // chunk_01 must contain Mid and import prior chunk_00
1269
1269
  assert!(files[1].1.contains("pub struct Mid"));
1270
- assert!(files[1].1.contains("use super::*;"));
1271
- // chunk_02 must contain Root
1270
+ assert!(files[1].1.contains("use super::chunk_00::*;"));
1271
+ // chunk_02 must contain Root and import prior chunks
1272
1272
  assert!(files[2].1.contains("pub struct Root"));
1273
- assert!(files[2].1.contains("use super::*;"));
1273
+ assert!(files[2].1.contains("use super::chunk_01::*;"));
1274
1274
 
1275
1275
  // mod.rs must re-export all chunks
1276
1276
  let mod_rs = &files[3].1;
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "polyxml"
7
- version = "0.32.0"
7
+ version = "0.33.0"
8
8
  description = "High-performance, polyglot XML data-binding engine built in Rust"
9
9
  authors = [
10
10
  { name = "Bailey Nguyen", email = "bailey.tan.nguyen@gmail.com" }
File without changes