FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix Python 3.14 library parsing, test loading, and REPL exits by youknowdot · Pull Request #9078 · RustPython/RustPython · GitHub

Repository navigation

Fix Python 3.14 library parsing, test loading, and REPL exits - #9078

Draft
youknowdot wants to merge 6 commits into
RustPython:mainfrom
youknowdot:fix-python314-library-compatibility-batch
Draft

youknowdot wants to merge 6 commits into
RustPython:mainfrom
youknowdot:fix-python314-library-compatibility-batch

Conversation

Copy link
Copy Markdown
Contributor

Summary

Group four independent Python 3.14.8-compatible fixes from #8954:

  • Cache ElementPath positional sibling selections to avoid repeated scans.
  • Restore the pure-Python zoneinfo POSIX-footer grammar backports, preserving the existing native behavior.
  • Keep REPL history-save errors from replacing EOF or SystemExit status.
  • Skip abstract unittest TestCase classes and reject explicit abstract test-method loading with the upstream diagnostic.

The ElementPath, zoneinfo and unittest loader files match the official Python 3.14.8 sources exactly. The REPL change is limited to the two history-save calls. No broad standard-library snapshot is imported.

Prerequisite

This branch retains the identical prerequisite commits from #9063, currently based on upstream main: 71956aa and 399e5b0. They provide the approved 3.14.8 reference and its required TextIOWrapper alignment; they are not recreated fixes. The shared prerequisite diff will disappear when #9063 merges.

Sources

Validation

  • Independent source, callback-scope and duplicate review; normal commit hooks passed.
  • Final native debug build with SQLite support passed. Root binary Clippy with warnings denied passed on the same Rust source; the final commit changes only the two unittest Python files.
  • The unchanged ElementPath canonical regression and five bounded positional controls passed on native/pure RustPython and native/pure CPython 3.14.8. Tests construct trees without parsing XML.
  • Exact zoneinfo grammar snippet pytest nodes passed on native RustPython and CPython 3.14.8. The existing in-memory fixture is shared by distinct native and pure classes: 23 invalid footer cases and three valid controls. These check grammar acceptance/ValueError, not every upstream diagnostic string.
  • Three unchanged upstream abstract-loader methods passed on native RustPython and CPython 3.14.8; the previous native baseline fails abstract-class loading. Only the selected method bodies and synthetic modules/classes were executed, without filesystem discovery.
  • Eight isolated Linux REPL cases passed: reference/native × writable/ENOTDIR history × EOF/SystemExit(7). Owned temporary HOME/configuration/history paths, hard child timeouts and writable-history controls were used. The prior native binary panics with status 101 on both failing-history paths; the candidate preserves 0/7. The reference uses its real editline/site history writer installed explicitly, not automatic site initialization.
  • An earlier broad pytest filter also ran the two existing zoneinfo cache cases, which use an owned temporary TZif file and a cleaned-up subinterpreter. They passed; they are separate from the final in-memory grammar validation and were not repeated.

Full workspace suites, broad XML/zoneinfo modules, GUI tests and non-Linux runtime checks were not run locally. Hosted CI is pending.

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

Comment @coderabbitai help to get the list of available commands.

github-actions Bot commented Oct 10, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor

📦 Library Dependencies

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

[x] lib: cpython/Lib/xml
[ ] test: cpython/Lib/test/test_xml_etree.py (TODO: 28)
[ ] test: cpython/Lib/test/test_xml_etree_c.py
[x] test: cpython/Lib/test/test_minidom.py (TODO: 4)
[x] test: cpython/Lib/test/test_pulldom.py (TODO: 3)
[ ] test: cpython/Lib/test/test_pyexpat.py (TODO: 49)
[x] test: cpython/Lib/test/test_sax.py (TODO: 28)
[x] test: cpython/Lib/test/test_xml_dom_minicompat.py
[x] test: cpython/Lib/test/test_xml_dom_xmlbuilder.py

dependencies:

  • xml

dependent tests: (34 tests)

  • xml: test_doctest test_minidom test_pulldom test_pydoc test_pyexpat test_regrtest test_sax test_typing test_xml_dom_minicompat test_xml_dom_xmlbuilder test_xml_etree
    • plistlib: test_plistlib
      • platform: test__locale test__osx_support test_asyncio test_baseexception test_builtin test_cmath test_ctypes test_fcntl test_math test_mimetypes test_os test_platform test_posix test_shutil test_socket test_ssl test_strptime test_sysconfig test_time test_winreg test_wsgiref
    • xmlrpc.client: test_xmlrpc

