Commit Graph

7808 Commits

Author SHA1 Message Date
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
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
Christian Heimes 60bf2fc25b 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 e1040e276b Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast
64-bit pointer to long (32 bits).
2013-09-05 00:22:24 +02:00
Antoine Pitrou e93b63b74b 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
Tim Peters 9edb168dd7 cwr_next(): move invariants out of loops.
This simplifies and clarifies the code, and gives a small speedup.
2013-09-03 11:49:31 -05:00
Eli Bendersky c554f725a0 Issue #18912: Fix indentation in docstring
Contributed by Jeroen Van Goey
2013-09-03 06:37:19 -07:00
Victor Stinner b84fc0fd9f Fix compilation of the _sqlite module if threads are disabled 2013-08-28 01:44:42 +02:00
Serhiy Storchaka 9594942716 Issue #18783: Removed existing mentions of Python long type in docstrings,
error messages and comments.
2013-08-27 19:40:23 +03:00
Ezio Melotti 7c4a7e6f3c #18803: fix more typos. Patch by Févry Thibault. 2013-08-26 01:32:56 +03:00
Charles-François Natali c20a7b977e Merge. 2013-08-25 18:27:59 +02:00
Charles-François Natali 249cdc39fc Issue #18763: subprocess: The file descriptors are now closed after calling the
preexec_fn callback, which may open file descriptors.
2013-08-25 18:24:45 +02:00
Christian Heimes f1fe159822 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 61636e7105 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
Serhiy Storchaka 203eb317d2 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:40:31 +03:00
Christian Heimes 80c5de93f9 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 9e6b97502f Issue #17119: Fixed integer overflows when processing large strings and tuples
in the tkinter module.
2013-08-21 21:38:21 +03:00
Christian Heimes f77b4b20e9 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 b1973c252c 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 ec67d187ee Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit platforms.
Patch by Yogesh Chaudhari.
2013-08-20 20:04:47 +03:00
Christian Heimes 4d98ca9ff6 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 3c2593b2bb Issue 18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok. 2013-08-17 17:25:18 +02:00
Christian Heimes 474afdda60 Issue #18768: coding style nitpick. Thanks to Vajrasky Kok 2013-08-17 17:18:56 +02:00
Ezio Melotti 85a8629d21 #18466: fix more typos. Patch by Févry Thibault. 2013-08-17 16:57:41 +03:00
Christian Heimes 9ff79f7c46 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 824f7f366d 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
Larry Hastings 00964ed216 Issue #18667: Add missing "HAVE_FCHOWNAT" symbol to posix._have_functions. 2013-08-12 13:49:30 -04:00
Mark Dickinson fb29a164df Issue #18661: typo in grp.struct_group docstring. Thanks Vajrasky Kok. 2013-08-05 17:57:01 +01:00
Raymond Hettinger d7bd7a5525 Silence compiler warnings for strict function prototype declarations. 2013-08-04 12:43:37 -07:00
Serhiy Storchaka 1f35ae0a3c Issue #17998: Fix an internal error in regular expression engine. 2013-08-03 19:18:38 +03:00
Ned Deily bd143c3760 Issue #18627: Fix typo noticed by Vajrasky Kok. 2013-08-01 22:12:29 -07:00
Ned Deily b5dd6d2287 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:21:15 -07:00
Larry Hastings 2e3e593e34 Issue #17899: Fix rare file descriptor leak in os.listdir().
(Done as separate patch from trunk as the code has diverged quite a bit.)
2013-08-01 19:34:46 -07:00
Christian Heimes b3c872403d Initialize utime with 0. It fixes a couple of compiler warnung:
warning: 'utime.mtime_ns' may be used uninitialized in this function [-Wmaybe-uninitialized]
2013-08-01 00:08:16 +02:00
Christian Heimes 4fec4314cf Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns
'SHA1' instead of 'SHA'.
2013-07-30 15:32:57 +02:00
Victor Stinner 36577e4e8c Issue #15893: frozenmain.c now handles PyMem_Malloc() failure 2013-07-27 01:04:56 +02:00
Christian Heimes 6ca8a05f10 Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
CID 486199
2013-07-26 23:04:29 +02:00
Christian Heimes 9ee5c37c8f Issue #18559: Fix NULL pointer dereference error in _pickle module 2013-07-26 22:45:00 +02:00
Christian Heimes 66eda26a72 Handle yet another potential failure in testcapi
CID 1058280
2013-07-26 15:54:07 +02:00
Christian Heimes 5962bef8aa Check return value of PyLong_FromLong(X509_get_version()). It might be NULL if
X509_get_version() grows beyond our small int cache.
CID 1058279
2013-07-26 15:51:18 +02:00
Christian Heimes ec2309b03d remove surplus and wrong Py_DECREF() introduced in 33891989c9cf 2013-07-26 15:26:18 +02:00
Christian Heimes 3205e74d88 Fix declaration-after-statement of d49f65ff4f3c 2013-07-26 15:06:48 +02:00
Christian Heimes 7e138027ff Fix memory leaks and add checks for failing malloc() calls to testcapi module
CID 1058288
2013-07-26 15:03:50 +02:00
Christian Heimes ff369a5595 Fix possible NULL pointer dereferences in testcapi module
CID 1058280
CID 1058282
CID 1058284
2013-07-26 14:52:18 +02:00
Christian Heimes a956e645c1 Fix possible NULL pointer dereference in PyCurses_Start_Color()
CID 1058276
2013-07-26 14:45:37 +02:00
Brett Cannon 845f7845aa Issue #18556: Check the return value for PyUnicode_AsWideChar() in
U_set() from ctypes.

