cpython/Objects
Eric Snow 87be8d9522
gh-100227: Make the Global Interned Dict Safe for Isolated Interpreters (gh-102925)
This is effectively two changes.  The first (the bulk of the change) is where we add _Py_AddToGlobalDict() (and _PyRuntime.cached_objects.main_tstate, etc.).  The second (much smaller) change is where we update PyUnicode_InternInPlace() to use _Py_AddToGlobalDict() instead of calling PyDict_SetDefault() directly.

Basically, _Py_AddToGlobalDict() is a wrapper around PyDict_SetDefault() that should be used whenever we need to add a value to a runtime-global dict object (in the few cases where we are leaving the container global rather than moving it to PyInterpreterState, e.g. the interned strings dict).  _Py_AddToGlobalDict() does all the necessary work to make sure the target global dict is shared safely between isolated interpreters.  This is especially important as we move the obmalloc state to each interpreter (gh-101660), as well as, potentially, the GIL (PEP 684).

https://github.com/python/cpython/issues/100227
2023-03-22 18:30:04 -06:00
..
clinic gh-101825: Clarify that as_integer_ratio() output is always normalized (#101843) 2023-02-27 19:11:28 +00:00
stringlib gh-99537: Use Py_SETREF() function in C code (#99657) 2022-11-22 13:39:11 +01:00
abstract.c GH-101291: Rearrange the size bits in PyLongObject (GH-102464) 2023-03-22 14:49:51 +00:00
boolobject.c GH-101291: Rearrange the size bits in PyLongObject (GH-102464) 2023-03-22 14:49:51 +00:00
bytearrayobject.c gh-101765: Fix SystemError / segmentation fault in iter __reduce__ when internal access of builtins.__dict__ exhausts the iterator (#101769) 2023-02-24 15:02:04 -08:00
bytes_methods.c gh-93033: Use wmemchr in stringlib (GH-93034) 2022-05-24 10:45:31 +09:00
bytesobject.c gh-102304: Move the Total Refcount to PyInterpreterState (gh-102545) 2023-03-21 11:46:09 -06:00
call.c gh-81057: Move the global Dict-Related Versions to _PyRuntimeState (gh-99497) 2022-11-16 10:37:29 -07:00
capsule.c gh-99537: Use Py_SETREF() function in C code (#99657) 2022-11-22 13:39:11 +01:00
cellobject.c gh-99300: Use Py_NewRef() in Objects/ directory (#99332) 2022-11-10 16:27:32 +01:00
classobject.c gh-99537: Use Py_SETREF(var, NULL) in C code (#99687) 2022-11-23 14:57:50 +01:00
codeobject.c gh-102381: don't call watcher callback with dead object (#102382) 2023-03-07 17:10:58 -07:00
complexobject.c gh-99300: Use Py_NewRef() in Objects/ directory (#99332) 2022-11-10 16:27:32 +01:00
descrobject.c GH-100942: Fix incorrect cast in property_copy(). (#100965) 2023-01-12 16:13:56 -06:00
dictnotes.txt bpo-46845: Reduce dict size when all keys are Unicode (GH-31564) 2022-03-02 08:09:28 +09:00
dictobject.c gh-102304: Move the Total Refcount to PyInterpreterState (gh-102545) 2023-03-21 11:46:09 -06:00
enumobject.c gh-99300: Use Py_NewRef() in Objects/ directory (#99335) 2022-11-10 22:22:02 +01:00
exception_handling_notes.txt gh-96455: update example in exception_handling_notes.txt to the 3.11RC bytecode (GH-96456) 2022-09-01 14:21:39 +01:00
exceptions.c gh-102406: replace exception chaining by PEP-678 notes in codecs (#102407) 2023-03-21 21:36:31 +00:00
fileobject.c gh-99537: Use Py_SETREF(var, NULL) in C code (#99687) 2022-11-23 14:57:50 +01:00
floatobject.c gh-101825: Clarify that as_integer_ratio() output is always normalized (#101843) 2023-02-27 19:11:28 +00:00
frame_layout.md GH-96421: Insert shim frame on entry to interpreter (GH-96319) 2022-11-10 12:34:57 +00:00
frameobject.c gh-102859: Remove JUMP_IF_FALSE_OR_POP and JUMP_IF_TRUE_OR_POP (#102870) 2023-03-22 18:10:48 +00:00
funcobject.c gh-100227: Move func_state.next_version to PyInterpreterState (gh-102334) 2023-03-08 15:56:36 -07:00
genericaliasobject.c gh-101765: Fix SystemError / segmentation fault in iter __reduce__ when internal access of builtins.__dict__ exhausts the iterator (#101769) 2023-02-24 15:02:04 -08:00
genobject.c gh-79940: add introspection API for asynchronous generators to inspect module (#11590) 2023-03-11 18:49:40 +05:30
interpreteridobject.c
iterobject.c gh-101892: Fix SystemError when a callable iterator call exhausts the iterator (#101896) 2023-03-04 19:51:29 +05:30
listobject.c GH-101291: Rearrange the size bits in PyLongObject (GH-102464) 2023-03-22 14:49:51 +00:00
listsort.txt
lnotab_notes.txt
locations.md GH-88116: Use a compact format to represent end line and column offsets. (GH-91666) 2022-04-21 16:10:37 +01:00
longobject.c GH-101291: Rearrange the size bits in PyLongObject (GH-102464) 2023-03-22 14:49:51 +00:00
memoryobject.c gh-99300: Use Py_NewRef() in Objects/ directory (#99354) 2022-11-10 23:58:07 +01:00
methodobject.c gh-99300: Use Py_NewRef() in Objects/ directory (#99354) 2022-11-10 23:58:07 +01:00
moduleobject.c gh-101758: Clean Up Uses of Import State (gh-101919) 2023-02-15 15:32:31 -07:00
namespaceobject.c gh-99300: Replace Py_INCREF() with Py_NewRef() (#99530) 2022-11-16 18:34:24 +01:00
object.c gh-102304: Move the Total Refcount to PyInterpreterState (gh-102545) 2023-03-21 11:46:09 -06:00
object_layout.md GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
object_layout_312.gv GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
object_layout_312.png GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
object_layout_full_312.gv GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
object_layout_full_312.png GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
obmalloc.c gh-102255: Improve build support for Windows API partitions (GH-102256) 2023-03-09 21:09:12 +00:00
odictobject.c gh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives (in Objects/) (#102218) 2023-03-08 17:03:18 +00:00
picklebufobject.c gh-91118: Fix docstrings that do not honor --without-doc-strings (#31769) 2022-04-17 20:39:32 -07:00
rangeobject.c GH-101291: Rearrange the size bits in PyLongObject (GH-102464) 2023-03-22 14:49:51 +00:00
README
setobject.c gh-99845: Use size_t type in __sizeof__() methods (#99846) 2022-11-30 17:22:52 +01:00
sliceobject.c GH-101291: Rearrange the size bits in PyLongObject (GH-102464) 2023-03-22 14:49:51 +00:00
structseq.c gh-102304: Move the Total Refcount to PyInterpreterState (gh-102545) 2023-03-21 11:46:09 -06:00
tupleobject.c gh-102304: Move the Total Refcount to PyInterpreterState (gh-102545) 2023-03-21 11:46:09 -06:00
typeobject.c GH-101291: Rearrange the size bits in PyLongObject (GH-102464) 2023-03-22 14:49:51 +00:00
typeslots.inc
typeslots.py
unicodectype.c bpo-46670: Remove unused macros in the Objects directory (GH-31193) 2022-02-07 16:21:41 +01:00
unicodeobject.c gh-100227: Make the Global Interned Dict Safe for Isolated Interpreters (gh-102925) 2023-03-22 18:30:04 -06:00
unicodetype_db.h bpo-47243: Duplicate entry in 'Objects/unicodetype_db.h' (GH-32376) 2022-09-28 06:57:14 -07:00
unionobject.c gh-99300: Replace Py_INCREF() with Py_NewRef() (#99530) 2022-11-16 18:34:24 +01:00
weakrefobject.c gh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives (in Objects/) (#102218) 2023-03-08 17:03:18 +00:00

Source files for various builtin objects