Commit Graph

88509 Commits

Author SHA1 Message Date
Serhiy Storchaka 009b811d67 Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
Serhiy Storchaka 6c32585f67 Restored backward compatibility of pickling http.cookies.Morsel. It was
broken after converting instance attributes to properies in issue #2211.
2015-03-18 18:03:40 +02:00
Victor Stinner cb7e5f6f08 Merge 3.4 (tracemalloc typo) 2015-03-18 16:05:32 +01:00
Victor Stinner 444f124fcf _tracemalloc.c: Fix typo 2015-03-18 16:05:18 +01:00
Victor Stinner e371b3d21a Fix compiler warning in mmapmodule.c (compare signed/unsigned integers) 2015-03-18 15:04:34 +01:00
Victor Stinner 0c39b1b970 Initialize variables to prevent GCC warnings 2015-03-18 15:02:06 +01:00
Victor Stinner 938b0b9fee Fix compiler warning in dtoa.c 2015-03-18 15:01:44 +01:00
Victor Stinner 59f7fb29ec Issue #22181: On Linux, os.urandom() now uses the new getrandom() syscall if
available, syscall introduced in the Linux kernel 3.17. It is more reliable
and more secure, because it avoids the need of a file descriptor and waits
until the kernel has enough entropy.
2015-03-18 14:39:33 +01:00
Victor Stinner 072248ec63 Merge 3.4 (linecache doc) 2015-03-18 14:19:19 +01:00
Victor Stinner 376658fa13 Issue #11726: Fix linecache example in the doc
Use a Python source file (linecache.__file__) instead of /etc/passwd.

Modify also linecache docstrings to clarify the linecache is written to cache
Python source files, not any text files.
2015-03-18 14:16:50 +01:00
Victor Stinner 58b8f3923e Merge 3.4 (linecache doc) 2015-03-18 14:14:52 +01:00
Victor Stinner 93f0665fb6 Issue #11726: clarify linecache doc: linecache is written to cache Python
source files, even if "it works" with other text files encoded to UTF-8.
2015-03-18 14:14:42 +01:00
Victor Stinner de31134558 Issue #12155: Fix queue doc example to join threads
Use None as a sentinel to stop a worker.
2015-03-18 14:05:43 +01:00
Victor Stinner 926ce70066 Merge 3.4 (marshal doc) 2015-03-18 13:59:02 +01:00
Victor Stinner 6a318d420a Issue #19428: Document that PyMarshal_ReadLongFromFile() and
PyMarshal_ReadShortFromFile() can fail.
2015-03-18 13:58:49 +01:00
Victor Stinner 5200f55024 Issue #19428: Handle PyMarshal_Read*() errors in run_pyc_file()
Detect also earlier PyMarshal_Read*() errors in zipimport.
2015-03-18 13:56:25 +01:00
Victor Stinner 50931f41d0 Merge 3.4 (asyncio) 2015-03-18 11:37:54 +01:00
Victor Stinner d6dc7bdaf9 Issue #23456: Add missing @coroutine decorators in asyncio 2015-03-18 11:37:42 +01:00
Victor Stinner 7fea974baf Issue #23605: Fix os.walk(topdown=True), don't cache entry.is_symlink() because
the caller can replace the directory with a different file kind.

The bottom-up way, os.walk(topdown=False), still uses entry.is_symlink(), and
so can be faster than Python 3.4.
2015-03-18 11:29:47 +01:00
Victor Stinner a47fc5c2dd Issue #23694: Handle EINTR in _Py_open() and _Py_fopen_obj()
Retry open()/fopen() if it fails with EINTR and the Python signal handler
doesn't raise an exception.
2015-03-18 09:52:54 +01:00
Serhiy Storchaka 9c1a9b2657 Issue #2211: Updated the implementation of the http.cookies.Morsel class.
Setting attributes key, value and coded_value directly now is deprecated.
update() and setdefault() now transform and check keys.  Comparing for
equality now takes into account attributes key, value and coded_value.
copy() now returns a Morsel, not a dict.  repr() now contains all attributes.
Optimized checking keys and quoting values.  Added new tests.
Original patch by Demian Brecht.
2015-03-18 10:59:57 +02:00
Vinay Sajip 3505bd82a9 Issue #23207: merged fix from 3.4. 2015-03-18 08:49:57 +00:00
Vinay Sajip d55436ace3 Issue #23207: Improved kwarg validation. 2015-03-18 08:47:58 +00:00
Victor Stinner e42ccd2bfd Issue #23694: Enhance _Py_fopen(), it now raises an exception on error
* If fopen() fails, OSError is raised with the original filename object.
* The GIL is now released while calling fopen()
2015-03-18 01:39:23 +01:00
Victor Stinner a555cfcb73 Issue #23694: Enhance _Py_open(), it now raises exceptions
* _Py_open() now raises exceptions on error. If open() fails, it raises an
  OSError with the filename.
* _Py_open() now releases the GIL while calling open()
* Add _Py_open_noraise() when _Py_open() cannot be used because the GIL is not
  held
2015-03-18 00:22:14 +01:00
Victor Stinner 6562b29e13 Issue #23644: Fix issues with C++ when compiling Python extensions
Disable completly pyatomic.h on C++, because <stdatomic.h> is not compatible with C++.

