Commit Graph

6071 Commits

Author SHA1 Message Date
Serhiy Storchaka 0f8f784a77 Removed duplicated words in in comments and docs. 2014-12-01 18:16:30 +02:00
Benjamin Peterson 31aa69ead5 allow hostname to be passed to SSLContext even if OpenSSL doesn't support SNI (closes #22921)
Patch from Donald Stufft.
2014-11-23 20:13:31 -06:00
Serhiy Storchaka 069bdcbb25 Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian
platforms.
2014-11-10 10:42:06 +02:00
Benjamin Peterson 9dcab59b08 fix test where sizeof(long) != sizeof(int) 2014-11-06 00:52:58 -05:00
Steve Dower 31221a7285 Issue #20160: broken ctypes calling convention on MSVC / 64-bit Windows (large structs). Patch by mattip 2014-11-05 19:16:05 -08:00
Antoine Pitrou 06c14976dc Issue #22773: fix failing test with old readline versions due to issue #19884. 2014-11-04 14:52:10 +01:00
Benjamin Peterson 93c41335ab allow keyfile argument to be None (closes #22787) 2014-11-03 21:12:05 -05:00
R David Murray 55bf20ad6e #13096: Fix segfault in CTypes POINTER handling of large values.
Patch by Meador Inge.
2014-10-12 14:26:30 -04:00
Benjamin Peterson 3d1f2d3b52 make _socket.socket weakrefable (closes #22569)
Patch from Alex Gaynor.
2014-10-06 14:38:20 -04:00
Georg Brandl fe3c80ba16 Closes #19342: improve docstrings in grp module. 2014-10-02 08:34:41 +02:00
Benjamin Peterson 2f33456e41 fix sslwrap_simple (closes #22523)
Thanks Alex Gaynor.
2014-10-01 23:53:01 -04:00
Benjamin Peterson bc4ece5775 allow longs as indexes to group() (closes #22530) 2014-09-30 22:04:28 -04:00
Benjamin Peterson 1c873bf77d clear BufferedRWPair weakrefs on deallocation (closes #22517) 2014-09-29 22:46:57 -04:00
Berker Peksag b5dc3dcb92 Issue #21860: Correct docstrings of FileIO.seek() and FileIO.truncate() methods.
Patch by Terry Chia.
2014-09-24 12:54:25 +03:00
Serhiy Storchaka 0aa6562913 Issue #21147: sqlite3 now raises an exception if the request contains a null
character instead of truncate it.  Based on patch by Victor Stinner.
2014-09-11 13:27:19 +03:00
Serhiy Storchaka 17c01785ee Issue #21951: Fixed a crash in Tkinter on AIX when called Tcl command with
empty string or tuple argument.

On some platforms Tcl memory allocator returns NULL when allocating zero-sized
block of memory.
2014-09-11 10:56:59 +03:00
Serhiy Storchaka 1c09c0ea11 Issue #21951: Use attemptckalloc() instead of ckalloc() in Tkinter.
ckalloc() causes the Tcl interpreter to panic, attemptckalloc() returns NULL
if the memory allocation fails.
2014-09-11 10:38:08 +03:00
doko@ubuntu.com 77a64bfdf7 - Issue #22381: Update zlib to 1.2.8. 2014-09-11 08:32:46 +02:00
Alex Gaynor e98205d798 Issue #20421: Add a .version() method to SSL sockets exposing the actual protocol version in use.
Backport from default.
2014-09-04 13:33:22 -07:00
Benjamin Peterson 0062d1e7f4 PEP 466: backport hashlib algorithm constants (closes #21307) 2014-08-28 09:41:29 -04:00
Benjamin Peterson 876473eba3 fix load_verify_locations on unicode paths (closes #22244) 2014-08-28 09:33:21 -04:00
Benjamin Peterson e373754056 don't segfault when trying to fdopen() a fd for a dir (closes #22259)
Patch from Brian Kearns.
2014-08-24 10:37:12 -05:00
Benjamin Peterson 7ed3e29723 fix error message for invalid curve name 2014-08-20 21:37:01 -05:00
Benjamin Peterson b47b54c7f8 Backed out changeset 7c19f1f792c6 2014-08-20 17:30:40 -05:00
Benjamin Peterson 64c1215b5d don't call rl_initialize when stdout is not a tty 2014-08-20 16:03:43 -05:00
Benjamin Peterson cbb144afc0 PyUnicode -> PyString and PyLong -> PyInt 2014-08-20 14:25:32 -05:00
Benjamin Peterson daeb925cc8 backport many ssl features from Python 3 (closes #21308)
A contribution of Alex Gaynor and David Reid with the generous support of
Rackspace. May God have mercy on their souls.
2014-08-20 14:14:50 -05:00
Serhiy Storchaka cbee972e35 Issue #15696: Add a __sizeof__ implementation for mmap objects on Windows. 2014-08-19 17:03:42 +03:00
Serhiy Storchaka f880bff41a Removed useless Py_LIMITED_API checks.
Support for Py_LIMITED_API was introduced in Python 3.2.
Thanks Arfrever Frehtes Taifersar Arahesis.
2014-08-17 13:29:13 +03:00
doko@ubuntu.com baa84b827b - Issue #22176: Update the ctypes module's libffi to v3.1. This release
adds support for the Linux AArch64 and POWERPC ELF ABIv2 little endian
  architectures.
2014-08-10 11:15:28 +02:00
Serhiy Storchaka 501da1da03 Issue #21975: Fixed crash when using uninitialized sqlite3.Row (in particular
when unpickling pickled sqlite3.Row).  sqlite3.Row is now initialized in the
__new__() method.
2014-08-06 17:50:22 +03:00
Serhiy Storchaka 04fa704161 Issue #21580: Now Tkinter correctly handles binary "data" and "maskdata"
configure options of tkinter.PhotoImage.

Added private Tkapp method _createbytearray().
2014-07-31 07:48:14 +03:00
Victor Stinner 0a649c7bb1 Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError
on closed socket.
2014-07-26 14:52:55 +02:00
Victor Stinner 465db3c69a socketmodule.c: backport INVALID_SOCKET from Python 3.5 to simplify the code 2014-07-26 14:47:56 +02:00
Victor Stinner 1d9457d2d2 Issue #19884, readline: calling rl_variable_bind ("enable-meta-key", "off")
does crash on Mac OS X which uses libedit instead of readline.
2014-07-24 22:11:21 +02:00
Victor Stinner 63a474788a Issue #19884: readline: Disable the meta modifier key if stdout is not a
terminal to not write the ANSI sequence "\033[1034h" into stdout. This sequence
is used on some terminal (ex: TERM=xterm-256color") to enable support of 8 bit
characters.
2014-07-24 12:22:24 +02:00
Serhiy Storchaka 5d93f408d8 Call PyErr_NoMemory() when PyMem_Malloc() fails. 2014-07-14 12:20:01 +03:00
Benjamin Peterson a83050196d properly decref the return value of close() 2014-07-04 17:00:25 -07:00
Victor Stinner f6b3c84a4a Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before,
it ignored I/O errors if at least the first C call read() succeed.
2014-07-02 23:12:48 +02:00
Raymond Hettinger 58ad24512a Issue #19145: Fix handling of negative values for a "times" keyword argument to itertools.repeat()>
(Patch contributed by Vajrasky Kok.)
2014-06-24 21:53:45 -07:00
Serhiy Storchaka 05b0a1be37 Issue #21310: Fixed possible resource leak in failed open(). 2014-06-09 13:32:08 +03:00
Benjamin Peterson 48f2e99808 backport hashlib.pbkdf2_hmac per PEP 466 (closes #21304)
Backport by Alex Gaynor.
2014-05-31 13:26:22 -07:00
Serhiy Storchaka 529a639669 Fixed possible integer overflow in getint, getdouble and getboolean too (issue #21552). 2014-05-30 14:28:21 +03:00
Serhiy Storchaka 2a0220b18a Issue #21552: Fixed possible integer overflow of too long string lengths in
the Tkinter module on 64-bit platforms.
2014-05-30 14:23:52 +03:00
Serhiy Storchaka 30080fd63d Issue #10203: sqlite3.Row now truly supports sequence protocol. In particular
it supports reverse() and negative indices.  Original patch by Claudiu Popa.
2014-05-28 12:57:38 +03:00
Benjamin Peterson d3d23636cb support pep 3118 format strings for ctypes objects with nontrivial shapes (closes #10744)
Patch from Matti Picus.
2014-05-17 14:57:10 -07:00
Benjamin Peterson 8c166055f9 use logical rather than bit and 2014-05-11 16:17:02 -07:00
Benjamin Peterson a1ccfb513b cast away warnings 2014-05-11 16:14:00 -07:00
Benjamin Peterson 629026aecc backport hmac.compare_digest to partially implement PEP 466 (closes #21306)
Backport from Alex Gaynor.
2014-05-11 16:11:44 -07:00
Raymond Hettinger 93434890dc Issue 21375: Fix possible Py_ssizet overflow in heapq. 2014-05-03 15:27:14 -07:00
Antoine Pitrou 3ec903fce4 Issue #21321: itertools.islice() now releases the reference to the source iterator when the slice is exhausted.
Patch by Anton Afanasyev.
2014-04-29 12:13:46 +02:00
Kristján Valur Jónsson be580f2e48 Issue #20434 Correct error handlin of _PyString_Resize and _PyBytes_Resize 2014-04-25 09:51:21 +00:00
Andrew Kuchling 68e85e5834 #15840: make docs consistent by saying operations on closed files raise ValueError.
Patch by Caelyn McAulay.

Neither Caelyn nor I could find any cases in 2.7 or 3.4/5 where an
operation on a closed stream raised IOError; generally the C
implementation have a macro to check for the stream being closed, and
these macros all raised ValueError.  If we find any, a new bug should
be opened.
2014-04-15 16:07:52 -04:00
Benjamin Peterson 7fc8a10577 add missing NULL check 2014-04-14 19:57:52 -04:00
Benjamin Peterson 5c863bf938 when an exception is raised in fdopen, never close the fd (changing on my mind on #21191) 2014-04-14 19:45:46 -04:00
Benjamin Peterson 3e5d87bb86 disallow a negative idx parameter 2014-04-14 11:43:09 -04:00
Benjamin Peterson 6c939cb6f6 in scan_once, prevent the reading of arbitrary memory when passed a negative index
Bug reported by Guido Vranken.
2014-04-13 22:10:38 -04:00
Benjamin Peterson 02ab7a84ef make sure fdopen always closes the fd in error cases (closes #21191) 2014-04-09 15:40:18 -04:00
Benjamin Peterson d42f60ed81 fix overflow detection of strop.expandtabs 2014-03-30 20:09:44 -04:00
Ned Deily b693e9fc5b Issue #6676: Ensure a meaningful exception is raised when attempting
to parse more than one XML document per pyexpat xmlparser instance.
(Original patches by Hirokazu Yamamoto and Amaury Forgeot d'Arc, with
suggested wording by David Gutteridge)
2014-03-27 16:38:32 -07:00
Benjamin Peterson e3af6f0a88 fix ctypes test alignment assumptions (closes #20946)
Patch by Andreas Schwab.
2014-03-16 10:07:26 +01:00
Georg Brandl 6d07641fce #13530: port to 2.7 branch (document what os.lseek returns). 2014-03-11 10:28:56 +01:00
Serhiy Storchaka e50fe4c9eb Issue #20283: RE pattern methods now accept the string keyword parameters
as documented.  The pattern and source keyword parameters are left as
deprecated aliases.
2014-03-06 12:24:29 +02:00
Benjamin Peterson 384e9cb3a1 finish backing out #19081 2014-02-16 14:46:57 -05:00
Benjamin Peterson e9aab0fb98 backout #19081 to fix #20621 2014-02-16 14:20:14 -05:00
Serhiy Storchaka 1d19f97eed Issue #17671: Fixed a crash when use non-initialized io.BufferedRWPair.
Based on patch by Stephen Tu.
2014-02-12 10:52:07 +02:00
Benjamin Peterson 2748c5c106 avoid name clash with posix_close (closes #20594) 2014-02-11 10:16:16 -05:00
Serhiy Storchaka 98a9722e4a Issue #20437: Fixed 43 potential bugs when deleting objects references. 2014-02-09 13:14:04 +02:00
Ned Deily ddc697f212 Issue #20374: delete spurious empty line 2014-02-05 17:01:41 -08:00
Ned Deily b0fd12d96c Issue #20374: Avoid compiler warnings when compiling readline with libedit. 2014-02-05 16:52:26 -08:00
Serhiy Storchaka ccffb25c54 Issue #20368: The null character now correctly passed from Tcl to Python (in
unicode strings only).  Improved error handling in variables-related commands.
2014-02-03 21:23:46 +02:00
Gregory P. Smith aaef0e7821 Remove inaccurate comment and a the related recently added
Py_VerboseFlag print that can never be triggered.

prefix[0] is always equal to 0 at this point in the code.
2014-01-27 22:43:25 -08:00
Gregory P. Smith 027ab39014 Issue #19081: Remove the zipimporter.files reference as the zip TOC
caches are module global in the zip_directory_cache. When it is
updated due to a changed zip file, all zipimporter instances need to
see the same updates TOC cache.  This fixes the bug for the overlooked
submodule import case from the earlier round of changes.  Includes
tests that would fail otherwise.

It also refactors zipimporter_init in the process to make it a bit
easier to read and understand.  Less reuse of the same variable for
multiple purposes and the local path buffer is malloc'ed instead
of consuming a large MAXPATHLEN+2 chunk stack space.
2014-01-27 00:15:10 -08:00
Benjamin Peterson 0ac0eadf8d new plan: just remove typecasts (closes #20374) 2014-01-24 11:44:16 -05:00
Benjamin Peterson ce75105e10 use new readline function types (closes #20374) 2014-01-24 00:32:12 -05:00
Serhiy Storchaka e0ed2d75c8 Issue #19936: Added executable bits or shebang lines to Python scripts which
requires them.  Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface.
2014-01-16 18:59:17 +02:00
Benjamin Peterson 9e79889184 remove overly strict assertion (closes #20251) 2014-01-14 00:21:49 -05:00
Benjamin Peterson 06e486c2d3 correct defaultdict signature in docstring (closes #20250)
Patch from Andrew Barnert.
2014-01-13 23:56:05 -05:00
Benjamin Peterson 28cf368c1b complain when nbytes > buflen to fix possible buffer overflow (closes #20246) 2014-01-13 22:59:38 -05:00
Antoine Pitrou 3b2afbbf88 Issue #20207: Always disable SSLv2 except when PROTOCOL_SSLv2 is explicitly asked for. 2014-01-09 19:52:12 +01:00
Benjamin Peterson 7251fe10ff fix zipimport ref leak 2014-01-09 09:36:10 -06:00
Gregory P. Smith 6de7260877 cleanup for the issue 19081 fix - pull the file open and close outside of the
zip_searchorder scanning loop in get_module_code().
[already done in 3.3 and 3.4]
2014-01-07 18:39:48 -08:00
Gregory P. Smith ad3e72557c Should fix the issue19081 fix on Windows. Don't let the previous
posix module ImportError cause the nt module import to fail.
2014-01-07 01:11:09 -08:00
Gregory P. Smith b48c5d5107 Fixes issue19081: When a zipimport .zip file in sys.path being imported
from is modified during the lifetime of the Python process after
zipimport has already opened and cached the zip's table of contents
it now fstat's the file after opening it upon every attempt to access
anything within and will re-read the table of contents if the .zip file
inode, size or mtime have changed.

It would've been nicer to hold any .zip file used by zipimport open for the
duration of the process but that would be more invasive and add an additional
open file descriptor to all zipimport using processes.  It also would likely
not fix the problem on Windows due to different filesystem semantics.
2014-01-06 09:46:46 -08:00
Victor Stinner 9450219b06 Issue #20026: Fix the sqlite module to handle correctly invalid isolation level
(wrong type).
2013-12-19 16:44:48 +01:00
Serhiy Storchaka 0c221beed4 Issue #18829: csv.Dialect() now checks type for delimiter, escapechar and
quotechar fields.  Original patch by Vajrasky Kok.
2013-12-19 16:26:56 +02:00
Gregory P. Smith ddd71e2f78 remove trailing spaces. 2013-12-18 11:25:26 -08:00
Serhiy Storchaka 15df36bb14 Issue #16404: Add checks for return value of PyInt_FromLong() in
sys.getwindowsversion() and ossaudiodev.setparameters().
Reported by Ned Batchelder.
2013-12-17 15:09:45 +02:00
Serhiy Storchaka a92cc91ee6 Issue #17919: Fixed integer overflow in the eventmask parameter. 2013-12-14 19:11:04 +02:00
Serhiy Storchaka 17f22c9281 Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX. 2013-12-13 12:09:05 +02:00
Victor Stinner 66c6e9dcb4 Issue #14432: Generator now clears the borrowed reference to the thread state
Fix a crash when a generator is created in a C thread that is destroyed while
the generator is still used. The issue was that a generator contains a frame,
and the frame kept a reference to the Python state of the destroyed C thread.
The crash occurs when a trace function is setup.
2013-12-13 02:37:09 +01:00
Serhiy Storchaka 5493d5ea2a Issue #19099: The struct module now supports Unicode format strings. 2013-12-08 17:44:50 +02:00
Nadeem Vawda 337c50b8cb Closes #19878: Fix segfault in bz2 module.
Initial patch by Vajrasky Kok.
2013-12-08 15:31:50 +01:00
Alexandre Vassalotti df9460f8dc Issue #6477: Revert fbb97f6eb3b3 as it broke test_xpickle. 2013-11-30 17:43:42 -08:00
Alexandre Vassalotti a2934280e5 Issue #6477: Added pickling support for singletons and their types. 2013-11-30 16:52:03 -08:00
Eli Bendersky 71142c4e86 Fix indentation from previous commit 2013-11-28 06:37:25 -08:00
Eli Bendersky f933e081dd Issue #19815: Fix segfault when parsing empty namespace declaration.
Based on patches by Christian Heimes and Vajrasky Kok
2013-11-28 06:25:45 -08:00
Serhiy Storchaka dafda9b042 Issue #11489: JSON decoder now accepts lone surrogates. 2013-11-26 21:25:15 +02:00
R David Murray a691219716 backport #18985: Improve fcntl documentation. 2013-11-07 10:52:53 -05:00
Christian Heimes 41a7d5ee17 Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding
It is causing trouble like e.g. hanging processes.
2013-10-29 20:50:01 +01:00
Serhiy Storchaka fdb73ed486 Issue #19405: Fixed outdated comments in the _sre module. 2013-10-27 08:00:57 +02:00
Benjamin Peterson 657d06b13e just return toplevel symbol table rather than all blocks (closes #19393) 2013-10-26 13:13:51 -04:00
Mark Dickinson 36f6e2c9e0 Issue #18739: Fix inconsistent results from math.log(n) and math.log(long(n)) 2013-10-13 10:55:15 +01:00
Ned Deily 62a192931b 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:45:25 -07:00
Ned Deily ebca3a5ab9 Issue #19147: Fix docstring for fcntl.flock to refer to correct man section. 2013-10-02 12:20:18 -07:00
Antoine Pitrou 87c99a0d37 Properly initialize all fields of a SSL object after allocation. 2013-09-29 19:52:45 +02:00
Serhiy Storchaka cf29ba8cf0 Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in
the _sre moduel.
2013-09-05 18:02:57 +03:00
Christian Heimes 5eb6e3b40d Issue #18709: GCC 4.6 complains that 'v' may be used uninitialized in GEN_EMAIL/GEN_URI/GEN_DNS case 2013-09-05 16:05:50 +02:00
Christian Heimes ed9884b2d0 Issue #18709: GCC 4.6 complains that 'v' may be used uninitialized in GEN_EMAIL/GEN_URI/GEN_DNS case 2013-09-05 16:04:35 +02:00
Victor Stinner 930c3c9e43 Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast
64-bit pointer to long (32 bits).
2013-09-05 00:26:15 +02:00
Antoine Pitrou 213fec4bff Issue #18876: The FileIO.mode attribute now better reflects the actual mode under which the file was opened.
Patch by Erik Bray.
2013-09-04 20:46:33 +02:00
Eli Bendersky e6802db7d1 Close #18912: Fix indentation in docstring
Contributed by Jeroen Van Goey
2013-09-03 06:41:58 -07:00
Ezio Melotti 6d0f0f299b #18803: fix more typos. Patch by Févry Thibault. 2013-08-26 01:31:30 +03:00
Christian Heimes 42831fefa7 Issue #11973: Fix a problem in kevent. The flags and fflags fields are now
properly handled as unsigned.
2013-08-25 14:57:00 +02:00
Christian Heimes 8ee5ffddf5 Issue #18747: Fix spelling errors in my commit message and comments,
thanks to Vajrasky Kok for proof-reading.
2013-08-25 14:19:16 +02:00
Barry Warsaw 82f8828317 - Issue #18709: Fix CVE-2013-4238. The SSL module now handles NULL bytes
inside subjectAltName correctly. Formerly the module has used OpenSSL's
  GENERAL_NAME_print() function to get the string represention of ASN.1
  strings for `rfc822Name` (email), `dNSName` (DNS) and
  `uniformResourceIdentifier` (URI).
2013-08-23 13:26:49 -04:00
Serhiy Storchaka 2ac1c1a31d Issue #16809: Tkinter's splitlist() and split() methods now accept Tcl_Obj
argument.

This is needed for support Tcl/Tk 8.6.
2013-08-22 17:42:45 +03:00
Christian Heimes 1d0f73d20f Issue #18747: Use a parent atfork handler instead of a child atfork handler.
fork() is suppose to be async-signal safe but the handler calls unsafe functions. A parent handler mitigates the issue.
2013-08-22 13:19:48 +02:00
Serhiy Storchaka 4203570d01 Issue #17119: Fixed integer overflows when processing large Unicode strings
and tuples in the tkinter module.
2013-08-21 21:46:12 +03:00
Christian Heimes 0d604cf65e Issue #18747: Re-seed OpenSSL's pseudo-random number generator after fork.
A pthread_atfork() child handler is used to seeded the PRNG with pid, time
and some stack data.
2013-08-21 13:26:05 +02:00
Serhiy Storchaka c360389453 Issue #8865: Concurrent invocation of select.poll.poll() now raises a
RuntimeError exception.  Patch by Christian Schubert.
2013-08-20 20:38:21 +03:00
Serhiy Storchaka a9885e93ee Issue #13461: Fix a crash in the TextIOWrapper.tell method and in the "replace"
error handler on 64-bit platforms.  Patch by Yogesh Chaudhari.
2013-08-20 20:08:53 +03:00
Christian Heimes 10107813ac Issue #18777: The ssl module now uses the new CRYPTO_THREADID API of
OpenSSL 1.0.0+ instead of the deprecated CRYPTO id callback function.
2013-08-19 17:36:29 +02:00
Christian Heimes b4ec842f39 Issue 18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok. 2013-08-17 17:25:18 +02:00
Christian Heimes f1bd47ae14 Issue #18768: coding style nitpick. Thanks to Vajrasky Kok 2013-08-17 17:18:56 +02:00
Ezio Melotti 419e23cbb0 #18466: fix more typos. Patch by Févry Thibault. 2013-08-17 16:56:09 +03:00
Christian Heimes 6e0be01bfb Issue #18178: Fix ctypes on BSD. dlmalloc.c was compiled twice which broke malloc weak symbols. 2013-08-17 15:01:54 +02:00
Christian Heimes 88b174c977 Issue #18709: Fix CVE-2013-4238. The SSL module now handles NULL bytes
inside subjectAltName correctly. Formerly the module has used OpenSSL's
GENERAL_NAME_print() function to get the string represention of ASN.1
strings for rfc822Name (email), dNSName (DNS) and
uniformResourceIdentifier (URI).
2013-08-17 00:54:47 +02:00
Serhiy Storchaka e822b034e7 Issue #15866: The xmlcharrefreplace error handler no more produces two XML
entities for a non-BMP character on narrow build.
2013-08-06 16:56:26 +03:00
Mark Dickinson 5ad3514822 Issue #18661: typo in grp.struct_group docstring. 2013-08-05 17:56:17 +01:00
Eli Bendersky b671701149 Issue #13612: Fix a buffer overflow in case of a multi-byte encoding.
This is a belated backport of f7b47fb30169; Patch by Serhiy Storchaka.
2013-08-04 06:09:49 -07:00
Serhiy Storchaka 3ade66c203 Issue #17998: Fix an internal error in regular expression engine. 2013-08-03 19:26:33 +03:00
Ned Deily 8074364f7a Issue #17557: Fix os.getgroups() to work with the modified behavior of
getgroups(2) on OS X 10.8.  Original patch by Mateusz Lenik.
2013-08-01 21:19:09 -07:00
Raymond Hettinger 662908b5e5 Restore the data block size to 62.
The former block size traded away good fit within cache lines in
order to gain faster division in deque_item().  However, compilers
are getting smarter and can now replace the slow division operation
with a fast integer multiply and right shift.  Accordingly, it makes
sense to go back to a size that lets blocks neatly fill entire
cache-lines.

GCC-4.8 and CLANG 4.0 both compute "x // 62" with something
roughly equivalent to "x * 9520900167075897609 >> 69".
2013-07-28 02:34:42 -07:00
Raymond Hettinger 69468146b4 Issue #18513: Add workaround for OS X 10.8 cexp bug that leads to wrong cmath.rect(0.0,-0.0) results. 2013-07-20 10:56:58 -07:00
Raymond Hettinger b77ed2c54b Backport c952f3d122ae: Tweak the deque struct by moving the least used fields
(maxlen and weakref) to the end.
2013-07-16 02:34:19 -07:00
Raymond Hettinger 90180c1c3f Move the leftlink to the end of the block structure.
The current pattern of memory access will update both the leftlink and
rightlink at the same time, so they should be positioned side-by-side
for better cache locality.

Keeping the leftlink at the front of the structure would make sense
only if the paired updates were eliminated by backporting changesets
49a9c734304d, 3555cc0ca35b, ae9ee46bd471, and 744dd749e25b.  However,
that isn't likely to happen, so we're better off with the leftlink at
the end of the structure.
2013-07-16 01:59:30 -07:00
Serhiy Storchaka fab65428d5 Issue #18101: Tcl.split() now process Unicode strings nested in a tuple as it
do with byte strings.

Added tests for Tcl.split() and tcl.splitline().
2013-07-11 20:32:48 +03:00
Richard Oudkerk 41072db709 Issue #17097: Make multiprocessing ignore EINTR. 2013-07-01 18:45:28 +01:00
Benjamin Peterson 73d6aca5d2 reapply f1dc30a1be72 2013-06-25 11:35:44 -07:00
Benjamin Peterson 227f0faed2 reapply 5accb0ac8bfb 2013-06-25 11:34:48 -07:00
Benjamin Peterson 3968e29959 reapply f1dc30a1be72 2013-06-25 11:26:20 -07:00
Benjamin Peterson 13dd1f947e reapply f1dc30a1be72 2013-06-25 11:25:26 -07:00
Victor Stinner c1a44269da Issue #18135: ssl.SSLSocket.write() now raises an OverflowError if the input
string in longer than 2 gigabytes. The ssl module does not support partial
write.
2013-06-25 00:48:02 +02:00
Benjamin Peterson 478b08ee5a also backout f1dc30a1be72 for not being a bugfix 2013-06-23 11:38:11 -07:00
Victor Stinner 4807df41ad Issue #18135: Fix a possible integer overflow in ssl.SSLSocket.write()
for strings longer than 2 gigabytes.
2013-06-23 15:15:10 +02:00
Benjamin Peterson 10c74d28e4 backout 5accb0ac8bfb; needs more discussion on python-dev 2013-06-22 11:16:36 -07:00
Andrew Kuchling aa6c297316 #18113: avoid segfault if Py_XDECREF triggers code that calls set_panel_userptr again
Problem noted & original patch by Serhiy Storchaka; I tweaked the patch a bit.
2013-06-22 12:33:05 -04:00
Raymond Hettinger 22b4b4cef4 Arrange structure to match the common access patterns. 2013-06-22 00:51:01 -07:00
Christian Heimes 3aa138fe1d Fix for r84195: add HAVE_ALLOCA_H to configure and only include alloca.h if it's available 2013-06-18 13:25:24 +02:00