Commit Graph

7690 Commits

Author SHA1 Message Date
Guido van Rossum 27b7c7ebf1 Initial checkin of asyncio package (== Tulip, == PEP 3156). 2013-10-17 13:40:50 -07:00
Nick Coghlan 7d270ee05d Issue #16129: Add `Py_SetStandardStreamEncoding`
This new pre-initialization API allows embedding
applications like Blender to force a particular
encoding and error handler for the standard IO streams.

Also refactors Modules/_testembed.c to let us start
testing multiple embedding scenarios.

(Initial patch by Bastien Montagne)
2013-10-17 22:35:35 +10:00
Serhiy Storchaka 25324971fb Issue #18468: The re.split, re.findall, and re.sub functions and the group()
and groups() methods of match object now always return a string or a bytes
object.
2013-10-16 12:46:28 +03:00
Georg Brandl 6083a4bc1c Re #18521: remove assignments of variables that are immediately reassigned. 2013-10-14 06:51:46 +02:00
Georg Brandl 782952b8fe Re #18521: fix not-quite-C syntax that works only because the PyXXX_Check are macros defined with () around them. 2013-10-14 06:46:12 +02:00
Georg Brandl daa1fa991c Back out accidentally pushed changeset b51218966201. 2013-10-13 09:32:59 +02:00
Georg Brandl 4300019e1a Add re.fullmatch() function and regex.fullmatch() method, which anchor the
pattern at both ends of the string to match.

