Title: Dispatch ElementTree DOCTYPE callbacks and parser warnings by youknowdot · Pull Request #9874 · RustPython/RustPython · GitHub
Open Graph Title: Dispatch ElementTree DOCTYPE callbacks and parser warnings by youknowdot · Pull Request #9874 · RustPython/RustPython
X Title: Dispatch ElementTree DOCTYPE callbacks and parser warnings by youknowdot · Pull Request #9874 · RustPython/RustPython
Description: Summary Restore the missing native ElementTree DOCTYPE dispatch as one callback/warning fix: Register StartDoctypeDeclHandler and call the cached target's doctype(name, pubid, system). Match CPython 3.15.2 _elementtree.c conversion/order and prefer the target callback over the ignored-parser-method warning. Propagate descriptor, callback and warnings-as-errors exceptions without holding the parser state lock across Python calls. This is a reconstruction of previously unsubmitted work after workspace loss, not a claim that its old test evidence validates this commit. Validation and remaining work cargo fmt --all, git diff --check, configured commit hooks (rustfmt/cspell): passed. cargo check -p rustpython-stdlib --locked: passed (Linux x86-64, Rust 1.99). Fresh Linux native build passed after providing the existing system libffi shared-library link privately. Existing focused accelerator doctype/warning/lookup cases: 5 passed. Full python -m unittest test.test_xml_etree_c: 249 run, 12 skipped, 12 retained expected failures, no failures or XPASS, with the final accelerator-only marker overrides. Full workspace/C-API tests, Clippy and cross-platform CI remain pending. No performance measurement is claimed. The shared canonical expected-failure markers remain; two existing accelerator cases are marked expectedSuccess: pure-Python ElementTree's DefaultHandler-based DOCTYPE handling is a separate pyexpat limitation. No assertions are weakened and no duplicate tests are added. Draft for continued verification, not ready-to-merge. AI assistance: Codex reconstructed the patch, compared CPython source, prepared validation and this description at the maintainer's direction. Summary by CodeRabbit New Features XML parsing now supports doctype declarations, passing the declaration name and identifiers to a registered doctype handler. Bug Fixes Parsers with a doctype attribute but no registered handler now receive a warning that the method is ignored.
Open Graph Description: Summary Restore the missing native ElementTree DOCTYPE dispatch as one callback/warning fix: Register StartDoctypeDeclHandler and call the cached target's doctype(name, pubid, system). Match C...
X Description: Summary Restore the missing native ElementTree DOCTYPE dispatch as one callback/warning fix: Register StartDoctypeDeclHandler and call the cached target's doctype(name, pubid, system). Mat...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9874
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:96c9e72c-47fc-b4b5-217f-b5d8bd4aa800 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E230:158DF1:10AC9A0:160AA7E:6B01DE5D |
| html-safe-nonce | 7613524eb9eb56a968cf65122cfb50fdcecf785492025fcffeb3a12803a0e7bf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjMwOjE1OERGMToxMEFDOUEwOjE2MEFBN0U6NkIwMURFNUQiLCJ2aXNpdG9yX2lkIjoiMzY4ODA2OTA2NTc0Nzg0ODc5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 87985a6e3a9c43242671f1e34232e62b6e03014aff1d4cbea14cd79e90d5ffca |
| hovercard-subject-tag | pull_request:5337133851 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9874/files |
| twitter:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| og:image:alt | Summary Restore the missing native ElementTree DOCTYPE dispatch as one callback/warning fix: Register StartDoctypeDeclHandler and call the cached target's doctype(name, pubid, system). Match C... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width