GeezerVison is showing github.com — Expose Expat error position aliases for SAX by youknowdot · Pull Request #9784 · RustPython/RustPython
Conversation
Summary
- Expose
ErrorLineNumber, ErrorColumnNumber, and ErrorByteIndex using the existing read-only current-position getters. CPython 3.15 uses the identical Expat getters for both name families: source.
- Restore three
test_sax error-path tests: source-location reporting, incomplete-input reporting, and input closure on error. ErrorColumnNumber was missing, masking the original XML failure with AttributeError.
- Add coverage for read-only aliases before parsing, during a callback, and after a parse error. No separate position storage or additional per-parse work.
This is independent of #9662's DTD/declaration work and is based directly on main. It does not claim to fix the remaining parser position/namespace/encoding differences; 21 existing SAX expected failures remain unchanged.
Validation
-
RustPython release -m test test_sax: 187 tests, success, 21 existing expected failures.
-
CPython 3.15.1: all four ErrorReportingTest/test_parse_close_source checks pass.
-
pytest -v test_snippets.py -k stdlib_pyexpat: CPython 3.15 and RustPython both pass.
-
Workspace Rust tests, separate CAPI tests, strict all-target workspace/CAPI Clippy.
-
Repository pre-commit hooks.
-
This PR follows the AI policy. Assisted by OpenAI Codex (model version not exposed by this runtime); disclosed in the commit trailer.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
Reuse the current position getters for ErrorLineNumber, ErrorColumnNumber and ErrorByteIndex, matching CPython 3.15. Enable three SAX error-path regressions and exercise alias getters before parsing, during callbacks and after errors.
Assisted-by: OpenAI Codex:model version not exposed
coderabbitai
Bot
commented
Nov 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Caution
Review failed
The pull request is closed.
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
📦 Library Dependencies
The following Lib/ modules were modified. Here are their dependencies:
[x] lib: cpython/Lib/xml
[x] test: cpython/Lib/test/test_xml_etree.py (TODO: 17)
[ ] test: cpython/Lib/test/test_xml_etree_c.py
[x] test: cpython/Lib/test/test_minidom.py (TODO: 1)
[x] test: cpython/Lib/test/test_pulldom.py
[ ] test: cpython/Lib/test/test_pyexpat.py (TODO: 38)
[x] test: cpython/Lib/test/test_sax.py (TODO: 22)
[x] test: cpython/Lib/test/test_xml_dom_minicompat.py
[x] test: cpython/Lib/test/test_xml_dom_xmlbuilder.py
dependencies:
dependent tests: (39 tests)
- xml: test_doctest test_minidom test_pulldom test_pydoc test_pyexpat test_regrtest test_sax test_typing test_xml test_xml_dom_minicompat test_xml_dom_xmlbuilder test_xml_etree
- plistlib: test_plistlib
- platform: test__locale test__osx_support test_android test_asyncio test_baseexception test_builtin test_calendar test_cmath test_ctypes test_fcntl test_math test_mimetypes test_os test_platform test_shutil test_socket test_ssl test_startfile test_strptime test_sysconfig test_time test_tkinter test_winreg test_wsgiref
- webbrowser: test_webbrowser
- xmlrpc.client: test_xmlrpc
Legend:
[+] path exists in CPython
[x] up-to-date, [ ] outdated
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-10T14:27:18.050428Z |
40c8944 |
Draft marked ready |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|