Patch by Matthew Barnett.
Closes #16203.
2013-10-13 09:18:45 +02:00
Ned Deily 9809ca9d9e Issue #18458: merge comments from 3.3 2013-10-12 15:57:04 -07:00
Christian Heimes e92ef13b0a Issue #18582: Add 'pbkdf2_hmac' to the hashlib module. 2013-10-13 00:52:43 +02:00
Ned Deily 5d4121a631 Issue #18458: Prevent crashes with newer versions of libedit. Its readline
emulation has changed from 0-based indexing to 1-based like gnu readline.
Original patch by Ronald Oussoren.
2013-10-12 15:47:58 -07:00
Christian Heimes 2582762b1b Issue #19209: Remove import of copyreg from the os module to speed up
interpreter startup. stat_result and statvfs_result are now hard-coded to
reside in the os module.
The patch is based on Victor Stinner's patch.
2013-10-12 01:27:08 +02:00
Antoine Pitrou fd4722cacf Issue #9548: Add a minimal "_bootlocale" module that is imported by the _io module instead of the full locale module. 2013-10-12 00:13:50 +02:00
Benjamin Peterson a76795bf53 merge 3.3 2013-10-10 20:22:39 -04:00
Benjamin Peterson 8aa7b89983 replace hardcoded version 2013-10-10 20:22:10 -04:00
Benjamin Peterson f0a1b87560 merge 3.3 2013-10-10 20:17:29 -04:00
Benjamin Peterson 577dd61ff2 make sure the docstring is never out of date wrt unicode data version 2013-10-10 20:16:25 -04:00
Benjamin Peterson d3c43a993c merge 3.3 (#19220) 2013-10-10 17:40:30 -04:00
Benjamin Peterson a4cf1c87d0 remove url from docstring (closes #19220) 2013-10-10 17:39:56 -04:00
Benjamin Peterson 94d08d908b upgrade unicode db to 6.3.0 (closes #19221) 2013-10-10 17:24:45 -04:00
Victor Stinner 2fe9bac4dc Close #16742: Fix misuse of memory allocations in PyOS_Readline()
The GIL must be held to call PyMem_Malloc(), whereas PyOS_Readline() releases
the GIL to read input.

The result of the C callback PyOS_ReadlineFunctionPointer must now be a string
allocated by PyMem_RawMalloc() or PyMem_RawRealloc() (or NULL if an error
occurred), instead of a string allocated by PyMem_Malloc() or PyMem_Realloc().

Fixing this issue was required to setup a hook on PyMem_Malloc(), for example
using the tracemalloc module.

PyOS_Readline() copies the result of PyOS_ReadlineFunctionPointer() into a new
buffer allocated by PyMem_Malloc(). So the public API of PyOS_Readline() does
not change.
2013-10-10 16:18:20 +02:00
Raymond Hettinger 07573d7b24 merge 2013-10-04 16:52:39 -07:00
Raymond Hettinger cb1d96f782 Issue #18594: Make the C code more closely match the pure python code. 2013-10-04 16:51:02 -07:00
Ned Deily f55697ca6d Issue #19147: merge from 3.3 2013-10-02 12:22:05 -07:00
Ned Deily 2a8b3f26b9 Issue #19147: Fix docstring for fcntl.flock to refer to correct man section. 2013-10-02 12:20:46 -07:00
Raymond Hettinger 75f65e368e merge 2013-10-01 21:38:37 -07:00
Raymond Hettinger 224c87d60c Issue #18594: Fix the fallback path in collections.Counter(). 2013-10-01 21:36:09 -07:00
Raymond Hettinger c13516b0a0 merge 2013-10-01 01:00:59 -07:00
Raymond Hettinger 2ff2190b62 Issue #18594: Fix the fast path for collections.Counter().
The path wasn't being taken due to an over-restrictive type check.
2013-10-01 00:55:43 -07:00
Antoine Pitrou b2201e1aa6 Properly initialize all fields of a SSL object after allocation. 2013-09-29 19:53:45 +02:00
Antoine Pitrou 860aee75b8 Properly initialize all fields of a SSL object after allocation. 2013-09-29 19:52:45 +02:00
Antoine Pitrou 20b85557f2 Issue #19095: SSLSocket.getpeercert() now raises ValueError when the SSL handshake hasn't been done. 2013-09-29 19:50:53 +02:00
Serhiy Storchaka 369606df2f Issue #19028: Fixed tkinter.Tkapp.merge() for non-string arguments. 2013-09-23 23:20:07 +03:00
Serhiy Storchaka 463bd4b5c6 Issue #19034: repr() for tkinter.Tcl_Obj now exposes string reperesentation. 2013-09-23 22:49:02 +03:00
Serhiy Storchaka 1eb87629cd Merge heads 2013-09-20 23:28:27 +03:00
Serhiy Storchaka dac8b8b7a6 Issue #3015: Fixed tkinter with wantobject=False. Any Tcl command call
returned empty string.
2013-09-20 23:24:20 +03:00
Serhiy Storchaka 31f477c7eb Issue #3015: Fixed tkinter with wantobject=False. Any Tcl command call
returned empty string.
2013-09-20 23:21:44 +03:00
Antoine Pitrou b4a46cb428 Add a comment making it explicit that itertools.tee() is already 64bit-safe (issue #19049) 2013-09-20 22:19:22 +02:00
doko@ubuntu.com 9937155a1c - followup for issue #18997, make _clear_joined_ptr static. 2013-09-18 12:13:18 +02:00
doko@ubuntu.com 0648bf795c - followup for issue #18997, make _clear_joined_ptr static. 2013-09-18 12:12:28 +02:00
Charles-François Natali 0cc86850b6 Issue #16201: socket: Use inet_pton()/inet_addr() instead of ad-hoc parsing for
numeric IP addresses.
2013-09-13 19:53:08 +02:00
Eli Bendersky 12f18289c0 Merge for Issue #18997: Issue #18997: fix ElementTree crash with using pickle and __getstate__. 2013-09-13 06:27:52 -07:00
Eli Bendersky dd3661e782 Issue #18997: fix ElementTree crash with using pickle and __getstate__.
Based on report and initial patch from Germán M. Bravo
2013-09-13 06:24:25 -07:00
Raymond Hettinger fb92f393b0 Issue 18752: Make chain.from_iterable() more visible in the documentation. 2013-09-09 02:01:35 -05:00
Raymond Hettinger 8df58f7ae8 Issue 18752: Make chain.from_iterable() more visible in the documentation. 2013-09-09 01:29:40 -05:00
Victor Stinner 8898350076 Close #18957: The PYTHONFAULTHANDLER environment variable now only enables the
faulthandler module if the variable is non-empty. Same behaviour than other
variables like PYTHONDONTWRITEBYTECODE.
2013-09-08 11:36:23 +02:00
Antoine Pitrou 7b4769937f Issue #18808: Thread.join() now waits for the underlying thread state to be destroyed before returning.
This prevents unpredictable aborts in Py_EndInterpreter() when some non-daemon threads are still running.
2013-09-07 23:38:37 +02:00
Richard Oudkerk b988ee0632 Fix conversion from Py_ssize_t to int. 2013-09-07 17:40:45 +01:00
Ned Deily f70f4a63b6 Issue #18458: Prevent crashes with newer versions of libedit. Its readline
emulation has changed from 0-based indexing to 1-based like gnu readline.
Original patch by Ronald Oussoren.
2013-09-06 15:16:19 -07:00
Serhiy Storchaka a83a022f9a Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in
the _sre moduel.
2013-09-05 18:02:31 +03:00
Serhiy Storchaka 134f0de66d Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in
the _sre moduel.
2013-09-05 18:01:15 +03:00