[x] lib: cpython/Lib/zoneinfo
[ ] test: cpython/Lib/test/test_zoneinfo

dependencies:

  • zoneinfo

dependent tests: (2 tests)

  • zoneinfo: test_plistlib test_zoneinfo

[ ] lib: cpython/Lib/unittest
[ ] test: cpython/Lib/test/test_unittest (TODO: 1)

dependencies:

  • unittest (native: _io, _log, async_case, builtins, case, loader, main, os.path, result, runner, signals, suite, sys, time, unittest.util, util)
    • asyncio (native: _asyncio, _overlapped, _pyrepl.console, _pyrepl.main, _pyrepl.simple_interact, _remote_debugging, _winapi, asyncio.tools, base_events, collections.abc, concurrent.futures, coroutines, errno, events, exceptions, futures, graph, itertools, locks, log, math, msvcrt, protocols, queues, readline, runners, streams, sys, taskgroups, tasks, threads, time, timeouts, transports, unix_events, windows_events)
    • io (native: _io, _thread, errno, msvcrt, sys)
    • logging (native: atexit, collections.abc, email.message, email.utils, errno, http.client, logging.handlers, multiprocessing.queues, select, sys, time, urllib.parse, win32evtlog, win32evtlogutil)
    • warnings (native: _contextvars, _thread, _warnings, builtins, sys)
    • _colorize, annotationlib, argparse, collections, contextlib, contextvars, dataclasses, difflib, fnmatch, functools, inspect, os, pkgutil, pprint, re, signal, threading, traceback, types, weakref

