Commit graph

8694 commits

Author SHA1 Message Date
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