cpython/Lib
Petr Viktorin 4ebbfcf30e
gh-87135: Raise PythonFinalizationError when joining a blocked daemon thread (gh-130402)
If `Py_IsFinalizing()` is true, non-daemon threads (other than the current one)
are done, and daemon threads are prevented from running, so they
cannot finalize themselves and become done. Joining them (without timeout)
would block forever.

Raise PythonFinalizationError instead of hanging.

Raise even when a timeout is given, for consistency with trying to join your own thread.

See gh-123940 for a use case: calling `join()` from `__del__`. This is
ill-advised, but an exception should at least make it easier to diagnose.
2025-04-28 15:48:48 +02:00
..
__phello__
_pyrepl gh-127495: Append to history file after every statement in PyREPL (GH-132294) 2025-04-27 15:32:37 +02:00
asyncio gh-86513: improve docs of loop.call_exception_handler (#132466) 2025-04-13 21:39:24 +00:00
collections Fix outdated reference link in collections module (gh-130349) 2025-02-20 23:58:58 +00:00
compression gh-132983: Introduce compression package and move _compression module (GH-133018) 2025-04-27 14:41:30 -07:00
concurrent gh-132063: ensure that ProcessPoolExecutor does not swallow falsey exceptions (#132129) 2025-04-08 15:11:13 +00:00
ctypes gh-121249: adjust formatting codes for complex types in struct/ctypes (#132827) 2025-04-23 15:38:24 +02:00
curses gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
dbm gh-120417: Remove unused imports in the stdlib (#120420) 2024-06-12 20:56:42 +02:00
email gh-127794: Validate email header names according to RFC 5322 (#127820) 2025-03-30 12:29:29 +00:00
encodings gh-61456: Add Thai language codec aliases (#15079) 2025-04-07 13:06:32 +02:00
ensurepip gh-129583: update bundled pip to 25.0.1 (#129909) 2025-02-10 12:21:04 +02:00
html
http gh-130631: Make join_header_words() more similar to the original Perl version (GH-130632) 2025-04-09 11:08:04 +03:00
idlelib gh-69001: Convert links to more usable buttons (#129591) 2025-02-20 08:30:57 +00:00
importlib gh-115942: Add locked to several multiprocessing locks (#115944) 2025-04-08 11:14:12 +03:00
json gh-131952: Add colour to the `json` module CLI (#132126) 2025-04-19 18:11:21 +00:00
logging gh-115032: Deprecate support for custom logging handlers with 'strm' argument. (GH-115314) 2025-04-27 22:18:14 +01:00
multiprocessing gh-131913: multiprocessing: add interrupt for POSIX (GH-132453) 2025-04-22 23:55:24 -07:00
pathlib GH-125866: Support complete "file:" URLs in urllib (#132378) 2025-04-14 01:49:02 +01:00
pydoc_data Python 3.14.0a7 2025-04-08 14:20:51 +03:00
re gh-126505: Fix bugs in compiling case-insensitive character classes (GH-126557) 2024-11-11 18:27:26 +02:00
site-packages
sqlite3 gh-130893: Fix typo in SqliteInteractiveConsole.runsource docstring (#130894) 2025-03-06 22:10:37 -08:00
sysconfig gh-127405: Add ABIFLAGS to sysconfig variables on Windows (GH-131799) 2025-04-11 16:19:03 +01:00
test gh-87135: Raise PythonFinalizationError when joining a blocked daemon thread (gh-130402) 2025-04-28 15:48:48 +02:00
tkinter gh-128562: Fix generation of the tkinter widget names (GH-128604) 2025-01-13 15:54:46 +00:00
tomllib gh-118761: Improve import time of tomllib (#128907) 2025-01-16 18:48:42 -08:00
turtledemo gh-128062: Fix the font size and shortcut display of the turtledemo menu (#128063) 2024-12-19 15:24:47 -05:00
unittest gh-128398: improve error messages when incorrectly using with and async with (#132218) 2025-04-19 10:44:01 +02:00
urllib GH-123599: Match file: URL hostname against machine hostname in urllib (#132523) 2025-04-15 01:05:06 +01:00
venv GH-127724: don't use sysconfig to calculate the venv local include path (#127731) 2024-12-12 21:41:46 +00:00
wsgiref gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
xml gh-131938: Update exception message for Element.remove() when an element is not found (#131972) 2025-04-04 15:04:07 +00:00
xmlrpc gh-120485: Add an override of allow_reuse_port on classes subclassing socketserver.TCPServer (GH-120488) 2024-06-16 13:15:03 +01:00
zipfile gh-117779: Fix reading duplicated entries in zipfile by name (GH-129254) 2025-04-08 13:56:42 +03:00
zoneinfo gh-114713: Handle case of an empty string passed to zoneinfo.ZoneInfo (#114731) 2025-04-15 18:41:52 +00:00
__future__.py
__hello__.py
_aix_support.py
_android_support.py Fix typo in Lib/_android_support.py (#127699) 2024-12-06 19:50:58 +02:00
_apple_support.py gh-126925: Modify how iOS test results are gathered (#127592) 2024-12-09 13:28:57 +08:00
_ast_unparse.py gh-118761: Fix star-import of ast (#132025) 2025-04-02 18:15:05 +00:00
_collections_abc.py gh-132491: Rename annotationlib.value_to_string to type_repr (#132492) 2025-04-15 20:10:53 +00:00
_colorize.py gh-131507: Clean up tests and type checking for _pyrepl (#131509) 2025-03-21 15:48:10 +01:00
_compat_pickle.py
_ios_support.py gh-119253: use ImportError in _ios_support (#119254) 2024-05-20 16:39:30 -04:00
_markupbase.py _markupbase.py: Use a permalink for the analysis of MS-Word extensions (GH-129017) 2025-02-06 11:40:43 +01:00
_opcode_metadata.py gh-130907: Treat all module-level annotations as conditional (#131550) 2025-04-28 06:10:28 -07:00
_osx_support.py
_py_abc.py
_py_warnings.py gh-128384: Use a context variable for warnings.catch_warnings (gh-130010) 2025-04-09 16:18:54 -07:00
_pydatetime.py gh-89157: Make C and Python implementation of datetime.date.fromisoformat consistent (#131007) 2025-04-24 17:16:07 +03:00
_pydecimal.py gh-53032: support IEEE 754 contexts in the decimal module (#122003) 2025-04-28 15:05:56 +02:00
_pyio.py gh-117151: IO performance improvement, increase io.DEFAULT_BUFFER_SIZE to 128k (GH-118144) 2025-03-07 11:36:12 -08:00
_pylong.py Fix typos in comments and test code (#122846) 2024-08-11 21:16:41 -07:00
_sitebuiltins.py
_strptime.py gh-131434: Improve error reporting for incorrect format in strptime() (GH-131568) 2025-04-09 13:26:50 +03:00
_threading_local.py
_weakrefset.py gh-89967: make WeakKeyDictionary and WeakValueDictionary thread safe (#125325) 2024-10-13 21:05:05 +05:30
abc.py
annotationlib.py annotationlib: Move ForwardRef tests to test_annotationlib (#132571) 2025-04-16 13:40:29 +00:00
antigravity.py
argparse.py GH-127133: Remove ability to nest argument groups & mutually exclusive groups (#127186) 2024-11-24 15:20:37 +00:00
ast.py gh-133046: Reformat the `ast` module docstring (GH-133050) 2025-04-27 14:35:56 -07:00
base64.py gh-118761: substitute re import in base64.b16decode for a more efficient alternative (#128736) 2025-01-14 13:25:33 +00:00
bdb.py gh-132536: Do not disable PY_THROW event in bdb (#132537) 2025-04-15 18:31:52 -04:00
bisect.py
bz2.py gh-132983: Introduce compression package and move _compression module (GH-133018) 2025-04-27 14:41:30 -07:00
calendar.py gh-130665: Only apply locale to calendar CLI via --locale and not LANG env var (#130676) 2025-02-28 16:24:05 +02:00
cmd.py gh-118761: Improve import time of cmd module (#130056) 2025-02-17 20:06:08 +00:00
code.py gh-130660: Restore sys.ps1 and sys.ps2 after code.interact (#130661) 2025-02-28 13:15:55 -05:00
codecs.py gh-121785: Remove unused code from codecs.py (GH-121787) 2024-07-15 17:18:37 +00:00
codeop.py gh-132449: Improve syntax error messages for keywords with typos (#132450) 2025-04-22 11:01:55 +02:00
colorsys.py gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
compileall.py gh-117205: Increase chunksize when compiling pyc in parallel (#117206) 2024-04-03 15:24:24 -07:00
configparser.py gh-130941: Fix configparser parsing values with allow_no_value and interpolation set (GH-130949) 2025-04-16 12:39:11 +02:00
contextlib.py
contextvars.py gh-126451: Register contextvars.Context to collections.abc.Mapping (#126452) 2024-11-07 01:12:45 +03:00
copy.py gh-128118: Speed up copy.copy with fast lookup for atomic and container types (#128119) 2024-12-30 18:18:42 +01:00
copyreg.py gh-132882: Fix copying of unions with members that do not support __or__ (#132883) 2025-04-24 16:49:09 +00:00
cProfile.py gh-132737: Support profiling modules that require __main___ (#132738) 2025-04-24 14:41:01 -04:00
csv.py gh-118761: Improve import time for csv (#128858) 2025-01-18 11:45:18 +01:00
dataclasses.py gh-128184: Fix display of signatures with ForwardRefs (#130815) 2025-03-04 06:58:37 -08:00
datetime.py gh-123843: Remove broken links to the Zope DateTimeWiki (#123846) 2024-09-08 22:39:23 -04:00
decimal.py gh-123339: Fix cases of inconsistency of __module__ and __firstlineno__ in classes (GH-123613) 2024-09-28 20:51:49 +03:00
difflib.py gh-131204: Fix difflib.HtmlDiff may not use monospaced font (#131221) 2025-03-14 10:45:33 +00:00
dis.py gh-130704: Strength reduce LOAD_FAST{_LOAD_FAST} (#130708) 2025-04-01 10:18:42 -07:00
doctest.py gh-128595: Default to stdout isatty for colour detection instead of stderr (#128498) 2025-01-20 12:52:42 +02:00
enum.py gh-132684: [Enum] only call _missing_ in __contains__ for Flags (GH-132790) 2025-04-24 23:13:54 -07:00
filecmp.py gh-122400: Handle ValueError in filecmp (GH-122401) 2024-07-30 08:50:30 +00:00
fileinput.py Use bool in fileinput.input() docstring and tests for the inplace argument (GH-111998) 2024-01-27 23:47:55 +02:00
fnmatch.py gh-74598: add fnmatch.filterfalse for excluding names matching a patern (#121185) 2025-04-08 10:11:25 +00:00
fractions.py gh-130104: Call __rpow__ in ternary pow() if necessary (GH-130251) 2025-04-16 18:32:41 +03:00
ftplib.py Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
functools.py gh-131525: Remove _HashedSeq wrapper from lru_cache (gh-131922) 2025-03-31 08:23:41 -05:00
genericpath.py gh-117114: Make os.path.isdevdrive available on all platforms (GH-117115) 2024-03-25 22:55:11 +00:00
getopt.py gh-126946: Improve error message in getopt.do_longs based on existing comment (GH-126871) 2024-11-26 10:54:02 +02:00
getpass.py
gettext.py gettext: Remove outdated "TODO" comment (#130890) 2025-03-06 23:41:03 +00:00
glob.py GH-130614: pathlib ABCs: support alternate separator in full_match() (#130991) 2025-03-09 16:36:59 +00:00
graphlib.py gh-130914: Make graphlib.TopologicalSorter.prepare() idempotent (#131317) 2025-03-18 16:28:00 -05:00
gzip.py gh-132983: Introduce compression package and move _compression module (GH-133018) 2025-04-27 14:41:30 -07:00
hashlib.py gh-122179: Fix hashlib.file_digest and non-blocking I/O (GH-122183) 2025-04-21 14:15:05 -07:00
heapq.py gh-119721: Integrate documentation fixes into heapq module docstring. (gh-119722) 2024-05-29 11:39:34 -05:00
hmac.py gh-132388: Increase test coverage for HMAC (#132389) 2025-04-12 17:43:11 +00:00
imaplib.py gh-55454: Add IMAP4 IDLE support to imaplib (#122542) 2025-02-06 19:15:11 -08:00
inspect.py gh-117174: Add a new route in linecache to fetch interactive source code (#117500) 2025-03-10 21:54:05 +00:00
io.py gh-127647: Add typing.Reader and Writer protocols (#127648) 2025-03-06 07:36:19 -08:00
ipaddress.py gh-124217, ipaddress: Add RFC 9637 reserved IPv6 block 3fff::/20 (#124240) 2024-09-20 11:01:28 +00:00
keyword.py
linecache.py gh-60115: Support frozen modules for linecache.getline() (#131638) 2025-04-02 19:50:01 -04:00
locale.py gh-118761: Always lazy import re in locale (#129860) 2025-03-27 15:47:08 +02:00
lzma.py gh-132983: Introduce compression package and move _compression module (GH-133018) 2025-04-27 14:41:30 -07:00
mailbox.py gh-117467: Add preserving of mailbox owner on flush (GH-117510) 2024-04-04 13:32:53 +03:00
mimetypes.py gh-132054: Add `application/yaml to mimetypes` (#132056) 2025-04-21 12:05:37 +03:00
modulefinder.py gh-114099 - Add iOS framework loading machinery. (GH-116454) 2024-03-19 08:36:19 -04:00
netrc.py
ntpath.py gh-119826: Improved fallback for ntpath.abspath() on Windows (GH-119938) 2024-11-12 21:18:03 +00:00
nturl2path.py GH-125866: Deprecate nturl2path module (#131432) 2025-03-19 19:33:01 +00:00
numbers.py
opcode.py gh-131738: optimize builtin any/all/tuple calls with a generator expression arg (#131737) 2025-03-28 10:35:20 +00:00
operator.py gh-115808: Add `is_none and is_not_none to operator` (#115814) 2024-08-10 20:16:34 +01:00
optparse.py gh-118761: Redudce the import time of `optparse` (#128899) 2025-01-20 00:03:19 +00:00
os.py gh-127541: Update os.walk example (GH-127765) 2025-03-28 23:25:13 -07:00
pdb.py gh-124703: Set return code to 1 when aborting process from pdb (#133013) 2025-04-26 18:43:23 -04:00
pickle.py gh-131178: Add tests for pickle command-line interface (#131275) 2025-04-06 11:50:32 -04:00
pickletools.py gh-93096: Update and document pickletools CLI (#131273) 2025-03-17 09:36:30 +00:00
pkgutil.py gh-131152, pkgutil: Remove unused imports (#131149) 2025-03-12 15:03:36 +01:00
platform.py gh-90548: Make musl test skips smarter (fixes Alpine errors) (#131313) 2025-03-19 13:05:09 -04:00
plistlib.py gh-111803: Support loading more deeply nested lists in binary plist format (GH-114024) 2024-01-13 15:26:55 +02:00
poplib.py gh-130637: Add validation for numeric response data in stat() method (#130646) 2025-03-02 08:05:40 -05:00
posixpath.py GH-118289: Fix handling of non-directories in posixpath.realpath() (#120127) 2024-11-13 22:59:32 +00:00
pprint.py gh-118761: Improve import time of pprint (#122725) 2024-08-07 22:46:54 +03:00
profile.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
pstats.py gh-118761: Improve import time for pstats and zipfile (#128981) 2025-01-23 14:49:36 +00:00
pty.py gh-124405: Fix NameError in openpty (#124406) 2024-09-24 20:06:39 +02:00
py_compile.py
pyclbr.py
pydoc.py gh-132261: Store annotations at hidden internal keys in the class dict (#132345) 2025-04-10 21:13:26 -07:00
queue.py gh-117531: Unblock getters after non-immediate queue shutdown (#117532) 2024-04-10 08:01:42 -07:00
quopri.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
random.py gh-131269: Minor optimization in random.py (#131270) 2025-03-20 17:10:33 -05:00
reprlib.py gh-113570: reprlib.repr does not use builtin __repr__ for reshadowed builtins (GH-113577) 2024-10-17 16:34:37 +00:00
rlcompleter.py gh-113978: Ignore warnings on text completion inside REPL (#113979) 2024-05-21 18:28:21 +02:00
runpy.py gh-99437: runpy: decode path-like objects before setting globals 2024-01-15 16:58:50 +00:00
sched.py gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
secrets.py
selectors.py
shelve.py
shlex.py gh-118761: Optimise import time for `shlex` (#132036) 2025-04-24 16:10:46 +01:00
shutil.py gh-81340: Use copy_file_range in shutil.copyfile copy functions (GH-93152) 2025-02-03 10:23:27 +00:00
signal.py
site.py gh-128779: Fix site venv() for system site-packages (#129184) 2025-01-30 00:02:31 +00:00
smtplib.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
socket.py gh-128916: Do not set SO_REUSEPORT on non-AF_INET* sockets (GH-128933) 2025-01-17 16:49:16 -08:00
socketserver.py gh-128916: Do not set SO_REUSEPORT on non-AF_INET* sockets (GH-128933) 2025-01-17 16:49:16 -08:00
sre_compile.py
sre_constants.py
sre_parse.py
ssl.py gh-128035: Add ssl.HAS_PHA to detect libssl PHA support (GH-128036) 2024-12-24 18:29:27 +00:00
stat.py gh-120417: Remove unused imports in the stdlib (#120420) 2024-06-12 20:56:42 +02:00
statistics.py gh-132893: More accurate CDF computation (gh-132895) 2025-04-25 00:34:55 -05:00
string.py gh-118761: Optimise import time for `string` (#132037) 2025-04-08 10:05:48 +00:00
stringprep.py
struct.py gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
subprocess.py gh-129204: Add _PYTHON_SUBPROCESS_USE_POSIX_SPAWN environment knob (GH-132184) 2025-04-06 20:53:02 -07:00
symtable.py gh-119698: deprecate `symtable.Class.get_methods` (#121902) 2024-07-22 07:04:17 -07:00
tabnanny.py gh-120495: Fix incorrect exception handling in Tab Nanny (#120498) 2024-06-15 05:04:14 -06:00
tarfile.py gh-133005: Support tarfile.open(mode="w|xz", preset=...) (GH-133007) 2025-04-27 22:19:59 +00:00
tempfile.py gh-127371 Avoid unbounded growth SpooledTempfile.writelines (GH-127372) 2025-03-05 00:06:07 +02:00
textwrap.py gh-130167: Improve the error case for `textwrap.dedent` (#132666) 2025-04-19 16:18:03 +01:00
this.py
threading.py gh-132578: Rename the threading.Thread._handle field (#132696) 2025-04-21 16:07:54 -07:00
timeit.py gh-131178: Update help message for timeit CLI (#131326) 2025-03-30 14:19:38 +03:00
token.py gh-127303: Add docs for token.EXACT_TOKEN_TYPES (#127304) 2024-11-29 04:00:50 -05:00
tokenize.py gh-131178: Add tests for tokenize command-line interface (#131274) 2025-03-27 18:04:16 +02:00
trace.py gh-112192: Increase the trace module coverage precision to one decimal (#126972) 2024-12-03 23:33:13 +01:00
traceback.py gh-132449: Improve the algorithm to detect typos in keywords (#132837) 2025-04-23 14:45:18 +01:00
tracemalloc.py
tty.py gh-114328: tty cbreak mode should not alter ICRNL (#114335) 2024-01-21 15:25:52 -08:00
turtle.py gh-126349: Add 'fill', 'poly', and 'no_animation' context managers to turtle (#126350) 2025-01-18 11:27:22 +01:00
types.py GH-118761: Expose more core interpreter types in `_types` (#132103) 2025-04-05 18:11:07 +00:00
typing.py gh-132493: Avoid eager import of annotationlib in typing (again) (#132596) 2025-04-17 16:03:53 +00:00
uuid.py gh-130843: expose 48-bit timestamp for UUIDv7 (#131838) 2025-03-31 14:32:54 +02:00
warnings.py gh-128384: Use a context variable for warnings.catch_warnings (gh-130010) 2025-04-09 16:18:54 -07:00
wave.py
weakref.py gh-89967: make WeakKeyDictionary and WeakValueDictionary thread safe (#125325) 2024-10-13 21:05:05 +05:30
webbrowser.py gh-113539: Enable using `$BROWSER` to reorder default seach order in webbrowser.py (#113561) 2025-04-25 14:36:18 +03:00
zipapp.py gh-130379: Fix incorrect zipapp logic to avoid including the target in itself (gh-130509) 2025-02-26 11:25:30 +00:00
zipimport.py gh-125746: Delay deprecated zipimport.zipimporter.load_module removal time to 3.15 (#125748) 2025-02-11 23:59:09 +00:00