CID #486657
2013-07-25 17:34:00 -04:00
Christian Heimes 9228837e31 Issue #18549: Eliminate dead code in socket_ntohl().
CID 982369
2013-07-25 11:46:10 +02:00
Ezio Melotti 61b0c672b5 #16937: document that stdin is always buffered, even when -u is used. Patch by Elena Oat. 2013-07-25 05:04:02 +02:00
Christian Heimes 60a6067709 Issue #15905: Fix theoretical buffer overflow in handling of sys.argv[0],
prefix and exec_prefix if the operation system does not obey MAXPATHLEN.
2013-07-22 12:53:32 +02:00
Christian Heimes 43d82df406 Now all error paths of _freeze_importlib use 'goto error' and the error label cleans up all used resources. 2013-07-21 23:05:04 +02:00
Christian Heimes 8c4c1f6e66 Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj() 2013-07-21 16:24:51 +02:00
Christian Heimes 96f628f487 Fix reference and memory leaks in _freeze_importlib 2013-07-21 16:19:02 +02:00
Christian Heimes a6404ad43c Check return value of PyEval_GetGlobals() for NULL
CID 486814
2013-07-20 22:54:25 +02:00
Christian Heimes 09994a9c59 Check return value of flush_character_buffer()
CID 486663
2013-07-20 22:41:58 +02:00
Mark Dickinson 58ceecfe5a 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 17:59:13 +01:00
Christian Heimes 7ed4294d7f Add missing check of PyDict_Update()'s return value in _elementtree.c
CID 719637
2013-07-20 15:12:09 +02:00
Christian Heimes 97cb67b9ca Add missing check of PyDict_SetItem()'s return value
CID 486659
2013-07-20 15:01:26 +02:00
Ronald Oussoren 138d080a28 #18480: Add missing PyType_Ready call to _elementtree extension 2013-07-19 11:11:25 +02:00
Victor Stinner 45e90394e7 Fix posix_chflags(): return_value was uninitialized when follow_symlinks=False
whereas the fchmodat() function is not avaialble.
2013-07-18 23:57:35 +02:00
Richard Oudkerk 9ad51ec81b Issue #18344: Fix potential ref-leaks in _bufferedreader_read_all(). 2013-07-15 16:05:22 +01:00
Serhiy Storchaka 275d5fdbe4 Issue #18101: Tcl.split() now process strings nested in a tuple as it
do with byte strings.

