Skip to content

Clear remaining LZMA expected failures - #9732

Merged
youknowone merged 3 commits into
RustPython:mainfrom
youknowdot:fix/lzma-expected-failures-20261107
Nov 6, 2026
Merged

youknowone merged 3 commits into
RustPython:mainfrom
youknowdot:fix/lzma-expected-failures-20261107

Conversation

@youknowdot

Copy link
Copy Markdown
Contributor

Summary

  • Fix XZ compressor integrity-check failures to raise LZMAError, matching CPython 3.15: reserved check IDs report Unsupported integrity check; out-of-range IDs report Internal error.
  • Raise ValueError with CPython messages when compressing or flushing an already-flushed compressor; report invalid delta property distances as LZMAError("Internal error").
  • Clear all three remaining RustPython expected-failure markers from test_lzma.py as one whole-file batch.
  • Update canonical test markers only through scripts/update_lib quick Lib/test/test_lzma.py --no-build --no-commit. No assertions, test data, test logic, snippets, skips, or workflow files are changed.

Validation

  • Fresh Linux release interpreter built with stdlib,stdio,importlib,host_env,doc,threading,sqlite and no default features.
  • Full test_lzma: 121 tests, one unchanged CPython-only reference-leak skip, zero expected failures. The existing extra_tests/snippets/stdlib_lzma.py also passed.
  • A 41-outcome differential oracle exactly matches CPython 3.15 for check IDs, default/custom filters, flushed compressors, and delta property-distance boundaries.
  • Full workspace tests passed, excluding the separately configured C-API, WASM, and Windows venv launcher crates.
  • Full workspace all-targets Clippy and separate C-API all-targets Clippy passed with -D warnings.
  • Separate C-API tests passed: 149 passed, 2 existing ignored tests.
  • Independent final source/test review, formatting, and normal commit hooks passed. No hooks bypassed and no lint suppressions added.

Hosted CI and native non-Linux/platform-specific execution remain pending; this PR stays draft.

Integration

Based on main f1f38c1594. This fixes a remaining error conversion also present in #8639's alternative LZMA backend; that port should preserve the correction when rebased. This does not broaden the pre-existing preset/filter-versus-check validation order or the state transition after a failed flush.

AI assistance: OpenAI Codex performed source inspection, the narrow correction, independent review, and validation. The exact model version was not exposed.

codex added 3 commits November 7, 2026 00:20
Report unsupported or invalid XZ check IDs as LZMAError rather than ValueError, preserving the liblzma diagnostics for reserved and out-of-range identifiers.

Assisted-by: OpenAI Codex: model version not exposed
Match CPython ValueError diagnostics after compressor flush and report invalid delta property distances as LZMAError. These cover the deeper failures in the remaining canonical LZMA tests.

Assisted-by: OpenAI Codex: model version not exposed
Run scripts/update_lib quick Lib/test/test_lzma.py --no-build --no-commit against the corrected interpreter. All 121 canonical tests pass with one existing skip and no remaining expected failures. No assertions or test logic change.

Assisted-by: OpenAI Codex: model version not exposed
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

📦 Library Dependencies

The following Lib/ modules were modified. Here are their dependencies:

[x] lib: cpython/Lib/lzma.py
[x] test: cpython/Lib/test/test_lzma.py

dependencies:

  • lzma

dependent tests: (118 tests)

  • lzma: test_free_threading test_lzma test_tarfile
    • shutil: test_argparse test_bz2 test_compileall test_ctypes test_embed test_filecmp test_glob test_httpservers test_importlib test_inspect test_io test_launcher test_logging test_modulefinder test_multiprocessing_forkserver test_os test_peepholer test_peg_generator test_pkgutil test_profiling test_py_compile test_reprlib test_sax test_shutil test_site test_string_literals test_subprocess test_support test_sys test_sysconfig test_tempfile test_traceback test_unicode_file test_venv test_zoneinfo
      • argparse: test_profiling
      • ctypes.util: test_ctypes
      • ensurepip: test_ensurepip
      • http.server: test_robotparser test_urllib2_localnet test_xmlrpc
      • multiprocessing.util: test_asyncio test_concurrent_futures
      • pathlib: test_ast test_dbm_sqlite3 test_importlib test_json test_netrc test_pathlib test_profiling test_pyrepl test_runpy test_tomllib test_tools test_unparse test_winapi test_zipapp test_zipfile test_zstd
      • tempfile: test_asyncio test_bytes test_cmd_line test_compile test_concurrent_futures test_contextlib test_csv test_curses test_dis test_doctest test_dtrace test_faulthandler test_fileinput test_free_threading test_generated_cases test_genericalias test_hashlib test_importlib test_interpreters test_linecache test_mailbox test_ntpath test_os test_pickle test_pickletools test_pkg test_profiling test_pstats test_pydoc test_pyrepl test_readline test_regrtest test_selectors test_shlex test_socket test_source_encoding test_sys_settrace test_tabnanny test_termios test_threadedtempfile test_tokenize test_turtle test_urllib test_urllib2 test_urllib_response test_wave test_winconsoleio test_zipfile test_zipfile64
      • uuid: test_free_threading
      • webbrowser: test_webbrowser
      • zipapp: test_pdb
      • zipfile: test_zipfile test_zipimport test_zipimport_support
    • zipfile:
      • importlib.metadata: test_importlib

Legend:

  • [+] path exists in CPython
  • [x] up-to-date, [ ] outdated

@youknowone
youknowone marked this pull request as ready for review November 6, 2026 23:43
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-06T23:43:09.992005Z
We couldn’t complete this review. Comment @codex review to try again.
f6d22b4 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.

@youknowone
youknowone merged commit fbb1e4e into RustPython:main Nov 6, 2026
21 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

youknowdot pushed a commit to youknowdot/RustPython that referenced this pull request Nov 6, 2026
Use scripts/update_lib quick Lib/test/test_picklebuffer.py --no-build --no-commit after enabling exporter traversal. All nine canonical tests pass with the three existing _testbuffer availability skips; no assertions, test logic, or skips change. Keep this validated stack from launching redundant hosted CI while RustPython#9732 is pending.

Assisted-by: OpenAI Codex: model version not exposed
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.

3 participants