bpo-46006: Fix _PyUnicode_EqualToASCIIId() for interned strings by vstinner · Pull Request #30123 · python/cpython

Fix string comparisons for subinterpreters: no longer make the assumption
that two interned strings are not equal if they have different different
memory addresses. This assumption is no longer true since interned
strings have been made per interpreter in Python 3.10.

Fix _PyUnicode_EqualToASCIIId() and type update_slot() functions.

The change makes update_slot() a little bit less efficient:
update_slot() now compares the strings contents, rather than
comparing strings memory addresses.

https://bugs.python.org/issue46006