diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 252984f..3ffde17 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,12 @@ Changelog ========= +2.14.3 (2025-03-11) +------------------- + +- reserved namespaces registration skipped. + + 2.14.2 (2025-02-24) ------------------- diff --git a/pydantic_xml/utils.py b/pydantic_xml/utils.py index 0b137b3..0553e6a 100644 --- a/pydantic_xml/utils.py +++ b/pydantic_xml/utils.py @@ -81,7 +81,7 @@ def register_nsmap(nsmap: NsMap) -> None: """ for prefix, uri in nsmap.items(): - if prefix != '': # skip default namespace + if prefix != '' and not re.match(r"ns\d+$", prefix): # skip default namespace and reserved ones etree.register_namespace(prefix, uri) diff --git a/pyproject.toml b/pyproject.toml index b639aee..b7e8636 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pydantic-xml" -version = "2.14.2" +version = "2.14.3" description = "pydantic xml extension" authors = ["Dmitry Pershin "] license = "Unlicense"