Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.13] gh-113993: Don't immortalize in PyUnicode_InternInPlace; keep immortalizing in other API (GH-121364) #121854

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

encukou
Copy link
Member

@encukou encukou commented Jul 16, 2024

  • Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal, clarify docs

  • Document immortality in some functions that take const char *

This is PyUnicode_InternFromString;
PyDict_SetItemString, PyObject_SetAttrString;
PyObject_DelAttrString; PyUnicode_InternFromString; and the PyModule_Add convenience functions.

Always point out a non-immortalizing alternative.

  • Don't immortalize user-provided attr names in _ctypes (cherry picked from commit b4aedb2)

📚 Documentation preview 📚: https://cpython-previews--121854.org.readthedocs.build/

… keep immortalizing in other API (pythonGH-121364)

* Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal, clarify docs

* Document immortality in some functions that take `const char *`

This is PyUnicode_InternFromString;
PyDict_SetItemString, PyObject_SetAttrString;
PyObject_DelAttrString; PyUnicode_InternFromString;
and the PyModule_Add convenience functions.

Always point out a non-immortalizing alternative.

* Don't immortalize user-provided attr names in _ctypes
(cherry picked from commit b4aedb2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@encukou encukou merged commit 4395d68 into python:3.13 Jul 17, 2024
36 checks passed
@encukou encukou deleted the backport-b4aedb2-3.13 branch July 17, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants