liquid-xml-objects-runtime 21.6.5__tar.gz → 21.6.6__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.
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/PKG-INFO +1 -1
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/pyproject.toml +1 -1
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/_version.py +1 -1
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/attribution/attributes.py +22 -18
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/.gitignore +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/CHANGELOG.md +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/LICENSE-COMMERCIAL.md +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/LICENSE.md +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/README.md +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/__init__.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/attribution/__init__.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/attribution/enums.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/constants.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/convert_string_to_xsd.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/convert_xsd_to_string.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/deserializer/__init__.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/deserializer/look_ahead_mode.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/deserializer/lx_compositor_readers.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/deserializer/lx_element_reader.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/deserializer/lx_reader.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/deserializer/type_deserialization_order.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/deserializer/xpath_alternatives.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/errors.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/licensing.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/lx_extensions.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/lx_nillable.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/lx_reader_settings.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/lx_serializer.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/lx_settings.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/lx_union.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/lx_writer_settings.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/metadata_type_info_cache.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/number_formatting.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/py.typed +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/qname.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/schema_model/__init__.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/schema_model/conversion_error_type.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/schema_model/conversion_result.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/schema_model/meta_data_extensions.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/schema_model/metadata_class.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/schema_model/metadata_class_compositor.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/schema_model/metadata_class_container.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/schema_model/metadata_class_union.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/schema_model/parsed_simple_type_data.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/serializer/__init__.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/serializer/class_element_writers.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/serializer/document_writer.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/serializer/element_writers.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/serializer/lx_writer.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/serializer/namespace_manager.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/serializer/writer_factory.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/serializer_base.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/string_utilities.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/types/__init__.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/types/lx_date_time.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/types/lx_duration.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/whitespace_utilities.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/xml/__init__.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/xml/x_element.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/xml/xml_reader.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/xml/xml_writer.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/xsd_names.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/xsd_regex.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/xsd_type_info.py +0 -0
- {liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/src/liquid_xml_objects_runtime/xsd_value_comparer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: liquid-xml-objects-runtime
|
|
3
|
-
Version: 21.6.
|
|
3
|
+
Version: 21.6.6
|
|
4
4
|
Summary: Liquid XML Objects runtime for Python: read and write XML as typed Python objects generated from an XSD.
|
|
5
5
|
Author: Liquid Technologies Ltd
|
|
6
6
|
License: AGPL-3.0-only OR Liquid Technologies License (see LICENSE.md and LICENSE-COMMERCIAL.md)
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "liquid-xml-objects-runtime"
|
|
7
|
-
version = "21.6.
|
|
7
|
+
version = "21.6.6" # written by scripts/Set-Version.ps1, the same as __version__ in src/liquid_xml_objects_runtime/_version.py
|
|
8
8
|
description = "Liquid XML Objects runtime for Python: read and write XML as typed Python objects generated from an XSD."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -18,7 +18,7 @@ from __future__ import annotations
|
|
|
18
18
|
import dataclasses
|
|
19
19
|
from collections.abc import Callable, Iterable
|
|
20
20
|
from dataclasses import MISSING
|
|
21
|
-
from typing import TYPE_CHECKING, Any
|
|
21
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
22
22
|
|
|
23
23
|
from ..deserializer.look_ahead_mode import LookAheadMode
|
|
24
24
|
from ..errors import LxInvalidAttributionException, LxInvalidStateException
|
|
@@ -36,6 +36,8 @@ LX_METADATA_KEY = "liquid_xml_objects_runtime"
|
|
|
36
36
|
TypeRef = type | Callable[[], type] | None
|
|
37
37
|
"""A class, or a function returning the class (used when the class is declared later in the module)."""
|
|
38
38
|
|
|
39
|
+
_ClassT = TypeVar("_ClassT")
|
|
40
|
+
|
|
39
41
|
|
|
40
42
|
def _resolve(ref: TypeRef) -> type | None:
|
|
41
43
|
if ref is None or isinstance(ref, type):
|
|
@@ -620,7 +622,7 @@ def runtime_requirements(required_runtime_version: str) -> Callable[[type], type
|
|
|
620
622
|
return decorate
|
|
621
623
|
|
|
622
624
|
|
|
623
|
-
def _define(cls: type, definition: Any) -> type:
|
|
625
|
+
def _define(cls: type[_ClassT], definition: Any) -> type[_ClassT]:
|
|
624
626
|
if _DEFINITION in cls.__dict__:
|
|
625
627
|
raise LxInvalidAttributionException(f"The class {cls.__name__} already has a definition")
|
|
626
628
|
setattr(cls, _DEFINITION, definition)
|
|
@@ -628,8 +630,10 @@ def _define(cls: type, definition: Any) -> type:
|
|
|
628
630
|
return cls
|
|
629
631
|
|
|
630
632
|
|
|
631
|
-
def element_definition(
|
|
632
|
-
|
|
633
|
+
def element_definition(
|
|
634
|
+
name: str, namespace: str, element_scope: ElementScopeType, is_abstract: bool = False
|
|
635
|
+
) -> Callable[[type[_ClassT]], type[_ClassT]]:
|
|
636
|
+
def decorate(cls: type[_ClassT]) -> type[_ClassT]:
|
|
633
637
|
return _define(cls, LxElementDefinitionAttribute(name, namespace, element_scope, is_abstract))
|
|
634
638
|
|
|
635
639
|
return decorate
|
|
@@ -637,47 +641,47 @@ def element_definition(name: str, namespace: str, element_scope: ElementScopeTyp
|
|
|
637
641
|
|
|
638
642
|
def simple_element_definition(
|
|
639
643
|
name: str, namespace: str, element_scope: ElementScopeType, is_abstract: bool = False
|
|
640
|
-
) -> Callable[[type], type]:
|
|
641
|
-
def decorate(cls: type) -> type:
|
|
644
|
+
) -> Callable[[type[_ClassT]], type[_ClassT]]:
|
|
645
|
+
def decorate(cls: type[_ClassT]) -> type[_ClassT]:
|
|
642
646
|
return _define(cls, LxSimpleElementDefinitionAttribute(name, namespace, element_scope, is_abstract))
|
|
643
647
|
|
|
644
648
|
return decorate
|
|
645
649
|
|
|
646
650
|
|
|
647
|
-
def complex_type_definition(name: str, namespace: str, is_abstract: bool = False) -> Callable[[type], type]:
|
|
648
|
-
def decorate(cls: type) -> type:
|
|
651
|
+
def complex_type_definition(name: str, namespace: str, is_abstract: bool = False) -> Callable[[type[_ClassT]], type[_ClassT]]:
|
|
652
|
+
def decorate(cls: type[_ClassT]) -> type[_ClassT]:
|
|
649
653
|
return _define(cls, LxComplexTypeDefinitionAttribute(name, namespace, is_abstract))
|
|
650
654
|
|
|
651
655
|
return decorate
|
|
652
656
|
|
|
653
657
|
|
|
654
|
-
def simple_complex_type_definition(name: str, namespace: str, is_abstract: bool = False) -> Callable[[type], type]:
|
|
655
|
-
def decorate(cls: type) -> type:
|
|
658
|
+
def simple_complex_type_definition(name: str, namespace: str, is_abstract: bool = False) -> Callable[[type[_ClassT]], type[_ClassT]]:
|
|
659
|
+
def decorate(cls: type[_ClassT]) -> type[_ClassT]:
|
|
656
660
|
return _define(cls, LxSimpleComplexTypeDefinitionAttribute(name, namespace, is_abstract))
|
|
657
661
|
|
|
658
662
|
return decorate
|
|
659
663
|
|
|
660
664
|
|
|
661
|
-
def compositor_definition(compositor_type: CompositorType) -> Callable[[type], type]:
|
|
662
|
-
def decorate(cls: type) -> type:
|
|
665
|
+
def compositor_definition(compositor_type: CompositorType) -> Callable[[type[_ClassT]], type[_ClassT]]:
|
|
666
|
+
def decorate(cls: type[_ClassT]) -> type[_ClassT]:
|
|
663
667
|
return _define(cls, LxCompositorDefinitionAttribute(compositor_type))
|
|
664
668
|
|
|
665
669
|
return decorate
|
|
666
670
|
|
|
667
671
|
|
|
668
|
-
def simple_type_definition(name: str, namespace: str, base_type: XsdType = XsdType.STRING) -> Callable[[type], type]:
|
|
672
|
+
def simple_type_definition(name: str, namespace: str, base_type: XsdType = XsdType.STRING) -> Callable[[type[_ClassT]], type[_ClassT]]:
|
|
669
673
|
"""Marks an :class:`enum.Enum` as an xs:simpleType. The values of the members are the text used in the xml."""
|
|
670
674
|
|
|
671
|
-
def decorate(cls: type) -> type:
|
|
675
|
+
def decorate(cls: type[_ClassT]) -> type[_ClassT]:
|
|
672
676
|
return _define(cls, LxSimpleTypeDefinitionAttribute(name, namespace, base_type))
|
|
673
677
|
|
|
674
678
|
return decorate
|
|
675
679
|
|
|
676
680
|
|
|
677
|
-
def union_definition(*members: LxUnionAttribute) -> Callable[[type], type]:
|
|
681
|
+
def union_definition(*members: LxUnionAttribute) -> Callable[[type[_ClassT]], type[_ClassT]]:
|
|
678
682
|
"""Marks a subclass of :class:`~liquid_xml_objects_runtime.lx_union.LxUnion` as an xs:union of the given types."""
|
|
679
683
|
|
|
680
|
-
def decorate(cls: type) -> type:
|
|
684
|
+
def decorate(cls: type[_ClassT]) -> type[_ClassT]:
|
|
681
685
|
for member in members:
|
|
682
686
|
member.union_class = cls
|
|
683
687
|
return _define(cls, LxUnionDefinitionAttribute(members))
|
|
@@ -685,10 +689,10 @@ def union_definition(*members: LxUnionAttribute) -> Callable[[type], type]:
|
|
|
685
689
|
return decorate
|
|
686
690
|
|
|
687
691
|
|
|
688
|
-
def element_alternative(type_: TypeRef, test: str) -> Callable[[type], type]:
|
|
692
|
+
def element_alternative(type_: TypeRef, test: str) -> Callable[[type[_ClassT]], type[_ClassT]]:
|
|
689
693
|
"""Adds an xs:alternative to a class (for an element whose type is the class)."""
|
|
690
694
|
|
|
691
|
-
def decorate(cls: type) -> type:
|
|
695
|
+
def decorate(cls: type[_ClassT]) -> type[_ClassT]:
|
|
692
696
|
setattr(cls, _ALTERNATIVES, (*cls.__dict__.get(_ALTERNATIVES, ()), LxElementAlternativeAttribute(type_, test)))
|
|
693
697
|
return cls
|
|
694
698
|
|
|
File without changes
|
|
File without changes
|
{liquid_xml_objects_runtime-21.6.5 → liquid_xml_objects_runtime-21.6.6}/LICENSE-COMMERCIAL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|