cpython/Lib/test
Barry Warsaw 27ebd9abce
gh-150228: Improve the PEP 829 batch processing APIs (#150542)
* gh-150228: Improve the PEP 829 batch processing APIs

As previously discussed with @ncoghlan and approved for 3.15b2 by @hugovk,
this implements the batch processing APIs for addsitedir() and friends.  We
remove the `defer_processing_start_files` flag which required some implicit
module global state, and promote StartupState to the public documented API.

This also moves the bulk of the module global functions into methods of the
`StartupState` class, so it removes the awkward APIs in 3.15b1.  Now, instances
of this class are an accumulator for startup state, using `StartupState.process()`
to process them.  Callers can now batch up startup state themselves by using
the methods on this class.  The module global functions are shims for this
which preserve the legacy APIs and semantics using the new state class.

This PR also fixes the interleaving regression identified by @ncoghlan in the
same issue.  Now, .pth file sys.path extensions are added to sys.path after
the sitedir that the .pth file is found in, restoring the legacy behavior.

Along the way, I've made a lot of improvements to function docstrings,
site.rst documentation, and comments in the code explaining what's going on.

* Add a note that if known_paths is provided to StartupState.__init__(), it
  will get mutated in place.
* Improve some conditional flows.
* Improve some comments.
* Improve the what's new entry.

* Make test_impl_exec_imports_suppressed_by_matching_start() more robust

Based on PR comment, we need to read both the .pth and .start files, and prove
that the .pth file's import line (which passes a bigger increment) is not
called, but the .start file's entry point (which uses the default increment)
is called.

* As per review, move some methods to the private API

_read_pth_file() and _read_start_file() are not intended to be part of the
public API surface outside of the site module, so even though they are used by
methods outside of the StartupState class, make them privately named.

* Resolve several review feedbacks

* Move a `versionadded`
* Better list comprehension formatting (use the output from
  `ruff format --line-length 78`)

* Add docs for site.makepath() and point the case-normalization requirement to
  this utility function.
* Note that StartupState.process() is not idempotent.

* Address another feedback comment

This time, we get rid of the legacy implementation `reset` local, which was
always difficult to understand, and just implement a return value based on the
processing mode selected.

* Changes based on gh-150228 review

The comment by @encukou that started this change:

```
I still see two red flags here though: an argument that doesn't combine with
other arguments, and (another instance of) changing the return type based on
an argument.

Did you consider adding a StartupState.addsitedir(sitedir) method, instead of
the startup_state argument?
```

As it turns out, this is an even cleaner design.  By moving the bulk of the
previous module global functions into `StartupState` methods, we can get rid
of all the awkward `startup_state` keyword-only arguments which conflict
with `known_path` (Petr's first point).  We can also get rid of the
return value dichotomy (Petr's second point) because now we can preserve
exactly the Python 3.14 API in the module global functions, and implement
the better APIs in the class methods.  We also generally don't have to
pass around `process_known_sitedirs`.

Now the following module global functions are essentially shims around
class methods:

* site.addsitedir() -> StartupState.addsitedir()
* site.addusersitepackages() -> StartupState.addusersitepackages()
* site.addsitepackages() -> StartupState.addsitepackages()
* Additional minor changes
* Remove a now unused parameter


Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-06-01 18:43:18 -07:00
..
archivetestdata
audiodata GH-60729: Add IEEE format wave audio support (GH-145931) 2026-03-18 12:46:26 +00:00
audit_test_data
certdata
cjkencodings
configdata
crashers
data
decimaltestdata
dtracedata gh-98894: Restore function entry/exit DTrace probes (#142397) 2026-05-05 00:29:55 +00:00
encoded_modules
leakers
libregrtest gh-150114: Fix get_process_memory_usage() on Windows (#150399) 2026-05-25 14:04:37 +00:00
mathdata
regrtestdata/import_from_tests
subprocessdata
support gh-150436: Skip subprocess test on STATUS_DLL_INIT_FAILED (#150704) 2026-06-01 14:50:15 +00:00
test_ast gh-140344: ast: Add deprecation warnings (#140345) 2026-05-18 11:20:49 -07:00
test_asyncio gh-150107: Fix asyncio sendfile fallback ignoring non-zero offset (#150270) 2026-05-29 15:10:57 +05:30
test_capi gh-149335: Avoid JIT trace buffer asserts with overhead above FITNESS_INITIAL (GH-149633) 2026-05-21 15:57:31 +01:00
test_cext gh-149044: Implement PEP 820 – PySlot: Unified slot system for the C API (GH-149055) 2026-05-05 09:18:04 +02:00
test_concurrent_futures gh-149879: Fix test_concurrent_futures on Cygwin (#150415) 2026-05-25 23:04:14 +02:00
test_cppext gh-148690: Build Windows freethreaded binaries into separate directory and include python3t.dll on GIL-enabled (GH-149218) 2026-05-04 17:45:08 +01:00
test_ctypes gh-148675: Use a string for ctypes cparam tag (#149778) 2026-05-15 13:25:09 +02:00
test_dataclasses gh-79413: Add qualname parameter to dataclass.make_dataclass. (GH-150026) 2026-05-18 19:55:47 -04:00
test_doctest gh-141510, PEP 814: Add built-in frozendict type (#144757) 2026-02-17 10:54:41 +01:00
test_email gh-88726: Stop using non-standard charset names eucgb2312_cn and big5_tw in email (GH-149959) 2026-05-26 21:52:47 +03:00
test_free_threading gh-144774: Add critical section in BaseException.__setstate__ (#150578) 2026-05-30 21:07:27 +05:30
test_future_stmt gh-143055: Fix crash in AST unparser when unparsing dict comprehension unpacking (#145556) 2026-03-09 10:37:23 -07:00
test_gdb Skip test_jit when the JIT backend is "interpreter" (GH-149423) 2026-05-06 09:20:33 +01:00
test_import gh-146636: Py_mod_abi mandatory for modules created from slots array (GH-146855) 2026-04-02 13:54:21 +02:00
test_importlib GH-83065: Fix import deadlock by implementing hierarchical module locking (GH-137196) 2026-04-28 01:06:23 -07:00
test_inspect gh-149083: use sentinel to fix _functools.reduce() signature (#149591) 2026-05-10 15:22:16 -07:00
test_interpreters tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345) 2026-04-11 17:01:18 -07:00
test_io gh-149046: fix: correctly handle str subclasses in io.StringIO (#149047) 2026-06-01 13:01:57 +00:00
test_json gh-149056: Properly pass array_hook in json.load() to json.loads() (GH-149057) 2026-05-29 22:53:21 +03:00
test_lazy_import gh-148587: Make sys.lazy_modules match PEP and keep internal lazy submodules tracking internal (#150086) 2026-05-28 17:55:47 -07:00
test_module
test_multiprocessing_fork
test_multiprocessing_forkserver gh-149879: Fix multiprocessing tests on Cygwin (#150031) 2026-05-19 00:45:35 +02:00
test_multiprocessing_spawn
test_os gh-86533: Restore os.makedirs() ability to apply *mode* recursively (GH-150011) 2026-05-18 23:00:27 +00:00
test_pathlib gh-86533: Make Path.mkdir parent_mode tests umask-independent (#150040) 2026-05-19 01:19:06 +00:00
test_peg_generator gh-142349: Fix build errors from PEP 810 (#144726) 2026-02-12 08:18:36 +00:00
test_profiling gh-150720: Remove '-d 1' in test_script_error_treatment (#150736) 2026-06-02 00:51:51 +00:00
test_pydoc gh-142349: Add help("lazy") support (#149886) 2026-05-15 16:30:40 +00:00
test_pyrepl gh-130472: Use fancycompleter in import completions (#148188) 2026-05-05 01:36:43 +00:00
test_sqlite3 gh-146090: fix memory management of internal sqlite3 callback contexts (#146569) 2026-03-29 14:21:37 +02:00
test_string
test_tkinter gh-146531: Skip hanging wm iconbitmap test on macOS 26 Intel (#148032) 2026-05-18 14:57:02 +00:00
test_tomllib gh-149231: tomllib: Limit the number of parts in a key (GH-149233) 2026-05-04 13:49:07 +02:00
test_tools GH-145762: Fix test_ci_fuzz_stdlib for source archive builds (#145778) 2026-04-07 12:02:15 +03:00
test_ttk gh-145736: Fix Tkinter tests for Tk 8.7, 9.0 and 9.1 (GH-145738) 2026-03-11 21:01:03 +02:00
test_unittest gh-149189: Revert "Modern defaults for pprint (#149190)" (#150249) 2026-05-22 23:22:03 +03:00
test_warnings gh-143231: Add the module attribute to warnings.WarningMessage (GH-149298) 2026-05-03 09:35:47 +00:00
test_zipfile gh-84353: Preserve non-UTF-8 filenames when appending to ZipFile (GH-150091) 2026-05-27 17:56:38 +00:00
test_zoneinfo gh-145883: Fix two heap-buffer-overflows in _zoneinfo (#145885) 2026-04-04 13:29:17 +01:00
tkinterdata
tokenizedata
tracedmodules
translationdata
typinganndata
wheeldata
xmltestdata
zipimport_data
.ruff.toml gh-145239: Accept unary plus literal pattern (#148566) 2026-04-23 22:07:28 +03:00
__init__.py
__main__.py
_code_definitions.py
_crossinterp_definitions.py
_test_atexit.py
_test_eintr.py
_test_embed_structseq.py gh-148014: Accept a function name in -X presite option (#148015) 2026-04-07 14:05:39 +00:00
_test_monitoring_shutdown.py
_test_multiprocessing.py gh-149879: Fix multiprocessing resource tracker tests on Cygwin (#150440) 2026-05-26 04:23:52 +02:00
_test_venv_multiprocessing.py
archiver_tests.py
audiotests.py GH-60729: Add IEEE format wave audio support (GH-145931) 2026-03-18 12:46:26 +00:00
audit-tests.py gh-149474: use Py_fopen in Binary{Reader,Writer} for audit hook and path-like support (#149524) 2026-05-09 01:01:35 +01:00
autotest.py
bisect_cmd.py
clinic.test.c gh-144545: Improve handling of default values in Argument Clinic (GH-146016) 2026-03-17 12:16:35 +02:00
cov.py gh-148014: Accept a function name in -X presite option (#148015) 2026-04-07 14:05:39 +00:00
curses_tests.py
datetimetester.py GH-70647: Remove support for %d (and deprecate for %e) without year in strptime() (GH-144570) 2026-04-14 17:15:27 -07:00
dis_module.py
empty.vbs
exception_hierarchy.txt gh-142349: Implement PEP 810 - Explicit lazy imports (#142351) 2026-02-12 00:15:33 +00:00
fork_wait.py
levenshtein_examples.json
list_tests.py
lock_tests.py
mapping_tests.py gh-141510, PEP 814: Add built-in frozendict type (#144757) 2026-02-17 10:54:41 +01:00
memory_watchdog.py gh-150114: Use get_process_memory_usage() in memory watchdog (#150402) 2026-05-25 21:15:12 +00:00
mime.types
mime.types2 gh-93417: Improve test_mimetypes (GH-150725) 2026-06-01 23:02:40 +03:00
mock_socket.py
mp_fork_bomb.py
mp_preload.py
mp_preload_flush.py
mp_preload_large_sysargv.py gh-144503: Pass sys.argv to forkserver as real argv elements (GH-148194) 2026-04-06 22:41:02 -07:00
mp_preload_main.py
mp_preload_sysargv.py
multibytecodec_support.py
NormalizationTest-3.2.0.txt
picklecommon.py gh-141510, PEP 814: Add frozendict support to pickle (#144967) 2026-02-21 11:07:55 +01:00
pickletester.py gh-148914: Fix memoization of in-band PickleBuffer in the Python implementation (GH-149052) 2026-05-02 12:04:05 +03:00
profilee.py
pstats.pck
pyclbr_input.py
pythoninfo.py gh-146410: Add --pythoninfo option to regrtest (#146413) 2026-03-26 10:56:38 +01:00
randv2_32.pck
randv2_64.pck
randv3.pck
re_tests.py
regrtest.py
relimport.py
seq_tests.py gh-145144: Add more tests for UserList, UserDict, etc (GH-145145) 2026-03-22 16:22:25 +02:00
signalinterproctester.py
ssl_servers.py
ssltests.py
string_tests.py gh-145144: Add more tests for UserList, UserDict, etc (GH-145145) 2026-03-22 16:22:25 +02:00
test___all__.py
test__colorize.py gh-137855: Lazy import inspect module in dataclasses (#144387) 2026-04-25 22:57:38 -07:00
test__interpchannels.py gh-140652: Fix a crash in _interpchannels.list_all() after closing a channel (ПР-143743) 2026-02-18 14:54:48 +02:00
test__interpreters.py
test__locale.py gh-149879: Fix test__locale on Cygwin (#150248) 2026-05-22 21:31:12 +02:00
test__opcode.py
test__osx_support.py gh-136677: Introduce executable specific linker flags to configure (#137296) 2026-02-24 22:52:02 +00:00
test_abc.py gh-149609: Raise deprecation warnings for abc.{abstractclassmethod,abstractstaticmethod,abstractproperty} (#149636) 2026-05-31 07:26:52 +00:00
test_abstract_numbers.py
test_android.py gh-144415: Android testbed fixes (#142912) 2026-02-03 16:37:34 +08:00
test_annotationlib.py gh-141388: Improve docs/tests for non-function callables as annotate functions (#142327) 2026-05-02 18:21:59 -07:00
test_apple.py
test_argparse.py gh-149614 - Restore deepcopiability of argparse.ArgumentParser instances (#149617) 2026-05-11 15:28:23 +00:00
test_array.py gh-80480: Remove deprecated 'u' array type code (#149535) 2026-06-01 11:57:55 +00:00
test_asdl_parser.py
test_asyncgen.py
test_atexit.py
test_audit.py
test_augassign.py
test_base64.py gh-148153: Do not use assert for parameter validation in base64 (GH-148154) 2026-04-06 13:47:27 +03:00
test_baseexception.py
test_bdb.py
test_bigaddrspace.py
test_bigmem.py
test_binascii.py gh-148093: Raise binascii.Error from binascii.a2b_uu() on empty input (GH-149077) 2026-05-04 12:40:52 +03:00
test_binop.py
test_bisect.py gh-145269: simplify bisect.bisect doc example (#145270) 2026-02-28 09:09:39 +00:00
test_bool.py
test_buffer.py gh-80480: Remove deprecated 'u' array type code (#149535) 2026-06-01 11:57:55 +00:00
test_build_details.py
test_builtin.py gh-85989: Add skip_if_double_rounding to test.support (#150219) 2026-05-28 13:42:39 +02:00
test_bytes.py gh-148605: Remove irepeat() thread test from test_bytes (#150576) 2026-05-31 14:57:10 +05:30
test_bz2.py gh-145607: Ensure BIG_DATA has two compressed blocks in test_bz2 (#145730) 2026-03-10 11:21:57 +02:00
test_c_locale_coercion.py gh-149879: Fix test_c_locale_coercion on Cygwin (#150250) 2026-05-22 15:47:38 +02:00
test_c_stack_unwind.py Rename fp unwind test module to C stack unwind (#149563) 2026-05-08 14:58:38 +01:00
test_calendar.py gh-148352: Add more colour to calendar CLI output (#148354) 2026-05-04 15:14:57 +03:00
test_call.py
test_charmapcodec.py
test_class.py
test_clinic.py gh-144545: Improve handling of default values in Argument Clinic (GH-146016) 2026-03-17 12:16:35 +02:00
test_cmath.py gh-148868: Increase test coverage for cmath.isinf (#148869) 2026-04-27 09:22:20 +02:00
test_cmd.py
test_cmd_line.py gh-150436: Skip subprocess test on STATUS_DLL_INIT_FAILED (#150704) 2026-06-01 14:50:15 +00:00
test_cmd_line_script.py gh-144278: Enable overriding sys.implementation's name and cache_tag when building sysmodule.c (GH-144293) 2026-02-10 00:01:17 +00:00
test_code.py gh-148871: extend and improve LOAD_COMMON_CONSTANT (GH-148971) 2026-05-02 19:59:51 +01:00
test_code_module.py
test_codeccallbacks.py
test_codecencodings_cn.py
test_codecencodings_hk.py
test_codecencodings_iso2022.py
test_codecencodings_jp.py
test_codecencodings_kr.py
test_codecencodings_tw.py
test_codecmaps_cn.py
test_codecmaps_hk.py
test_codecmaps_jp.py
test_codecmaps_kr.py
test_codecmaps_tw.py
test_codecs.py gh-62259: Add support of multi-byte encodings in the XML parser (GH-149860) 2026-05-26 19:40:25 +00:00
test_codeop.py
test_collections.py
test_colorsys.py
test_compare.py
test_compile.py gh-148871: extend and improve LOAD_COMMON_CONSTANT (GH-148971) 2026-05-02 19:59:51 +01:00
test_compileall.py gh-144278: Enable overriding sys.implementation's name and cache_tag when building sysmodule.c (GH-144293) 2026-02-10 00:01:17 +00:00
test_compiler_assemble.py
test_compiler_codegen.py gh-150027: Avoid copying during construction of frozenset objects (GH-150028) 2026-05-19 13:57:37 -04:00
test_complex.py gh-143231: Do not swallow not matched warnings in assertWarns*() (GH-149229) 2026-05-03 10:24:57 +00:00
test_configparser.py gh-148370: prevent quadratic behavior in configparser.ParsingError.combine (#148452) 2026-04-14 00:32:54 +02:00
test_contains.py
test_context.py
test_contextlib.py gh-125862: Keep ContextDecorator open across generator/coroutine execution (GH-136212) 2026-04-28 05:26:38 +00:00
test_contextlib_async.py gh-125862: Keep ContextDecorator open across generator/coroutine execution (GH-136212) 2026-04-28 05:26:38 +00:00
test_copy.py gh-141510: Fix copy.deepcopy() for recursive frozendict (#145027) 2026-02-21 15:30:40 +00:00
test_copyreg.py
test_coroutines.py
test_crossinterp.py gh-149219: Test frozendict in Lib/test/test_crossinterp.py (#149220) 2026-05-21 12:28:38 +03:00
test_csv.py gh-145105: Fix crash in csv.reader with re-entrant iterator (GH-145106) 2026-04-11 15:18:02 -07:00
test_curses.py
test_datetime.py gh-143959: Fix test_datetime if _datetime is unavailable (GH-145248) 2026-03-22 16:15:35 +02:00
test_dbm.py
test_dbm_dumb.py
test_dbm_gnu.py
test_dbm_ndbm.py
test_dbm_sqlite3.py
test_decimal.py gh-141510: support frozendict's in the C decimal module (gh-145165) 2026-02-27 07:02:39 +09:00
test_decorators.py
test_defaultdict.py gh-149534: Fix unification of defaultdict and frozendict with | (#149539) 2026-06-01 16:26:49 +03:00
test_deque.py
test_descr.py gh-146615: Fix crash in __get__() for METH_METHOD descriptors with invalid type argument (GH-146634) 2026-03-31 10:48:02 +03:00
test_descrtut.py gh-149189: Revert "Modern defaults for pprint (#149190)" (#150249) 2026-05-22 23:22:03 +03:00
test_devpoll.py gh-146205: Check the errno with != 0 in close impls in select module (#146206) 2026-03-20 14:44:01 +01:00
test_dict.py gh-149807: Fix hash(frozendict): compute (key, value) pair hash (#149841) 2026-05-20 13:22:57 +02:00
test_dictcomps.py
test_dictviews.py
test_difflib.py gh-144384: Lazily import _colorize (#149318) 2026-05-06 16:07:43 +00:00
test_difflib_expect.html
test_dis.py GH-150478: Add "show_jit" option to dis.dis to show jit entry points (GH-150554) 2026-06-01 17:52:40 +01:00
test_docxmlrpc.py
test_dtrace.py gh-98894: Restore function entry/exit DTrace probes (#142397) 2026-05-05 00:29:55 +00:00
test_dynamic.py
test_dynamicclassattribute.py
test_eintr.py
test_embed.py gh-149879: Fix test_embed on Cygwin (#150441) 2026-05-26 16:33:08 +00:00
test_ensurepip.py gh-146310: Fix ensurepip to treat empty WHEEL_PKG_DIR as unset (#146357) 2026-03-27 20:48:07 +00:00
test_enum.py gh-139398: [Enum] Add supported sunder names to __dir__ for REPL completions (GH-139985) 2026-05-28 12:55:38 -07:00
test_enumerate.py
test_eof.py
test_epoll.py gh-146205: Check the errno with != 0 in close impls in select module (#146206) 2026-03-20 14:44:01 +01:00
test_errno.py
test_except_star.py
test_exception_group.py GH-146096: Fix segfault in BaseExceptionGroup repr (#146141) 2026-03-19 11:25:15 +00:00
test_exception_hierarchy.py
test_exception_variations.py
test_exceptions.py gh-146250: Fix memory leak in re-initialization of SyntaxError (#146251) 2026-03-27 19:29:21 +05:30
test_extcall.py gh-145876: Do not mask KeyErrors raised during dictionary unpacking in call (GH-146472) 2026-03-29 11:58:52 +03:00
test_external_inspection.py gh-149584: Fix excessive overhead in the Tachyon profiler regarding the cache behavior (#149649) 2026-05-20 04:32:08 -07:00
test_faulthandler.py gh-149085: Add max_threads keyword to faulthandler.dump_traceback() (GH-149106) 2026-04-30 09:27:57 -04:00
test_fcntl.py
test_file_eintr.py
test_filecmp.py
test_fileinput.py
test_fileutils.py
test_finalization.py
test_float.py
test_flufl.py
test_fnmatch.py
test_fork1.py
test_format.py gh-119949: Refactor test_exc() helper in test_format.py (GH-135452) 2026-05-24 10:24:59 +00:00
test_fractions.py
test_frame.py
test_frozen.py
test_fstring.py
test_ftplib.py gh-149879: Fix test_ftplib on Cygwin (#150431) 2026-05-26 00:09:41 +02:00
test_funcattrs.py gh-115231: Fill __module__ for built-in staticmethods (#115232) 2026-02-02 12:34:02 +01:00
test_functools.py gh-149537: Remove kw parameters from python version of reduce (#149538) 2026-05-08 18:34:48 +03:00
test_gc.py GH-148726: Add heap_size to generational GC (#149195) 2026-05-04 22:14:45 +01:00
test_gc_stats.py GH-148726: Add heap_size to generational GC (#149195) 2026-05-04 22:14:45 +01:00
test_generated_cases.py gh-149358: Generating JIT recorder transformers and stabilizing family layouts (GH-149359) 2026-05-21 17:06:52 +01:00
test_generator_stop.py
test_generators.py gh-120321: Add gi_state, cr_state, and ag_state attributes (gh-144409) 2026-02-03 13:06:32 -05:00
test_genericalias.py gh-150146: Fix NULL dereference in _Py_subs_parameters (#150147) 2026-05-20 16:27:55 +03:00
test_genericclass.py
test_genericpath.py gh-74453: Deprecate os.path.commonprefix (#144436) 2026-02-05 22:37:05 +02:00
test_genexps.py
test_getopt.py
test_getpass.py gh-138577: Fix keyboard shortcuts in getpass with echo_char (#141597) 2026-03-30 11:11:13 +02:00
test_getpath.py
test_gettext.py
test_glob.py
test_global.py
test_grammar.py
test_graphlib.py
test_grp.py gh-149879: Fix test_grp on Cygwin (#150495) 2026-05-26 21:16:16 +00:00
test_gzip.py gh-91372: Add mtime to gzip.open() (GH-32310) 2026-05-22 15:14:25 +03:00
test_hash.py
test_hashlib.py gh-145028: Fix blake2 tests in test_hashlib when it is missing due to build config (GH-145029) 2026-02-20 20:57:29 -08:00
test_heapq.py
test_hmac.py gh-145200: Fix EVP_MAC_CTX leak in hashlib HMAC on init failure (GH-145201) 2026-04-11 15:10:43 -07:00
test_html.py
test_htmlparser.py
test_http_cookiejar.py
test_http_cookies.py gh-149144: Use decodeURIComponent() for UTF-8 support in js_output() (GH-149157) 2026-05-14 23:10:39 +02:00
test_httplib.py gh-146211: Reject CR/LF in HTTP tunnel request headers (#146212) 2026-04-10 15:21:42 +00:00
test_httpservers.py gh-149879: Fix test_httpservers on Cygwin (#150417) 2026-05-25 19:50:35 +00:00
test_idle.py
test_imaplib.py gh-142307: deprecate legacy support for altering IMAP4.file (#142335) 2026-05-06 17:41:26 +03:00
test_index.py
test_int.py
test_int_literal.py
test_ioctl.py gh-149879: Fix test_termios and test_ioctl on Cygwin (#150412) 2026-05-25 19:06:28 +02:00
test_ipaddress.py
test_isinstance.py
test_iter.py
test_iterlen.py
test_itertools.py gh-146613: Fix re-entrant use-after-free in itertools._grouper (#147962) 2026-04-02 19:04:58 +05:30
test_keyword.py
test_keywordonlyarg.py
test_kqueue.py gh-146205: Check the errno with != 0 in close impls in select module (#146206) 2026-03-20 14:44:01 +01:00
test_launcher.py gh-122941: Fix test_launcher sporadic failures via py.ini isolation (GH-145090) 2026-03-04 18:06:49 +00:00
test_linecache.py
test_list.py
test_listcomps.py gh-145701: Fix __classdict__ & __conditional_annotations__ in class-scope inlined comprehensions (GH-145702) 2026-03-09 12:56:41 -07:00
test_lltrace.py
test_locale.py gh-140924: In locale module, add missing names to __all__ (GH-140925) 2026-05-11 17:21:03 +03:00
test_logging.py gh-132372: Speed up logging.config existing logger handling (GH-150242) 2026-05-29 16:50:05 +01:00
test_long.py
test_longexp.py
test_lzma.py gh-115988: Add ARM64 and RISCV BCJ filters constants in lzma module (GH-115989) 2026-05-28 08:05:03 -07:00
test_mailbox.py Move root user checks to test.support (#146195) 2026-04-02 15:50:38 +00:00
test_marshal.py gh-148653: Fix reference leaks in test_marshal introduced in gh-148698 (GH-148725) 2026-04-18 12:11:14 +00:00
test_math.py gh-85989: Add skip_if_double_rounding to test.support (#150219) 2026-05-28 13:42:39 +02:00
test_math_integer.py
test_math_property.py
test_memoryview.py gh-148675: Remove F and D formats from array and memoryview (GH-149368) 2026-05-04 17:26:30 +02:00
test_metaclass.py
test_mimetypes.py gh-93417: Improve test_mimetypes (GH-150725) 2026-06-01 23:02:40 +03:00
test_minidom.py
test_mmap.py
test_modulefinder.py
test_monitoring.py gh-142186: Allow all PEP-669 events to be per-code object and disableable (GH-146182) 2026-04-22 09:08:23 +01:00
test_msvcrt.py gh-150436: Skip subprocess test on STATUS_DLL_INIT_FAILED (#150704) 2026-06-01 14:50:15 +00:00
test_multibytecodec.py
test_multiprocessing_main_handling.py gh-144278: Enable overriding sys.implementation's name and cache_tag when building sysmodule.c (GH-144293) 2026-02-10 00:01:17 +00:00
test_named_expressions.py
test_netrc.py gh-139633: Run netrc file permission check only once per parse (GH-139634) 2026-03-30 22:05:18 +03:00
test_ntpath.py gh-74453: Deprecate os.path.commonprefix (#144436) 2026-02-05 22:37:05 +02:00
test_nturl2path.py
test_numeric_tower.py
test_opcache.py gh-100239: specialize mixed int/float inplace binary ops (GH-149413) 2026-05-06 13:59:08 +01:00
test_opcodes.py
test_openpty.py
test_operator.py
test_optimizer.py
test_optparse.py
test_ordered_dict.py gh-145056: Fix merging of collections.OrderedDict and frozendict (GH-146466) 2026-03-30 22:06:44 +03:00
test_osx_env.py
test_patma.py gh-145239: Accept unary plus literal pattern (#148566) 2026-04-23 22:07:28 +03:00
test_pdb.py gh-148615: Handle -- separator in pdb argument parsing (#148624) 2026-05-05 21:22:58 -07:00
test_peepholer.py gh-148871: Add CONSTANT_EMPTY_TUPLE to LOAD_COMMON_CONSTANT (GH-149688) 2026-05-21 15:54:46 +01:00
test_pep646_syntax.py
test_perf_profiler.py gh-150389: Make perf profiler tests resilient (#150437) 2026-05-27 13:22:56 +01:00
test_perfmaps.py GH-126910: Add gdb support for unwinding JIT frames (#146071) 2026-05-02 13:42:03 +00:00
test_pickle.py gh-149189: Revert "Modern defaults for pprint (#149190)" (#150249) 2026-05-22 23:22:03 +03:00
test_picklebuffer.py
test_pickletools.py gh-149026: Add colour to pickletools CLI output (#149027) 2026-04-29 18:33:05 +03:00
test_pkg.py
test_pkgutil.py gh-148641: Implement PEP 829 - startup configuration files (#149109) 2026-05-03 17:17:29 +00:00
test_platform.py
test_plistlib.py gh-141510: Support frozendict in plistlib (#145590) 2026-03-31 15:45:23 +03:00
test_poll.py
test_popen.py
test_poplib.py gh-148600: Add OpenSSL 4.0.0 support to test configurations (#149356) 2026-05-04 16:21:04 +03:00
test_positional_only_arg.py
test_posixpath.py
test_pow.py
test_pprint.py gh-149189: Revert "Modern defaults for pprint (#149190)" (#150249) 2026-05-22 23:22:03 +03:00
test_print.py
test_profile.py
test_property.py
test_pstats.py
test_pty.py
test_pulldom.py
test_pwd.py gh-80198: Improve test_pwd and test_grp (GH-150380) 2026-05-25 16:17:38 +03:00
test_py_compile.py gh-145234: Normalize decoded CR in string tokenizer (#145281) 2026-02-27 12:44:54 +00:00
test_pyclbr.py gh-145035: Allows removing the _pyrepl module to completely disable the modern REPL (GH-145159) 2026-03-10 14:58:32 +01:00
test_pyexpat.py gh-150560: Fix crash in XML parser on invalid XML with multi-byte encoding (GH-150568) 2026-05-30 00:23:32 +03:00
test_pystats.py
test_queue.py
test_quopri.py
test_raise.py
test_random.py gh-149221:Fix binomialvariate Function for random module (gh-149222) 2026-05-02 07:55:43 -05:00
test_range.py
test_re.py gh-80480: Remove deprecated 'u' array type code (#149535) 2026-06-01 11:57:55 +00:00
test_readline.py
test_regrtest.py gh-150046: Fix test_add_python_opts to ignore PYTHON* env vars (#150089) 2026-05-28 18:48:51 +02:00
test_remote_pdb.py
test_repl.py gh-140287: Handle PYTHONSTARTUP script exceptions in the asyncio REPL (#140288) 2026-04-25 15:24:40 +01:00
test_reprlib.py gh-144278: Enable overriding sys.implementation's name and cache_tag when building sysmodule.c (GH-144293) 2026-02-10 00:01:17 +00:00
test_resource.py gh-149879: Fix test_resource on Cygwin (#149903) 2026-05-15 23:09:36 +00:00
test_richcmp.py
test_rlcompleter.py gh-112821: Fix rlcompleter failures on objects with descriptors (#149577) 2026-05-10 21:44:59 -04:00
test_robotparser.py gh-79638: Test other HTTP error codes besides 403 in test_robotparser (#149569) 2026-05-08 20:24:34 +00:00
test_runpy.py gh-149117: Set ImportError.name on errors from runpy.run_module/run_path (gh-149159) 2026-05-02 12:27:23 +10:00
test_samply_profiler.py
test_sax.py
test_sched.py
test_scope.py
test_script_helper.py
test_secrets.py
test_select.py
test_selectors.py
test_set.py gh-141510: Add frozendict fast-path to the set type (#144912) 2026-02-18 15:25:47 +01:00
test_setcomps.py
test_shelve.py gh-137829: Fix shelve tests for backend compatibility (#137879) 2026-03-01 16:48:13 +01:00
test_shlex.py
test_shutil.py gh-149567: Remove deprecated shutil.ExecError (#149568) 2026-05-15 18:54:05 +01:00
test_signal.py gh-149879: Fix test_signal on Cygwin (#149896) 2026-05-15 21:32:10 +02:00
test_site.py gh-150228: Improve the PEP 829 batch processing APIs (#150542) 2026-06-01 18:43:18 -07:00
test_slice.py
test_smtplib.py
test_smtpnet.py gh-70039: smtplib: store the server name in ._host in .connect() (#115259) 2026-04-08 17:46:25 -04:00
test_socket.py gh-139310: Revert test skip for test_aead_aes_gcm (GH-139552) (GH-149687) 2026-05-26 14:36:36 +02:00
test_socketserver.py
test_sort.py
test_source_encoding.py gh-144872: fix heap buffer overflow _PyTokenizer_ensure_utf8 (#144807) 2026-02-26 22:35:08 +00:00
test_ssl.py gh-148508: Add another common pattern for iOS SSL failures to test_ssl (#150442) 2026-06-01 11:37:53 +02:00
test_stable_abi_ctypes.py gh-149189: Revert "Modern defaults for pprint (#149190)" (#150249) 2026-05-22 23:22:03 +03:00
test_startfile.py
test_stat.py
test_statistics.py gh-85989: Add skip_if_double_rounding to test.support (#150219) 2026-05-28 13:42:39 +02:00
test_str.py gh-145118: Add frozendict support to str.maketrans() (gh-145129) 2026-02-23 16:04:16 -06:00
test_strftime.py
test_string_literals.py
test_stringprep.py
test_strptime.py gh-149879: Fix test_strptime on Cygwin (#150438) 2026-05-26 04:25:07 +02:00
test_strtod.py
test_struct.py gh-148675: Add Zd/Zf formats to array, ctypes, memoryview, struct (#148676) 2026-05-04 16:14:23 +02:00
test_structseq.py gh-145376: Fix GC tracking in structseq.__replace__ (#145820) 2026-03-13 15:42:19 +00:00
test_subclassinit.py
test_subprocess.py gh-150436: Skip subprocess test on STATUS_DLL_INIT_FAILED (#150704) 2026-06-01 14:50:15 +00:00
test_sundry.py
test_super.py
test_support.py gh-146004: fix test_args_from_interpreter_flags on windows (#146580) 2026-03-29 09:38:45 +05:30
test_symtable.py gh-149530: Remove symtable.Class.get_methods deprecated method (#149531) 2026-05-09 08:33:09 +00:00
test_syntax.py gh-145241: specialize SyntaxError for single trailing-comma with item (#145282) 2026-02-28 02:24:06 +00:00
test_sys.py gh-149595: Remove the sys._enablelegacywindowsfsencoding() function (#149596) 2026-05-12 17:11:34 +01:00
test_sys_setprofile.py
test_sys_settrace.py GH-143732: SEND specialization (GH-148963) 2026-05-05 15:19:16 +01:00
test_sysconfig.py gh-150208: Avoid double-quoting string values in sysconfigdata (#150209) 2026-05-25 13:30:07 +01:00
test_syslog.py
test_tabnanny.py
test_tarfile.py gh-107398: Fix tarfile stream mode exception when process the file with the gzip extra field (GH-126304) 2026-05-21 19:12:09 +00:00
test_tcl.py gh-124111: Keep tests passing for Tcl prior to 9.0 (GH-150102) 2026-05-19 21:27:44 +01:00
test_tempfile.py gh-150368: Change Windows user group to secure identifier in test_tempfile (#150369) 2026-06-01 11:35:48 +00:00
test_termios.py gh-149879: Fix test_termios and test_ioctl on Cygwin (#150412) 2026-05-25 19:06:28 +02:00
test_textwrap.py
test_thread.py
test_thread_local_bytecode.py
test_threadedtempfile.py
test_threading.py gh-124397: Add free-threading support for iterators. (gh-148894) 2026-05-01 16:31:00 -05:00
test_threading_local.py
test_threadsignals.py
test_time.py GH-70647: Remove support for %d (and deprecate for %e) without year in strptime() (GH-144570) 2026-04-14 17:15:27 -07:00
test_timeit.py GH-130750: Restore quoting of choices in argparse error messages to match documentation and improve clarity (#144983) 2026-05-04 21:51:48 +00:00
test_timeout.py
test_tokenize.py gh-148991: Add colour to tokenize CLI output (#148992) 2026-04-26 22:14:33 +03:00
test_trace.py
test_traceback.py gh-146406: add clear() cross-language hint for immutable types (GH-149927) 2026-05-19 23:01:15 -04:00
test_tracemalloc.py
test_tstring.py
test_ttk_textonly.py
test_tty.py
test_tuple.py
test_turtle.py
test_type_aliases.py gh-149171: Make TypeAliasType __module__ writable (#149172) 2026-05-02 17:28:08 +00:00
test_type_annotations.py gh-137814: Fix __qualname__ of __annotate__ (#137842) 2026-04-15 21:52:30 -07:00
test_type_cache.py gh-148450: abc.register needs to update type_version when tp_flags is changed (#148623) 2026-05-23 13:55:44 +05:30
test_type_comments.py gh-148157: Check for _PyPegen_add_type_comment_to_arg fail in _PyPegen_name_default_pair (#148158) 2026-04-06 12:56:36 +01:00
test_type_params.py gh-145187: Fix crash on invalid type parameter bound expression in conditional block (GH-145188) 2026-02-24 12:44:57 -08:00
test_typechecks.py
test_types.py gh-143636: fix a crash when calling `__replace__ on invalid SimpleNamespace` instances (#143655) 2026-03-14 09:58:15 +00:00
test_typing.py gh-149410: Test that typing.NoDefault is final (#149411) 2026-05-05 17:58:49 +03:00
test_ucn.py gh-80667: Fix Tangut ideographs names in unicodedata (GH-144789) 2026-02-16 13:31:18 +02:00
test_unary.py
test_unicode_file.py
test_unicode_file_functions.py
test_unicode_identifiers.py
test_unicodedata.py gh-149449: Fix use-after-free in _PyUnicode_GetNameCAPI (#150323) 2026-05-24 16:17:38 +00:00
test_unpack.py
test_unpack_ex.py gh-145876: Do not mask KeyErrors raised during dictionary unpacking in call (GH-146472) 2026-03-29 11:58:52 +03:00
test_unparse.py gh-143055: Fix crash in AST unparser when unparsing dict comprehension unpacking (#145556) 2026-03-09 10:37:23 -07:00
test_urllib.py
test_urllib2.py
test_urllib2_localnet.py
test_urllib2net.py
test_urllib_response.py
test_urllibnet.py
test_urlparse.py gh-144148: Update the urllib.parse documentation (GH-144497) 2026-02-05 16:32:17 +02:00
test_userdict.py gh-145056: Add support for merging collections.UserDict and frozendict (GH-146465) 2026-03-30 22:07:28 +03:00
test_userlist.py gh-145144: Add more tests for UserList, UserDict, etc (GH-145145) 2026-03-22 16:22:25 +02:00
test_userstring.py gh-145144: Add more tests for UserList, UserDict, etc (GH-145145) 2026-03-22 16:22:25 +02:00
test_utf8_mode.py
test_utf8source.py
test_uuid.py gh-148740: Fix uuid CLI with custom UUIDs for UUIDv3/v5 namespaces (#148741) 2026-04-29 15:44:22 +02:00
test_venv.py gh-149879: Fix test_venv on Cygwin (#150483) 2026-05-26 18:32:13 +02:00
test_wait3.py
test_wait4.py
test_wave.py gh-117716: Fix wave RIFF padding for data chunks (GH-145237) 2026-04-15 14:21:43 +02:00
test_weakref.py gh-124748: Fix handling kwargs in WeakKeyDictionary.update() (#124783) 2026-02-18 13:17:08 +00:00
test_weakset.py
test_webbrowser.py gh-149496: Fix MacOSTest.test_default regression when BROWSER env var is set (GH-149579) 2026-05-08 20:33:05 +00:00
test_winapi.py
test_winconsoleio.py
test_winreg.py
test_winsound.py
test_with.py
test_wmi.py
test_wsgiref.py gh-146292: Add colour to http.server logs (GH-146293) 2026-04-08 14:10:05 +02:00
test_xml.py gh-139489: Add xml.is_valid_text() (GH-149412) 2026-05-06 14:40:10 +00:00
test_xml_dom_minicompat.py
test_xml_dom_xmlbuilder.py
test_xml_etree.py gh-150560: Fix crash in XML parser on invalid XML with multi-byte encoding (GH-150568) 2026-05-30 00:23:32 +03:00
test_xml_etree_c.py
test_xmlrpc.py
test_xpickle.py gh-75572: Speed up test_xpickle (GH-144393) 2026-02-02 20:00:12 +02:00
test_xxlimited.py gh-140550: Update xxlimited with 3.15 limited API (GH-142827) 2026-05-13 18:35:50 +02:00
test_xxtestfuzz.py
test_yield_from.py
test_zipapp.py
test_zipfile64.py
test_zipimport.py gh-144278: Enable overriding sys.implementation's name and cache_tag when building sysmodule.c (GH-144293) 2026-02-10 00:01:17 +00:00
test_zipimport_support.py
test_zlib.py
test_zstd.py
testcodec.py
tf_inherit_check.py
win_console_handler.py
xmltests.py
xpickle_worker.py gh-75572: Speed up test_xpickle (GH-144393) 2026-02-02 20:00:12 +02:00