Commit graph

7306 commits

Author SHA1 Message Date
Antoine Pitrou
9f14681959 Issue #17804: New function `struct.iter_unpack` allows for streaming struct unpacking. 2013-04-27 00:20:04 +02:00
Eli Bendersky
45f3d2fff0 Revert c9674421d78e, leaving an additional comment 2013-04-24 05:34:07 -07:00
Eli Bendersky
1859fe80c4 Simplify the code of get_attrib_from_keywords somewhat. 2013-04-22 05:52:16 -07:00
Eli Bendersky
ed8b86d323 Issue #17736: fix misleading comment in _elementtree.c
Patch by Jonas Wagner
2013-04-22 05:29:09 -07:00
Eli Bendersky
d4cb4b7451 Issue #17736: fix misleading comment in _elementtree.c
Patch by Jonas Wagner
2013-04-22 05:25:25 -07:00
Alexandre Vassalotti
4fe2184a0f Merge 3.3 2013-04-20 21:28:49 -07:00
Alexandre Vassalotti
637c7c475a Fix reference leak in _pickle. 2013-04-20 21:28:21 -07:00
Antoine Pitrou
a85017fbe3 Issue #16694: Add a pure Python implementation of the operator module.
Patch by Zachary Ware.
2013-04-20 19:21:44 +02:00
Eli Bendersky
ddcc6798f6 Remove useless #define and #ifdefs 2013-04-20 06:36:43 -07:00
Eli Bendersky
bf05df2396 Make license notices more consistent and remove old changelog.
Also remove unused macro.
2013-04-20 05:44:01 -07:00
Victor Stinner
8f674ccd64 Close #17694: Add minimum length to _PyUnicodeWriter
* Add also min_char attribute to _PyUnicodeWriter structure (currently unused)
 * _PyUnicodeWriter_Init() has no more argument (except the writer itself):
   min_length and overallocate must be set explicitly
 * In error handlers, only enable overallocation if the replacement string
   is longer than 1 character
 * CJK decoders don't use overallocation anymore
 * Set min_length, instead of preallocating memory using
   _PyUnicodeWriter_Prepare(), in many decoders
 * _PyUnicode_DecodeUnicodeInternal() checks for integer overflow
2013-04-17 23:02:17 +02:00
Richard Oudkerk
245bbee0d5 Merge. 2013-04-17 21:24:58 +01:00
Antoine Pitrou
cf8a1e51ec - Issue #17782: Fix undefined behaviour on platforms where `struct timespec`'s "tv_nsec" member is not a C long. 2013-04-17 22:06:44 +02:00
Alexandre Vassalotti
7c5e094cbf Make C and Python implementations of pickle load STRING opcodes the same way.
The C version tried to remove trailing whitespace between the last quote and
the newline character. I am not sure why it had this because pickle never
generated such pickles---for this to happen repr(some_string) would need to
return trailing whitespace. It was maybe there to make it easier for people
to write pickles in text editors. Anyhow, the Python version doesn't do this
so there is no point keeping this around anymore.

