Files
RustPython/Lib/test
Kwak Byoung Min 123dc4b9a0 Support xml.sax pyexpat setup APIs (#8238)
* Let xml.sax initialize pyexpat-backed parsers

RustPython already exposes an Expat-like XML parser, but xml.sax expects a few setup APIs before parsing. Add compatible parser setup methods and constants without pretending to implement full Expat external entity behavior.

Constraint: Lib/test changes only remove expectedFailure markers for tests that now pass; test bodies and assertions are unchanged.
Rejected: Implementing full Expat parameter entity parsing | xml-rs does not expose that configuration and the immediate failure is the missing setup API.
Confidence: high
Scope-risk: narrow
Directive: Keep SetParamEntityParsing as a compatibility shim unless the backend grows real Expat-style entity parsing support.
Tested: PATH=/tmp/pyshim:$PATH prek run --all-files
Tested: cargo run --quiet -- extra_tests/snippets/stdlib_xml.py
Tested: cargo run --release -- -m test test_sax
Tested: cargo run --release -- -m test test_pyexpat
Tested: cargo test --workspace --exclude rustpython-capi --exclude rustpython_wasm --exclude rustpython-compiler-source --exclude rustpython-venvlauncher --features threading --no-default-features --features stdlib,importlib,stdio,encodings,sqlite,ssl-rustls-aws-lc,host_env && (cd crates/capi && cargo test)
Tested: PYO3_CONFIG_FILE=$PWD/crates/capi/pyo3-rustpython.config cargo test --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher
Tested: cargo build --release --features sqlite && cd extra_tests && /tmp/rustpython-extra-tests-venv/bin/python -m pytest -v
Tested: cargo clippy --workspace --exclude rustpython-capi --exclude rustpython_wasm --exclude rustpython-compiler-source --exclude rustpython-venvlauncher --features threading --no-default-features --features stdlib,importlib,stdio,encodings,sqlite,ssl-rustls-aws-lc,host_env
Assisted-by: Codex:gpt-5.5

* Keep XML follow-up tests aligned with passing behavior

The pyexpat setup API compatibility fix also makes pulldom's basic parse smoke test pass, so keep RustPython expected-failure markers aligned with current behavior and apply the ruff import-spacing fix.

Constraint: Test body and assertions remain unchanged.

Confidence: high

Scope-risk: narrow

Tested: cargo run --release -- -m test test_pulldom -v

Tested: cargo run --release -- -m test test_sax

Tested: cargo run --release -- -m test test_pyexpat

Tested: cargo run --quiet -- extra_tests/snippets/stdlib_xml.py

Tested: PATH=/tmp/pyshim:/Users/kbm/.codex/tmp/arg0/codex-arg0ejsdGi:/Users/kbm/.omx-runs/run-20260703105454-4fab/.omx/runtime/bin:/Users/kbm/.nvm/versions/node/v24.15.0/bin:/Users/kbm/Library/Java/JavaVirtualMachines/temurin-21.0.9/Contents/Home/bin:/Users/kbm/.antigravity/antigravity/bin:/opt/homebrew/opt/mysql-client/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/var/folders/vq/1mhmtsbs2kj_03tsx74kd1mm0000gn/T//cmux-cli-shims/93BA47BD-630C-4ED3-8573-0FE6ABFAE824:/Applications/cmux.app/Contents/Resources/bin:/Users/kbm/.nvm/versions/node/v24.15.0/bin:/Users/kbm/Library/Java/JavaVirtualMachines/temurin-21.0.9/Contents/Home/bin:/Users/kbm/.antigravity/antigravity/bin:/opt/homebrew/opt/mysql-client/bin:/var/folders/vq/1mhmtsbs2kj_03tsx74kd1mm0000gn/T/cmux-cli-shims/93BA47BD-630C-4ED3-8573-0FE6ABFAE824:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin prek run --all-files

Tested: cargo build --release --features sqlite && cd extra_tests && /tmp/rustpython-extra-tests-venv/bin/python -m pytest -v

Tested: PYO3_CONFIG_FILE=/Users/kbm/IdeaProjects/RustPython/crates/capi/pyo3-rustpython.config cargo test --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher

Tested: cargo clippy --workspace --exclude rustpython-capi --exclude rustpython_wasm --exclude rustpython-compiler-source --exclude rustpython-venvlauncher --features threading --no-default-features --features stdlib,importlib,stdio,encodings,sqlite,ssl-rustls-aws-lc,host_env

Assisted-by: Codex:gpt-5.5
2026-07-09 20:24:16 +09:00
..
2026-03-01 11:36:46 +09:00
2025-08-24 10:36:07 +03:00
2023-04-20 15:36:28 +09:00
2023-03-02 15:01:12 +09:00
2026-05-24 19:56:35 +09:00
2026-02-05 00:21:34 +09:00
2022-10-18 03:26:29 +09:00
2026-05-12 20:51:33 +09:00
2023-03-01 18:06:50 +09:00
2026-03-01 11:36:46 +09:00
2026-02-02 02:02:12 +09:00
2026-02-13 22:15:52 +09:00
2026-01-25 15:20:05 +09:00
2026-05-24 19:56:35 +09:00
2026-02-13 13:36:33 +02:00
2026-02-13 13:36:33 +02:00
2026-02-13 14:13:30 +09:00
2024-06-24 19:00:54 +09:00
2026-02-11 16:50:23 +09:00
2026-02-08 20:36:35 +09:00
2026-02-10 00:48:22 +09:00
fix
2026-02-12 01:01:35 +09:00
2026-02-13 13:36:33 +02:00
2026-05-20 16:16:14 +09:00
2026-05-30 20:16:10 +09:00
2026-02-03 22:10:31 +09:00
2026-02-06 00:15:18 +09:00
2026-06-10 11:14:05 +09:00
2026-05-17 19:49:19 +09:00
2026-06-15 11:21:28 +09:00
2026-03-06 06:00:08 +09:00
2026-02-13 13:55:05 +09:00
2026-02-14 18:19:57 +02:00
2026-01-25 00:18:55 +09:00
2026-01-26 10:40:22 +09:00
2026-07-07 09:19:25 +09:00
2026-02-03 22:10:31 +09:00
2026-03-12 18:08:56 +09:00
2025-08-31 11:58:21 +03:00
2026-02-06 01:14:55 +09:00
2026-02-13 13:36:33 +02:00
2026-06-15 11:19:40 +09:00
2026-02-04 18:32:45 +09:00
2026-03-03 19:57:50 +09:00
2026-02-28 22:50:51 +09:00
2026-07-07 09:19:25 +09:00
2025-04-21 21:11:42 -07:00
2026-01-31 20:51:53 -05:00
2025-12-12 10:37:40 +09:00
2026-06-15 11:12:39 +09:00
2026-02-14 21:40:04 +09:00
2026-02-14 09:18:09 +09:00
2025-03-26 23:12:21 -05:00
2026-03-21 22:49:09 +09:00
2026-06-11 12:15:21 +09:00
2026-06-11 12:15:21 +09:00
2026-03-03 21:58:46 +09:00
2025-01-17 18:04:25 -08:00
2026-01-25 00:18:55 +09:00
2026-01-25 00:18:55 +09:00
2026-02-13 13:44:28 +09:00
2026-01-25 00:18:55 +09:00
2026-02-13 13:42:22 +09:00
2026-01-25 00:18:55 +09:00
2026-06-15 11:19:40 +09:00
2026-06-15 11:19:40 +09:00
2026-03-05 17:25:59 +09:00
2023-04-20 15:36:28 +09:00