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 commented on 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 commented on 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 commented on 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 commented on 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 commented on 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…