Commit Graph

6053 Commits

Author SHA1 Message Date
Victor Stinner
9a2326b362 Issue #24684: socket.socket.getaddrinfo() now calls
PyUnicode_AsEncodedString() instead of calling the encode() method of the
host, to handle correctly custom unicode string with an encode() method which
doesn't return a byte string. The encoder of the IDNA codec is now called
directly instead of calling the encode() method of the string.
2015-09-11 12:42:13 +02:00
Martin Panter
6f80464f4a Issue #25030: Do not document seek() as if it accepts keyword arguments
Patch from Shiyao Ma.
2015-09-11 03:58:30 +00:00
Gregory P. Smith
0a8572800b Don't left shift negative values. Use an unsigned value instead to avoid
undefined behavior.
2015-08-04 16:29:00 -07:00
Benjamin Peterson
d7a4f9ef8d include fcntl.h on all *nix platforms (closes #24217)
Patch by Jeffrey Armstrong.
2015-08-02 12:15:30 -07:00
Zachary Ware
977be3e7b5 Issue #23652: Make the select module compile against LSB headers.
Initial patch by Matt Frank.
2015-08-01 21:30:11 -05:00
Victor Stinner
e97944a27e Issue #23319: Fix ctypes.BigEndianStructure, swap correctly bytes. Patch
written by Matthieu Gautier.
2015-07-29 14:37:17 +02:00
Serhiy Storchaka
76a64ca438 Issue #24683: Fixed a crash in _json.make_encoder() called with non-dict 1st argument. 2015-07-26 09:07:53 +03:00
Serhiy Storchaka
cf74c1996e Issue #24613: Calling array.fromstring() with self is no longer allowed
to prevent the use-after-free error.  Patch by John Leitch.
2015-07-26 08:49:37 +03:00
Benjamin Peterson
7f18ac4a59 possible memory leak in error case (closes #24719)
Patch by Pankaj Sharma.
2015-07-25 10:20:13 -07:00
Benjamin Peterson
455a2a30a3 proper overflow checks for mymemreplace (closes #24708) 2015-07-24 23:25:35 -07:00
Serhiy Storchaka
045c451ff4 Issue #24704: Fixed possible NULL pointer dereferencing in the _json module
initialization.  Patch by Pankaj Sharma.
2015-07-24 12:58:25 +03:00
Serhiy Storchaka
3b77d01dbc Issue #24620: Random.setstate() now validates the value of state last element. 2015-07-24 09:02:53 +03:00
Serhiy Storchaka
affac0062d Issue #24703: Fixed resource leak on error in bsddb.verify().
Original patch by Pankaj Sharma.
2015-07-24 08:05:45 +03:00
Serhiy Storchaka
81c670d540 Initialize buf.outobj in multibyte encoder (closes issue #24702).
Patch by pankaj.s01.
2015-07-24 07:44:42 +03:00
Raymond Hettinger
fe13eac341 Issue #19663: Improve error message for defaultdict. 2015-07-20 03:08:09 -04:00
Benjamin Peterson
65192c1756 improve style of the convert macro (#24655)
Patch by Brian Cain.
2015-07-18 10:59:13 -07:00
Serhiy Storchaka
be8c6ae56e Issue #24611: Fixed compiling the posix module on non-Windows platforms
without mknod() or makedev() (e.g. on Unixware).
2015-07-12 16:41:29 +03:00
Serhiy Storchaka
7865f218b4 Issue #18684: Fixed reading out of the buffer in the re module. 2015-07-06 13:58:24 +03:00
Serhiy Storchaka
84af51d1b3 Issue #24456: Fixed possible buffer over-read in adpcm2lin() and lin2adpcm()
functions of the audioop module.  Fixed SystemError when the state is not a
tuple.  Fixed possible memory leak.
2015-06-28 17:51:40 +03:00
Benjamin Peterson
1c72acf24c ensure internal buffer is large enough for string after flushing (closes #24481) 2015-06-27 14:52:41 -05:00
Antoine Pitrou
0d2fac1fba Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar(). 2015-06-23 14:31:11 +02:00
Serhiy Storchaka
f0aa88f6e8 Fixed indentation of Python examples in C comments. 2015-06-11 00:06:27 +03:00
Serhiy Storchaka
c7797dc748 Issue #19543: Emit deprecation warning for known non-text encodings.
Backported issues #19619: encode() and decode() methods and constructors
of str, unicode and bytearray classes now emit deprecation warning for known
non-text encodings when Python is ran with the -3 option.

Backported issues #20404: io.TextIOWrapper (and hence io.open()) now uses the
internal codec marking system added to emit deprecation warning for known non-text
encodings at stream construction time when Python is ran with the -3 option.
2015-05-31 20:21:00 +03:00
Serhiy Storchaka
dc967c137c Fixed the array module in unicode disabled build (regression of issue20014). 2015-05-31 11:56:48 +03:00
Serhiy Storchaka
062bed289b Issue #24264: Fixed buffer overflow in the imageop module. 2015-05-31 09:05:10 +03:00