Commit Graph

88542 Commits

Author SHA1 Message Date
Victor Stinner 716a74ea22 Issue #23001: Fix typo 2015-03-20 10:24:18 +01:00
Serhiy Storchaka 53c3fb186a Issue #22826: The result of open() in Tools/freeze/bkfile.py is now better
compatible with regular files (in particular it now supports the context
management protocol).
2015-03-20 09:21:59 +02:00
Serhiy Storchaka 8490f5acfe Issue #23001: Few functions in modules mmap, ossaudiodev, socket, ssl, and
codecs, that accepted only read-only bytes-like object now accept writable
bytes-like object too.
2015-03-20 09:00:36 +02:00
Victor Stinner 0eac13052c Issue #23646: Fix test_threading on Windows 2015-03-20 03:06:12 +01:00
Victor Stinner 580ef1345a Cleanup pytime.c: add XXX_TO_YYY constants (ex: SEC_TO_US) 2015-03-20 01:55:04 +01:00
Victor Stinner 9a8089b32a Issue #23646: Enhance precision of time.sleep() and socket timeout when
interrupted by a signal

Add a new _PyTime_AddDouble() function and remove _PyTime_ADD_SECONDS() macro.
The _PyTime_ADD_SECONDS only supported an integer number of seconds, the
_PyTime_AddDouble() has subsecond resolution.
2015-03-20 01:42:20 +01:00
Victor Stinner 4fa99cdb4c Issue #23709: The ossaudiodev module now retries read/write when interrupted by
a signal (PEP 475).

Use he new _Py_read() and _Py_write() functions.
2015-03-20 00:27:28 +01:00
Ned Deily b3aa2e7ba3 Issue #23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a. 2015-03-19 16:22:14 -07:00
Ned Deily f0c6cd3581 Issue #23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a. 2015-03-19 16:21:10 -07:00
Antoine Pitrou 484b9f3b99 Merge 2015-03-20 00:10:23 +01:00
Victor Stinner c1cf4f7ef9 Issue #23708: Fix _Py_read() compilation error on Windows
Fix typo: self->fd => fd
2015-03-19 23:53:04 +01:00
Victor Stinner c9382eb7ae Issue #23707: On UNIX, os.urandom() now calls the Python signal handler when
read() is interrupted by a signal.

dev_urandom_python() now calls _Py_read() helper instead of calling directly
read().
2015-03-19 23:36:33 +01:00
Victor Stinner 54799672da Issue #23708: select.devpoll now retries its internal write() when interrupted
by a signal (EINTR).

Modify devpoll_flush() to use _Py_write() instead of calling directly write().
2015-03-19 23:33:09 +01:00
Antoine Pitrou 31084ba528 Issue #23632: Memoryviews now allow tuple indexing (including for multi-dimensional memoryviews). 2015-03-19 23:29:36 +01:00
Victor Stinner c7cd12da60 Issue #22181: Fix dev_urandom_noraise(), try calling py_getrandom() before
opening /dev/urandom.
2015-03-19 23:24:45 +01:00
Victor Stinner 66aab0c4b5 Issue #23708: Add _Py_read() and _Py_write() functions to factorize code handle
EINTR error and special cases for Windows.

These functions now truncate the length to PY_SSIZE_T_MAX to have a portable
and reliable behaviour. For example, read() result is undefined if counter is
greater than PY_SSIZE_T_MAX on Linux.
2015-03-19 22:53:20 +01:00
Victor Stinner 9eb57c5fa5 Issue #22181: The availability of the getrandom() is now checked in configure,
and stored in pyconfig.h as the new HAVE_GETRANDOM_SYSCALL define.

Fix os.urandom() tests using file descriptors if os.urandom() uses getrandom().
2015-03-19 22:21:49 +01:00
Victor Stinner 79d68f929d Issue #23646: If time.sleep() is interrupted by a signal, the sleep is now
retried with the recomputed delay, except if the signal handler raises an
exception (PEP 475).

Modify also test_signal to use a monotonic clock instead of the system clock.
2015-03-19 21:54:09 +01:00
Serhiy Storchaka 0ed56a0b42 Fixed Misc/NEWS entry for issue #23136. 2015-03-19 19:54:51 +02:00
Serhiy Storchaka 64c439d3ae Fixed Misc/NEWS entry for issue #23136. 2015-03-19 19:52:50 +02:00
Serhiy Storchaka fc7344a792 Issue #23136: _strptime now uniformly handles all days in week 0, including
Jan 30 of previous year.  Based on patch by Jim Carroll.
2015-03-19 19:14:15 +02:00
Serhiy Storchaka 423feea01e Issue #23136: _strptime now uniformly handles all days in week 0, including
Jan 30 of previous year.  Based on patch by Jim Carroll.
2015-03-19 19:13:37 +02:00
Serhiy Storchaka 4f418d3671 Issue #23700: Iterator of NamedTemporaryFile now keeps a reference to
NamedTemporaryFile instance.  Patch by Bohuslav Kabrda.
2015-03-19 15:24:27 +02:00
Serhiy Storchaka 56cefa69ee Issue #23700: Iterator of NamedTemporaryFile now keeps a reference to
NamedTemporaryFile instance.  Patch by Bohuslav Kabrda.
2015-03-19 15:23:15 +02:00
Benjamin Peterson 41ce610d4c merge 3.4 2015-03-18 21:36:23 -05:00
Benjamin Peterson 86fdbf3152 wrap properly 2015-03-18 21:35:38 -05:00
Ethan Furman 8a0b9a4bf3 null merge from 3.4 2015-03-18 18:26:08 -07:00
Ethan Furman 482fe0477e issue23673
add private method to enum to support replacing global constants with Enum members:
- search for candidate constants via supplied filter
- create new enum class and members
- insert enum class and replace constants with members via supplied module name
- replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle
modify IntEnum classes to use new method
2015-03-18 18:19:30 -07:00
Ethan Furman 24e837f231 issue23673
add private method to enum to support replacing global constants with Enum members:
- search for candidate constants via supplied filter
- create new enum class and members
- insert enum class and replace constants with members via supplied module name
- replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle
modify IntEnum classes to use new method
2015-03-18 17:27:57 -07:00
Antoine Pitrou 8eef6a9ad0 Issue #22903: The fake test case created by unittest.loader when it fails importing a test module is now picklable. 2015-03-19 00:01:37 +01:00
Antoine Pitrou d833779cea Issue #22903: The fake test case created by unittest.loader when it fails importing a test module is now picklable. 2015-03-18 23:56:46 +01:00
Antoine Pitrou 52a05ab524 Issue #23353: improve exceptions tests for generators 2015-03-18 22:23:40 +01:00
Antoine Pitrou c4c19b3938 Issue #23353: improve exceptions tests for generators 2015-03-18 22:22:46 +01:00
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