summaryrefslogtreecommitdiffstats
path: root/Python/getargs.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #8926: getargs.c: release the buffer on errorVictor Stinner2010-06-241-4/+5
| | | | | | | - "t#" format: don't get the buffer if the object is not a pinned buffer - getbuffer(): release the buffer on error (Commit based on r82206 from py3k)
* Merged revisions 81849 via svnmerge fromVictor Stinner2010-06-081-3/+4
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81849 | victor.stinner | 2010-06-08 23:45:51 +0200 (mar., 08 juin 2010) | 7 lines PyArg_Parse*("Z#") raises an error for unknown type instead of ignoring the error and leave the pointer to the string and the size unchanged (not initialized). Fix also the type in the error message of "Z", "Z#" and "Y" formats. ........
* Recorded merge of revisions 81032 via svnmerge fromAntoine Pitrou2010-05-091-1642/+1642
| | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines Recorded merge of revisions 81029 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........ ................
* Merged revisions 76646 via svnmerge fromMark Dickinson2009-12-031-0/+1
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r76646 | mark.dickinson | 2009-12-03 10:59:46 +0000 (Thu, 03 Dec 2009) | 6 lines Issue #7414: Add missing 'case 'C'' to skipitem() in getargs.c. This was causing PyArg_ParseTupleAndKeywords(args, kwargs, "|CC", ...) to fail with a RuntimeError. Thanks Case Van Horsen for tracking down the source of this error. ........
* Merged revisions 74278 via svnmerge fromGeorg Brandl2009-08-131-1/+1
| | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ........ r74278 | sean.reifschneider | 2009-08-02 01:55:06 +0200 (So, 02 Aug 2009) | 3 lines - Issue #6624: yArg_ParseTuple with "s" format when parsing argument with NUL: Bogus TypeError detail string. ........
* Issue #6012: Add cleanup support to O& argument parsing.Martin v. Löwis2009-05-291-1/+47
|
* add a replacement API for PyCObject, PyCapsule #5630Benjamin Peterson2009-05-051-8/+26
| | | | | | All stdlib modules with C-APIs now use this. Patch by Larry Hastings
* Merged revisions ↵Benjamin Peterson2009-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 70980,71059,71225,71234,71241,71243,71249,71251,71255,71266,71299,71329,71397-71398,71486 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70980 | jack.diederich | 2009-04-01 15:26:13 -0500 (Wed, 01 Apr 2009) | 3 lines bounds check arguments to mmap.move(). All of them. Really. fixes crasher on OS X 10.5 ........ r71059 | mark.dickinson | 2009-04-02 13:39:37 -0500 (Thu, 02 Apr 2009) | 2 lines sys.long_info attributes should be ints, not longs ........ r71225 | georg.brandl | 2009-04-05 06:54:07 -0500 (Sun, 05 Apr 2009) | 1 line #5580: no need to use parentheses when converterr() argument is actually a type description. ........ r71234 | georg.brandl | 2009-04-05 08:16:35 -0500 (Sun, 05 Apr 2009) | 1 line Whitespace normalization. ........ r71241 | georg.brandl | 2009-04-05 09:48:49 -0500 (Sun, 05 Apr 2009) | 1 line #5471: fix expanduser() for $HOME set to "/". ........ r71243 | georg.brandl | 2009-04-05 10:14:29 -0500 (Sun, 05 Apr 2009) | 1 line #5432: make plistlib docstring a raw string, since it contains examples with backslash escapes. ........ r71249 | georg.brandl | 2009-04-05 11:30:43 -0500 (Sun, 05 Apr 2009) | 1 line #5444: adapt make.bat to new htmlhelp output file name. ........ r71251 | georg.brandl | 2009-04-05 12:17:42 -0500 (Sun, 05 Apr 2009) | 1 line #5298: clarify docs about GIL by using more consistent wording. ........ r71255 | georg.brandl | 2009-04-05 13:34:58 -0500 (Sun, 05 Apr 2009) | 1 line #602893: add indicator for current line in cgitb that doesnt rely on styling alone. ........ r71266 | georg.brandl | 2009-04-05 15:23:13 -0500 (Sun, 05 Apr 2009) | 1 line Normalize issue referencing style. ........ r71299 | gregory.p.smith | 2009-04-05 18:43:58 -0500 (Sun, 05 Apr 2009) | 3 lines Fixes issue5705: os.setuid() and friends did not accept the same range of values that pwd.getpwnam() returns. ........ r71329 | benjamin.peterson | 2009-04-06 16:53:33 -0500 (Mon, 06 Apr 2009) | 1 line add create_connection to __all__ #5711 ........ r71397 | georg.brandl | 2009-04-08 11:36:39 -0500 (Wed, 08 Apr 2009) | 1 line Remove redundant backtick. ........ r71398 | georg.brandl | 2009-04-08 11:39:04 -0500 (Wed, 08 Apr 2009) | 1 line Update ignore file for suspicious builder. ........ r71486 | andrew.kuchling | 2009-04-11 11:18:14 -0500 (Sat, 11 Apr 2009) | 1 line Re-word ........
* make 'c' only accept bytes and 'C' only unicode #5499Benjamin Peterson2009-04-021-10/+4
|
* Merged revisions ↵Benjamin Peterson2008-12-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 67889-67892,67895,67898,67904-67907,67912,67918,67920-67921,67923-67924,67926-67927,67930,67943 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ................ r67889 | benjamin.peterson | 2008-12-20 19:04:32 -0600 (Sat, 20 Dec 2008) | 1 line sphinx.web is long gone ................ r67890 | benjamin.peterson | 2008-12-20 19:12:26 -0600 (Sat, 20 Dec 2008) | 1 line update readme ................ r67891 | benjamin.peterson | 2008-12-20 19:14:47 -0600 (Sat, 20 Dec 2008) | 1 line there are way too many places which need to have the current version added ................ r67892 | benjamin.peterson | 2008-12-20 19:29:32 -0600 (Sat, 20 Dec 2008) | 9 lines Merged revisions 67809 via svnmerge from svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r67809 | benjamin.peterson | 2008-12-15 21:54:45 -0600 (Mon, 15 Dec 2008) | 1 line fix logic error ........ ................ r67895 | neal.norwitz | 2008-12-21 08:28:32 -0600 (Sun, 21 Dec 2008) | 2 lines Add Tarek for work on distutils. ................ r67898 | benjamin.peterson | 2008-12-21 15:00:53 -0600 (Sun, 21 Dec 2008) | 1 line compute DISTVERSION with patchlevel.py ................ r67904 | benjamin.peterson | 2008-12-22 14:44:58 -0600 (Mon, 22 Dec 2008) | 1 line less attitude ................ r67905 | benjamin.peterson | 2008-12-22 14:51:15 -0600 (Mon, 22 Dec 2008) | 1 line fix #4720: the format to PyArg_ParseTupleAndKeywords can now start with '|' ................ r67906 | benjamin.peterson | 2008-12-22 14:52:53 -0600 (Mon, 22 Dec 2008) | 1 line add NEWS note ................ r67907 | benjamin.peterson | 2008-12-22 16:12:19 -0600 (Mon, 22 Dec 2008) | 1 line silence compiler warning ................ r67912 | georg.brandl | 2008-12-23 06:37:21 -0600 (Tue, 23 Dec 2008) | 2 lines Fix missing "svn" command. ................ r67918 | georg.brandl | 2008-12-23 09:44:25 -0600 (Tue, 23 Dec 2008) | 2 lines Markup fix. ................ r67920 | benjamin.peterson | 2008-12-23 14:09:28 -0600 (Tue, 23 Dec 2008) | 1 line use a global variable, so the compiler doesn't optimize the assignment out ................ r67921 | benjamin.peterson | 2008-12-23 14:12:33 -0600 (Tue, 23 Dec 2008) | 1 line make global static ................ r67923 | benjamin.peterson | 2008-12-24 09:10:27 -0600 (Wed, 24 Dec 2008) | 1 line #4736 BufferRWPair.closed shouldn't try to call another property as a function ................ r67924 | benjamin.peterson | 2008-12-24 10:10:05 -0600 (Wed, 24 Dec 2008) | 1 line pretend exceptions don't exist a while longer ................ r67926 | tarek.ziade | 2008-12-24 13:10:05 -0600 (Wed, 24 Dec 2008) | 1 line fixed #4400 : distutils .pypirc default generated file was broken. ................ r67927 | benjamin.peterson | 2008-12-26 17:26:30 -0600 (Fri, 26 Dec 2008) | 1 line python version is included in file name now ................ r67930 | hirokazu.yamamoto | 2008-12-26 22:19:48 -0600 (Fri, 26 Dec 2008) | 2 lines Issue #4740: Use HIGHEST_PROTOCOL in pickle test. (There is no behavior difference in 2.x because HIGHEST_PROTOCOL == 2) ................ r67943 | alexandre.vassalotti | 2008-12-27 04:02:59 -0600 (Sat, 27 Dec 2008) | 2 lines Fix bogus unicode tests in pickletester. ................
* string -> bytes in error message #4745Benjamin Peterson2008-12-271-1/+1
|
* #3668: When PyArg_ParseTuple correctly parses a s* format, but raises anAntoine Pitrou2008-08-291-16/+47
| | | | | | | exception afterwards (for a subsequent parameter), the user code will not call PyBuffer_Release() and memory will leak. Reviewed by Amaury Forgeot d'Arc.
* Fix #3651 various memory leaks when using the buffer interfaceBenjamin Peterson2008-08-271-10/+11
| | | | | by Amaury Forgeot d'Arc Reviewer: Antoine Pitrou
* Merged revisions 66006 via svnmerge fromNeal Norwitz2008-08-241-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt modes) ........ r66006 | neal.norwitz | 2008-08-23 22:04:52 -0700 (Sat, 23 Aug 2008) | 25 lines Fix: * crashes on memory allocation failure found with failmalloc * memory leaks found with valgrind * compiler warnings in opt mode which would lead to invalid memory reads * problem using wrong name in decimal module reported by pychecker Update the valgrind suppressions file with new leaks that are small/one-time leaks we don't care about (ie, they are too hard to fix). TBR=barry TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt modes) in opt mode: valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \ ./python -E -tt ./Lib/test/regrtest.py -uall,-bsddb,-compiler \ -x test_logging test_ssl test_multiprocessing valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \ ./python -E -tt ./Lib/test/regrtest.py test_multiprocessing for i in `seq 1 4000` ; do LD_PRELOAD=~/local/lib/libfailmalloc.so FAILMALLOC_INTERVAL=$i \ ./python -c pass done At least some of these fixes should probably be backported to 2.5. ........
* Merged revisions 65654 via svnmerge fromMartin v. Löwis2008-08-131-11/+108
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r65654 | martin.v.loewis | 2008-08-12 16:49:50 +0200 (Tue, 12 Aug 2008) | 6 lines Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple, by denying s# to parse objects that have a releasebuffer procedure, and introducing s*. More module might need to get converted to use s*. ........
* Rename PyUnicode_AsString -> _PyUnicode_AsString andMarc-André Lemburg2008-08-071-1/+1
| | | | | | | | | PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark them for interpreter internal use only. We'll have to rework these APIs or create new ones for the purpose of accessing the UTF-8 representation of Unicode objects for 3.1.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-22/+22
|
* Renamed PyBytes to PyByteArrayChristian Heimes2008-05-261-3/+3
|
* #2895: don't crash with bytes as keyword argument names.Georg Brandl2008-05-161-1/+1
|
* #2798: PyArg_ParseTuple did not correctly handle the "s" code in case of ↵Amaury Forgeot d'Arc2008-05-121-8/+8
| | | | | | | | | | unicode strings with chars outside the 7bit ascii (s# was already correct). This is necessary to allow python run from a non-ASCII directory, and seems enough on some platforms, probably where the default PyUnicode encoding (utf-8) is also the default filesystem encoding.
* Fixed a memory leak introduced in r62462Christian Heimes2008-05-081-1/+3
|
* Issue 2440: remove the guard around the handling of case 'n' in getargs.c's ↵Trent Nelson2008-04-221-4/+1
| | | | convertsimple() such that we always treat it as an index type, regardless of whether or not sizeof(size_t) == sizeof(long). Fix the test_args2.Signed_TestCase.test_n() such that it tests for adherence to PEP 357 (don't try and coerce objects that don't have nb_index slots but do have nb_int slots (i.e. floats) into indexes 'just because we can'). Three other commits are related to this one: r62269 and r62279, which were changes to PyNumber_Index (among other things) to check for nb_int slots when we lack nb_index slots -- and r62292, which is when I reverted these changes after various people pointed out that the test was in fact wrong, not the code.
* Issue 2440: revert r62269 and r62279. These changes were made in an effort ↵Trent Nelson2008-04-111-2/+4
| | | | to fix test_args2.Signed_TestCase.test_n(), which was failing on Windows x64 on the following line: 'self.failUnlessEqual(99, getargs_n(Long()))'. Although the two commits *did* fix the test on Windows x64, it's become clear that it's the test that's incorrect, and the changes to PyNumber_Index() in particular were not warranted (and actually violate PEP 357). This commit will get us back to where we were at r62268, before I started butchering things.
* Issue 2440: fix the handling of %n in Python/getargs.c's convertsimple(), ↵Trent Nelson2008-04-101-4/+2
| | | | extend Objects/abstract.c's PyNumber_Index() to accept PyObjects that have nb_int slots, and update test_getargs2 to test that an exception is thrown when __int__() returns a non-int object.
* Add XXX comments for whoever cleans up getargs.c :)Georg Brandl2008-03-211-0/+4
|
* Merged revisions ↵Christian Heimes2008-02-281-153/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 61038,61042-61045,61047,61050,61053,61055-61056,61061-61062,61066,61068,61070,61081-61095 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r61081 | neal.norwitz | 2008-02-26 09:04:59 +0100 (Tue, 26 Feb 2008) | 7 lines Speed up this test by about 99%. Remove sleeps and replace with events. (This may fail on some slow platforms, but we can fix those cases which should be relatively isolated and easier to find now.) Move two test cases that didn't require a server to be started to a separate TestCase. These tests were taking 3 seconds which is what the timeout was set to. ........ r61082 | christian.heimes | 2008-02-26 09:18:11 +0100 (Tue, 26 Feb 2008) | 1 line The contains function raised a gcc warning. The new code is copied straight from py3k. ........ r61084 | neal.norwitz | 2008-02-26 09:21:28 +0100 (Tue, 26 Feb 2008) | 3 lines Add a timing flag to Trace so you can see where slowness occurs like waiting for socket timeouts in test_smtplib :-). ........ r61086 | christian.heimes | 2008-02-26 18:23:51 +0100 (Tue, 26 Feb 2008) | 3 lines Patch #1691070 from Roger Upole: Speed up PyArg_ParseTupleAndKeywords() and improve error msg My tests don't show the promised speed up of 10%. The code is as fast as the old code for simple cases and slightly faster for complex cases with several of args and kwargs. But the patch simplifies the code, too. ........ r61087 | georg.brandl | 2008-02-26 20:13:45 +0100 (Tue, 26 Feb 2008) | 2 lines #2194: fix some typos. ........ r61088 | raymond.hettinger | 2008-02-27 00:40:50 +0100 (Wed, 27 Feb 2008) | 1 line Add itertools.combinations(). ........ r61089 | raymond.hettinger | 2008-02-27 02:08:04 +0100 (Wed, 27 Feb 2008) | 1 line One too many decrefs. ........ r61090 | raymond.hettinger | 2008-02-27 02:08:30 +0100 (Wed, 27 Feb 2008) | 1 line Larger test range ........ r61091 | raymond.hettinger | 2008-02-27 02:44:34 +0100 (Wed, 27 Feb 2008) | 1 line Simply the sample code for combinations(). ........
* Merged revisions ↵Christian Heimes2008-02-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 61038,61042-61045,61047,61050,61053,61055-61056,61061-61064,61066-61080 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r61063 | andrew.kuchling | 2008-02-25 17:29:19 +0100 (Mon, 25 Feb 2008) | 1 line Move .setupterm() output so that we don't try to call endwin() if it fails ........ r61064 | andrew.kuchling | 2008-02-25 17:29:58 +0100 (Mon, 25 Feb 2008) | 1 line Use file descriptor for real stdout ........ r61067 | facundo.batista | 2008-02-25 19:06:00 +0100 (Mon, 25 Feb 2008) | 4 lines Issue 2117. Update compiler module to handle class decorators. Thanks Thomas Herve ........ r61069 | georg.brandl | 2008-02-25 21:17:56 +0100 (Mon, 25 Feb 2008) | 2 lines Rename sphinx.addons to sphinx.ext. ........ r61071 | georg.brandl | 2008-02-25 21:20:45 +0100 (Mon, 25 Feb 2008) | 2 lines Revert r61029. ........ r61072 | facundo.batista | 2008-02-25 23:33:55 +0100 (Mon, 25 Feb 2008) | 4 lines Issue 2168. gdbm and dbm needs to be iterable; this fixes a failure in the shelve module. Thanks Thomas Herve. ........ r61073 | raymond.hettinger | 2008-02-25 23:42:32 +0100 (Mon, 25 Feb 2008) | 1 line Make sure the itertools filter functions give the same performance for func=bool as func=None. ........ r61074 | raymond.hettinger | 2008-02-26 00:17:41 +0100 (Tue, 26 Feb 2008) | 1 line Revert part of r60927 which made invalid assumptions about the API offered by db modules. ........ r61075 | facundo.batista | 2008-02-26 00:46:02 +0100 (Tue, 26 Feb 2008) | 3 lines Coerced PyBool_Type to be able to compare it. ........ r61076 | raymond.hettinger | 2008-02-26 03:46:54 +0100 (Tue, 26 Feb 2008) | 1 line Docs for itertools.combinations(). Implementation in forthcoming checkin. ........ r61077 | neal.norwitz | 2008-02-26 05:50:37 +0100 (Tue, 26 Feb 2008) | 3 lines Don't use a hard coded port. This test could hang/fail if the port is in use. Speed this test up by avoiding a sleep and using the event. ........ r61078 | neal.norwitz | 2008-02-26 06:12:50 +0100 (Tue, 26 Feb 2008) | 1 line Whitespace normalization ........ r61079 | neal.norwitz | 2008-02-26 06:23:51 +0100 (Tue, 26 Feb 2008) | 1 line Whitespace normalization ........ r61080 | georg.brandl | 2008-02-26 07:40:10 +0100 (Tue, 26 Feb 2008) | 2 lines Banish tab. ........
* Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases ↵Christian Heimes2007-12-021-8/+8
| | | | in intobject.h
* Merged revisions 59239-59244 via svnmerge fromChristian Heimes2007-11-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r59240 | amaury.forgeotdarc | 2007-11-30 21:37:22 +0100 (Fri, 30 Nov 2007) | 2 lines Add a NEWS entry for r59231 ........ r59241 | amaury.forgeotdarc | 2007-11-30 21:51:40 +0100 (Fri, 30 Nov 2007) | 5 lines Issue #1521: on 64bit platforms, str.decode fails on very long strings. The t# and w# formats were not correctly handled. Will backport. ........ r59242 | christian.heimes | 2007-11-30 22:11:28 +0100 (Fri, 30 Nov 2007) | 3 lines Fix for feature request #1528 Add os.fchmod Georg Brandl has added fchmod() and fchown(). I've contributed lchown but I'm not able to test it on Linux. However it should be available on Mac and some other flavors of Unix. I've made a quick test of fchmod() and fchown() on my system. They are working as expected. ........
* PyString_AsString is permissive and accepts unicode strings.Amaury Forgeot d'Arc2007-11-221-4/+4
| | | | Replace it with PyUnicode_AsString when the argument is known to be a str.
* Fix error messages for buffer objects to say "bytes" instead of "string".Guido van Rossum2007-11-211-2/+2
|
* Merging the py3k-pep3137 branch back into the py3k branch.Guido van Rossum2007-11-061-183/+158
| | | | | | | | | | | | | | No detailed change log; just check out the change log for the py3k-pep3137 branch. The most obvious changes: - str8 renamed to bytes (PyString at the C level); - bytes renamed to buffer (PyBytes at the C level); - PyString and PyUnicode are no longer compatible. I.e. we now have an immutable bytes type and a mutable bytes type. The behavior of PyString was modified quite a bit, to make it more bytes-like. Some changes are still on the to-do list.
* #1316: remove redundant PyLong_Check calls when PyInt_Check was already called.Georg Brandl2007-10-231-3/+1
|
* Remove the buffer API from PyUnicode as specified by PEP 3137. Also,Alexandre Vassalotti2007-10-141-1/+1
| | | | | fix the error message of the 't' format unit, in getargs.c, so that it asks for bytes, instead of string.
* Eliminate use of PyBUF_CHARACTER flag which is no longer part of the buffer ↵Travis E. Oliphant2007-10-131-2/+4
| | | | interface. Fix up array module to export the correct format for wide-builds.
* Change PyBuffer to Py_buffer to be consistent with other non-object ↵Travis E. Oliphant2007-09-231-3/+3
| | | | structures like Py_complex. Add some more functionality to the memoryview object.
* Ugh, hopefully I can get this right. The code is only compiled on Win64Neal Norwitz2007-08-311-1/+1
|
* Try to fix the problem of passing a non-int on Win64 right this time.Neal Norwitz2007-08-311-2/+5
|
* Try to fix a problem with large values on Win64. Diagnosed by Thomas HellerNeal Norwitz2007-08-311-1/+1
|
* Three patches from issue #1047, by Amaury Forgeot d'Arc:Guido van Rossum2007-08-291-0/+28
| | | | | | | | | | | | | | | | | | | 1/ getargs.diff adds the 'Z' and 'Z#' format specifiers for PyArg_ParseTuple. They mimic z and z# for unicode strings, by accepting a Unicode or None (in which case the Py_UNICODE* pointer is set to NULL). With doc and tests. 2/ subprocess.diff converts file PC/_subprocess.c to unicode. We use the Unicode version of the win32 api (and Z conversion from previous patch) 3/ stdout.diff: sys.stdout must not convert the line endings, Windows already does it. Without this patch, when redirecting the output of python, the file contains \r\r\n for each line. (test_subprocess did catch this) However, I (GvR) removed the change to _fileio.c (included in the patches) that prevents closing file descripors < 3 from being closed; I think that needs to be solved in a different way.
* Merged in py3k-buffer branch to main line. All objects now use the buffer ↵Travis E. Oliphant2007-08-181-18/+37
| | | | protocol in PEP 3118.
* Revert r56044 (which changed the %c format specifier to accept aWalter Dörwald2007-07-011-0/+13
| | | | unicode char into an int variable) and add %C which does this.
* Change %c format specifier for PyArg_ParseTuple() so that it acceptsWalter Dörwald2007-06-201-4/+3
| | | | | | | | | | a unicode character (an int * must be passed as the argument). Change %c format specifier for Py_BuildValue() so that it outputs a unicode object. Fix datetime.datetime.isoformat(), so that it works if sep is a unicode character > U+00FF.
* Be more robust around bytes for e[st]#? formats.Guido van Rossum2007-05-091-4/+8
|
* Checkpoint. A b it closer to working pickles and pickletools.Guido van Rossum2007-05-071-0/+10
| | | | Added 'Y' getargs opcode which requires a bytes object.
* Change UnicodeDecodeError objects so that the 'object' attributeWalter Dörwald2007-05-041-0/+27
| | | | | | | is a bytes object. Add 'y' and 'y#' format specifiers that work like 's' and 's#' but only accept bytes objects.
* Compare and hash unicode objects like their UTF-8 representations.Guido van Rossum2007-05-041-1/+5
| | | | Accept Unicode characters < 256 for 'c' format.
* More coding by random modification.Guido van Rossum2007-05-041-12/+12
| | | | | Encoding now return bytes instead of str8. eval(), exec(), compile() now accept unicode or bytes.
* Get rid of all #ifdef Py_USING_UNICODE (it is always present now).Guido van Rossum2007-05-031-24/+0
| | | | (With the help of unifdef from freshmeat.)
* Checkpoint. Manipulated things so that string literals are alwaysGuido van Rossum2007-04-271-2/+2
| | | | | | | | unicode, and a few other compensating changes, e.g. str <- unicode, chr <- unichr, and repr() of a unicode string no longer starts with 'u'. Lots of unit tests are broken, but some basic things work, in particular distutils works so the extensions can be built, and test_builtin.py works.