Commit graph

2763 commits

Author SHA1 Message Date
Ned Deily
d4850dd549 Python 3.6.5
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAlq7Xj8ACgkQLTR+pqpl
 Qh0RKg//culaaeshI/2fVnstFt4UuvocnFpvE5hLho0TOJdRBXnL8LN8L7L7Cvo2
 SxaxGuWXHbPeXw+GoXgzchUhX79h5azlBHM1sC+K1RnrB+jXjvICTR1bNjNzX3yg
 Ga12QbQIO0BFLJpXsUPUFePxV6AlGvCIqneUKN/YilAtmYtJi9k5VkabEkebY+t9
 LyO4vYICRTW0A0KSK+PK8maeg66QOt1x7uCK+lizWIPDgyoCsTeIhnBvvwCH5oaO
 dltI+sJVIDnAWPVZ+fBq+q+iBc9RLlWg4ulpGzjfenTO/CnnzSb1sMFZh1XFVKvP
 4c6J5e4XerPYRY+MV9PNGQhv1nxCqji0CF/TaTldQVZnkMe5i1x9fhfDP8wgnO/2
 akpEqm9XAXOtVIqRc/pF5309IiglYzBbFTGGxbVZsaKn9lh2sH+5dmHFcEzHQDd/
 wN/oXp0ufjie16xm01i5psHoFgF1FI/F/wQ+9OoGvbuOMUBbr9p77tfUAZZ9IFGe
 Zwy1Tp7hEvr4qHk+wt+l7D5ffGQdAXfacQAB+8rpLZlB4YUY3IBbYzKoruoWNmmo
 rYSKC4bzZMH6oQho5vY7QduFnKlZoNtDLLZ7rt4yvikjVgDC5O8UFNIIsDPkNVSO
 kTfIC4k0gwuRXr8i7bGjJz6pncz4hdMgz6e8u4LGAQi3rKOVQ+0=
 =cXem
 -----END PGP SIGNATURE-----

Merge tag 'v3.6.5' into 3.6

Python 3.6.5
2018-03-28 14:22:48 -04:00
Ned Deily
f59c0932b4 3.6.5final 2018-03-28 05:19:31 -04:00
Ned Deily
4d04cae921 on to 3.6.6 2018-03-13 23:38:19 -04:00
Ned Deily
f03c5148cf 3.6.5rc1 2018-03-13 21:21:36 -04:00
Miss Islington (bot)
743b6c07e8
Fix typo in Include/objimpl.h, the word "has" was missing (GH-5568) (GH-5570)
It now reads: ...be aware that Python has no control over...
(cherry picked from commit 517da1e58f)

Co-authored-by: Alexey <forestbiiird@gmail.com>
2018-02-11 23:35:56 -08:00
Miss Islington (bot)
b90c68586e bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560) (GH-5563)
Fix a rare but potential pre-exec child process deadlock in subprocess on POSIX systems when marking file descriptors inheritable on exec in the child process.  This bug appears to have been introduced in 3.4 with the inheritable file descriptors support.

This also changes Python/fileutils.c `set_inheritable` to use the "slow" two `fcntl` syscall path instead of the "fast" single `ioctl` syscall path when asked to be async signal safe (by way of being asked not to raise exceptions).  `ioctl` is not a POSIX async-signal-safe approved function.

