* Refresh canonical importlib and preserve native import callback
Cache the original builtin __import__ callback so CPython 3.15 importlib's
hierarchical locking uses the existing native parent-initialization path.
Refresh the complete canonical importlib and related test/helper families
from CPython d220409a13b77de7a6c30abe16ea90db01528edc through update_lib.
Preserve both nondecorator importlib guards in the updater. Add explicit
hash-pinned removal of reviewed obsolete canonical files, with full
preflight, dry-run, idempotence and refusal tests. Preserve empty fixtures.
Assisted-by: OpenAI Codex:model version unavailable
* Complete canonical inspect and types closure for importlib metadata
Refresh whole canonical inspect/types production and related test families
through update_lib after hosted CI exposed stale __cached__ consumers.
Add coroutine and async-generator state getters, with closed-state priority
for reentrant frame-local finalizers, and expose the existing frame-locals
proxy type with its CPython class documentation.
Preserve the optional _datetime and unittest import blocks through a narrow
migration adapter. Retain canonical assertions and existing guards; record
the missing LazyImportType expectation before adding a conditional expected
failure, and capability-skip only the two absent-_testcapi CLI fixtures.
Assisted-by: OpenAI Codex:model version unavailable
* Reject canonical removal junctions and read UTF-8 manifests
Reject junctions alongside symlinks in the existing path-component preflight and revalidation. Decode removal manifests explicitly as UTF-8. Add regressions for whole-batch refusal, revalidation, and Unicode dry-run/apply/idempotence.
Assisted-by: OpenAI Codex:model version unavailable
* Unskip passing flaky CPython tests
Remove RUSTPYTHON skip overlays after Linux release repeats passed
for enum, threading, logging, subprocess, socket, int, re, strtod,
and regrtest cases.
Assisted-by: Grok:4.6
* Fix fork-child SIGSEGV and yield-from throw args
Forget JoinHandle of threads that did not survive fork instead
of dropping them. Zero-reinit the import lock and condvars in
the child rather than unlock/notify. Resume the world if
os.fork() fails.
Call a yield-from subiterator throw() without None fillers so
a 1-arg throw stays 1-arg.
Drop the stale Windows expectedFailure on logging queue config
and unskip test_reinit_tls_after_fork plus the asyncio
local_addr family test.
Assisted-by: Grok:4.6
* Restore import lock depth after fork; add WASI clock info
Zeroing IMP_LOCK in the child discarded its recursion count, so
imp.release_lock() raised and test_fork1 exited 1. Re-acquire the
saved depth, then drop the extra pre-fork hold.
Expose time.get_clock_info on WASI via clock_getres so test_int
Stopwatch can run.
Unskip lock_tests test_acquire_contended and test_thread_leak.
Assisted-by: Grok:4.6
* Honor chmod follow_symlinks=False via fchmodat
Linux chmod followed the symlink, so dangling links raised
FileNotFoundError instead of NotImplementedError. Use fchmodat
with AT_SYMLINK_NOFOLLOW and map ENOTSUP to NotImplementedError.
Unskip httpservers truncated Content-Length (CPython already
skips as root) and tempfile symlink-mode cleanup on Linux.
Assisted-by: Grok:4.6
* Unskip httplib local bad-hostname HTTPS test
The skip was leftover. With default ssl-rustls the test passes
under -W error on Linux.
Assisted-by: Grok:4.6
* Fix list cmp deadlock, wasm digit overflow, REPL prompt
Do not hold list/deque locks across item comparison callbacks.
Compute int-to-str digit bounds in u64 so the check cannot wrap
on wasm32. Snapshot set contents when list.extend copies a set.
For a non-TTY stdin, write the REPL prompt to stderr and read
lines from stdin. Flush stdout/stderr after each interactive
command. Set sys.ps1/ps2 to ">>> " and "... ".
Unskip list mutation compares, asyncio all_tasks race, importlib
deadlock/parallel/circular-import tests, and REPL stdout flush.
Assisted-by: Grok:4.6
* Avoid unnecessary u64 cast in int-to-str digit check
bits() is already u64, so `bits as u64` fails clippy
unnecessary_cast under -Dwarnings.
Assisted-by: Grok:4.6
* Fix test_import: import machinery and errors
- Emit IMPORT_FROM instead of LOAD_ATTR for `import a.b.c as m`
- Add "partially initialized module" error for circular imports
- Add "cannot access submodule" error for initializing submodules
- Implement script shadowing detection with "consider renaming" hint
- Detect user scripts shadowing stdlib/third-party modules
- Compute original sys.path[0] from sys.argv[0]
- Check sys.stdlib_module_names for stdlib detection
- Respect safe_path setting
- Implement _imp._fix_co_filename for code source_path rewriting
- Add data parameter to _imp.get_frozen_object with marshal deser
- Fix import_from: check __spec__.has_location before using origin
- Set ImportError.path attribute on import failures
- Fix import_star error messages for non-str __all__/__dict__ items
- Always call builtins.__import__ in import_inner
* Propagate __bool__ errors from fromlist in import
Previously, try_to_bool errors were silently swallowed via .ok(),
causing fromlist with broken __bool__ to default to false.
* Downgraded skips in tests
* Fixed failing tests
* Fixed test_ftplib + test_socket + test_ssl + test_threaded_import failures
* Removed comments about which tests are run in which environment
* Addressed PR comments
* Annotated skips on failing tests
* Removed unneeded tests
* Removed unneeded sys import from test_ftplib
* Added annotation to test_ftplib
* Readded skipIf to test_cleanup_with_symlink_modes with a more general ENV_POLLUTING_TESTS_WINDOWS
* Addressed PR comments
* Made changes to minimize diff in PR
* Apply suggestion from @youknowone
---------
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
* Replace skips with expectedFailure markings for SimpleTest
* Uncomment Source-PEP451 tests and apply similar monkey-patches as before
* Uncomment Source-PEP302 tests and apply similar monkey-patches as before
* Uncomment Sourceless-PEP451 tests and apply similar monkey-patches as
before
* Uncomment Sourceless-PEP302 tests and apply similar monkey-patches as
before
* disable test_argparse on windows
* fix test_exceptions and mark it as platform dependent
* test importlib on windows
* explain why windows tests fail
* mark test_argparse as non platform-independent
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>