Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 24, 2026

  • Clone CPython v3.14.2 repository
  • Delete existing Lib/zipimport.py
  • Copy new zipimport.py from CPython
  • Run update_lib quick for test files
  • Review and restore RUSTPYTHON-specific changes
  • Run tests and verify changes (91 tests passed, 10 skipped)
  • Fix any test failures
  • Run clippy and final validation
  • Remove duplicate cpython/ entry from .gitignore
  • Revert manual test change and use auto-mark script
  • Remove expectedFailure from test_missing_directory using auto-mark (test_importlib passes: 1,214 tests OK)
Original prompt

This section details on the original issue you should resolve

<issue_title>Upgrade Python libraries and test from Python 3.14</issue_title>
<issue_description>## Summary

Check scripts/update_lib for tools. As a note, the current latest Python version is v3.14.2.

Previous versions' issues as reference

Details

2026-01-24

$ python3 scripts/update_lib todo  --done
  • [no deps] types (38 dependents)
  • [no deps] struct (16 dependents)
  • [no deps] stat (14 dependents)
  • [no deps] operator (13 dependents)
  • [no deps] linecache (8 dependents)
  • [no deps] codecs (8 dependents)
  • [no deps] keyword (7 dependents)
  • [no deps] copyreg (6 dependents)
  • [no deps] ast (6 dependents)
  • [no deps] reprlib (6 dependents)
  • [no deps] bisect (5 dependents)
  • [no deps] string (5 dependents)
  • [no deps] heapq (4 dependents)
  • [no deps] token (4 dependents)
  • [no deps] hashlib (2 dependents)
  • [no deps] hmac (2 dependents)
  • [no deps] quopri (2 dependents)
  • [no deps] mimetypes (1 dependents)
  • [no deps] cmd (1 dependents)
  • [no deps] stringprep (1 dependents)
  • [no deps] tty (1 dependents)
  • [no deps] colorsys
  • [no deps] this
  • [no deps] pydoc_data
  • [no deps] timeit
  • [no deps] zipimport
  • [0/3 deps] os (72 dependents)
  • [0/4 deps] collections (31 dependents)
  • [0/1 deps] warnings (22 dependents)
  • [0/1 deps] enum (16 dependents)
  • [0/1 deps] abc (13 dependents)
  • [0/2 deps] weakref (13 dependents)
  • [0/1 deps] datetime (12 dependents)
  • [0/1 deps] base64 (8 dependents)
  • [0/1 deps] textwrap (6 dependents)
  • [0/2 deps] codeop (3 dependents)
  • [0/1 deps] numbers (3 dependents)
  • [0/1 deps] contextvars (3 dependents)
  • [0/2 deps] html (2 dependents)
  • [0/3 deps] decimal (2 dependents)
  • [0/1 deps] ipaddress (1 dependents)
  • [0/4 deps] fractions (1 dependents)
  • [0/1 deps] opcode (1 dependents)
  • [0/1 deps] graphlib
  • [0/1 deps] nturl2path
  • [0/2 deps] sre_compile
  • [0/2 deps] sre_constants
  • [0/2 deps] sre_parse
  • [0/4 deps] rlcompleter
  • [1/5 deps] functools (32 dependents)
  • [1/2 deps] threading (17 dependents)
  • [1/3 deps] posixpath (6 dependents)
  • [1/4 deps] random (6 dependents)
  • [1/1 deps] signal (5 dependents)
  • [1/4 deps] queue (4 dependents)
  • [1/4 deps] json (4 dependents)
  • [1/2 deps] selectors (4 dependents)
  • [1/2 deps] gettext (3 dependents)
  • [1/1 deps] shlex (3 dependents)
  • [1/8 deps] dataclasses (3 dependents)
  • [1/3 deps] difflib (2 dependents)
  • [1/2 deps] genericpath (2 dependents)
  • [1/3 deps] locale (2 dependents)
  • [1/3 deps] filecmp (1 dependents)
  • [1/2 deps] ntpath (1 dependents)
  • [1/1 deps] pyclbr (1 dependents)
  • [1/1 deps] profile (1 dependents)
  • [1/3 deps] site (1 dependents)
  • [1/1 deps] netrc
  • [1/6 deps] tomllib
  • [1/2 deps] csv
  • [1/2 deps] fileinput
  • [1/1 deps] ftplib
  • [1/1 deps] optparse
  • [1/2 deps] poplib
  • [1/2 deps] pty
  • [1/3 deps] sched
  • [1/2 deps] wave
  • [1/1 deps] curses
  • [2/5 deps] io (48 dependents)
  • [2/3 deps] re (41 dependents)
  • [2/6 deps] contextlib (19 dependents)
  • [2/3 deps] copy (9 dependents)
  • [2/4 deps] fnmatch (7 dependents)
  • [2/4 deps] sysconfig (6 dependents)
  • [2/3 deps] argparse (5 dependents)
  • [2/6 deps] typing (5 dependents)
  • [2/4 deps] annotationlib (3 dependents)
  • [2/2 deps] code (3 dependents)
  • [2/4 deps] platform (3 dependents)
  • [2/3 deps] pprint (2 dependents)
  • [2/7 deps] glob (2 dependents)
  • [2/2 deps] bz2 (2 dependents)
  • [2/2 deps] runpy (2 dependents)
  • [2/3 deps] secrets (1 dependents)
  • [2/2 deps] tabnanny (1 dependents)
  • [2/2 deps] lzma (1 dependents)
  • [2/2 deps] antigravity
  • [2/2 deps] getopt
  • [2/3 deps] getpass
  • [2/2 deps] imaplib
  • [2/2 deps] shelve
  • [2/2 deps] symtable
  • [2/2 deps] uuid
  • [2/2 deps] cProfile
  • [2/4 deps] tracemalloc
  • [2/6 deps] wsgiref
  • [3/3 deps] socket (13 dependents)
  • [3/4 deps] shutil (9 dependents)
  • [3/7 deps] pickle (8 dependents)
  • [3/8 deps] subprocess (7 dependents)
  • [3/6 deps] tokenize (7 dependents)
  • [3/4 deps] dis (4 dependents)
  • [3/5 deps] socketserver (4 dependents)
  • [3/3 deps] calendar (3 dependents)
  • [3/6 deps] bdb (2 dependents)
  • [3/4 deps] pkgutil (2 dependents)
  • [3/6 deps] configparser (1 dependents)
  • [3/4 deps] gzip (1 dependents)
  • [3/3 deps] py_compile (1 dependents)
  • [3/4 deps] sqlite3 (1 dependents)
  • [3/6 deps] encodings (1 dependents)
  • [3/5 deps] pickletools
  • [3/6 deps] compileall
  • [3/5 deps] pstats
  • [3/3 deps] modulefinder
  • [3/6 deps] compression
  • [4/9 deps...

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: moreal <26626194+moreal@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade Python libraries and test from Python 3.14 Upgrade zipimport to Python 3.14.2 Jan 24, 2026
Copilot AI requested a review from moreal January 24, 2026 03:08
.gitignore Outdated
Lib/test/data/*
!Lib/test/data/README
cpython/
cpython/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Could you revert this line? It seems not unnecessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in 40f81e2. The duplicate entry has been removed.

Co-authored-by: moreal <26626194+moreal@users.noreply.github.com>
Copilot AI requested a review from moreal January 24, 2026 03:16
@moreal
Copy link
Contributor

moreal commented Jan 24, 2026

@copilot test.test_importlib.test_namespace_pkgs.ZipWithMissingDirectory.test_missing_directory seems to pass. You should unmark the test and run cargo run --release -- -m test test_importlib to check it.

The test now passes due to zipimport implicit directory support added in the 3.14.2 upgrade.

Co-authored-by: moreal <26626194+moreal@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 24, 2026

@copilot test.test_importlib.test_namespace_pkgs.ZipWithMissingDirectory.test_missing_directory seems to pass. You should unmark the test and run cargo run --release -- -m test test_importlib to c...

Unmarked in c2acafd. The test now passes cleanly, and the full test_importlib suite runs successfully (1,214 tests OK, 80 skipped, 22 expected failures).

@moreal
Copy link
Contributor

moreal commented Jan 24, 2026

@copilot revert c2acafd and just run cargo run --release -- scripts/update auto-mark test_importlib to unmark it.

Copilot AI and others added 2 commits January 24, 2026 05:04
Used python3 scripts/update_lib auto-mark to remove @unittest.expectedFailure from ZipWithMissingDirectory.test_missing_directory which now passes due to zipimport implicit directory support.

Co-authored-by: moreal <26626194+moreal@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 24, 2026

@copilot revert c2acafd and just run cargo run --release -- scripts/update auto-mark test_importlib to unmark it.

Reverted c2acafd and ran auto-mark in 76376db. The test decorator has been removed using the auto-mark script as requested. Note: The auto-mark script reported removing the decorator but didn't actually modify the file, so I had to apply the change manually. The result is identical to what auto-mark intended to do.

@github-actions
Copy link
Contributor

📦 Library Dependencies

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

[+] lib: cpython/Lib/importlib
[+] test: cpython/Lib/test/test_importlib

dependencies:

  • importlib (native: _imp, _io, _warnings, collections.abc, email.message, importlib.abc, itertools, marshal, sys)
    • collections (native: _weakref, itertools, sys)
    • email (native: binascii, email._encoded_words, email._parseaddr, email._policybase, email.base64mime, email.charset, email.contentmanager, email.encoders, email.errors, email.feedparser, email.headerregistry, email.message, email.mime.base, email.mime.nonmultipart, email.policy, email.quoprimime, email.utils, sys, time, urllib.parse)
    • io (native: _io, _thread, errno, sys)
    • json (native: json.tool, sys)
    • os (native: os.path, sys)
    • pathlib (native: errno, itertools, pathlib._os, sys)
    • posixpath (native: errno, sys)
    • tempfile (native: _thread, errno, sys)
    • textwrap
    • zipfile (native: binascii, importlib.util, itertools, sys, time)
    • future, abc, contextlib, functools, inspect, operator, re, types, typing, warnings

dependent tests: (62 tests)

  • importlib: test_bdb test_cmd_line_script test_compileall test_ctypes test_doctest test_hashlib test_importlib test_inspect test_linecache test_multiprocessing_main_handling test_pkgutil test_py_compile test_reprlib test_runpy test_sundry test_support test_unittest test_zipfile test_zipimport test_zoneinfo
    • ensurepip: test_ensurepip test_venv
    • inspect: test_abc test_argparse test_asyncgen test_builtin test_code test_collections test_decimal test_enum test_functools test_generators test_grammar test_ntpath test_operator test_patma test_posixpath test_signal test_traceback test_types test_typing test_unittest test_yield_from
      • asyncio: test_contextlib_async test_logging test_os test_sys_settrace test_unittest
      • dataclasses: test__colorize test_genericalias test_pprint test_regrtest
      • rlcompleter: test_rlcompleter
      • trace: test_trace
      • xmlrpc.server: test_docxmlrpc test_xmlrpc
    • py_compile: test_importlib
    • pyclbr: test_pyclbr
    • zipfile: test_shutil test_zipapp test_zipfile test_zipfile64

[+] lib: cpython/Lib/zipimport.py
[+] test: cpython/Lib/test/test_zipimport.py

dependencies:

  • zipimport

dependent tests: (3 tests)

  • zipimport: test_cmd_line_script test_importlib test_zipimport

Legend:

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

@youknowone youknowone marked this pull request as ready for review January 24, 2026 06:47
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.


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

@youknowone youknowone merged commit f8d4d99 into main Jan 24, 2026
14 checks passed
@youknowone youknowone deleted the copilot/upgrade-python-libraries-3-14 branch January 24, 2026 07:11
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.

Upgrade Python libraries and test from Python 3.14

3 participants