diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d435aca18..f840dd493 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,18 +8,18 @@ repos: - id: end-of-file-fixer - id: debug-statements - repo: https://github.com/crate-ci/typos - rev: v1.22.9 + rev: v1.23.5 hooks: - id: typos exclude: ^tests/|.xsd|xsdata/models/datatype.py$ - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.0 + rev: v0.5.5 hooks: - id: ruff args: [ --fix, --show-fixes] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.10.1 + rev: v1.11.0 hooks: - id: mypy files: ^(xsdata/) diff --git a/CHANGES.md b/CHANGES.md index 7d58ae652..792fa97af 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,17 @@ +## 24.7 (2024-07-28) + +**Features** + +- Improve XML parsing performance on union elements with fixed attributes + ([#1066](https://github.com/tefra/xsdata/pull/1066)) +- Skip optional and nillable elements on XML Serializer + ([#1066](https://github.com/tefra/xsdata/pull/1066)) + +**Fixes** + +- Reset attr types derived from missing simple types + ([#1062](https://github.com/tefra/xsdata/pull/1062)) + ## 24.6.1 (2024-06-28) **Fixes** diff --git a/README.md b/README.md index 399ce1706..8cf7bd6be 100644 --- a/README.md +++ b/README.md @@ -74,32 +74,16 @@ Check the [documentation](https://xsdata.readthedocs.io) for more ✨✨✨ - Support xinclude statements and unknown properties - Customize behaviour through config -## Changelog: 24.6.1 (2024-06-28) - -**Fixes** - -- Ruff check command typo breaks generator with v0.5.0 - ([#1061](https://github.com/tefra/xsdata/pull/1061)) - -## Changelog: 24.6 (2024-06-24) +## Changelog: 24.7 (2024-07-28) **Features** -- Add class and field info in parsing warnings - ([#1036](https://github.com/tefra/xsdata/pull/1036)) -- Remove whitespace from bytes encoded xml strings - ([#1037](https://github.com/tefra/xsdata/pull/1037)) -- Improve codegen performance ([#1043](https://github.com/tefra/xsdata/pull/1043)) +- Improve XML parsing performance on union elements with fixed attributes + ([#1066](https://github.com/tefra/xsdata/pull/1066)) +- Skip optional and nillable elements on XML Serializer + ([#1066](https://github.com/tefra/xsdata/pull/1066)) **Fixes** -- JSON serializer fails on derived elements - ([#1053](https://github.com/tefra/xsdata/pull/1053)) -- Update typing-extensions minimum version - ([#1039](https://github.com/tefra/xsdata/pull/1039)) -- Avoid using not-threadsafe warnings.catch_warning - ([#1042](https://github.com/tefra/xsdata/pull/1042)) -- Unnest classes doesn't update inner classes recursively - ([#1047](https://github.com/tefra/xsdata/pull/1047)) -- Restore support for optional lists - ([#1053](https://github.com/tefra/xsdata/pull/1053)) +- Reset attr types derived from missing simple types + ([#1062](https://github.com/tefra/xsdata/pull/1062)) diff --git a/xsdata/__init__.py b/xsdata/__init__.py index 71d0859f4..60b8485d7 100644 --- a/xsdata/__init__.py +++ b/xsdata/__init__.py @@ -1 +1 @@ -__version__ = "24.6.1" +__version__ = "24.7" diff --git a/xsdata/formats/dataclass/parsers/nodes/union.py b/xsdata/formats/dataclass/parsers/nodes/union.py index 6839ad581..b1e9b5070 100644 --- a/xsdata/formats/dataclass/parsers/nodes/union.py +++ b/xsdata/formats/dataclass/parsers/nodes/union.py @@ -74,7 +74,7 @@ def filter_candidates(self) -> List[Type]: return list(filter(fixed_attribute, candidates)) - def filter_fixed_attrs(self, candidate: Type, parent_ns: str) -> bool: + def filter_fixed_attrs(self, candidate: Type, parent_ns: Optional[str]) -> bool: """Return whether the node attrs are incompatible with fixed attrs. Args: