cpython/Lib
László Kiss Kollár 3e06cfcaee
gh-135953: Reduce memory usage of stack collectors (#138875)
The stack collector base class keeps all frames until export() is
called, which causes significant unnecessary memory usage. Instead, we
can process the frames on the fly in the collect call by dispatching the
aggregation logic to the subclass through the process_frames method.

Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2025-09-14 23:47:14 +01:00
..
__phello__
_pyrepl gh-138318, PyREPL: builtins should not be highlighted when used as attribute names (#138319) 2025-09-08 14:04:22 +01:00
asyncio Improve permission error messages in pdb and asyncio.tools (#134290) 2025-09-12 12:54:04 +01:00
collections Minor edit: Improve comment readability and ordering (gh-136557) 2025-07-11 12:36:17 -07:00
compression gh-132983: Split `_zstd_set_c_parameters` (#133921) 2025-05-28 14:45:08 +00:00
concurrent gh-138253: Fix compatibility of sub-interpreters queues with queue.Queue (GH-138256) 2025-09-02 08:59:20 +03:00
ctypes gh-83424: Allow empty name if handle is non-null when create ctypes.CDLL on Windows (GH-136878) 2025-09-05 18:51:35 +03:00
curses gh-133575: eliminate legacy checks in Lib/curses/__init__.py (#133576) 2025-05-07 20:28:32 +02:00
dbm gh-135386: Fix "unable to open database file" errors on readonly DB (GH-135566) 2025-08-22 14:11:59 +03:00
email gh-134759: fix UnboundLocalError in email.message.Message.get_payload (#136071) 2025-07-12 13:30:09 +00:00
encodings gh-137153: Add latin_N aliases to encodings.aliases (#136701) 2025-08-29 14:28:04 +02:00
ensurepip gh-137257: Upgrade bundled pip to 25.2 (GH-137258) 2025-08-03 22:00:17 -04:00
html gh-135661: Fix parsing unterminated bogus comments in HTMLParser (GH-137873) 2025-08-17 13:37:50 +03:00
http gh-92936: allow double quote in cookie values (#113663) 2025-08-08 12:07:15 -07:00
idlelib gh-71648: Optimize PNG files (GH-138842) 2025-09-12 20:13:05 +00:00
importlib gh-93334: Fix homonym edge case in PathFinder.find_spec() (GH-98100) 2025-09-05 15:41:01 -07:00
json gh-138019: improve help message for json.tool (#138037) 2025-08-22 08:44:25 +00:00
logging gh-91555: Revert disabling of logger while handling log record. (GH-135858) 2025-06-25 06:42:38 +01:00
multiprocessing gh-126631: gh-137996: fix pre-loading of __main__ (GH-135295) 2025-09-07 07:49:54 +00:00
pathlib GH-128520: pathlib ABCs: improve protocol for 'openable' objects (#134101) 2025-09-12 22:25:18 +01:00
profiling gh-135953: Reduce memory usage of stack collectors (#138875) 2025-09-14 23:47:14 +01:00
pydoc_data Python 3.14.0b1 2025-05-06 18:33:52 +03:00
re gh-133306: Support \z as a synonym for \Z in regular expressions (GH-133314) 2025-05-03 07:54:33 +00:00
site-packages
sqlite3 gh-133390: Extend completion for .commands in sqlite3 (GH-135432) 2025-08-25 14:58:00 +02:00
string GH-132661: Add `string.templatelib.convert()` (#135217) 2025-07-15 11:56:42 +02:00
sysconfig gh-84683: Check <prefix>/share/zoneinfo for zoneinfo files on Windows (GH-28495) 2025-08-06 23:05:41 +01:00
test gh-135953: Reduce memory usage of stack collectors (#138875) 2025-09-14 23:47:14 +01:00
tkinter gh-126008: Improve docstrings for Tkinter cget and configure methods (GH-133303) 2025-08-12 07:55:01 +03:00
tomllib gh-133117: Enable stricter mypy checks for tomllib (#133206) 2025-05-03 16:57:09 +03: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-137716: Fix double period in AttributeError message for invalid mock assertions (#137717) 2025-08-14 21:26:02 +00:00
urllib gh-88375, gh-111788: Fix parsing errors and normalization in robotparser (GH-138502) 2025-09-05 18:58:42 +03:00
venv gh-119535: 3.15 minus π (#134037) 2025-05-15 02:39:42 -07:00
wsgiref gh-133810: remove http.server.CGIHTTPRequestHandler and --cgi flag (#133811) 2025-05-17 09:58:16 +02:00
xml gh-135640: Adds more type checking to ElementTree (GH-135643) 2025-07-03 10:48:47 +03:00
xmlrpc gh-136839: Refactor simple dict.update calls (#136811) 2025-07-19 10:12:10 -07:00
zipfile gh-136170: Revert adding ZipFile.data_offset (GH-136950) 2025-07-21 23:16:30 +00:00
zoneinfo gh-138432: Improved invalid path checking in zoneinfo.reset_tzpath() (GH-138433) 2025-09-11 10:08:53 +03: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-132661: Disallow Template/str concatenation after PEP 750 spec update (#135996) 2025-07-21 08:44:26 +02: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-133722: Add Difflib theme to _colorize and 'color' option to difflib.unified_diff (#133725) 2025-08-08 18:34:02 +03:00
_compat_pickle.py gh-133810: remove http.server.CGIHTTPRequestHandler and --cgi flag (#133811) 2025-05-17 09:58:16 +02:00
_ios_support.py
_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-134282: Always borrow references LOAD_CONST (GH-134284) 2025-05-20 11:24:11 -04:00
_osx_support.py
_py_abc.py
_py_warnings.py gh-138010: Fix __init_subclass__ forwarding by warnings.deprecated (#138210) 2025-09-05 20:44:50 +00:00
_pydatetime.py gh-123681: Check NORMALIZE_CENTURY behavior at runtime; require C99 (GH-136022) 2025-08-19 12:59:03 +02:00
_pydecimal.py gh-87790: support thousands separators for formatting fractional part of Decimal (#132202) 2025-07-07 11:16:27 +03:00
_pyio.py gh-133982: Test _pyio.BytesIO in free-threaded tests (gh-136218) 2025-07-04 11:27:21 +09:00
_pylong.py
_sitebuiltins.py
_strptime.py gh-136028: Fix parsing month names containing "İ" (U+0130) in strptime() (GH-136029) 2025-06-27 16:47:03 +03:00
_threading_local.py gh-107006: Move threading.local docstring to docs (#131840) 2025-05-05 15:00:15 +03:00
_weakrefset.py gh-89967: make WeakKeyDictionary and WeakValueDictionary thread safe (#125325) 2024-10-13 21:05:05 +05:30
abc.py
annotationlib.py gh-137226: Fix behavior of ForwardRef.evaluate with type_params (#137227) 2025-08-13 06:47:47 -07:00
antigravity.py
argparse.py GH-130645: Default to color help in argparse (#136809) 2025-07-20 14:55:44 -07:00
ast.py gh-124503: Optimize ast.literal_eval() for small input (GH-137010) 2025-07-31 12:55:00 +03: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-136980: Remove unused C tracing code in bdb (#136981) 2025-07-24 09:58:54 +09: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-137481: Fix abbreviation of day names in TextCalendar (GH-137482) 2025-08-20 19:55:50 +03:00
cmd.py gh-133363: Fix Cmd completion for lines beginning with ! (#133364) 2025-05-03 22:50:37 -04:00
code.py gh-135103: Remove an unused local variable in Lib/code.py (GH-135104) 2025-06-04 13:57:31 +09:00
codecs.py gh-52876: Implement missing parameter in codecs.StreamReaderWriter functions (#136498) 2025-07-10 17:42:14 +02:00
codeop.py gh-132449: Improve syntax error messages for keywords with typos (#132450) 2025-04-22 11:01:55 +02:00
colorsys.py
compileall.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
configparser.py gh-65697: Improved error msg for configparser key validation (#135527) 2025-06-15 12:13:19 -04: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-132657: improve deepcopy and copy scaling on free-threading (#138429) 2025-09-04 13:20:23 +05:30
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-138122: Implement PEP 799 (#138142) 2025-08-27 17:52:50 +01:00
csv.py gh-118761: Improve import time for csv (#128858) 2025-01-18 11:45:18 +01:00
dataclasses.py gh-135228: Create __dict__ and __weakref__ descriptors for object (GH-136966) 2025-08-18 14:25:51 +02: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-133722: Add Difflib theme to _colorize and 'color' option to difflib.unified_diff (#133725) 2025-08-08 18:34:02 +03:00
dis.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
doctest.py gh-136914: Fix support of cached functions and properties in DocTest's lineno computation (GH-136930) 2025-07-25 12:46:12 +03:00
enum.py gh-136764: improve comment in enum.verify.__call__ (GH-136774) 2025-07-19 05:55:02 -07:00
filecmp.py
fileinput.py
fnmatch.py gh-133306: Use \z instead of \Z in fnmatch.translate() and glob.translate() (GH-133338) 2025-05-03 17:58:21 +03:00
fractions.py gh-87790: support thousands separators for formatting fractional part of Fraction (#132204) 2025-07-07 11:16:31 +03:00
ftplib.py
functools.py Improve readability by adding whitespace between code paragraphs (gh-138090) 2025-08-23 15:18:46 +00:00
genericpath.py gh-71189: Support all-but-last mode in os.path.realpath() (GH-117562) 2025-07-30 10:19:19 +03: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 gh-77065: Use putwch instead of putch in getpass.win_getpass (#134058) 2025-05-15 15:14:31 +00:00
gettext.py gettext: Remove outdated "TODO" comment (#130890) 2025-03-06 23:41:03 +00:00
glob.py GH-137466: Remove deprecated and undocumented glob.glob0() and glob1() (#137467) 2025-08-06 17:13:58 +01:00
graphlib.py gh-130914: Make graphlib.TopologicalSorter.prepare() idempotent (#131317) 2025-03-18 16:28:00 -05:00
gzip.py Remove some dead code from gzip and tarfile (#138123) 2025-08-25 16:23:47 +03:00
hashlib.py gh-136565: use SHA-256 for hashlib.__doc__ example instead of MD5 (#138157) 2025-08-26 10:38:53 +00:00
heapq.py gh-137239: Add *_max functions to heapq.__all__ (gh-137241) 2025-07-30 16:12:14 -05:00
hmac.py gh-136912: fix handling of OverflowError in hmac.digest (#136917) 2025-07-26 08:22:06 +00:00
imaplib.py gh-136134: imaplib: fix CRAM-MD5 on FIPS-only environments (#136615) 2025-08-22 12:08:55 +02:00
inspect.py gh-137317: Fix inspect.signature() for class with wrapped __init__ or __new__ (GH-137862) 2025-08-28 17:57:53 +03:00
io.py gh-132952: Speed up startup by importing _io instead of io (#132957) 2025-04-28 08:38:56 -07:00
ipaddress.py gh-115766: Fix IPv4Interface.is_unspecified (GH-137326) 2025-08-11 15:04:47 +02:00
keyword.py
linecache.py gh-133253: making linecache thread-safe (#133305) 2025-05-09 12:15:16 +05:30
locale.py gh-137729: Fix support for locales with @-modifiers (GH-137253) 2025-08-18 10:11:15 +03:00
lzma.py gh-132983: Introduce compression package and move _compression module (GH-133018) 2025-04-27 14:41:30 -07:00
mailbox.py
mimetypes.py gh-136507: Fix mimetypes CLI to handle multiple file parameters (GH-136508) 2025-08-25 16:38:43 +02:00
modulefinder.py
netrc.py gh-135823: improve error message in netrc security checks (#135827) 2025-06-23 12:49:27 +02:00
ntpath.py gh-71189: Support all-but-last mode in os.path.realpath() (GH-117562) 2025-07-30 10:19:19 +03:00
nturl2path.py GH-125866: Deprecate nturl2path module (#131432) 2025-03-19 19:33:01 +00:00
numbers.py gh-122450: Expand documentation for `Rational and Fraction` (#136800) 2025-08-04 02:15:59 +00:00
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
optparse.py gh-118761: Redudce the import time of `optparse` (#128899) 2025-01-20 00:03:19 +00:00
os.py GH-119169: Slightly speed up os.walk(topdown=True) (GH-121431) 2025-09-03 13:57:01 +02:00
pdb.py Improve permission error messages in pdb and asyncio.tools (#134290) 2025-09-12 12:54:04 +01:00
pickle.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
pickletools.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
pkgutil.py gh-131152, pkgutil: Remove unused imports (#131149) 2025-03-12 15:03:36 +01:00
platform.py gh-90548: Fix musl version detection with --strip-all (#137864) 2025-09-01 18:58:45 +02:00
plistlib.py
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-71189: Support all-but-last mode in os.path.realpath() (GH-117562) 2025-07-30 10:19:19 +03:00
pprint.py GH-90117: Check for list and tuple before MappingView in pprint (GH-135779) 2025-06-24 14:41:41 -07:00
profile.py gh-138122: Implement PEP 799 (#138142) 2025-08-27 17:52:50 +01:00
pstats.py gh-135953: Implement sampling tool under profile.sample (#135998) 2025-07-10 18:44:24 +01:00
pty.py gh-124405: Fix NameError in openpty (#124406) 2024-09-24 20:06:39 +02:00
py_compile.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
pyclbr.py
pydoc.py gh-125142: remove duplicated import in Lib/pydoc.py (gh-135215) 2025-06-25 20:01:25 -07:00
queue.py Fix Queue.shutdown docs for condition to unblock a join (gh-137088) 2025-07-25 07:56:28 -06:00
quopri.py
random.py Minor edit: Move comments closer to the code they describe (gh-136477) 2025-07-09 10:23:46 -07:00
reprlib.py gh-135487: fix reprlib.Repr.repr_int when given very large integers (#135506) 2025-06-24 11:09:46 +00:00
rlcompleter.py
runpy.py
sched.py
secrets.py
selectors.py
shelve.py gh-99631: Add custom loads and dumps support for the shelve module (#118065) 2025-07-12 14:27:32 +02:00
shlex.py gh-138804: Check type in shlex.quote (GH-138809) 2025-09-12 14:26:21 -04:00
shutil.py gh-132983: Add missing references to Zstandard in shutil docstrings (GH-136617) 2025-07-23 18:09:53 +00:00
signal.py
site.py gh-128066: Properly handle history file writes for RO fs on PyREPL (gh-134380) 2025-05-20 21:47:57 +02:00
smtplib.py gh-136134: restore truncated comment post GH-136623 (#138088) 2025-08-23 10:17:14 +00:00
socket.py gh-99813: Start using SSL_sendfile when available (#99907) 2025-07-12 12:42:35 +00:00
socketserver.py gh-80184: Set getattr(socket, "SOMAXCONN", 5) as the default queue size for TCPServer (GH-134249) 2025-05-19 19:28:09 +00:00
ssl.py gh-138252: Add support in SSL module for getting and setting TLS signature algorithms (#138269) 2025-09-08 08:36:12 +00:00
stat.py
statistics.py gh-132893: Minor edits to the statistics module PR (gh-133106) 2025-04-28 23:05:37 -05:00
stringprep.py
struct.py
subprocess.py GH-133711: Enable UTF-8 mode by default (PEP 686) (#133712) 2025-07-15 10:45:41 +01:00
symtable.py gh-121914: Change the names of the symbol tables for lambda and genexpr (GH-135288) 2025-07-13 21:09:42 +03:00
tabnanny.py
tarfile.py gh-57911: Sanitize symlink targets in tarfile on win32 (GH-138309) 2025-09-05 16:19:47 +02:00
tempfile.py gh-136156: Allow using linkat() with TemporaryFile (#136281) 2025-07-08 18:39:47 +02:00
textwrap.py gh-133306: Use \z instead of \Z in regular expressions in the stdlib (GH-133337) 2025-05-03 17:58:49 +03:00
this.py
threading.py gh-130522: Fix unraisable TypeError in threading at interpreter shutdown (#131537) 2025-07-25 14:51:30 +00:00
timeit.py gh-131178: Update help message for timeit CLI (#131326) 2025-03-30 14:19:38 +03:00
token.py gh-131507: Add support for syntax highlighting in PyREPL (GH-133247) 2025-05-02 20:22:31 +02:00
tokenize.py gh-134675: Add t-string prefixes to tokenizer module, lexical analysis doc, and add a test to make sure we catch this error in the future. (#134734) 2025-05-26 13:49:39 -04:00
trace.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
traceback.py gh-137967: Restore suggestions on nested attribute access (#137968) 2025-08-21 16:56:57 +01:00
tracemalloc.py
tty.py
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-136492: Add FrameLocalsProxyType to types (GH-136546) 2025-07-20 20:49:00 +02:00
typing.py gh-137706: make typing._is_unpacked_typevartuple check for True instead of truthy (#137712) 2025-09-06 07:39:49 +00:00
uuid.py gh-135244: generate UUID random Node ID with a CSPRNG as per RFC 9562, §6.10.3 (#135226) 2025-06-08 11:46:16 +00: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 gh-136523: Fix wave.Wave_write emitting an unraisable when open raises (GH-136529) 2025-07-13 08:49:12 +03:00
weakref.py gh-89967: make WeakKeyDictionary and WeakValueDictionary thread safe (#125325) 2024-10-13 21:05:05 +05:30
webbrowser.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
zipapp.py gh-130645: Add color to stdlib argparse CLIs (gh-133380) 2025-05-05 19:46:46 +02:00
zipimport.py gh-61206: Support zstandard compression in the zipimport module (GH-138254) 2025-09-01 17:14:23 -07:00