This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Arfrever, eryksun, ezio.melotti, pitrou, serhiy.storchaka, vstinner
Date 2016-11-05.12:05:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1478347513.39.0.0550070893208.issue19569@psf.upfronthosting.co.za>
In-reply-to
Content
Proposed patch marks most deprecated functions. Code is rewritten for using non-deprecated functions if possible. Unfortunately some deprecated function still are used in the code and can't be easier replaced. They are left not marked.

* PyEval_ReleaseLock() is used in Python/pystate.c. It can't be replaced with PyEval_ReleaseThread() since the latter don't accept NULL.

* Py_UNICODE (currently an alias of wchar_t) is used in a number of deprecated functions and bridges between deprecated and new APIs. Maybe it can be just replaced with wchar_t.

* Macros PyUnicode_GET_SIZE, PyUnicode_GET_DATA_SIZE, PyUnicode_AS_UNICODE, PyUnicode_AS_DATA, functions PyUnicode_AsUnicode and PyUnicode_AsUnicodeAndSize are used in a number of places. They can't be easily replaced with wchar-based functions since they return a borrowed reference to cached representation.

* PyUnicode_FromUnicode, PyUnicode_EncodeDecimal and PyUnicode_TransformDecimalToASCII are used only in Modules/_testcapimodule.c. I think we should write tests for modern APIs and eliminate tests for deprecated APIs. Or temporary silence compiler warning in test functions.

* _PyUnicode_ToLowercase, _PyUnicode_ToUppercase and corresponding public macros Py_UNICODE_TOLOWER and Py_UNICODE_TOUPPER are used in Modules/_sre.c (this is a bug in regex implementation). The problem is that more modern functions _PyUnicode_ToLowerFull and _PyUnicode_ToUpperFull is a private API.

All these cases needs separate issues.
History
Date User Action Args
2016-11-05 12:05:13serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner, ezio.melotti, Arfrever, eryksun
2016-11-05 12:05:13serhiy.storchakasetmessageid: <1478347513.39.0.0550070893208.issue19569@psf.upfronthosting.co.za>
2016-11-05 12:05:13serhiy.storchakalinkissue19569 messages
2016-11-05 12:05:11serhiy.storchakacreate