[issue22271] Deprecate PyUnicode_AsUnicode(): emit a DeprecationWarning

2017-06-27 Thread STINNER Victor
STINNER Victor added the comment: Sorry I lost track of this issue, I just close it. Note: Serhiy recently worked on wchar_t functions of PyUnicodeObject to detect embedded null characters, see for example bpo-30708. -- resolution: -> out of date stage: -> resolved status: open ->

[issue22271] Deprecate PyUnicode_AsUnicode(): emit a DeprecationWarning

2014-09-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be better to emit a warning only at compile time. End user of compiled extension can't do anything with a warning emitted at run time, only its author can avoid it. -- nosy: +serhiy.storchaka ___ Python

[issue22271] Deprecate PyUnicode_AsUnicode(): emit a DeprecationWarning

2014-09-03 Thread STINNER Victor
STINNER Victor added the comment: It would be better to emit a warning only at compile time. End user of compiled extension can't do anything with a warning emitted at run time, only its author can avoid it. DeprecatedWarning warnings are silent by default. So it will not annoy users.

[issue22271] Deprecate PyUnicode_AsUnicode(): emit a DeprecationWarning

2014-09-01 Thread STINNER Victor
STINNER Victor added the comment: The deprecate PyUnicode_AsUnicode(), we should stop using it in Python itself. Here is the first step: issue #22323, rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() (to not call PyUnicode_AsUnicode() anymore). --

[issue22271] Deprecate PyUnicode_AsUnicode(): emit a DeprecationWarning

2014-08-24 Thread STINNER Victor
New submission from STINNER Victor: With the PEP 393 implemented in Python 3.3, PyUnicode_AsUnicode() and all similar functions have to convert the compact string to a heavy wchar_t* string (UCS-4 on Linux: 4 bytes per character, UTF-16 on Windows: 2 or 4 bytes per character) which is stored