Serhiy Storchaka
f07a4b663d
Issue #21526 : Tkinter now supports new boolean type in Tcl 8.5.
2015-03-23 00:47:45 +02:00
Victor Stinner
efde146b0c
Issue #23571 : _Py_CheckFunctionResult() now gives the name of the function
...
which returned an invalid result (result+error or no result without error) in
the exception message.
Add also unit test to check that the exception contains the name of the
function.
Special case: the final _PyEval_EvalFrameEx() check doesn't mention the
function since it didn't execute a single function but a whole frame.
2015-03-21 15:04:43 +01:00
Raymond Hettinger
6921c13bbb
Minor nit. Make the rotate() success/fail tests consistent.
2015-03-21 02:03:40 -07:00
Raymond Hettinger
ac13ad6a32
For safety, wait to decref deleted values until the deque state has been restored.
2015-03-21 01:53:16 -07:00
Raymond Hettinger
0f6f94778a
Fix minor formatting nits and remove unnecessary comment.
2015-03-21 01:42:10 -07:00
Raymond Hettinger
32ea16577d
Issue 23704: Add index(), copy(), and insert() to deques. Register deques as a MutableSequence.
2015-03-21 01:37:37 -07:00
Raymond Hettinger
39dadf7abf
Issue 23705: Improve the performance of __contains__ checks for deques.
2015-03-20 16:38:56 -07:00
Serhiy Storchaka
17d3a58e39
Issue #22832 : Tweaked parameter names for fcntl module to better match
...
official POSIX documentation. Updated the documenttion for Python 3.
Patch by Alex Shkop.
2015-03-20 20:04:21 +02: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
f50e187724
Fix compiler warnings: comparison between signed and unsigned numbers
2015-03-20 11:32:24 +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
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
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
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
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
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
009b811d67
Removed unintentional trailing spaces in non-external and non-generated C files.
2015-03-18 21:53:15 +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
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
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
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
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
Serhiy Storchaka
a60c2fe480
Issue #23641 : Cleaned out legacy dunder names from tests and docs.
...
Fixed 2 to 3 porting bug in pynche.ColorDB.
2015-03-12 21:56:08 +02:00
Victor Stinner
945c82eea3
test
2015-03-12 16:19:01 +01:00
Serhiy Storchaka
c2ccce791c
Issue #23641 : Cleaned out legacy dunder names from tests and docs.
...
Fixed 2 to 3 porting bug in pynche.ColorDB.
Added few tests for __truediv__, __floordiv__ and __matmul__.
2015-03-12 22:01:30 +02:00
Victor Stinner
95bb714ff7
Issue #23566 : enable(), register(), dump_traceback() and dump_traceback_later()
...
functions of faulthandler now accept file descriptors. Patch by Wei Wu.
2015-03-12 15:32:03 +01:00
Steve Dower
8acde7dcce
Issue #23524 : Change back to using Windows errors for _Py_fstat instead of the errno shim.
2015-03-07 18:14:07 -08:00
Victor Stinner
35a97c0bed
Issue #22524 : Fix os.scandir() for platforms which don't have a d_type field in
...
the dirent structure (ex: OpenIndiana).
2015-03-08 02:59:09 +01:00
Victor Stinner
6036e4431d
Issue #22524 : New os.scandir() function, part of the PEP 471: "os.scandir()
...
function -- a better and faster directory iterator". Patch written by Ben
Hoyt.
2015-03-08 01:58:04 +01:00
Victor Stinner
4a7cc88472
Issue #23571 : PyObject_Call(), PyCFunction_Call() and call_function() now
...
raise a SystemError if a function returns a result and raises an exception.
The SystemError is chained to the previous exception.
Refactor also PyObject_Call() and PyCFunction_Call() to make them more readable.
Remove some checks which became useless (duplicate checks).
Change reviewed by Serhiy Storchaka.
2015-03-06 23:35:27 +01:00
Steve Dower
d81431f587
Issue #23524 : Replace _PyVerify_fd function with calling _set_thread_local_invalid_parameter_handler on every thread.
2015-03-06 14:47:02 -08:00
Ned Deily
e37a1946c7
Fix regression introduced by changeset 7c6e3358221a that caused compile
...
errors of _testcapimodule.c with older versions of gcc.
2015-03-05 15:47:10 -08:00
Serhiy Storchaka
caa01f861c
Fixed GCC version testing.
2015-03-05 23:42:24 +02:00
Victor Stinner
a4c727131e
Fix "GCC diagnostic" in socketmodule.c
...
Fix regression of changeset 7c6e3358221a on GCC < 4.4. The _socket module
cannot be compiled on "x86 FreeBSD 7.2 3.x" buildbot anymore.
2015-03-05 14:04:03 +01:00
Benjamin Peterson
de8eca4638
merge 3.4
2015-03-04 22:50:25 -05:00
Benjamin Peterson
990fcaac3c
expose X509_V_FLAG_TRUSTED_FIRST
2015-03-04 22:49:41 -05:00
Benjamin Peterson
b64ae7bf2d
merge 3.4 ( #23476 )
2015-03-04 22:11:48 -05:00
Benjamin Peterson
fdb1971587
enable X509_V_FLAG_TRUSTED_FIRST when possible ( closes #23476 )
2015-03-04 22:11:12 -05:00
Antoine Pitrou
0bfd0a4048
Issue #23576 : Avoid stalling in SSL reads when EOF has been reached in the SSL layer but the underlying connection hasn't been closed.
2015-03-04 20:54:57 +01:00
Antoine Pitrou
f7f3b0a14a
Issue #23576 : Avoid stalling in SSL reads when EOF has been reached in the SSL layer but the underlying connection hasn't been closed.
2015-03-04 20:51:55 +01:00
Victor Stinner
9672da7bb4
Issue #23285 : Fix handling of EINTR in fileio.c
...
Fix handling of EINTR: don't return None if PyErr_CheckSignals() raised an
exception.
Initialize also the length outside the loop to only initialize it once.
2015-03-04 18:40:10 +01:00
Raymond Hettinger
87e691240b
Minor neatening-up. Make assignments in same order a struct fields. Line-up comments.
2015-03-02 23:32:02 -08:00
Raymond Hettinger
f9d9c79aa8
Switch the state variable to unsigned for defined wrap-around behavior.
2015-03-02 22:47:46 -08:00
Raymond Hettinger
30c9074b96
Minor beautification. Move struct definitions to the top. Fix-up a comment.
2015-03-02 22:31:35 -08:00
Raymond Hettinger
f30f5b9ba6
Minor code beautification. Replace macro with in-lineable functions.
2015-03-02 22:23:37 -08:00
Raymond Hettinger
3c186ba441
Beautify and better document the use of the size_t cast for bounds checking.
2015-03-02 21:45:02 -08:00
Benjamin Peterson
83d8fc265a
merge 3.4 ( #23367 )
2015-03-02 11:18:56 -05:00
Benjamin Peterson
5061e67f0f
merge 3.3 ( #23367 )
2015-03-02 11:18:40 -05:00
Benjamin Peterson
b779bfba45
fix possible overflow bugs in unicodedata ( closes #23367 )
2015-03-02 11:17:05 -05:00
Steve Dower
3e96f324dc
Issue #23451 : Update pyconfig.h for Windows to require Vista headers and remove unnecessary version checks.
2015-03-02 08:01:10 -08:00
Alexander Belopolsky
e49af34151
Issue #7830 : Flatten nested functools.partial.
2015-03-01 15:08:17 -05:00
Alexander Belopolsky
e2e178e081
Closes issue #22791 : Improved datetime from timestamp methods documentation.
...
Original patch by Akira Li.
2015-03-01 14:52:07 -05:00
Raymond Hettinger
7f9ea7543e
Issue #23553 : Use an unsigned cast to tighten-up the bounds checking logic.
2015-03-01 00:38:00 -08:00
Serhiy Storchaka
90295b450c
Merge heads
2015-03-01 10:03:46 +02:00
Raymond Hettinger
c20830804d
Need a (size_t) cast instead of (unsigned) to be big enough for a Py_ssize_t.
2015-02-28 23:29:16 -08:00
Serhiy Storchaka
50adb9fc32
Issue #20204 : Added the __module__ attribute to _tkinter classes.
2015-03-01 09:07:10 +02:00
Serhiy Storchaka
efdc16f978
Issue #20204 : Added the __module__ attribute to _tkinter classes.
2015-03-01 09:06:29 +02:00
Raymond Hettinger
a473b9da15
Use unsigned division and modulo for item assignment as well.
2015-02-28 17:49:47 -08:00
Raymond Hettinger
63d1ff2a0b
Convert one more division to unsigned arithmetic to speed-up deque_item().
2015-02-28 07:41:30 -08:00
Raymond Hettinger
7e8c7956a7
Line missed in last checkin
2015-02-27 16:59:29 -08:00
Raymond Hettinger
da2850f932
Since the index is always non-negative, use faster unsigned division and modulo.
2015-02-27 12:42:54 -08:00
Raymond Hettinger
daf57f25e5
Bump the blocksize up from 62 to 64 to speed up the modulo calculation.
...
Remove the old comment suggesting that it was desireable to have
blocksize+2 as a multiple of the cache line length. That would
have made sense only if the block structure start point was always
aligned to a cache line boundary. However, the memory allocations
are 16 byte aligned, so we don't really have control over whether
the struct spills across cache line boundaries.
2015-02-26 23:21:29 -08:00
Serhiy Storchaka
b48af340b9
Silenced minor GCC warnings.
2015-02-26 15:27:57 +02:00
Antoine Pitrou
e71258a0e6
Issue #15955 : Add an option to limit the output size in bz2.decompress().
...
Patch by Nikolaus Rath.
2015-02-26 13:08:07 +01:00
Steve Dower
f63dab5a84
Back-out wcstok deprecation suppression and updates calls to use wcstok_s.
2015-02-25 20:48:01 -08:00
Serhiy Storchaka
06a13f81ea
Issue #23152 : Move declarations back to posixmodule.c.
...
Declarations of Windows-specific auxilary functions need Windows types
from windows.h. Instead of including windows.h in Python.h and making
it available to all Windows users, it is simpler and safer just move
declarations to the single file that needs them.
2015-02-22 21:34:54 +02:00
Serhiy Storchaka
12ebbc74f1
Issue #23152 : Move declaration into a header and exclude from stable API.
2015-02-22 19:39:36 +02:00
Steve Dower
bf1f376b3e
Issue #23152 : Renames time_t_to_FILE_TIME to _Py_time_t_to_FILE_TIME, removes unused struct win32_stat and return value
2015-02-21 15:26:02 -08:00
Steve Dower
a2af1a5a5a
Issue #23152 : Renames attribute_data_to_stat to _Py_attribute_data_to_stat
2015-02-21 10:04:10 -08:00
Steve Dower
f2f373f593
Issue #23152 : Implement _Py_fstat() to support files larger than 2 GB on Windows.
...
fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
2015-02-21 08:44:05 -08:00
Serhiy Storchaka
df80706f14
Issue #23215 : Multibyte codecs with custom error handlers that ignores errors
...
consumed too much memory and raised SystemError or MemoryError.
Original patch by Aleksi Torhamo.
2015-02-21 01:21:08 +02:00
Serhiy Storchaka
a1543cdcd6
Issue #23215 : Multibyte codecs with custom error handlers that ignores errors
...
consumed too much memory and raised SystemError or MemoryError.
Original patch by Aleksi Torhamo.
2015-02-21 01:19:58 +02:00
Serhiy Storchaka
254dd59068
Issue #5700 : io.FileIO() called flush() after closing the file.
...
flush() was not called in close() if closefd=False.
2015-02-21 00:35:53 +02:00
Serhiy Storchaka
a3712a9a6c
Issue #5700 : io.FileIO() called flush() after closing the file.
...
flush() was not called in close() if closefd=False.
2015-02-21 00:35:09 +02:00
Serhiy Storchaka
79d8f3f123
Regenerated Argument Clinic checksums.
2015-02-20 12:46:11 +02:00
Raymond Hettinger
7a4f43a8dd
Improve struct cache locality by bring commonly accessed fields close together.
2015-02-20 00:50:04 -08:00
Serhiy Storchaka
483405bcca
Issue #22883 : Got rid of outdated references to PyInt and PyString in comments.
2015-02-17 10:14:30 +02:00
Serhiy Storchaka
3584056ca5
Shoould be Py_MIN, not Py_MAX.
2015-02-16 20:54:03 +02:00
Serhiy Storchaka
26861b0b29
Issue #23450 : Fixed possible integer overflows.
2015-02-16 20:52:17 +02:00
Serhiy Storchaka
4d0d982985
Issue #23446 : Use PyMem_New instead of PyMem_Malloc to avoid possible integer
...
overflows. Added few missed PyErr_NoMemory().
2015-02-16 13:33:32 +02:00
Serhiy Storchaka
1a1ff29659
Issue #23446 : Use PyMem_New instead of PyMem_Malloc to avoid possible integer
...
overflows. Added few missed PyErr_NoMemory().
2015-02-16 13:28:22 +02:00
Serhiy Storchaka
53fa8b2a4b
Fixed few compiler warnings.
2015-02-16 09:40:12 +02:00
Serhiy Storchaka
c86ca26d32
Issue #23096 : Pickle representation of floats with protocol 0 now is the same
...
for both Python and C implementations.
2015-02-15 14:18:32 +02:00
Berker Peksag
9ab1cc4fe4
Issue #13637 : Improve exception message of a2b_* functions.
...
Patch by Vajrasky Kok.
2015-02-15 00:31:26 +02:00
Berker Peksag
3cd30c2cee
Issue #13637 : Improve exception message of a2b_* functions.
...
Patch by Vajrasky Kok.
2015-02-15 00:31:00 +02:00
Victor Stinner
cf40a9e640
Issue #23450 : Fix signal.set_wakeup_fd() on Windows
...
Detect integer overflow on the file descriptor of the socket on 64-bit Python.
2015-02-12 16:34:54 +01:00
Victor Stinner
385efb4d99
Merge 3.4 (faulthandler)
2015-02-11 14:23:46 +01:00
Victor Stinner
7a5567a92c
Issue #23433 : Fix faulthandler._stack_overflow()
...
Fix undefined behaviour: don't compare pointers. Use Py_uintptr_t type instead
of void*. It fixes test_faulthandler on Fedora 22 which now uses GCC 5.
2015-02-11 14:23:35 +01:00
Raymond Hettinger
eb6b554fbc
Update copyright.
2015-02-10 22:37:22 -06:00
Benjamin Peterson
5ef01e9b93
merge 3.4 ( #23361 )
2015-02-09 21:00:00 -05:00
Benjamin Peterson
22ef9f722e
merge 3.3 ( #23361 )
2015-02-09 20:58:52 -05:00
Benjamin Peterson
8ce6806498
add overflow checking ( closes #23361 )
2015-02-09 20:58:12 -05:00
Charles-François Natali
6e6c59b508
Issue #23285 : PEP 475 -- Retry system calls failing with EINTR.
2015-02-07 13:27:50 +00:00
Serhiy Storchaka
6cfb61f163
Issue #23392 : Added tests for marshal C API that works with FILE*.
2015-02-06 09:00:44 +02:00
Serhiy Storchaka
b51813403f
Issue #23392 : Added tests for marshal C API that works with FILE*.
2015-02-06 08:58:56 +02:00
Stefan Krah
a7559c04e0
Issue #14203 : Temporary fix for the compile failure on Windows.
2015-02-03 22:27:21 +01:00
Stefan Krah
650c1e818d
Issue #14203 : Remove obsolete support for view==NULL in bytesiobuf_getbuffer()
...
and array_buffer_getbuf().
2015-02-03 21:43:23 +01:00
Serhiy Storchaka
38c30e6c8e
Issue #15381 : Fixed a bug in BytesIO.write().
...
It was expected that string_size == PyBytes_GET_SIZE(buf) if the buffer is
shared, but truncate() and __setstate__() can set string_size without
unsharing the buffer.
2015-02-03 18:51:58 +02:00
Stefan Krah
5178d91be0
Issue #14203 : Remove obsolete support for view==NULL in PyBuffer_FillInfo()
...
and bytearray_getbuffer(). Both functions now raise BufferError in that
case.
2015-02-03 16:57:21 +01:00
Serhiy Storchaka
b9765eec5c
Issue #15381 : Try to fix refcount bug. Empty and 1-byte buffers are always shared.
2015-02-03 14:57:49 +02:00
Serhiy Storchaka
87d0b45485
Issue #15381 : Optimized io.BytesIO to make less allocations and copyings.
2015-02-03 11:30:10 +02:00
Serhiy Storchaka
83e802796c
Issue #22818 : Splitting on a pattern that could match an empty string now
...
raises a warning. Patterns that can only match empty strings are now
rejected.
2015-02-03 11:04:19 +02:00
Serhiy Storchaka
32ca3dcb97
Issue #23099 : Closing io.BytesIO with exported buffer is rejected now to
...
prevent corrupting exported buffer.
2015-02-03 09:30:51 +02:00
Serhiy Storchaka
c057c3859c
Issue #23099 : Closing io.BytesIO with exported buffer is rejected now to
...
prevent corrupting exported buffer.
2015-02-03 02:00:18 +02:00
Serhiy Storchaka
7a27c97216
Issues #23363 , #23364 , #23365 , #23366 : Fixed itertools overflow tests.
...
Used PyMem_New to check overflow.
2015-02-03 01:50:31 +02:00
Serhiy Storchaka
b5e8e57555
Issues #23363 , #23364 , #23365 , #23366 : Fixed itertools overflow tests.
...
Used PyMem_New to check overflow.
2015-02-03 01:35:10 +02:00
Serhiy Storchaka
dee948b359
Issues #23363 , #23364 , #23365 , #23366 : Fixed itertools overflow tests.
...
Used PyMem_New to check overflow.
2015-02-03 01:34:09 +02:00
Serhiy Storchaka
3dd3e26680
Issue #22896 : Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
...
and PyObject_AsWriteBuffer().
2015-02-03 01:25:42 +02:00
Serhiy Storchaka
4fdb68491e
Issue #22896 : Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
...
and PyObject_AsWriteBuffer().
2015-02-03 01:21:08 +02:00
Raymond Hettinger
0e259f18f7
Optimization guides suggest copying memory in an ascending direction when possible.
2015-02-01 22:53:41 -08:00
Benjamin Peterson
5d0bb852a2
merge 3.4 ( #23364 , #23363 )
2015-02-01 21:36:01 -05:00
Benjamin Peterson
c468b537cd
merge 3.3 ( #23364 , #23363 )
2015-02-01 21:35:34 -05:00
Benjamin Peterson
0eaabf1c05
check for overflows in permutations() and product() ( closes #23363 , closes #23364 )
2015-02-01 21:34:07 -05:00
Benjamin Peterson
38d9772622
merge 3.4 ( #23365 )
2015-02-01 21:11:54 -05:00
Benjamin Peterson
f635dc32b1
merge 3.3 ( #23365 )
2015-02-01 21:11:39 -05:00
Benjamin Peterson
6f082297b2
check for overflow in combinations_with_replacement ( closes #23365 )
2015-02-01 21:10:47 -05:00
Benjamin Peterson
4db56d5002
merge 3.4 ( #23366 )
2015-02-01 21:01:43 -05:00
Benjamin Peterson
819c4e9bc4
merge 3.3 ( #23366 )
2015-02-01 21:00:15 -05:00
Benjamin Peterson
4b40eeb339
detect overflow in combinations ( closes #23366 )
2015-02-01 20:59:00 -05:00
Benjamin Peterson
71cf91cc09
merge 3.4 ( #23369 )
2015-02-01 18:00:19 -05:00
Benjamin Peterson
3675cd9db1
merge 3.3 ( #23369 )
2015-02-01 17:59:49 -05:00
Benjamin Peterson
e3bfe19358
fix possible overflow in encode_basestring_ascii ( closes #23369 )
2015-02-01 17:53:53 -05:00
Stefan Krah
2e6658b4a7
Merge from 3.4.
2015-02-01 19:19:49 +01:00
Stefan Krah
7213fcc27e
Issue #23370 : Fix off-by-one error for non-contiguous buffers.
2015-02-01 16:19:23 +01:00
Stefan Krah
363af44a4a
Issue #22445 : PyBuffer_IsContiguous() now implements precise contiguity
...
tests, compatible with NumPy's NPY_RELAXED_STRIDES_CHECKING compilation
flag. Previously the function reported false negatives for corner cases.
2015-02-01 14:53:54 +01:00
Gregory P. Smith
bd4976bbd3
Always #define _PyLong_FromDev as we always need it to compile rather than
...
only defining it when HAVE_MKNOD && HAVE_MAKEDEV are true.
This "oops" issue reported by John E. Malmberg on core-mentorship.
(what kinds of systems don't HAVE_MKNOD && HAVE_MAKEDEV?)
2015-01-28 16:08:07 -08:00
Gregory P. Smith
702dada2c5
Always #define _PyLong_FromDev as we always need it to compile rather than
...
only defining it when HAVE_MKNOD && HAVE_MAKEDEV are true.
This "oops" issue reported by John E. Malmberg on core-mentorship.
(what kinds of systems don't HAVE_MKNOD && HAVE_MAKEDEV?)
2015-01-28 16:07:52 -08:00
Benjamin Peterson
c54de47759
ifdef our way to compatibility with old openssl ( closes #23335 )
2015-01-28 12:06:39 -05:00
Benjamin Peterson
07f0515667
disable ALPN on LibreSSL, which has a large version number, but not ALPN support ( closes #23329 )
2015-01-27 11:10:18 -05:00
Victor Stinner
3bf8684c5e
Merge 3.4 (asyncio)
2015-01-26 22:43:52 +01:00
Victor Stinner
498b1f62db
asyncio, _overlapped.ConnectPipe(): release the GIL
2015-01-26 22:43:39 +01:00
Victor Stinner
c27a8afcb0
Merge 3.4 (asyncio)
2015-01-26 22:31:03 +01:00
Victor Stinner
41063d2a59
asyncio, Tulip issue 204: Fix IocpProactor.recv()
...
If ReadFile() fails with ERROR_BROKEN_PIPE, the operation is not pending: don't
register the overlapped.
I don't know if WSARecv() can fail with ERROR_BROKEN_PIPE. Since
Overlapped.WSARecv() already handled ERROR_BROKEN_PIPE, let me guess that it
has the same behaviour than ReadFile().
2015-01-26 22:30:49 +01:00
Serhiy Storchaka
47efb4a5dc
Issue #19361 : JSON decoder now raises JSONDecodeError instead of ValueError.
2015-01-26 13:16:30 +02:00
Steve Dower
7d0e0c9f7b
Closes #23253 : Delay-load ShellExecute
2015-01-24 08:18:24 -08:00
Benjamin Peterson
8861502e07
prefer server alpn ordering over the client's
2015-01-23 17:30:26 -05:00
Benjamin Peterson
cca2732a82
add support for ALPN ( closes #20188 )
2015-01-23 16:35:37 -05:00
Victor Stinner
5da0549154
Merge 3.4 (asyncio)
2015-01-22 23:50:34 +01:00
Victor Stinner
2b77c5467f
asyncio, Tulip issue 204: Fix IocpProactor.accept_pipe()
...
Overlapped.ConnectNamedPipe() now returns a boolean: True if the pipe is
connected (if ConnectNamedPipe() failed with ERROR_PIPE_CONNECTED), False if
the connection is in progress.
This change removes multiple hacks in IocpProactor.
2015-01-22 23:50:03 +01:00
Victor Stinner
58c85144db
Merge 3.4 (asyncio)
2015-01-22 22:55:31 +01:00
Victor Stinner
7ffa2c5fdd
Issue #23293 , asyncio: Rewrite IocpProactor.connect_pipe()
...
Add _overlapped.ConnectPipe() which tries to connect to the pipe for
asynchronous I/O (overlapped): call CreateFile() in a loop until it doesn't
fail with ERROR_PIPE_BUSY. Use an increasing delay between 1 ms and 100 ms.
Remove Overlapped.WaitNamedPipeAndConnect() which is no more used.
2015-01-22 22:55:08 +01:00
Victor Stinner
91d11bbb2d
Merge 3.4 (asyncio)
2015-01-21 23:40:19 +01:00
Victor Stinner
d0a28dee78
Issue #23095 , asyncio: Rewrite _WaitHandleFuture.cancel()
...
This change fixes a race conditon related to _WaitHandleFuture.cancel() leading
to Python crash or "GetQueuedCompletionStatus() returned an unexpected event"
logs. Before, the overlapped object was destroyed too early, it was possible
that the wait completed whereas the overlapped object was already destroyed.
Sometimes, a different overlapped was allocated at the same address, leading to
unexpected completition.
_WaitHandleFuture.cancel() now waits until the wait is cancelled to clear its
reference to the overlapped object. To wait until the cancellation is done,
UnregisterWaitEx() is used with an event instead of UnregisterWait().
To wait for this event, a new _WaitCancelFuture class was added. It's a
simplified version of _WaitCancelFuture. For example, its cancel() method calls
UnregisterWait(), not UnregisterWaitEx(). _WaitCancelFuture should not be
cancelled.
The overlapped object is kept alive in _WaitHandleFuture until the wait is
unregistered.
Other changes:
* Add _overlapped.UnregisterWaitEx()
* Remove fast-path in IocpProactor.wait_for_handle() to immediatly set the
result if the wait already completed. I'm not sure that it's safe to
call immediatly UnregisterWaitEx() before the completion was signaled.
* Add IocpProactor._unregistered() to forget an overlapped which may never be
signaled, but may be signaled for the next loop iteration. It avoids to
block forever IocpProactor.close() if a wait was cancelled, and it may also
avoid some "... unexpected event ..." warnings.
2015-01-21 23:39:51 +01:00
Zachary Ware
b4826c3fd1
Merge with 3.4 ( closes #23280 )
2015-01-20 14:11:38 -06:00
Zachary Ware
b176d40398
Issue #23280 : Fix docstrings for binascii.(un)hexlify
2015-01-20 13:59:46 -06:00
Antoine Pitrou
3b225d8bfb
Issue #23248 : Update ssl error codes from latest OpenSSL git master.
2015-01-18 17:40:17 +01:00
Antoine Pitrou
173ad83b07
Issue #23248 : Update ssl error codes from latest OpenSSL git master.
2015-01-18 17:39:32 +01:00
Serhiy Storchaka
82e07b92b3
Issue #23181 : More "codepoint" -> "code point".
2015-01-18 11:33:31 +02:00
Serhiy Storchaka
d3faf43f9b
Issue #23181 : More "codepoint" -> "code point".
2015-01-18 11:28:37 +02:00
Serhiy Storchaka
acdb7c158a
Issue #23098 : 64-bit dev_t is now supported in the os module.
2015-01-18 11:17:39 +02:00
Serhiy Storchaka
b2653b344e
Issue #23098 : 64-bit dev_t is now supported in the os module.
2015-01-18 11:12:11 +02:00
Antoine Pitrou
26795baaa8
Issue #15955 : Add an option to limit output size when decompressing LZMA data.
...
Patch by Nikolaus Rath and Martin Panter.
2015-01-17 16:22:18 +01:00
Benjamin Peterson
610bc6a211
merge 3.4 ( #23221 )
2015-01-13 09:20:31 -05:00
Benjamin Peterson
82f34ada45
fix instances of consecutive articles ( closes #23221 )
...
Patch by Karan Goel.
2015-01-13 09:17:24 -05:00
Antoine Pitrou
dc3eaa80d4
Issue #23206 : Make ``json.dumps(..., ensure_ascii=False)`` as fast as the default case of ``ensure_ascii=True``. Patch by Naoki Inada.
2015-01-11 16:41:01 +01:00
Mark Dickinson
cc8617b93a
Issue #21092 : Merge from 3.4.
2015-01-11 13:22:44 +00:00
Mark Dickinson
dfe0b2326b
Issue #21902 : Replace incorrect 'hyperbolic arc sine' (etc.) with 'inverse hyperbolic sine' (etc.). Remove meaningless reference to radians.
2015-01-11 13:08:05 +00:00
Mark Dickinson
a5d0c7c2fd
Issue #23185 : add math.inf and math.nan constants.
2015-01-11 11:55:29 +00:00
Benjamin Peterson
baf7c1e546
use SSL_get_session
2015-01-07 11:32:00 -06:00
Benjamin Peterson
4cb17812d9
expose the client's cipher suites from the handshake ( closes #23186 )
2015-01-07 11:14:26 -06:00
Nick Coghlan
582acb75e9
Merge issue 19548 changes from 3.4
2015-01-07 00:37:01 +10:00
Nick Coghlan
b9fdb7a452
Issue 19548: update codecs module documentation
...
- clarified the distinction between text encodings and other codecs
- clarified relationship with builtin open and the io module
- consolidated documentation of error handlers into one section
- clarified type constraints of some behaviours
- added tests for some of the new statements in the docs
2015-01-07 00:22:00 +10:00
Victor Stinner
fcfed19913
Issue #21356 : Make ssl.RAND_egd() optional to support LibreSSL. The
...
availability of the function is checked during the compilation. Patch written
by Bernard Spil.
2015-01-06 13:54:58 +01:00
Antoine Pitrou
bc26646505
Issue #23143 : Remove compatibility with OpenSSLs older than 0.9.8.
...
(now the hashlib module)
2015-01-03 23:21:21 +01:00
Antoine Pitrou
5e8430d02c
Issue #23143 : Remove compatibility with OpenSSLs older than 0.9.8.
...
(the last 0.9.7 release was in 2007)
2015-01-03 23:17:23 +01:00
Benjamin Peterson
98beb7599e
merge 3.4 ( #23093 )
2014-12-21 21:00:51 -06:00
Benjamin Peterson
10e76b67c9
allow more operations to work on detached streams ( closes #23093 )
...
Patch by Martin Panter.
2014-12-21 20:51:50 -06:00
Steve Dower
2a8ef68028
Issue #22733 : MSVC ffi_prep_args doesn't handle 64-bit arguments properly
2014-12-17 06:31:44 -08:00
Serhiy Storchaka
707b5ccde5
Issue #22783 : Pickling now uses the NEWOBJ opcode instead of the NEWOBJ_EX
...
opcode if possible.
2014-12-16 19:43:46 +02:00
Serhiy Storchaka
01bdd9a980
Issue #15513 : Added a __sizeof__ implementation for pickle classes.
2014-12-16 19:40:58 +02:00
Serhiy Storchaka
5bbd231f27
Issue #15513 : Added a __sizeof__ implementation for pickle classes.
2014-12-16 19:39:08 +02:00
Benjamin Peterson
e32467cf6a
allow ssl module to compile if openssl doesn't support SSL 3 ( closes #22935 )
...
Patch by Kurt Roeckx.
2014-12-05 21:59:35 -05:00
Serhiy Storchaka
b757c83ec6
Issue #22581 : Use more "bytes-like object" throughout the docs and comments.
2014-12-05 22:25:22 +02:00
Serhiy Storchaka
56a6d855e2
Removed duplicated words in in comments and docs.
2014-12-01 18:28:43 +02:00
Benjamin Peterson
7243b574e5
don't require OpenSSL SNI to pass hostname to ssl functions ( #22921 )
...
Patch by Donald Stufft.
2014-11-23 17:04:34 -06:00
Steve Dower
65e4cb10d9
Issue #22919 : Windows build updated to support VC 14.0 (Visual Studio 2015), which will be used for the official 3.5 release.
2014-11-22 12:54:57 -08:00
Benjamin Peterson
22293df016
merge 3.4 ( #22935 )
2014-12-05 22:11:33 -05:00
Victor Stinner
cbc18f328c
Issue #9647 : os.confstr() ensures that the second call to confstr() returns the
...
same length.
2014-12-05 22:51:51 +01:00
Serhiy Storchaka
92bf919ed0
Issue #22581 : Use more "bytes-like object" throughout the docs and comments.
2014-12-05 22:26:10 +02:00
Serhiy Storchaka
4954f9fcab
Issue #17401 : Output the closefd attribute as boolean.
2014-12-02 23:39:56 +02:00
Antoine Pitrou
6cd5eda0dd
Fix uninitialized variable after #22676 .
2014-12-02 00:20:03 +01:00
Serhiy Storchaka
83000a490a
Removed duplicated words in in comments and docs.
2014-12-01 18:30:14 +02:00
Victor Stinner
beeb512fe1
Issue #21356 : Make ssl.RAND_egd() optional to support LibreSSL. The
...
availability of the function is checked during the compilation.
Patch written by Bernard Spil.
2014-11-28 13:28:25 +01:00
Ned Deily
8007cbc4d5
Issue 22940: fixes to editline support
2014-11-26 13:02:33 -08:00
Benjamin Peterson
d1e22ba7db
only support append_history if readline has it
2014-11-26 14:35:12 -06:00
Benjamin Peterson
33f8f15bdd
add readline.append_history_file ( closes #22940 )
...
patch by "bru"
2014-11-26 13:58:16 -06:00
Benjamin Peterson
f9284ae8ed
merge 3.4 ( #22921 )
2014-11-23 17:06:39 -06:00
Nick Coghlan
d600951748
Issue #22869 : Split pythonrun into two modules
...
- interpreter startup and shutdown code moved to a new
pylifecycle.c module
- Py_OptimizeFlag moved into the new module with the other
global flags
2014-11-20 21:39:37 +10:00
Benjamin Peterson
994c7f76a3
merge 3.4 ( #22849 )
2014-11-12 10:23:35 -05:00
Benjamin Peterson
6c14f23100
fix possible double free in TextIOWrapper.__init__ ( closes #22849 )
2014-11-12 10:19:46 -05:00
Serhiy Storchaka
5a8dacf9c6
Issue #22821 : Fixed fcntl() with integer argument on 64-bit big-endian
...
platforms.
2014-11-10 11:25:50 +02:00
Serhiy Storchaka
d915b0847d
Issue #22821 : Fixed fcntl() with integer argument on 64-bit big-endian
...
platforms.
2014-11-10 10:42:26 +02:00
Brett Cannon
b7299ddbc7
Issue 20152, 22821: Port the fcntl module to Argument Clinic.
...
Along the way, fix an argumrnt to fcntl.fcntl to be an int instead of
a long.
Thanks to Serhiy Storchaka for reviewing my Clinic patch and for
writing the patch to fix the long/int issue.
2014-11-09 20:22:01 -05:00