<pyatomic.h> is only needed by the optimized PyThreadState_GET() macro in
pystate.h. Instead, declare PyThreadState_GET() as an alias to
PyThreadState_Get(), as done for limited API.
2015-03-17 22:53:27 +01:00
Robert Collins b28de01992 Fix patch attribution for issue 18983. 2015-03-18 09:59:33 +13:00
Robert Collins 302dbc6792 Issue #18983: Allow selection of output units in timeit.
This allows manual selection of a specific unit such as usecs rather than the
use of a heuristic. This is intended to aid machine processing of timeit
output.

Patch by Serhiy Storchaka.
2015-03-18 09:54:50 +13:00
Victor Stinner f024d263b4 Issue #23685: Fix usage of PyMODINIT_FUNC in _json, _scproxy, nis, pyexpat
_codecs_cn, _codecs_hk, _codecs_iso2022, _codecs_jp, _codecs_kr and _codecs_tw
modules.

pyexpat.c doesn't need to redeclare PyMODINIT_FUNC, it's already declared in
Include/pyport.h.
2015-03-17 17:48:27 +01:00
Ned Deily beb09977bc Issue #22585: null merge 2015-03-17 04:32:30 -07:00
Ned Deily ab6b9f8a5b Issue #22585: make URandomFDTests test case actually run 2015-03-17 04:30:08 -07:00
Victor Stinner 0c2fd89777 Revert changeset d927047b1d8eb87738676980a24930d053ba2150
Sorry, it was a mistake, the patch is still under review: issue #23646.
2015-03-17 10:49:17 +01:00
Berker Peksag e010d8f031 Issue #23682: Delete Python 2.2 mention from distutils documentation.
Patch by Thomas Kluyver.
2015-03-17 06:56:11 +02:00
Berker Peksag 6a98002d47 Issue #23682: Delete Python 2.2 mention from distutils documentation.
Patch by Thomas Kluyver.
2015-03-17 06:55:48 +02:00
Benjamin Peterson 85586ebc39 merge 3.4 (#23679) 2015-03-16 12:45:27 -05:00
Benjamin Peterson 59c4eb71f2 versionchanged for rc4 removal (closes #23679) 2015-03-16 12:43:38 -05:00
Victor Stinner 9c182a1e25 Issue #23680: Reduce risk of race condition in check_interrupted_write() of
test_io. Allocate the large data before scheduling an alarm in 1 second.

On very slow computer, the alarm rings sometimes during the memory allocation.
2015-03-16 18:03:06 +01:00
Victor Stinner 6d3c09f284 Issue #23680: Reduce risk of race condition in check_interrupted_write_retry()
of test_io. Allocate the large data before scheduling an alarm in 1 second.

On very slow computer, the alarm rings sometimes during the memory allocation.
2015-03-16 17:57:49 +01:00
Victor Stinner 59b356d659 Issue #23571: Restore removed assert(!PyErr_Occurred()); in
PyEval_CallObjectWithKeywords()

Sorry Serhiy, I missed your explanation because the review email was moved to
my Spam folder :-(
2015-03-16 11:52:32 +01:00
Serhiy Storchaka b8a78d3d85 Use non-zero and non-last positions in error handler tests. 2015-03-16 08:31:38 +02:00
Serhiy Storchaka 05d54730da Use non-zero and non-last positions in error handler tests. 2015-03-16 08:29:47 +02:00
Robert Collins c7965e0c21 Issue #23585: make patchcheck will ensure the interpreter is built. 2015-03-16 15:30:31 +13:00
Robert Collins bbb8ade904 Issue #23631: Fix traceback.format_list when a traceback has been mutated. 2015-03-16 15:27:16 +13:00
Serhiy Storchaka 93f4d4c1d6 Increased coverage of standard codec error handlers. 2015-03-15 23:43:34 +02:00
Serhiy Storchaka 98d156b2b2 Increased coverage of standard codec error handlers. 2015-03-15 23:41:37 +02:00
Eli Bendersky a84099bcc5 Issue #23549: Clarify confusion in heapq doc - accessing the mininmal element
Merge 3.4

The current documentation only mentions heap[0] as the smallest element in the
beginning, and not in any of the methods' docs. There's no method to access the
minimal element without popping it, and the documentation of nsmallest is
confusing because it may suggest that min() is the way to go for n==1.
2015-03-14 20:17:38 -07:00
Eli Bendersky 39430daa3b Issue #23549: Clarify confusion in heapq doc - accessing the mininmal element
The current documentation only mentions heap[0] as the smallest element in the
beginning, and not in any of the methods' docs. There's no method to access the
minimal element without popping it, and the documentation of nsmallest is
confusing because it may suggest that min() is the way to go for n==1.
2015-03-14 20:14:23 -07:00
Berker Peksag 7aaa85932c Issue #23568: Add rdivmod support to MagicMock() objects.
Patch by Håkan Lövdahl.
2015-03-15 01:57:38 +02:00
Berker Peksag a785dece57 Issue #23568: Add rdivmod support to MagicMock() objects.
Patch by Håkan Lövdahl.
2015-03-15 01:51:56 +02:00
Berker Peksag 102029dfd6 Issue #2052: Add charset parameter to HtmlDiff.make_file(). 2015-03-15 01:18:47 +02:00