Commit Graph

9997 Commits

Author SHA1 Message Date
Antoine Pitrou 1d896ed2cd
[3.6] bpo-32228: Reset raw_pos after unwinding the raw stream (GH-4858) (#5389)
Ensure that ``truncate()`` preserves the file position (as reported by ``tell()``) after writes longer than the buffer size..
(cherry picked from commit 059f58ce93)
2018-01-28 18:42:31 +01:00
Victor Stinner 5f959c4f9e
[3.6] bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) (#5192)
* Add _Py_GetLocaleconvNumeric() function: decode decimal_point and
  thousands_sep fields of localeconv() from the LC_NUMERIC encoding,
  rather than decoding from the LC_CTYPE encoding.
* Modify locale.localeconv() and "n" formatter of str.format() (for
  int, float and complex to use _Py_GetLocaleconvNumeric()
  internally.

(cherry picked from commit cb064fc232)
2018-01-15 23:23:47 +01:00
Miss Islington (bot) 020668b8e1 correct the typos (GH-4950) (#4951)
(cherry picked from commit 83cb778b4a)
2017-12-21 07:43:11 +02:00
Victor Stinner 22097aaa77
bpo-32329: Fix sys.flags.hash_randomization (#4875)
sys.flags.hash_randomization is now properly set to 0 when hash
randomization is turned off by PYTHONHASHSEED=0.
2017-12-15 01:39:48 +01:00
Miss Islington (bot) d1cb1067a8 bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (GH-4797) (#4869)
(cherry picked from commit 233ef249cc)
2017-12-14 19:30:45 +02:00
Andrew Svetlov 28453feaa8
[3.6] bpo-32297: Fix misspellings in Python source code comments (GH-4803) (#4864)
* [3.6] bpo-32297: Few misspellings found in Python source code comments. (GH-4803)

* Fix multiple typos in code comments

* Add spacing in comments (test_logging.py, test_math.py)

* Fix spaces at the beginning of comments in test_logging.py.

(cherry picked from commit 53f7a7c281)
2017-12-14 16:19:51 +02:00
Miss Islington (bot) ce5a3cd9b1 bpo-32255: Always quote a single empty field when write into a CSV file. (GH-4769) (#4810)
This allows to distinguish an empty row from a row consisting of a single empty field.
(cherry picked from commit 2001900b0c)
2017-12-12 12:56:40 +02:00
Miss Islington (bot) 71d8f36eb4 bpo-32252: Fix faulthandler_suppress_crash_report() (GH-4794) (#4795)
Fix faulthandler_suppress_crash_report() used to prevent core dump files
when testing crashes. getrlimit() returns zero on success.
(cherry picked from commit 48d4dd974f)
2017-12-11 14:17:06 +01:00
Miss Islington (bot) 8bcd41040a bpo-32186: Release the GIL during lseek and fstat (GH-4652) (#4661)
In _io_FileIO_readall_impl(), lseek() and _Py_fstat_noraise() were called
without releasing the GIL. This can cause all threads to hang for
unlimited time when calling FileIO.read() and the NFS server is not
accessible.
(cherry picked from commit 6a89481680)
2017-12-01 07:26:31 +01:00
Miss Islington (bot) c91bf742e5 bpo-28416: Break reference cycles in Pickler and Unpickler subclasses (GH-4080) (#4653)
with the persistent_id() and persistent_load() methods.
(cherry picked from commit 986375ebde)
2017-11-30 23:30:39 +02:00
Miss Islington (bot) cb79c22039 bpo-31440: Changed default module search path for windows (#4613)
(cherry picked from commit 08d2b86a10)
2017-11-28 18:18:26 +01:00
Victor Stinner 33217d2213
bpo-31701: faulthandler: ignore MSC and COM Windows exception (#3929) (#4416)
(cherry picked from commit 6e3d6b5dc2)
2017-11-16 03:53:45 -08:00
Miss Islington (bot) 18056fb11e bpo-32020: arraymodule: Correct missing Py_DECREF in failure case of make_array() (GH-4391) (#4392)
(cherry picked from commit 56935a53b1)
2017-11-14 09:01:29 +02:00
Miss Islington (bot) 6ed9d4ecde bpo-32013: _pickle: Add missing Py_DECREF in error case in fast_save_enter() (GH-4384) (#4385)
(cherry picked from commit f76231f89a)
2017-11-13 10:19:52 +02:00
Serhiy Storchaka 596286f8f3
[3.6] bpo-31927: Fix bugs in socketmodule.c on NetBSD and other issues. (GH-4235) (#4352)
* Fix compilation of the socket module on NetBSD 8.
* Fix the assertion failure or reading arbitrary data when parse
  a AF_BLUETOOTH address on NetBSD and DragonFly BSD.
* Fix other potential errors and make the code more reliable.
(cherry picked from commit d3187158c0)
2017-11-09 21:40:29 +02:00
Miss Islington (bot) b0331c94c2 bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor object is uninitialized (GH-3958) (#4303)
(cherry picked from commit edb13ae48c)
2017-11-06 16:45:19 -08:00
Miss Islington (bot) 9684cf69e3 bpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more than once (GH-3968) (#4301)
(cherry picked from commit e56ab746a9)
2017-11-06 16:44:23 -08:00
Miss Islington (bot) a512493371 bpo-31933: fix blake2 multi-byte params on big endian platforms (GH-4250) (#4262)
All Blake2 params have to be encoded in little-endian byte order. For
the two multi-byte integer params, leaf_length and node_offset, that
means that assigning a native-endian integer to them appears to work on
little-endian platforms, but gives the wrong result on big-endian. The
current libb2 API doesn't make that very clear, and @sneves is working
on new API functions in the GH issue above. In the meantime, we can work
around the problem by explicitly assigning little-endian values to the
parameter block.

See https://github.com/BLAKE2/libb2/issues/12.
(cherry picked from commit dcfb0e3c04)
2017-11-03 20:55:54 +01:00
Miss Islington (bot) ea80ae04e2 bpo-30057: Fix potential missed signal in signal.signal(). (GH-4258) (#4261)
Bug report and patch by Jeroen Demeyer.
(cherry picked from commit f6f90ff079)
2017-11-03 20:23:12 +01:00
Tal Einat f8b3f6b178 [3.6] bpo-31926: fix missing *_METHODDEF statements by argument clinic (GH-4230) (#4253)
When a single .c file contains several functions and/or methods with
the same name, a safety _METHODDEF GH-define statement is generated
only for one of them.

This fixes the bug by using the full name of the function to avoid
duplicates rather than just the name..
(cherry picked from commit 4f57409a2f)
2017-11-03 06:43:13 -07:00
Miss Islington (bot) aad7ac10af bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse(). (GH-4220) (#4221)
(cherry picked from commit 4f469c0966)
2017-11-01 21:23:46 +02:00
Miss Islington (bot) 1f81ea85e8 bpo-15037: Add a workaround for getkey() in curses for ncurses 5.7 and earlier. (GH-3826) (#4218)
Skip a test for unget_wch()/get_wch() on OpenBSD since they are broken
in ncurses 5.7.
(cherry picked from commit 7e68790f3d)
2017-11-01 16:38:35 +02:00
Miss Islington (bot) 2be9a31213 bpo-31919: Fix building the curses module on OpenIndiana. (GH-4211) (#4215)
(cherry picked from commit 894ebd065e)
2017-11-01 15:11:12 +02:00
Miss Islington (bot) f44a6299e2 Remove nested comments in blake2 (GH-4173) (#4214)
Replace occurence of nested comments in blake2 reference implementation
with preprocessor directive for disabling unused code.

`blake2s-load-xop.h` is conditionally pulled in only on chips with XOP
support, among others the AMD Bulldozer. The malformed comments in the
source file breaks the build of `hashlib`'s `_blake2` on GCC 6.3.0.

Official reference code on github uses `GH-if` so this change should be
uncontroversial.
(cherry picked from commit 388cd85e51)
2017-11-01 12:58:40 +00:00
Miss Islington (bot) ff6ae4de38 bpo-25720: Fix the method for checking pad state of curses WINDOW (GH-4164) (#4212)
Modify the code to use ncurses is_pad() instead of checking WINDOW
_flags field.  If your platform does not provide the is_pad(), the
existing way that checks the field will be enabled.

Note: This change does not drop support for platforms where do not
have both WINDOW _flags field and is_pad().
(cherry picked from commit 8bc7d63560)
2017-11-01 14:35:41 +02:00
Miss Islington (bot) 84e252b79e bpo-31893: Fix errors in b9052a0f91. (GH-4196) (#4201)
* Fix a compilation error on FreeBSD.
* Fix the data attribute size on Mac OS X.
(cherry picked from commit 2298fad5ff)
2017-10-31 20:16:07 +02:00
Miss Islington (bot) f9a639b97c bpo-31893: Fixed select.kqueue(). (GH-4166) (#4190)
* Fixed the layout of the kqueue_event structure on OpenBSD and NetBSD.
* Fixed the comparison of the kqueue_event objects.
(cherry picked from commit b9052a0f91)
2017-10-31 14:46:15 +02:00
Miss Islington (bot) 5db32085e7 bpo-31891: Fix building the curses module on NetBSD. (GH-4165) (#4189)
(cherry picked from commit baac01e629)
2017-10-31 14:33:09 +02:00
xdegaye 4b27d51222 [3.6] bpo-30697: Fix PyErr_NormalizeException() when no memory (GH-2327). (#4135)
(cherry picked from commit 56d1f5ca32)
2017-10-26 17:48:48 +02:00
Miss Islington (bot) 6e45d7b90a bpo-31752: Fix possible crash in timedelta constructor called with custom integers. (GH-3947) (#4086)
Bad remainder in divmod() in intermediate calculations caused an assertion failure.
(cherry picked from commit 4ffd4653a7)
2017-10-23 18:20:13 +03:00
Miss Islington (bot) aaf6a3dbbd [3.6] bpo-30695: Add set_nomemory(start, stop) to _testcapi (GH-2406) (#4083)
(cherry picked from commit 85f643023f)
2017-10-23 15:05:46 +02:00
Serhiy Storchaka 77af0a3bca [3.6] bpo-31572: Get rid of using _PyObject_HasAttrId() in pickle. (GH-3729). (#4081)
(cherry picked from commit 04e36af9b8)
2017-10-23 15:00:41 +03:00
Miss Islington (bot) 97abcabc19 [3.6] bpo-31334: Fix timeout in select.poll.poll() (GH-3277) (#4033)
Always pass -1, or INFTIM where defined, to the poll() system call when
a negative timeout is passed to the poll.poll([timeout]) method in the
select module. Various OSes throw an error with arbitrary negative
values.
(cherry picked from commit 6cfa927ceb)
2017-10-18 15:05:16 +03:00
Miss Islington (bot) be4e9cc769 [3.6] bpo-31806: Use _PyTime_ROUND_TIMEOUT for the timeout argument parsing in more functions (GH-4026) (#4032)
Fix timeout rounding in time.sleep(), threading.Lock.acquire() and
socket.socket.settimeout() to round correctly negative timeouts between -1.0 and
0.0. The functions now block waiting for events as expected. Previously, the
call was incorrectly non-blocking.
(cherry picked from commit 59af94fa61)
2017-10-18 12:09:57 +03:00
Pablo Galindo 95602b368b [3.6] bpo-31786: Make functions in the select module blocking when timeout is a small negative value. (GH-4003). (#4022)
(cherry picked from commit 2c15b29aea)
2017-10-18 11:12:47 +03:00
Miss Islington (bot) cfc604722f [3.6] completly -> completely (GH-3999) (closes bpo-31788) (#4008)
(cherry picked from commit 1295e11d39)
2017-10-15 12:48:50 -07:00
Miss Islington (bot) c923da188b [3.6] bpo-30058: Fixed buffer overflow in select.kqueue.control(). (GH-1095) (#3973)
(cherry picked from commit de07210077)
2017-10-12 23:20:44 +03:00
Berker Peksag 5f908005ce bpo-28647: Update -u documentation (GH-3954)
* stdout and stderr are always opened in text mode
* and they are line-buffered

Initial patch by Gareth Rees.
2017-10-11 17:09:57 +03:00
Miss Islington (bot) 764969a4b9 [3.6] bpo-28157: Improvements for the time module documentation (GH-928)
* Separated functions and constants descriptions in sections.
* Added a note about the limitations of timezone constants.
* Removed redundant lists from the module docstring.

(cherry picked from commit 703ff381ff)
2017-10-11 16:50:21 +03:00
Miss Islington (bot) a8ac71d15f [3.6] bpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of Element.text and Element.tail (GH-3924) (#3945)
(cherry picked from commit 39ecb9c71b)
2017-10-11 00:51:28 +03:00
Miss Islington (bot) a65b2420f6 [3.6] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH-3866) (#3874)
when pass a string larger than 2 GiB.

Decrease memory requirements for Tcl's bigmem tests.
(cherry picked from commit 27c623c845)
2017-10-03 23:50:46 +03:00
Serhiy Storchaka fcc832a4fa [3.6] bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). (GH-3864). (#3873)
(cherry picked from commit 929b40a601)
2017-10-03 22:39:37 +03:00
Victor Stinner 7d6ddb96b3 bpo-28129: fix ctypes crashes (#386) (#3799)
* init commit, with initial tests for from_param and fields __set__ and __get__, and some additions to from_buffer and from_buffer_copy

* added the rest of tests and patches. probably only a first draft.

* removed trailing spaces

* replace ctype with ctypes in error messages

* change back from ctypes instance to ctype instance

(cherry picked from commit 1bea762d9e)
2017-09-28 07:32:11 -07:00
Serhiy Storchaka befc956acf [3.6] bpo-31478: Fix an assertion failure in random.seed() in case a seed has a bad __abs__() method. (GH-3596) (#3794)
(cherry picked from commit d780b2d588)
2017-09-28 12:17:51 +03:00
Miss Islington (bot) 7c24e99c99 [3.6] bpo-31505: Fix an assertion failure in json, in case _json.make_encoder() received a bad encoder() argument. (GH-3643) (#3777)
(cherry picked from commit 2b382dd612)
2017-09-27 08:21:47 +03:00
Miss Islington (bot) bdb215b18a [3.6] bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is defined only outside _fields_. (GH-3615) (#3774)
(cherry picked from commit 30b61b51e0)
2017-09-27 07:37:37 +03:00
Miss Islington (bot) a1c49f6f09 [3.6] bpo-31586: Use _count_element fast path for real dicts. (#3776)
(cherry picked from commit 31aca4bf79)
2017-09-26 20:45:57 -07:00
Miss Islington (bot) 69b2dc8637 [3.6] bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() iterators. (GH-1557) (#3770)
(cherry picked from commit c740e4fe8a)
2017-09-26 22:20:22 +03:00
Miss Islington (bot) a6bddb8e43 [3.6] bpo-31311: Fix a SystemError and a crash in ctypes._CData.__setstate__(), in case of a bad __dict__. (GH-3254) (#3743)
(cherry picked from commit 57c2561c8c)
2017-09-25 11:49:08 +03:00
Miss Islington (bot) e2a30cd35b [3.6] bpo-27385: Clarify docstring for groupby() (GH-3738) (#3744)
(cherry picked from commit 49392c63a2)
2017-09-25 01:41:49 -07:00