ref: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html
(cherry picked from commit c1e46e94de)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
2018-02-05 22:51:10 -08:00
Miss Islington (bot)
8e230e1eb3 bpo-32635: Fix a segfault when importing the crypt module with libxcrypt. (GH-5284) (#5296)
glibc is deprecating libcrypt in favor of libxcrypt, however python assumes
that crypt.h will always be included. This change makes the header inclusion
explicit when libxcrypt is present on the system.
(cherry picked from commit e768c86ef4)
2018-01-24 11:11:16 +01:00
Victor Stinner
b92c159efa
[3.6] bpo-32555: Fix locale encodings (#5193)
On FreeBSD and Solaris, os.strerror() now always decode the byte
string from the current locale encoding, rather than using
ASCII/surrogateescape in some cases.

Changes:

* Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx() which has an
  additional current_locale parameter.
* PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize() and
* PyUnicode_EncodeLocale() now always use the current locale
* encoding, instead of using Py_DecodeLocale()/Py_EncodeLocale().
* Document encoding in Py_DecodeLocale() and Py_EncodeLocale()
  documentations.
* Add USE_FORCE_ASCII define to not define
  decode_ascii_surrogateescape() on Android.
2018-01-15 23:43:24 +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)
d62b7412c1 bpo-29084: Exclude C API for OrderedDict from the limited C API. (GH-4900) (#5007)
(cherry picked from commit 1b3029ac83)
2017-12-25 09:40:27 +02:00
Ned Deily
86816ecb98 3.6.4+ 2017-12-19 02:56:06 -05:00
Ned Deily
d48ecebad5 Update to 3.6.4 2017-12-18 23:53:56 -05:00
Ned Deily
3398dcb14f Bump to 3.6.4rc1 2017-12-05 03:26:08 -05:00
Miss Islington (bot)
726467616f Correct the location of a function mentioned in a comment (GH-4327)
(cherry picked from commit 01ae58d446)
2017-11-09 20:14:38 +03: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)
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
Serhiy Storchaka
d94ef8fe94 Fix trailing whitespaces in C and Python files. (#4131) 2017-10-26 17:00:13 +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
Ned Deily
ec47aff13a Bump version to 3.6.3+ 2017-10-03 04:46:04 -04:00
Ned Deily
2c5fed86e0 Bump to 3.6.3 2017-10-03 01:52:02 -04:00
Ned Deily
d8c174afd5 Bump to 3.6.3rc1 2017-09-18 23:18:48 -04:00
Miss Islington (bot)
b03623227e [3.6] fixes bpo-31373: fix undefined floating-point demotions (GH-3396) (#3424)
(cherry picked from commit a853a8ba78)
2017-09-07 11:35:03 -07:00
Victor Stinner
cb7fdf69ec bpo-28667: Fix a compile warning on FreeBSD when compare with FD_SETSIZE. (#501) (#3190)
FreeBSD is the only platforms with unsigned FD_SETSIZE.

(cherry picked from commit 783d0c1a1c)
2017-08-23 00:58:43 +02:00
Ned Deily
a61089f573 Bump to v3.6.2+ 2017-07-17 00:54:03 -04:00
Ned Deily
03e0df66b8 Update for post-3.6.2rc2 2017-07-08 00:49:40 -04:00
Antoine Pitrou
3024c05290 [3.6] bpo-30703: Improve signal delivery (GH-2415) (#2527)
* [3.6] bpo-30703: Improve signal delivery (GH-2415)

* Improve signal delivery

Avoid using Py_AddPendingCall from signal handler, to avoid calling signal-unsafe functions.

* Remove unused function

* Improve comments

* Add stress test

* Adapt for --without-threads

* Add second stress test

* Add NEWS blurb

* Address comments @haypo.
(cherry picked from commit c08177a1cc)

* bpo-30796: Fix failures in signal delivery stress test (#2488)

* bpo-30796: Fix failures in signal delivery stress test

setitimer() can have a poor minimum resolution on some machines,
this would make the test reach its deadline (and a stray signal
could then kill a subsequent test).

* Make sure to clear the itimer after the test
2017-07-01 19:12:05 +02:00
Serhiy Storchaka
0834905d9b [3.6] bpo-13617: Reject embedded null characters in wchar* strings. (GH-2302) (#2462)
Based on patch by Victor Stinner.

Add private C API function _PyUnicode_AsUnicode() which is similar to
PyUnicode_AsUnicode(), but checks for null characters..
(cherry picked from commit f7eae0adfc)
2017-06-28 09:27:35 +03:00
Serhiy Storchaka
0edffa3073 [3.6] bpo-30708: Check for null characters in PyUnicode_AsWideCharString(). (GH-2285) (#2443)
Raise a ValueError if the second argument is NULL and the wchar_t\*
string contains null characters..
(cherry picked from commit e613e6add5)
2017-06-27 21:08:58 +03:00
Ned Deily
ccc06d3270 Bump version for post 3.6.2rc1 2017-06-17 21:58:49 -04:00
Ned Deily
268e1fbf21 Version bump to 3.6.2rc1 2017-06-17 04:48:35 -04:00
Victor Stinner
932946ca14 bpo-30604: Fix __PyCodeExtraState_Get() prototype (#2152)
Replace __PyCodeExtraState_Get() with __PyCodeExtraState_Get(void) to
fix the following GCC warning:

./Include/pystate.h:63:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 __PyCodeExtraState* __PyCodeExtraState_Get();
2017-06-13 10:39:30 +02:00
Dino Viehland
2997fec01e [3.6] bpo-30604: Move co_extra_freefuncs to interpreter state to avoid crashes in threads (#2015)
* Move co_extra_freefuncs to interpreter state to avoid crashes in
multi-threaded scenarios involving deletion of code objects

* Don't require that extra be zero initialized

* Build test list instead of defining empty test class

* Ensure extra is always assigned on success

* Keep the old fields in the thread state object, just don't use them
Add new linked list of code extra objects on a per-interpreter basis
  so that interpreter state size isn't changed

* Rename __PyCodeExtraState_Get and add comment about it going away in 3.7
Fix sort order of import's in test_code.py

* Remove an extraneous space

* Remove docstrings for comments

* Touch up formatting

* Fix casing of coextra local

* Fix casing of another variable

* Prefix PyCodeExtraState with __ to match C API for getting it

* Update NEWS file for bpo-30604
2017-06-12 21:46:35 -04:00
Victor Stinner
f0ff849adc bpo-30524: Fix _PyStack_UnpackDict() (#1886)
* bpo-29259: Remove unused func parameter of _PyStack_UnpackDict()
* bpo-29286: Change _PyStack_UnpackDict() prototype to be able to
  notify of failure when args is NULL. _PyStack_UnpackDict() now
  returns -1 on error.
2017-06-09 13:24:53 +02:00
Serhiy Storchaka
f43b293f2f [3.6] bpo-29943: Do not replace the function PySlice_GetIndicesEx() with a macro (GH-1049) (#1813)
if Py_LIMITED_API is not defined.
(cherry picked from commit 49a9059)
2017-05-25 15:32:08 +03:00
T. Wouters
90e3518225 bpo-29941: Assert fixes (#886) (#955)
Make a non-Py_DEBUG, asserts-enabled build of CPython possible. This means
making sure helper functions are defined when NDEBUG is not defined, not
just when Py_DEBUG is defined.

Also fix a division-by-zero in obmalloc.c that went unnoticed because in
Py_DEBUG mode, elsize is never zero.

(cherry picked from commit a00c3fd12d and 06bb4873d6)
2017-04-01 20:20:05 -07:00
Serhiy Storchaka
bf4bb2e430 bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887) (#907)
when pass indices of wrong type.
(cherry picked from commit d4edfc9abf)
2017-03-30 19:46:59 +03:00
Ned Deily
f93b994892 Merge branch '3.6.1' of github.com:ned-deily/cpython into 3.6 2017-03-21 21:03:20 -04:00
Ned Deily
1688e64925 Bump to 3.6.2rc1 development. 2017-03-21 20:39:58 -04:00
Ned Deily
69c0db5050 Update docs and patchlevel for 3.6.1 final 2017-03-21 02:32:38 -04:00
n.d. parker
07e6cbd7b9 Fix the only non-C90 comment to be C90 compatible. (#568)
(cherry picked from commit 51b646a55a)
2017-03-21 01:54:50 -04:00
Serhiy Storchaka
69eab3123e bpo-28749: Fixed the documentation of the mapping codec APIs. (#487) (#714)
Added the documentation for PyUnicode_Translate().
(cherry picked from commit c85a26628c)
2017-03-19 20:26:26 +02:00
Victor Stinner
68d2980940 bpo-29619: Convert st_ino using unsigned integer (#557) (#584)
bpo-29619: os.stat() and os.DirEntry.inodeo() now convert inode
(st_ino) using unsigned integers.

(cherry picked from commit 0f6d73343d)
(Misc/NEWS conflict handled manually.)
2017-03-09 18:43:39 +01:00
n.d. parker
51b646a55a Fix the only non-C90 comment to be C90 compatible. (#568) 2017-03-09 00:27:46 +02:00
Ned Deily
38136e2a58 Bump to v3.6.1rc1+. 2017-03-05 05:33:38 -05:00
Ned Deily
e0fbe5feee Update docs and patchlevel for 3.6.1rc1. 2017-03-04 12:25:04 -05:00
Ned Deily
95c50e5aed [3.6] bpo-27593: Get SCM build info from git instead of hg. (#446) (#454)
* bpo-27593: Get SCM build info from git instead of hg. (#446)

sys.version and the platform module python_build(),
python_branch(), and python_revision() functions now use
git information rather than hg when building from a repo.

Based on original patches by Brett Cannon and Steve Dower.
(cherry picked from commit 5c4b0d063a)
2017-03-04 01:05:06 -05:00
Serhiy Storchaka
ed4de13f06 Issue #27867: Silenced may-be-used-uninitialized warnings after
using PySlice_GetIndicesEx() in debug builds.
2017-02-04 11:07:17 +02:00
Serhiy Storchaka
c7611362b4 Issue #27867: Silenced may-be-used-uninitialized warnings after
using PySlice_GetIndicesEx() in debug builds.
2017-02-04 11:04:00 +02:00
Serhiy Storchaka
512c57cb72 Issue #27867: Function PySlice_GetIndicesEx() is replaced with a macro if
Py_LIMITED_API is not set or set to the value between 0x03050400
and 0x03060000 (not including) or 0x03060100 or higher.
2017-01-25 13:25:52 +02:00