Repository navigation
Allow xmlschema 4 so pysaml2 imports on Python 3.15 - #4
Merged
Merged
Conversation
Python 3.15 ships Unicode 17.0.0, which only elementpath 5.x knows; xmlschema <3 kept elementpath below 5, so `import saml2.sigver` failed. Relaxes the pin to >=2.0.0,<5.0.0 (locks xmlschema 4.3.2, elementpath 5.1.4) and ports the two xmlschema 3+/4 fixes from upstream IdentityPython#1044: - validate() loads the document via XMLResource(doc): xmlschema 4's allow="sandbox" otherwise blocks the validated document itself. - An empty AttributeValue keeps its xmlns:xs/xsd declaration when re-serialized (IdentityPython#947 / IdentityPython#1009), which xmlschema 3+ rightly requires. Full suite on Python 3.15.2: 782 passed, 5 skipped. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D3kAc1xPqKfGZVP2VdXYkM
calderwoodra
approved these changes
Nov 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Python 3.15 ships Unicode 17.0.0, and only elementpath 5.x has data for it. Our
xmlschema >=2.0.0,<3.0.0pin kept elementpath at 4.x, soimport saml2.sigverraisesTypeError: can't get version 17.0.0 from module. That blocks hadrius_backend's move to Python 3.15 (https://linear.app/hadrius/issue/PLAT-4710).Changes:
xmlschema >=2.0.0,<5.0.0. The lock moves to xmlschema 4.3.2 and elementpath 5.1.4.validate()loads the document throughXMLResource(doc). On xmlschema 4,allow="sandbox"would otherwise block the validated document itself.AttributeValuekeeps itsxmlns:xs/xmlns:xsddeclaration when re-serialized (upstream xmlschema 3.0.1 broken dependency IdentityPython/pysaml2#947 / test_namespace_processing fails with saml2.xml.schema.XMLSchemaError IdentityPython/pysaml2#1009). xmlschema 3+ rejects the undeclared prefix.The cert.py changes in IdentityPython#1044 aren't needed: this fork already dropped pyOpenSSL (#1).
Testing: the full suite on Python 3.15.2 gives 782 passed, 5 skipped. With only the pin change, 43 schema-validation tests failed, and those two ports fix them.
🤖 Generated with Claude Code
https://claude.ai/code/session_01D3kAc1xPqKfGZVP2VdXYkM