Added tests for Tcl.split() and Tcl.splitline().
2013-07-11 20:34:47 +03:00
R David Murray 296b73c83d #18399: fix comment typo.
Patch by Andrew Rowe.
2013-07-10 10:57:39 -04:00
Victor Stinner 8d3795474e Issue #18343: faulthandler.register() now keeps the previous signal handler
when the function is called twice, so faulthandler.unregister() restores
correctly the original signal handler.
2013-07-02 00:14:56 +02:00
Christian Heimes 8087879349 Singular form just like the other error message. 2013-07-01 15:23:39 +02:00
Christian Heimes a24b4d260b Issue #18339: Negative ints keys in unpickler.memo dict no longer cause a
segfault inside the _pickle C extension.
2013-07-01 15:17:45 +02:00
Victor Stinner 36b82d85a3 Fix time.strftime("%Y") on AIX: raise a ValueError for year > 9999
time.strtime("%Y") returned "2345" when formatting year 12345.
2013-06-25 02:33:53 +02:00
Victor Stinner 6efa965a27 Issue #18135: ssl.SSLSocket.write() now raises an OverflowError if the input
string in longer than 2 gigabytes, and ssl.SSLContext.load_cert_chain() raises
a ValueError if the password is longer than 2 gigabytes. The ssl module does
not support partial write.
2013-06-25 00:42:31 +02:00
Christian Heimes 91e8b8180d Check for correct macro, code uses S_ISDIR(). 2013-06-23 23:51:44 +02:00
Victor Stinner 9ee0203057 Issue #18135: Fix a possible integer overflow in ssl.SSLSocket.write()
and in ssl.SSLContext.load_cert_chain() for strings and passwords longer
than 2 gigabytes.
2013-06-23 15:08:23 +02:00
Victor Stinner 4569cd5eab _ssl.c: strip trailing spaces 2013-06-23 14:58:43 +02:00
Andrew Kuchling da30acf50b Closes #18220: expand itertools.islice docstring to 2 lines 2013-06-22 19:20:54 -04:00
Andrew Kuchling 446a39f78f Close #18285: add 'repeat' parameter to docstring for product 2013-06-22 19:04:11 -04:00
Andrew Kuchling 9290dd14b0 #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 14:50:56 -04:00
Andrew Kuchling b003ffa0ab Closes #18239: correct description of count() in module docstring 2013-06-21 07:58:35 -04:00
Benjamin Peterson 19886b8adc fix libffi build on AIX (closes #18248) 2013-06-19 09:01:42 -07:00
Christian Heimes 2f13f546e6 fixed libffi on PPC without __NO_FPRS__
ISO C90 forbids mixed declarations and code
2013-06-19 02:40:38 +02:00
Christian Heimes d2774c7d09 Issue #18259: Declare sethostname in socketmodule.c for AIX 2013-06-19 02:06:29 +02:00
Christian Heimes f0400baba8 Fix for r84195: add HAVE_ALLOCA_H to configure and only include alloca.h if it's available 2013-06-18 13:22:17 +02:00
Victor Stinner 43b2639fe2 ctypes: AIX needs an explicit #include <alloca.h> to get alloca() 2013-06-17 22:01:53 +02:00
Andrew Kuchling c7b6c50f29 Describe 'surrogateescape' in the documentation.
Also, improve some docstring descriptions of the 'errors' parameter.

Closes #14015.
2013-06-16 12:58:48 -04:00
Andrew Kuchling 53e5ea7951 #18113: Objects associated to a curses.panel object with set_userptr() were leaked.
Reported by Atsuo Ishimoto.
2013-06-15 14:04:04 -04:00
Ronald Oussoren a822d36675 Ensure that the fix for #17269 also works on OSX 10.4
AI_NUMERICSERV isn't defined on OSX 10.4.
2013-06-10 10:36:28 +02:00
Victor Stinner a534fc4b3b Close #18109: os.uname() now decodes fields from the locale encoding, and
socket.gethostname() now decodes the hostname from the locale encoding, instead
of using the UTF-8 encoding in strict mode.
2013-06-03 22:07:27 +02:00
Stefan Krah 04754b0fd4 Support multiarch build in tests. 2013-05-29 20:58:19 +02:00
Stefan Krah 891ca9e06a Backport bff16086f03b and bcaaaa00425b. 2013-05-29 19:14:17 +02:00
Stefan Krah 6edda14b29 Issue #17768: Support newline fill character in decimal.py and NUL fill
character in _decimal.c.
2013-05-29 15:45:38 +02:00
Serhiy Storchaka 37a79a12d1 Issue #18025: Fixed a segfault in io.BufferedIOBase.readinto() when raw
stream's read() returns more bytes than requested.
2013-05-28 16:24:45 +03:00
Jason R. Coombs 3a09286790 Issue #13772: Restored directory detection of targets in `os.symlink` on Windows, which was temporarily removed in Python 3.2.3 due to an incomplete implementation. The implementation now works even if the symlink is created in a location other than the current directory. 2013-05-27 23:21:28 -04:00
Eli Bendersky 6dc32b34dd Issue #13612: handle unknown encodings without a buffer overflow.
This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new
function - DefaultUnknownEncodingHandler.

Based on a patch by Serhiy Storchaka.
2013-05-25 05:25:48 -07:00
Benjamin Peterson 3b08a2978e indicate that read/write work with bytes (closes #18009) 2013-05-24 14:35:57 -07:00
Ronald Oussoren 27a4ac535f Issue #17269: Workaround for a platform bug in getaddrinfo on OSX
Without this patch socket.getaddrinfo crashed when called
with some unusual argument combinations.
2013-05-24 13:47:37 +02:00
Serhiy Storchaka 66d53fa9ad Issue #16986: ElementTree now correctly parses a string input not only when
an internal XML encoding is UTF-8 or US-ASCII.
2013-05-22 17:07:51 +03:00
Eli Bendersky 6a55dc3b4a Issue #17989: fix typo in error message 2013-05-19 16:59:59 -07:00
Eli Bendersky 08231a9c6a Issue #17901: fix TreeBuilder construction for an explicit element_factory=None
Based on report and patch by Aaron Oakley.
2013-05-18 15:47:16 -07:00
Eli Bendersky ef9683b73f Issue #17989: element_setattro returned incorrect error value.
This caused an exception to be raised later than expected.
2013-05-18 07:52:34 -07:00
Benjamin Peterson 18b7191653 C89 declaration compliance 2013-05-16 15:29:44 -05:00
doko@ubuntu.com 9df891ca41 - Fix typos in the multiprocessing module. 2013-05-15 18:06:56 +02:00
Benjamin Peterson dedac52731 prevent double free in cleanup code (#17968) 2013-05-13 19:55:40 -05:00
Antoine Pitrou 7f987398b7 Issue #17968: Fix memory leak in os.listxattr(). 2013-05-13 19:46:29 +02:00