Issue 10439: PyCodec C API is not documented in reST (original) (raw)

Created on 2010-11-17 00:08 by belopolsky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue10439.1.patch eli.bendersky,2010-11-20 12:26
issue10439.2.patch eli.bendersky,2010-11-20 13:18
issue10439.3.patch eli.bendersky,2010-11-20 13:22
Messages (11)
msg121329 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-11-17 00:08
Python Codec Registry and support functions are well documented in codecs.h header file. It should be easy to convert that to reST.
msg121603 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2010-11-20 10:42
I will write a codecs.rst for this. Any suggestion of where in c-api/index.html it should be linked?
msg121606 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-11-20 10:51
Please call it codec.rst. It is probably best placed under "utilities".
msg121613 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2010-11-20 11:27
While preparing a .rst document for this, I ran into a possible inaccuracy in a comment in codecs.h: /* Lookup the error handling callback function registered under the name error. As a special case NULL can be passed, in which case the error handling callback for "strict" will be returned. */ PyAPI_FUNC(PyObject *) PyCodec_LookupError(const char *name); ---- The problem may be with the phrase "under the name error". Shouldn't it be just "under *name*"?
msg121614 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-11-20 11:31
Yes, apparently the parameter was (intended to be) called "error" at some point. Can you put the correction in your patch?
msg121620 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2010-11-20 12:26
Submitting a patch. What was touched: 1. Include/codecs.h - minor inaccuracy and inconsistency in a comment 2. Doc/c-api/codec.rst - new reST documentation file for the codecs.h C API 3. Doc/c-api/utilities.rst - for linking to codec.rst, per Georg's suggestion
msg121629 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-11-20 13:02
Thanks for the patch, it looks good, I have 2 remarks though: - "under the name name" could be replaced by "under the given name". - "The *search_function*'s refcount is incremented by this function." This information is not useful to the caller - she just wants to know whether she still owns the reference she had before. Most probably here, the refcount is incremented because the object is stored in a list; the caller still owns the reference to the parameter, like most functions of the API, and there is nothing to say about refcounts here.
msg121632 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2010-11-20 13:18
Amaury, Thanks for the review & comments. I'm attaching a fixed patch.
msg121633 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-11-20 13:18
Please also keep to 3-space indentation in directives.
msg121636 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2010-11-20 13:22
Georg, Thanks. Submitting fixed patch with 3-space indentation in directives.
msg121640 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-11-20 13:45
Reviewed and applied in r86562. Thanks!
History
Date User Action Args
2022-04-11 14:57:09 admin set github: 54648
2010-11-20 13:45:29 georg.brandl set status: open -> closedresolution: fixedmessages: +
2010-11-20 13:22:53 eli.bendersky set files: + issue10439.3.patchmessages: +
2010-11-20 13🔞53 georg.brandl set messages: +
2010-11-20 13🔞06 eli.bendersky set files: + issue10439.2.patchmessages: +
2010-11-20 13:02:03 amaury.forgeotdarc set nosy: + amaury.forgeotdarcmessages: +
2010-11-20 12:26:55 eli.bendersky set files: + issue10439.1.patchkeywords: + patchmessages: +
2010-11-20 11:31:10 georg.brandl set messages: +
2010-11-20 11:27:09 eli.bendersky set messages: +
2010-11-20 10:51:10 georg.brandl set nosy: + georg.brandlmessages: +
2010-11-20 10:42:57 eli.bendersky set nosy: + eli.benderskymessages: +
2010-11-17 01:04:27 ezio.melotti set nosy: + ezio.melotti
2010-11-17 00:08:55 belopolsky create