[issue10435] Document unicode C-API in reST

2016-04-30 Thread Berker Peksag
Berker Peksag added the comment: This is a duplicate of issue 1944. -- nosy: +berker.peksag resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Document PyUnicode_* API ___ Python tracker

[issue10435] Document unicode C-API in reST

2015-05-03 Thread Mark Lawrence
Mark Lawrence added the comment: Py_UNICODE_TOLOWER, Py_UNICODE_TOUPPER and Py_UNICODE_TOTITLE are all labelled deprecated in 3.3 and presumably can be removed completely. Alternatively should these like many others be scheduled for removal in 4.0? --

[issue10435] Document unicode C-API in reST

2015-04-30 Thread Mark Lawrence
Mark Lawrence added the comment: List of just about everything that's in the header file but not in the rst file as I'm not sure which bits you normally wouldn't bother with. Py_USING_UNICODE Py_UNICODE_SIZE Py_UNICODE_WIDE Py_UNICODE_COPY Py_UNICODE_FILL Py_UNICODE_HIGH_SURROGATE Py_UNICODE_LO

[issue10435] Document unicode C-API in reST

2015-04-21 Thread Mark Lawrence
Mark Lawrence added the comment: Okay Alexander I'll give it a go, but not tonight :) -- ___ Python tracker ___ ___ Python-bugs-list m

[issue10435] Document unicode C-API in reST

2015-04-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Sorry for the broken link, the correct header file is Include/unicodeobject.h -- ___ Python tracker ___ __

[issue10435] Document unicode C-API in reST

2015-04-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Mark, Unicode C-APIs have changed a lot since this issue was opened, but I think many of the listed functions are still present but not properly documented. You can help by checking the Include/unicode.h file and compiling a list of functions that are t

[issue10435] Document unicode C-API in reST

2015-04-21 Thread Mark Lawrence
Mark Lawrence added the comment: I've looked at c-api/unicode.rst and I can't see any correlation between it and the names listed here in msg121302. So either this was never completed or it's been all change in the mean time, so could somebody take a look please. -- nosy: +BreamoreBoy

[issue10435] Document unicode C-API in reST

2010-11-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Wed, Nov 17, 2010 at 5:20 PM, Marc-Andre Lemburg > wrote: > .. >> -/* Encodes a Unicode object and returns the result as Python string >> +/* Encodes a Unicode object and retu

[issue10435] Document unicode C-API in reST

2010-11-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Nov 17, 2010 at 5:20 PM, Marc-Andre Lemburg wrote: .. > -/* Encodes a Unicode object and returns the result as Python string > +/* Encodes a Unicode object and returns the result as Python bytes >    object. */ > > > PyUnicode_AsEncodedObject() en

[issue10435] Document unicode C-API in reST

2010-11-20 Thread Simon Cross
Changes by Simon Cross : -- nosy: +hodgestar ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue10435] Document unicode C-API in reST

2010-11-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Thanks for your work on this. Please see my comments below: --- Include/unicodeobject.h (revision 86478) +++ Include/unicodeobject.h (working copy) @@ -737,7 +737,7 @@ const char *errors /* error handling */ ); -/* Encodes a Un

[issue10435] Document unicode C-API in reST

2010-11-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > If you have time, please take a look at > PyUnicode_As{En,De}codedObject() and > PyUnicode_As{En,De}DecodedUnicode() documentation in the attached > patch. Thanks. I'll try to have a look later tonight. --

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like I misunderstood what PyUnicode_As{En,De}codedObject() and PyUnicode_As{En,De}codedUnicode() functions are designed to do. Attaching a corrected patch, issue10435a.diff. -- Added file: http://bugs.python.org/file19622/issue10435a.di

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > I agree and will handle this in #10435 because codecs.h s/#10435/#10439/ -- ___ Python tracker ___ ___

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Nov 16, 2010 at 7:19 PM, Marc-Andre Lemburg wrote: .. >> * Decoding converts a bytes object encoded using a particular >> character set encoding to a string object. >> """ >> http://docs.python.org/dev/library/codecs.html?highlight=codecs#codecs.

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Tue, Nov 16, 2010 at 5:54 PM, Marc-Andre Lemburg > wrote: >> >> Marc-Andre Lemburg added the comment: >> >> Please note that PyCodec_Encode()/PyCodec_Decode() will return wha

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch documents all previously undocumented unicode C API functions. Note that for the PyUnicode_As{En,De}codedObject() and PyUnicode_As{En,De}DecodedUnicode() functions I attempted to capture what they are supposed to do rather than what the

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Nov 16, 2010 at 5:54 PM, Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > Please note that PyCodec_Encode()/PyCodec_Decode() will return whatever the > codec returns for these operations. > > The codec system is not limite

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Please note that PyCodec_Encode()/PyCodec_Decode() will return whatever the codec returns for these operations. The codec system is not limited to converting between Unicode and bytes only. A typical example is a same-type codec such as rot13 that only tr

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: PyUnicode_AsDecodedObject() and PyUnicode_AsDecodedUnicode() appear to be broken as well: both start with a PyUnicode_Check(unicode) and then pass unicode to PyCodec_Decode() which expects bytes. -- ___ Pytho

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +haypo, lemburg, loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Nov 16, 2010 at 10:38 AM, M.-A. Lemburg wrote: > Alexander Belopolsky wrote: .. >> I also have a similar question about C API.  Here, in absence of >> __all__, the answer should be clear: all symbols in public header >> files should start with eit

[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : The following C-APIs are only documented in comments inside unicode.h: PyUnicode_GetMax PyUnicode_Resize PyUnicode_InternImmortal PyUnicode_FromOrdinal PyUnicode_GetDefaultEncoding PyUnicode_AsDecodedObject PyUnicode_AsDecodedUnicode PyUnicode_AsEncoded