Also, I've changed the exception raised when a bad pickle is encountered.
Again this unlikely to make much difference to anyone though it does make
testing slightly nicer for us.
2013-04-15 23:14:55 -07:00
Benjamin Peterson
48a2e7c357 merge 3.3 2013-04-15 21:38:33 -04:00
Benjamin Peterson
51ce29c530 remove pointless code (closes #17738) 2013-04-15 21:38:25 -04:00
Antoine Pitrou
af94051a93 Issue #17710: Fix pickle raising a SystemError on bogus input. 2013-04-15 21:55:14 +02:00
Antoine Pitrou
3034efdd29 Issue #17710: Fix pickle raising a SystemError on bogus input. 2013-04-15 21:51:09 +02:00
Victor Stinner
322cc7438c Issue #17693: Fix memory/reference leaks 2013-04-14 18:11:41 +02:00
Alexandre Vassalotti
cc7571727f Style cleanups for pickle.py and _pickle. 2013-04-14 02:25:10 -07:00
Alexandre Vassalotti
6d9e14593e Merge 3.3 2013-04-14 02:11:16 -07:00
Alexandre Vassalotti
00d83f2d05 Clean up error messages raised by save_reduce in _pickle. 2013-04-14 01:28:01 -07:00
Victor Stinner
d949126995 Issue #17693: CJK encoders now use the new Unicode API (PEP 393) 2013-04-14 02:06:32 +02:00
Serhiy Storchaka
6d80046628 Issue #17016: Get rid of possible pointer wraparounds and integer overflows
in the re module.  Patch by Nickolai Zeldovich.
2013-04-13 21:16:40 +03:00
Serhiy Storchaka
4bb17348f5 Issue #17016: Get rid of possible pointer wraparounds and integer overflows
in the re module.  Patch by Nickolai Zeldovich.
2013-04-13 21:15:47 +03:00
Victor Stinner
a0dd0213cc Close #17693: Rewrite CJK decoders to use the _PyUnicodeWriter API instead of
the legacy Py_UNICODE API.

Add also a new _PyUnicodeWriter_WriteChar() function.
2013-04-11 22:09:04 +02:00
Antoine Pitrou
50b24d0d7c Fix a crash when setting a servername callback on a SSL server socket and the client doesn't send a server name.
Patch by Kazuhiro Yoshida.
(originally issue #8109)
2013-04-11 20:48:42 +02:00
Victor Stinner
7d36e4f074 Close #14439: Python now prints the traceback on runpy failure at startup. 2013-04-10 00:27:23 +02:00
Antoine Pitrou
4b7b0f06b4 gibibytes (Arfrever) 2013-04-07 23:46:52 +02:00
Antoine Pitrou
299978dfe3 Issue #15596: Faster pickling of unicode strings. 2013-04-07 17:38:11 +02:00
Serhiy Storchaka
ee57f159af Revert a premature patch for issue #14010 (changeset 846bd418aee5). 2013-04-06 22:55:12 +03:00
Serhiy Storchaka
278d03bd66 Revert a premature patch for issue #14010 (changeset aaaf36026511). 2013-04-06 22:52:34 +03:00
Serhiy Storchaka
aac81e2780 Issue #14010: Fix a crash when iterating or deleting deeply nested filters
(builting and in itertools module, i.e. map(), itertools.chain(), etc).
2013-04-06 21:20:30 +03:00
Serhiy Storchaka
e8f706eda7 Issue #14010: Fix a crash when iterating or deleting deeply nested filters
(builting and in itertools module, i.e. map(), itertools.chain(), etc).
2013-04-06 21:14:43 +03:00
Antoine Pitrou
7faf70512a Issue #17591: Use lowercase filenames when including Windows header files.
Patch by Roumen Petrov.
2013-03-31 22:48:04 +02:00
Antoine Pitrou
ce852cb8b9 Fix comment about the OpenSSL version in which SNI version was introduced. 2013-03-30 16:45:04 +01:00
Antoine Pitrou
edbc18e9d0 Improve set_servername_callback docstring. 2013-03-30 16:40:27 +01:00
Antoine Pitrou
a596338bb8 Fix previous fix (the cause was actually a misplaced #endif, or so it seems) 2013-03-30 16:39:00 +01:00
Antoine Pitrou
41f8c4f5e4 Further compiling fixes (issue #17581) 2013-03-30 16:36:54 +01:00
Antoine Pitrou
912fbff105 Issue #17581: try to fix building on old OpenSSL versions 2013-03-30 16:29:32 +01:00
Antoine Pitrou
2463e5fee4 Issue #16692: The ssl module now supports TLS 1.1 and TLS 1.2. Initial patch by Michele Orrù. 2013-03-28 22:24:43 +01:00
Victor Stinner
d06b35c1b6 (Merge 3.3) Issue #17209: curses.window.get_wch() now handles correctly KeyboardInterrupt (CTRL+c) 2013-03-21 12:21:43 +01:00
Victor Stinner
bd2d30cf31 Issue #17209: curses.window.get_wch() now handles correctly KeyboardInterrupt (CTRL+c) 2013-03-21 12:21:06 +01:00
Gregory P. Smith
40a2160a09 Refactor the common code out of the posix and windows listdir
implementations from my previous commit into the higher level
function.
2013-03-20 20:52:50 -07:00
Gregory P. Smith
16ea14a690 Refactor the Windows specific and POSIX specific implementations of
listdir into two separate coherent functions rather than interleaved
#ifdef's.
2013-03-20 18:51:33 -07:00
R David Murray
9a7d3768a3 Use logic operator, not bitwise operator, for conditional. 2013-03-20 00:15:20 -04:00
R David Murray
c7c42efb16 #15927: Fix cvs.reader parsing of escaped \r\n with quoting off.
This fix means that such values are correctly roundtripped, since
cvs.writer already does the correct escaping.

Patch by Michael Johnson.
2013-03-19 22:41:47 -04:00
Kristján Valur Jónsson
d6e9f32b79 Merge 2013-03-19 16:00:01 -07:00
Kristján Valur Jónsson
ece12222ce Merge 2013-03-19 15:57:19 -07:00
Kristján Valur Jónsson
23f854ca68 Issue #10296: Merge to default 2013-03-19 15:38:32 -07:00