Skip to content

Allow xmlschema 4 so pysaml2 imports on Python 3.15 - #4

Merged
hadrazar merged 1 commit into
masterfrom
xmlschema-4
Nov 14, 2026
Merged

hadrazar merged 1 commit into
masterfrom
xmlschema-4

Conversation

@hadrazar

Copy link
Copy Markdown

Python 3.15 ships Unicode 17.0.0, and only elementpath 5.x has data for it. Our xmlschema >=2.0.0,<3.0.0 pin kept elementpath at 4.x, so import saml2.sigver raises TypeError: 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:

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

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
@hadrazar hadrazar self-assigned this Nov 14, 2026
@hadrazar
hadrazar merged commit 68935bd into master Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants