classification
Title: UCS4 support functions are not implemented
Type: behavior Stage: resolved
Components: Documentation, Unicode Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: benjamin.peterson, docs@python, ezio.melotti, lemburg, python-dev, serhiy.storchaka, vstinner
Priority: normal Keywords:

Created on 2016-12-27 19:13 by serhiy.storchaka, last changed 2016-12-28 07:20 by serhiy.storchaka. This issue is now closed.

Messages (5)
msg284126 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-12-27 19:13
There is a special section in the documentation of Unicode Objects C API: UCS4 Support.

https://docs.python.org/3/c-api/unicode.html#ucs4-support

It documents utility functions that work on strings of Py_UCS4 characters like Py_UCS4_strlen(), Py_UCS4_strcpy(), etc. But none of these functions is implemented. May be the documentation should be just removed?
msg284141 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-12-27 23:18
I recall that the very first implementation of the PEP 393 (compact strings) was heavily based on UCS4. Slowly, I optimized the code by specializing functions to each kind of string (ACSII, Latin1, UCS2, UCS4).
msg284142 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-12-27 23:45
Py_UCS4_strlen() added by:

changeset:   72475:8beaa9a37387
user:        Martin v. Löwis <martin@v.loewis.de>
date:        Wed Sep 28 07:41:54 2011 +0200
files:       ...
description:
Implement PEP 393.


Removed by:

changeset:   73236:80a7ab9ac29f
user:        Martin v. Löwis <martin@v.loewis.de>
date:        Mon Oct 31 08:40:56 2011 +0100
files:       Include/unicodeobject.h Objects/unicodeobject.c Objects/uniops.h
description:
Drop Py_UCS4_ functions. Closes #13246.


80a7ab9ac29f came before Python 3.3.0:

haypo@selma$ hg log -r v3.3.0
changeset:   79242:bd8afb90ebf2
branch:      3.3
tag:         v3.3.0
parent:      79237:cb84dcb35114
user:        Georg Brandl <georg@python.org>
date:        Sat Sep 29 09:44:17 2012 +0200
files:       Lib/test/test_sys.py
description:
Fix test_sys.test_implementation for final releases.


Py_UCS4_strlen() was documented but was never part of any public Python release.

=> you can remove the doc.
msg284156 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-12-28 07:20
New changeset 29d46d29e169 by Serhiy Storchaka in branch '3.5':
Issue #29087: Removed the documentation of non-existing UCS4 support functions.
https://hg.python.org/cpython/rev/29d46d29e169

New changeset e44b6b01c8cf by Serhiy Storchaka in branch '3.6':
Issue #29087: Removed the documentation of non-existing UCS4 support functions.
https://hg.python.org/cpython/rev/e44b6b01c8cf

New changeset 0ec4befef7e0 by Serhiy Storchaka in branch 'default':
Issue #29087: Removed the documentation of non-existing UCS4 support functions.
https://hg.python.org/cpython/rev/0ec4befef7e0
msg284157 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-12-28 07:20
Thanks Victor.
History
Date User Action Args
2016-12-28 07:20:58serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg284157

stage: resolved
2016-12-28 07:20:17python-devsetnosy: + python-dev
messages: + msg284156
2016-12-27 23:45:28vstinnersetmessages: + msg284142
2016-12-27 23:18:51vstinnersetmessages: + msg284141
2016-12-27 19:13:23serhiy.storchakacreate