Repository navigation
Document PyUnicode_* API #46236
Copy link
Copy link
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-unicodetype-featureA feature request or enhancementA feature request or enhancement
Description
| BPO | 1944 |
|---|---|
| Nosy | @malemburg, @birkenfeld, @vstinner, @avassalotti, @berkerpeksag, @vadmium, @serhiy-storchaka, @shihai1991, @furkanonder |
| PRs | |
| Files |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = None
created_at = <Date 2008-01-27.06:26:42.019>
labels = ['type-feature', 'docs']
title = 'Document PyUnicode_* API'
updated_at = <Date 2020-06-21.12:39:22.129>
user = 'https://github.com/avassalotti'bugs.python.org fields:
activity = <Date 2020-06-21.12:39:22.129>
actor = 'shihai1991'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2008-01-27.06:26:42.019>
creator = 'alexandre.vassalotti'
dependencies = []
files = ['13717']
hgrepos = []
issue_num = 1944
keywords = ['patch']
message_count = 9.0
messages = ['61734', '86116', '86121', '89100', '185552', '185725', '264571', '264575', '368582']
nosy_count = 11.0
nosy_names = ['lemburg', 'georg.brandl', 'vstinner', 'alexandre.vassalotti', 'donlorenzo', 'docs@python', 'berker.peksag', 'martin.panter', 'serhiy.storchaka', 'shihai1991', 'furkanonder']
pr_nums = ['20011']
priority = 'normal'
resolution = None
stage = 'patch review'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue1944'
versions = ['Python 3.5', 'Python 3.6'][edit @encukou]: Converting the lists below to checkboxes:
- PyUnicode_Resize
-
PyUnicode_InternImmortal(removed in 3.12) - PyUnicode_GetDefaultEncoding
-
PyUnicode_SetDefaultEncoding(removed in 3.2) - PyUnicode_BuildEncodingMap
- PyUnicode_FromFormatV
- PyUnicode_UTF7
- PyUnicode_AsEncodedObject
- PyUnicode_FromOrdinal
- PyUnicode_DecodeFSDefault
- PyUnicode_DecodeFSDefaultAndSize
- PyUnicode_DecodeUTF7
- PyUnicode_DecodeUTF7Stateful
- PyUnicode_EncodeDecimal
- PyUnicode_EncodeUTF7
- PyUnicode_FromFormat
- PyUnicode_FromString
- PyUnicode_FromStringAndSize
- PyUnicode_GetMax
- PyUnicode_Partition
- PyUnicode_RPartition
- PyUnicode_RSplit
- PyUnicode_IsIdentifier
- PyUnicode_Append
- PyUnicode_AppendAndDel
- Py_UNICODE_REPLACEMENT_CHARACTER
- PyUnicodeIter_Type
- PyUnicode_AsDecodedObject
- PyUnicode_AsDecodedUnicode
- PyUnicode_AsEncodedUnicode
-
_PyUnicode_ClearStaticStrings(removed in 3.9) -
_PyUnicode_EQ(removed in 3.14) -
_PyUnicode_FromId(private)
Linked PRs
- gh-46236: Add missing document of
PyUnicode_DecodeCodePageStateful#127934 - [3.13] gh-46236: Document
PyUnicode_DecodeCodePageStateful(GH-127934) #129961 - [3.12] gh-46236: Document
PyUnicode_DecodeCodePageStateful(GH-127934) #129962 - gh-46236: PyUnicode docs improvements #129966
- gh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and PyUnicode_RPartition #130191
- gh-46236: Add missing PyUnicode_GetDefaultEncoding() doc #130335
- [3.13] gh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and PyUnicode_RPartition (GH-130191) #130360
- [3.12] gh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and PyUnicode_RPartition (GH-130191) #130361
- [3.13] gh-46236: Add docs for PyUnicode_GetDefaultEncoding() doc (GH-130335) #130511
- [3.12] gh-46236: Add docs for PyUnicode_GetDefaultEncoding() doc (GH-130335) #130512
- gh-46236: Add missing PyUnicode_Append() doc #130531
- gh-46236: Add missing PyUnicode_FromOrdinal() doc #132040
- [3.13] gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040) #132521
- gh-46236: Add missing PyUnicode_Resize() doc #132628
- gh-46236: Document PyUnicode_Resize #132703
- gh-46236: Add Py_UNICODE_REPLACEMENT_CHARACTER doc #132706
- gh-46236: Document
PyUnicodeIter_Type#132925 - [3.13] gh-46236: Document
PyUnicodeIter_Type(GH-132925) #133149 - gh-46236: Document PyUnicode_BuildEncodingMap #133270
- [3.14] gh-46236: Document PyUnicode_BuildEncodingMap (GH-133270) #133769
- [3.13] gh-46236: Document PyUnicode_BuildEncodingMap #133770
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-unicodetype-featureA feature request or enhancementA feature request or enhancement
Projects
- StatusShow more project fieldsTodo
Activity
serhiy-storchaka commentedon Apr 30, 2016
PyUnicode_DecodeCodePageStateful
Following functions likely should be wrapped with "#ifndef Py_LIMITED_API":
_PyUnicode_ClearStaticStrings
_PyUnicode_EQ
_PyUnicode_FromId
vstinner commentedon May 10, 2020
"""
Following functions likely should be wrapped with "#ifndef Py_LIMITED_API":
_PyUnicode_ClearStaticStrings
_PyUnicode_EQ
_PyUnicode_FromId
"""
It's already the case since at least Python 3.7. Extract of Python 3.7 Include/unicodeobject.h:
gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934)
pythongh-46236: Document `PyUnicode_DecodeCodePageStateful` (pythonGH…
pythongh-46236: Document `PyUnicode_DecodeCodePageStateful` (pythonGH…
[3.13] gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934…
[3.12] gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934…
pythongh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and Py…
pythongh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and Py…
rruuaanng commentedon Feb 20, 2025
I have noticed that some tasks that have already been opened are not checked off. I believe we should select them.
gh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and PyUnicod…
pythongh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and Py…
pythongh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and Py…
[3.13] gh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and P…
[3.12] gh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and P…
gh-46236: Add docs for PyUnicode_GetDefaultEncoding() doc (GH-130335)
pythongh-46236: Add docs for PyUnicode_GetDefaultEncoding() doc (pyth…
pythongh-46236: Add docs for PyUnicode_GetDefaultEncoding() doc (pyth…
[3.13] gh-46236: Add docs for PyUnicode_GetDefaultEncoding() doc (GH-…
[3.12] gh-46236: Add docs for PyUnicode_GetDefaultEncoding() doc (GH-…
gh-46236: PyUnicode docs improvements (GH-129966)
gh-46236: Add missing PyUnicode_Append() doc (#130531)
rruuaanng commentedon Apr 3, 2025
@encukou Let's remove the
PyUnicode_GetMaxentry, which was removed inMisc/NEWS.d/3.10.0a1.rst.vstinner commentedon Apr 3, 2025
I checked the checkbox :-)
gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040)
pythongh-46236: Add missing PyUnicode_FromOrdinal() doc (python#132040)
[3.13] gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040) (#…
StanFromIreland commentedon Apr 18, 2025
PyUnicode_EncodeDecimalwas removed in 3.11gh-46236: Add PyUnicode_Resize() doc (#132628)
StanFromIreland commentedon Apr 22, 2025
PyUnicode_AsDecodedObject,PyUnicode_AsDecodedUnicode,PyUnicode_AsEncodedUnicode,PyUnicode_AsEncodedObjectare deprecated since3.6and should probably be removed by now, do we still want to document them?cpython/Include/unicodeobject.h
Line 351 in 05d0559
cpython/Include/unicodeobject.h
Line 364 in 05d0559
cpython/Include/unicodeobject.h
Line 400 in 05d0559
cpython/Include/unicodeobject.h
Line 378 in 05d0559
vstinner commentedon Apr 22, 2025
No, I don't think that it's worth it to document them if they are going to be removed.
gh-46236: Add Py_UNICODE_REPLACEMENT_CHARACTER doc (#132706)
StanFromIreland commentedon Apr 22, 2025
PyUnicode_FromFormatV is documented.
StanFromIreland commentedon Apr 22, 2025
I agree, though they have been deprecated for many years but there is no planned removal date that I can find. Should we just remove them now?
vstinner commentedon Apr 22, 2025
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).
StanFromIreland commentedon Apr 22, 2025
cc @serhiy-storchaka who originally deprecated them in 0093907
A new issue is probably best for this, scheduling for 3.15 seems good for now.
gh-46236: Document `PyUnicodeIter_Type` (GH-132925)
pythongh-46236: Document `PyUnicodeIter_Type` (pythonGH-132925)
pythongh-46236: Document `PyUnicodeIter_Type` (pythonGH-132925)
[3.13] gh-46236: Document `PyUnicodeIter_Type` (GH-132925) (GH-133149)
StanFromIreland commentedon May 1, 2025
The list needs to be updated, just
PyUnicode_BuildEncodingMapis left.gh-46236: Document PyUnicode_BuildEncodingMap (#133270)
pythongh-46236: Document PyUnicode_BuildEncodingMap (pythonGH-133270)
vstinner commentedon May 9, 2025
The list is complete. I close the issue. Thanks to everybody who was involved in this old issue (2008!).
[3.14] gh-46236: Document PyUnicode_BuildEncodingMap (GH-133270) (#13…
[3.13] gh-46236: Document PyUnicode_BuildEncodingMap (#133770)
pythongh-46236: Document PyUnicode_BuildEncodingMap (python#133270)
pythongh-46236: Document PyUnicode_BuildEncodingMap (python#133270)