bpo-40521: Per-interpreter interned strings by vstinner · Pull Request #20085 · python/cpython
This was referenced
vstinner
marked this pull request as ready for review
vstinner
changed the title
[WIP] bpo-40521: Per-interpreter interned strings
bpo-40521: Per-interpreter interned strings
Make the Unicode dictionary of interned strings compatible with subinterpreters. Remove the INTERN_NAME_STRINGS macro in typeobject.c: names are always now interned (even if EXPERIMENTAL_ISOLATED_SUBINTERPRETERS macro is defined). _PyUnicode_ClearInterned() now uses PyDict_Next() to no longer allocate memory, to ensure that the interned dictionary is cleared.
vstinner
deleted the
unicode_interned_subinterp
branch
adorilson pushed a commit to adorilson/cpython that referenced this pull request
Make the Unicode dictionary of interned strings compatible with subinterpreters. Remove the INTERN_NAME_STRINGS macro in typeobject.c: names are always now interned (even if EXPERIMENTAL_ISOLATED_SUBINTERPRETERS macro is defined). _PyUnicode_ClearInterned() now uses PyDict_Next() to no longer allocate memory, to ensure that the interned dictionary is cleared.
vstinner added a commit that referenced this pull request
This was referenced
vstinner added a commit that referenced this pull request
…GH-20085)" (GH-30422) (GH-30425) This reverts commit ea25180. Keep "assert(interned == NULL);" in _PyUnicode_Fini(), but only for the main interpreter. Keep _PyUnicode_ClearInterned() changes avoiding the creation of a temporary Python list object. Leave the PyInterpreterState structure unchanged to keep the ABI backward compatibility with Python 3.10.0: rename the "interned" member to "unused_interned". (cherry picked from commit 35d6540)
ericsnowcurrently added a commit to ericsnowcurrently/cpython that referenced this pull request