Victor Stinner
268225f154
Issue #23715 : Fix test_script_helper
2015-03-20 14:02:33 +01:00
Victor Stinner
57d516bd6b
Issue #23696 : Remove test on ZipImportError.__context__ because the context is
...
None on Windows.
When the file is not readable, the error occurs at open on UNIX. On Windows,
the error only occurs at the first operation on the open file. It would require
to many changes to set __context__ to an OSError for all file operations, for a
little benefit (__context__ is almost never used).
2015-03-20 13:48:36 +01:00
Victor Stinner
03129230c9
Issue #23715 : Fix test_eintr, skip tests on signal.sigwaitinfo() and
...
signal.sigtimedwait() if functions are missing
2015-03-20 13:42:52 +01:00
Victor Stinner
1335ca5053
Issue #23715 : Enhance test.script_helper to investigate test_eintr failure
...
If Python failed, show also stdout in the assertion error.
2015-03-20 13:38:08 +01:00
Victor Stinner
a453cd8d85
Issue #23715 : signal.sigwaitinfo() and signal.sigtimedwait() are now retried
...
when interrupted by a signal not in the *sigset* parameter, if the signal
handler does not raise an exception. signal.sigtimedwait() recomputes the
timeout with a monotonic clock when it is retried.
Remove test_signal.test_sigwaitinfo_interrupted() because sigwaitinfo() doesn't
raise InterruptedError anymore if it is interrupted by a signal not in its
sigset parameter.
2015-03-20 12:54:28 +01:00
Victor Stinner
a3c0202eb5
Issue #23708 : Save/restore errno in _Py_read() and _Py_write()
...
Save and then restore errno because PyErr_CheckSignals() and
PyErr_SetFromErrno() can modify it.
2015-03-20 11:58:18 +01:00
Victor Stinner
f50e187724
Fix compiler warnings: comparison between signed and unsigned numbers
2015-03-20 11:32:24 +01:00
Victor Stinner
7f04d4d4b7
Issue #23708 : Split assertion expression in two assertions in _Py_read() and
...
_Py_write() to know which test failed on the buildbot "AMD64 Snow Leop 3.x".
2015-03-20 11:21:41 +01:00
Victor Stinner
fbd6f9ed12
Issue #23696 : Chain ZipImportError to the OSError
2015-03-20 10:52:25 +01:00
Victor Stinner
99953006df
Issue #23709 , #23001 : ossaudiodev now uses Py_ssize_t for sizes instead of int
...
The module is now also "SSIZE_T clean" (for PyArg_Parse...() functions) since
it switched to Py_buffer ("y*" argument format).
2015-03-20 10:37:34 +01:00
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