cpython/Lib
Sam Gross 4b63cd170e
gh-122527: Fix a crash on deallocation of `PyStructSequence` (GH-122577)
The `PyStructSequence` destructor would crash if it was deallocated after
its type's dictionary was cleared by the GC, because it couldn't compute
the "real size" of the instance. This could occur with relatively
straightforward code in the free-threaded build or with a reference
cycle involving the type in the default build, due to differing orders
in which `tp_clear()` was called.

Account for the non-sequence fields in `tp_basicsize` and use that,
along with `Py_SIZE()`, to compute the "real" size of a
`PyStructSequence` in the dealloc function. This avoids the accesses to
the type's dictionary during dealloc, which were unsafe.
2024-08-02 18:11:44 +02:00
..
__phello__
_pyrepl gh-119896: Fix CTRL-Z behavior in the new REPL on Windows (GH-122217) 2024-07-30 14:03:52 +02:00
asyncio gh-121913: Use str(exc) instead of exc.strerror in `asyncio.base_events` (#122269) 2024-07-25 17:26:04 +05:30
collections gh-120417: Fix "imported but unused" linter warnings (#120461) 2024-06-14 20:39:50 +02:00
concurrent gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
ctypes gh-105733: Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it. (GH-122281) 2024-07-30 09:37:58 +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-121650: Encode newlines in headers, and verify headers are sound (GH-122233) 2024-07-31 00:19:48 +02:00
encodings
ensurepip gh-120888: Bump bundled pip to 24.1.1 (#120889) 2024-06-27 09:09:54 +00:00
html gh-100210: Correct the comment link for unescaping HTML (#100212) 2023-02-19 11:18:12 +01:00
http gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
idlelib gh-120083: Add IDLE Hovertip foreground color needed for recent macOS (#120605) 2024-08-01 23:02:43 -04:00
importlib gh-122188: Remove _imp.pyc_magic_number (GH-122503) 2024-08-02 13:12:19 +03:00
json gh-122163: Add notes for JSON serialization errors (GH-122165) 2024-07-23 20:02:54 +03:00
logging gh-121723: Relax constraints on queue objects for `logging.handlers.QueueHandler`. (GH-122154) 2024-08-02 12:16:32 +01:00
multiprocessing gh-121381 Remove subprocess._USE_VFORK escape hatch (#121383) 2024-07-30 18:39:54 -07:00
pathlib GH-73991: Support preserving metadata in `pathlib.Path.copytree()` (#121438) 2024-07-20 23:32:52 +01:00
pydoc_data Python 3.13.0b1 2024-05-08 11:21:00 +02:00
re gh-111259: Optimize complementary character sets in RE (GH-120742) 2024-06-20 07:19:32 +00:00
site-packages
sqlite3 gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
sysconfig gh-120831: Correct default minimum iOS version. (#122339) 2024-07-27 01:53:44 +00:00
test gh-122527: Fix a crash on deallocation of `PyStructSequence` (GH-122577) 2024-08-02 18:11:44 +02:00
tkinter gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
tomllib
turtledemo gh-120633: Move scrollbar and remove tear-off menus in turtledemo (#120634) 2024-06-19 02:20:54 -04:00
unittest gh-117765: Improve documentation for `mocker.patch.dict` (#121755) 2024-07-15 07:14:17 +00:00
urllib gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
venv gh-90329: Add _winapi.GetLongPathName and GetShortPathName and use in venv to reduce warnings (GH-117817) 2024-04-15 15:36:06 +01:00
wsgiref Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
xml gh-120417: Fix "imported but unused" linter warnings (#120461) 2024-06-14 20:39:50 +02: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-119588: Implement zipfile.Path.is_symlink (zipp 3.19.0). (#119591) 2024-06-03 11:13:07 -04:00
zoneinfo
__future__.py
__hello__.py
_aix_support.py
_android_support.py gh-116622: Redirect stdout and stderr to system log when embedded in an Android app (#118063) 2024-04-30 16:00:31 +02:00
_collections_abc.py GH-120097: Make FrameLocalsProxy a mapping (#120101) 2024-06-19 17:54:13 +01:00
_colorize.py gh-117225: Move colorize functionality to own internal module (#118283) 2024-05-01 12:27:06 -06:00
_compat_pickle.py
_compression.py
_ios_support.py gh-119253: use ImportError in _ios_support (#119254) 2024-05-20 16:39:30 -04:00
_markupbase.py
_opcode_metadata.py GH-122029: Break INSTRUMENTED_CALL into micro-ops, so that its behavior is consistent with CALL (GH-122177) 2024-07-26 14:35:57 +01:00
_osx_support.py
_py_abc.py
_pydatetime.py gh-120713: Normalize year with century for datetime.strftime (GH-120820) 2024-06-29 09:32:42 +03:00
_pydecimal.py gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
_pyio.py gh-120754: Reduce system calls in full-file FileIO.readall() case (#120755) 2024-07-04 09:17:00 +02:00
_pylong.py gh-119057: Use better error messages for zero division (#119066) 2024-06-03 19:03:56 +03:00
_sitebuiltins.py
_strptime.py GH-70647: Deprecate strptime day of month parsing without a year present to avoid leap-year bugs (GH-117107) 2024-04-03 14:19:49 +02:00
_threading_local.py
_weakrefset.py
abc.py
annotationlib.py gh-119180: Add evaluate functions for type params and type aliases (#122212) 2024-07-27 17:24:10 +00:00
antigravity.py
argparse.py gh-121018: Fix more cases of exiting in argparse when exit_on_error=False (GH-121056) 2024-06-28 17:21:59 +03:00
ast.py gh-121210: handle nodes with missing attributes/fields in `ast.compare` (#121211) 2024-07-02 16:23:17 +05:30
base64.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
bdb.py gh-121450: Make inline breakpoints use the most recent pdb instance (#121451) 2024-07-10 19:54:27 -07:00
bisect.py
bz2.py gh-115961: Add name and mode attributes for compressed file-like objects (GH-116036) 2024-04-21 11:46:39 +03:00
cProfile.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
calendar.py gh-120567: Clarify weekday return in calendar.monthrange docstring (#120570) 2024-06-16 16:43:57 -04:00
cmd.py Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
code.py gh-87320: In the code module, handle exceptions raised in sys.excepthook (GH-122456) 2024-07-31 10:33:29 +00:00
codecs.py gh-121785: Remove unused code from codecs.py (GH-121787) 2024-07-15 17:18:37 +00:00
codeop.py gh-119521: Rename IncompleteInputError to _IncompleteInputError and remove from public API/ABI (GH-119680) 2024-06-24 14:08:12 +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 Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
contextlib.py
contextvars.py
copy.py gh-121300: Add `replace` to `copy.__all__` (#121302) 2024-07-03 20:33:56 +05:30
copyreg.py
csv.py gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
dataclasses.py gh-119180: Add `annotationlib` module to support PEP 649 (#119891) 2024-07-23 21:16:50 +00:00
datetime.py gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
decimal.py gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
difflib.py gh-115801: Only allow sequence of strings as input for difflib.unified_diff (GH-118333) 2024-06-10 14:06:18 +03:00
dis.py gh-120780: Show attribute name for LOAD_SPECIAL in dis output (#120781) 2024-06-20 07:07:24 -07:00
doctest.py Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
enum.py gh-118650: Exclude `_repr_*` methods from Enum's _sunder_ reservation (GH-118651) 2024-05-07 12:35:51 +02:00
filecmp.py gh-122400: Handle ValueError in filecmp (GH-122401) 2024-07-30 08:50:30 +00:00
fileinput.py
fnmatch.py
fractions.py gh-82017: Support as_integer_ratio() in the Fraction constructor (GH-120271) 2024-07-19 08:06:53 +03:00
ftplib.py Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
functools.py gh-119180: Add `annotationlib` module to support PEP 649 (#119891) 2024-07-23 21:16:50 +00:00
genericpath.py
getopt.py Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
getpass.py
gettext.py
glob.py GH-116380: Move pathlib-specific code from `glob` to `pathlib._abc`. (#120011) 2024-06-07 17:59:34 +01:00
graphlib.py
gzip.py gh-112346: Always set OS byte to 255, simpler gzip.compress function. (GH-120486) 2024-06-15 18:46:39 +00:00
hashlib.py gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
heapq.py gh-119721: Integrate documentation fixes into heapq module docstring. (gh-119722) 2024-05-29 11:39:34 -05:00
hmac.py
imaplib.py Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
inspect.py gh-119180: Add `annotationlib` module to support PEP 649 (#119891) 2024-07-23 21:16:50 +00:00
io.py
ipaddress.py gh-120128: fix description of argument to ipaddress.collapse_addresses() (#120131) 2024-06-06 00:52:40 +03:00
keyword.py
linecache.py gh-122170: Handle ValueError raised by os.stat() in linecache (GH-122176) 2024-07-27 10:10:42 +00:00
locale.py gh-91565: Replace bugs.python.org links with Devguide/GitHub ones (GH-91568) 2024-04-01 13:02:07 +00:00
lzma.py gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
mailbox.py gh-117467: Add preserving of mailbox owner on flush (GH-117510) 2024-04-04 13:32:53 +03:00
mimetypes.py Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
modulefinder.py
netrc.py
ntpath.py gh-120417: Remove unused imports in the stdlib (#120420) 2024-06-12 20:56:42 +02:00
nturl2path.py
numbers.py
opcode.py gh-120780: Show attribute name for LOAD_SPECIAL in dis output (#120781) 2024-06-20 07:07:24 -07:00
operator.py gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
optparse.py
os.py GH-119169: Simplify `os.walk()` exception handling (#121435) 2024-07-08 17:41:01 +01:00
pdb.py gh-121450: Make inline breakpoints use the most recent pdb instance (#121451) 2024-07-10 19:54:27 -07:00
pickle.py gh-122311: Fix some error messages in pickle (GH-122386) 2024-07-29 11:49:13 +03:00
pickletools.py
pkgutil.py
platform.py gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
plistlib.py
poplib.py
posixpath.py pathlib ABCs: remove duplicate `realpath()` implementation. (#119178) 2024-06-05 18:54:50 +01:00
pprint.py
profile.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
pstats.py gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
pty.py gh-118824: Remove deprecated `master_open` and `slave_open` from `pty` (#118826) 2024-05-28 16:42:35 +03:00
py_compile.py
pyclbr.py
pydoc.py gh-122129: Improve support of method descriptors and wrappers in the help title (GH-122157) 2024-07-23 20:45:21 +03: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-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
reprlib.py
rlcompleter.py gh-113978: Ignore warnings on text completion inside REPL (#113979) 2024-05-21 18:28:21 +02:00
runpy.py
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
shutil.py GH-73991: Use same signature for `shutil._rmtree_[un]safe()`. (#120517) 2024-06-18 22:15:18 +01:00
signal.py
site.py gh-121790: Fix interactive console initialization (#121793) 2024-07-16 00:24:18 +02: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-122133: Rework pure Python socketpair tests to avoid use of importlib.reload. (#122493) 2024-07-31 10:24:15 +02:00
socketserver.py
sre_compile.py
sre_constants.py
sre_parse.py
ssl.py
stat.py gh-120417: Remove unused imports in the stdlib (#120420) 2024-06-12 20:56:42 +02:00
statistics.py gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
string.py
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-121381 Remove subprocess._USE_VFORK escape hatch (#121383) 2024-07-30 18:39:54 -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-121999: Change default tarfile filter to 'data' (GH-122002) 2024-07-26 16:34:13 +02:00
tempfile.py
textwrap.py
this.py
threading.py gh-121474: Add threading.Barrier parties arg sanity check. (GH-121480) 2024-07-30 11:53:07 +03:00
timeit.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
token.py
tokenize.py
trace.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
traceback.py gh-99180: Make `StackSummary.should_show_carets` private (#119554) 2024-05-25 17:08:32 +00:00
tracemalloc.py
tty.py
turtle.py
types.py
typing.py gh-119180: Add `annotationlib` module to support PEP 649 (#119891) 2024-07-23 21:16:50 +00:00
uuid.py
warnings.py gh-122088: Copy the coroutine status of the underlying callable in `@warnings.deprecated` (#122086) 2024-07-23 10:59:28 +01:00
wave.py
weakref.py
webbrowser.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
zipapp.py
zipimport.py gh-122188: Move magic number to its own file (#122243) 2024-07-30 15:31:05 -04:00