You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Schedule removal of PyUnicode_AsDecoded/Encoded functions #132798
Before we schedule it, remember to do a code search first:
IMO now it's too late for the 3.14 release cycle. It would be better to schedule such removal at the start of a new dev cycle, such as Python 3.15. Someone also has to check if these functions are used in the wild (ex: run a code search).
Activity
hugovk commentedon Apr 22, 2025
Before we schedule it, remember to do a code search first:
Please can you do this?
For example, GitHub code search, https://grep.app, or https://hugovk.dev/blog/2022/how-to-search-5000-python-projects/.
StanFromIreland commentedon Apr 22, 2025
I did a (github) code search and found no recent uses. (Some (~4 for each) old repositories that have not been updated in the last ~8 years.)
vstinner commentedon Apr 22, 2025
A code search on PyPI top 8,000 PyPI projects found matches in 2 projects:
I used the regex:
PyUnicode_AsDecodedObject|PyUnicode_AsDecodedUnicode|PyUnicode_AsEncodedUnicode|PyUnicode_AsEncodedObject.It seems safe to remove these functions.
methane commentedon Apr 25, 2025
I am OK. But they are stable ABI. We need to convert them into abi only stable abi function that raise RuntimeError.
vstinner commentedon Apr 25, 2025
This change doesn't remove functions, it only schedules the removal.
For the API removal, we can keep the functions unchanged in the stable ABI. There is no need to raise RuntimeError.
gh-132798: Schedule removal of `PyUnicode_AsDecoded/Encoded` function…