dependent tests: (408 tests)

  • unittest: regrtestdata test___all__ test__colorize test__locale test__opcode test__osx_support test_abc test_abstract_numbers test_android test_annotationlib test_apple test_argparse test_array test_asdl_parser test_ast test_asyncgen test_asyncio test_atexit test_audit test_augassign test_base64 test_baseexception test_bdb test_bigaddrspace test_bigmem test_binascii test_binop test_bisect test_bool test_buffer test_bufio test_builtin test_bytes test_bz2 test_c_locale_coercion test_calendar test_call test_charmapcodec test_class test_clinic test_cmath test_cmd test_cmd_line test_cmd_line_script test_code test_code_module test_codeccallbacks test_codecencodings_cn test_codecencodings_hk test_codecencodings_iso2022 test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_codecs test_codeop test_collections test_colorsys test_compare test_compile test_compileall test_complex test_concurrent_futures test_configparser test_contains test_context test_contextlib test_contextlib_async test_copy test_copyreg test_coroutines test_cprofile test_csv test_ctypes test_datetime test_dbm test_dbm_dumb test_dbm_sqlite3 test_decimal test_decorators test_defaultdict test_deque test_descr test_descrtut test_devpoll test_dict test_dictcomps test_dictviews test_difflib test_dis test_doctest test_doctest2 test_docxmlrpc test_dtrace test_dummy_thread test_dummy_threading test_dynamic test_dynamicclassattribute test_eintr test_email test_embed test_ensurepip test_enum test_enumerate test_eof test_epoll test_errno test_except_star test_exception_group test_exception_hierarchy test_exception_variations test_exceptions test_extcall test_external_inspection test_faulthandler test_fcntl test_file test_file_eintr test_filecmp test_fileinput test_fileio test_fileutils test_finalization test_float test_flufl test_fnmatch test_fork1 test_format test_fractions test_frame test_frozen test_fstring test_ftplib test_funcattrs test_functools test_future_stmt test_gc test_generated_cases test_generator_stop test_generators test_genericalias test_genericclass test_genericpath test_genexps test_getopt test_getpass test_gettext test_glob test_global test_grammar test_graphlib test_grp test_gzip test_hash test_hashlib test_heapq test_hmac test_html test_htmlparser test_http_cookiejar test_http_cookies test_httplib test_httpservers test_idle test_imaplib test_importlib test_index test_inspect test_int test_int_literal test_io test_ioctl test_ipaddress test_isinstance test_iter test_iterlen test_itertools test_json test_keyword test_keywordonlyarg test_kqueue test_largefile test_launcher test_linecache test_list test_listcomps test_locale test_logging test_long test_longexp test_lzma test_mailbox test_marshal test_math test_math_property test_memoryio test_memoryview test_metaclass test_mimetypes test_minidom test_mmap test_modulefinder test_monitoring test_msvcrt test_multibytecodec test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_named_expressions test_netrc test_ntpath test_nturl2path test_numeric_tower test_opcache test_opcodes test_openpty test_operator test_optimizer test_optparse test_ordered_dict test_os test_osx_env test_pathlib test_patma test_pdb test_peepholer test_peg_generator test_pep646_syntax test_perfmaps test_pickle test_picklebuffer test_pickletools test_pkg test_pkgutil test_platform test_plistlib test_poll test_popen test_poplib test_positional_only_arg test_posix test_posixpath test_pow test_pprint test_print test_profile test_property test_pstats test_pty test_pulldom test_pwd test_py_compile test_pyclbr test_pydoc test_pyexpat test_pyrepl test_queue test_quopri test_raise test_random test_range test_re test_regrtest test_repl test_reprlib test_resource test_richcmp test_rlcompleter test_robotparser test_runpy test_sax test_sched test_scope test_script_helper test_secrets test_select test_selectors test_set test_setcomps test_shelve test_shlex test_shutil test_signal test_site test_slice test_smtplib test_smtpnet test_socket test_socketserver test_sort test_sqlite3 test_ssl test_stable_abi_ctypes test_stat test_statistics test_str test_strftime test_string test_string_literals test_stringprep test_strptime test_strtod test_struct test_structseq test_subclassinit test_subprocess test_sundry test_super test_support test_symtable test_syntax test_sys test_sys_setprofile test_sys_settrace test_sysconfig test_syslog test_tabnanny test_tarfile test_tempfile test_termios test_textwrap test_thread test_thread_local_bytecode test_threadedtempfile test_threading test_threading_local test_threadsignals test_time test_timeit test_timeout test_tokenize test_tomllib test_tools test_trace test_traceback test_tracemalloc test_tstring test_tty test_tuple test_turtle test_type_aliases test_type_annotations test_type_cache test_type_comments test_type_params test_typechecks test_types test_typing test_ucn test_unary test_unicode_file test_unicode_file_functions test_unicode_identifiers test_unicodedata test_unittest test_univnewlines test_unpack test_unpack_ex test_unparse test_urllib test_urllib2 test_urllib2_localnet test_urllib2net test_urllib_response test_urllibnet test_urlparse test_userdict test_userlist test_userstring test_utf8_mode test_utf8source test_uuid test_venv test_wait3 test_wait4 test_wave test_weakref test_weakset test_webbrowser test_winapi test_winconsoleio test_winreg test_winsound test_with test_wmi test_wsgiref test_xml_dom_minicompat test_xml_dom_xmlbuilder test_xml_etree test_xml_etree_c test_xmlrpc test_xpickle test_xxlimited test_xxtestfuzz test_yield_from test_zipapp test_zipfile test_zipfile64 test_zipimport test_zipimport_support test_zlib test_zoneinfo test_zstd

Legend:

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

Extract the backported bound-validation removal and align the CPython reference pin to 3.14.8 so both snippet interpreters exercise the same contract.

Assisted-by: OpenAI Codex:model identifier unavailable
The 3.14.8 reference pin exposes the Argument Clinic deletion guard moved before initialization and attachment checks by CPython 90a1f02b7da0c356d10a23f1faee7dc063f887ed. Preserve assignment checks and align the exact deletion error, including subclass type names.

Assisted-by: OpenAI Codex:model identifier unavailable
Restore the Python 3.14.8 backport and its unchanged constructed-tree regression.

Assisted-by: OpenAI Codex:model identifier unavailable
Reuse the in-memory TZif fixture across native and pure implementations.

Assisted-by: OpenAI Codex:model identifier unavailable
Treat history persistence as best effort on EOF and SystemExit.

Assisted-by: OpenAI Codex:model identifier unavailable
Restore the upstream loader backport and its three canonical regression methods.

Assisted-by: OpenAI Codex:model identifier unavailable
youknowdot force-pushed the fix-python314-library-compatibility-batch branch from 28332a5 to 3200984 Compare October 11, 2026 00:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL