Commit Graph

20017 Commits

Author SHA1 Message Date
Miss Islington (bot) dda938683c
bpo-32852: Fix trace changing sys.argv to tuple. (GH-5692)
(cherry picked from commit 9f4223261f)

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2018-02-16 23:14:41 -08:00
Miss Islington (bot) a23eecab9a bpo-32841: Fix cancellation in awaiting asyncio.Condition (GH-5665) (GH-5683)
(cherry picked from commit 5746510b7a)

Co-authored-by: Bar Harel <bzvi7919@gmail.com>
2018-02-14 12:10:18 +02:00
INADA Naoki 4731634241
bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995)
(cherry picked from commit d019bc8319)
2018-02-13 22:15:24 +09:00
Serhiy Storchaka c3f9d7e0ea
[3.6] bpo-32370: Use the correct encoding for ipconfig output in the uuid module. (GH-5608). (#5654)
(cherry picked from commit da6c3da6c3)


Co-authored-by: Segev Finer <segev208@gmail.com>
2018-02-13 11:15:21 +02:00
Miss Islington (bot) 9fad857444
bpo-32837: IDLE - require encoding argument for textview.view_file. (GH-5646)
Using the system and place-dependent default encoding for open()
is a bad idea for IDLE's system and location-independent files.
(cherry picked from commit 688722cedd)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-02-12 15:40:12 -08:00
Miss Islington (bot) 46daf39453
bpo-32826: Add "encoding=utf-8" to open() in idle_test/test_help_about. (GH-5639)
GUI test test_file_buttons() only looks at initial ascii-only lines,
but failed on systems where open() defaults to 'ascii' because
readline() internally reads and decodes far enough ahead to encounter
a non-ascii character in CREDITS.txt.
(cherry picked from commit f34e03ec0e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-02-12 12:53:50 -08:00
Miss Islington (bot) a1d33f7425 bpo-29248: Fix os.readlink() on Windows (GH-5577)
The PrintNameOffset field of the reparse data buffer
was treated as a number of characters instead of bytes.

(cherry picked from commit 3c34aad4e7)

Co-authored-by: SSE4 <tomskside@gmail.com>
2018-02-12 21:14:08 +03:00
Miss Islington (bot) 9d8c24b791 bpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) GH-5612)
The new link is given in a red box on the old page.
(cherry picked from commit 8d1f2f4038)

Co-authored-by: sblondon <sblondon@users.noreply.github.com>
2018-02-10 19:42:22 -05:00
Serhiy Storchaka 504f19145c
[3.6] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5603)
Co-authored-by: Jake Davis <jcdavis@awedge.net>.
(cherry picked from commit 2411292ba8)
2018-02-10 00:01:40 +02: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) a8c25d1c7f [3.6] bpo-8722: Document __getattr__ behavior with AttributeError in property (GH-5542)
When `__getattr__` is implemented, attribute lookup will always fall back to that,
even if the initial failure comes from `__getattribute__` or a descriptor's `__get__`
method (including property methods).
(cherry picked from commit d1f318105b)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-02-05 13:10:00 +10:00
Miss Islington (bot) 1c2b138671 bpo-32765: Update configdialog General tab create page docstring (GH-5529) (GH-5538)
Add new entries to the widget list.
(cherry picked from commit 845d86485e)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-02-04 19:05:23 -05:00
Barry Warsaw a71397fb66
[3.6] bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5504)
* Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages.
* Make sure ``__spec__.origin` matches ``__file__`` for namespace packages.

https://bugs.python.org/issue32303
https://bugs.python.org/issue32305.
(cherry picked from commit bbbcf8693b)

Co-authored-by: Barry Warsaw <barry@python.org>
2018-02-02 23:21:14 -05:00
Bar Harel 7e4cf8e95d [3.6] bpo-32734: Fix asyncio.Lock multiple acquire safety issue (GH-5466) (#5502)
(cherry picked from commit d41e9e0952)
2018-02-02 18:15:31 -05:00
Terry Jan Reedy fbf8e823c0
[3.6] bpo-32614: Modify re examples to use a raw string to prevent wa… …rning (GH-5265) (GH-5500)
Modify RE examples in documentation to use raw strings to prevent DeprecationWarning.
Add text to REGEX HOWTO to highlight the deprecation.  Approved by Serhiy Storchaka.

(cherry picked from commit 66771422d0)
2018-02-02 17:37:30 -05:00
Miss Islington (bot) 688b6dec4e bpo-32137: The repr of deeply nested dict now raises a RecursionError (GH-4570) (GH-4689)
instead of crashing due to a stack overflow.

This perhaps will fix similar problems in other extension types.
(cherry picked from commit 1fb72d2ad2)
2018-02-01 13:57:28 +02:00
Miss Islington (bot) 85a92d00bd bpo-32727: smtplib's SMTP.send_message behaves differently with from_addr and to_addrs (GH-5451) (#5455)
Do not pass the name field in the 'from' address in the SMTP envelope.
(cherry picked from commit 8d83e4ba78)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2018-01-31 15:54:09 -05:00
Xiang Zhang ea94fce696
[3.6] bpo-32583: Fix possible crashing in builtin Unicode decoders (GH-5325) (#5459)
When using customized decode error handlers, it is possible for builtin decoders
to write out-of-bounds and then crash..
(cherry picked from commit 2c7fd46e11)
2018-01-31 21:34:17 +08:00
Miss Islington (bot) 6b2bbcc4cc closes bpo-32721: do not fail test_hashlib if _md5 isn't available (GH-5441) (GH-5442)
(cherry picked from commit 95441809ef)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-01-29 23:01:32 -08:00
Nick Coghlan 05f91a42cd
[3.6] Revert "bpo-32690: Preserve order of locals() (GH-5379) (#5390)"
This reverts commit 9105879bfd
in order to keep the behaviour of locals() consistent between
3.6.4 and 3.6.5+.
2018-01-30 15:27:41 +10:00
Miss Islington (bot) 6ea75b174d bpo-27931: Fix email address header parsing error (GH-5329) (GH-5431)
Correctly handle addresses whose username is an empty quoted string.
(cherry picked from commit aa218d1649)

Co-authored-by: jayyyin <jayyin11043@hotmail.com>
2018-01-29 14:27:55 -08:00
Miss Islington (bot) 543ec005a4 bpo-32650: Add native coroutine support to bdb when stepping over line (GH-5400) (#5402)
(cherry picked from commit 4687702442)
2018-01-29 07:57:06 +02:00
Miss Islington (bot) 9105879bfd bpo-32690: Preserve order of locals() (GH-5379) (#5390)
(cherry picked from commit a4d0001256)
2018-01-28 10:13:17 -08:00
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
Miss Islington (bot) b3b4b81d01 bpo-32685: Improve suggestion for print statement (GH-5380)
Better account for single-line compound statements and
semi-colon separated statements when suggesting
Py3 replacements for Py2 print statements.

Initial patch by Nitish Chandra.
(cherry picked from commit 43c0f1ac5e)
2018-01-28 21:31:48 +10:00
Christian Heimes 12ae40766e
[3.6] bpo-32521: nis libnsl (GH-5190) (#5352)
* bpo-32521: nis libnsl (#5190)

The nismodule is now compatible with new libnsl and headers location

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 29a7df7827)
2018-01-27 09:39:16 +01:00
Bo Bayles 995c60d265 [3.6] bpo-32304: Fix distutils upload for tar files ending with b'\r' (GH-5264) (GH-5330)
Patch by Bo Bayles.
2018-01-26 21:18:58 -05:00
Xiang Zhang fd844efa9c
bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile (GH-4056) (#5298)
(cherry picked from commit 131fd7f96c)
2018-01-24 22:44:53 +08:00
Bo Bayles d69794f4df [3.6] bpo-32502: Discard 64-bit (and other invalid) hardware addresses (GH-5254) (#5290)
* [3.6] bpo-32502: Discard 64-bit (and other invalid) hardware addresses (GH-5254).
(cherry picked from commit 6b273f7f40)
2018-01-24 08:27:14 -05: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
Miss Islington (bot) 4002d5dbf4 [3.6] bpo-32028: Fix suggestions for indented print statements (GH-5249)
The suggested replacement for print statements previously failed to account
for leading whitespace and hence could end up including unwanted text in
the proposed call to the print builtin.

Patch by Sanyam Khurana.
(cherry picked from commit d57f26c753)
2018-01-20 13:56:31 +10:00
Steve Dower ccf7f05c5d
[3.6] bpo-32588 Move _distutils_findvs into its own module (GH-5227) (#5228) 2018-01-19 09:09:49 +11:00
Miss Islington (bot) e7dbd06583 bpo-26163: Frozenset hash improvement (GH-5194) (#5198)
(cherry picked from commit b44c5169f6)
2018-01-16 02:27:15 -08: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) d55d6825d7 [3.6] bpo-32521: nis libtirpc (GH-5137) (#5165)
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit f3031b8a7a)
2018-01-12 16:29:35 +01:00
Miss Islington (bot) a91662affe bpo-32473: Improve ABCMeta._dump_registry() readability (GH-5091)
(cherry picked from commit ae12f5d4c9)
2018-01-12 19:47:36 +09:00
Miss Islington (bot) 94a3facc0e bpo-31802: Fix importing native path module before importing os. (GH-4017) (#5129)
(cherry picked from commit 3460198f6b)
2018-01-07 18:35:28 +02: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
Miss Islington (bot) c1b8eb8006 bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files (GH-4977) (#4979)
This is more complicated than it should be because we need to preserve the
useful mtime-based regeneration feature that lib2to3.pgen2.driver.load_grammar
has. We only look for the pickled grammar file with pkgutil.get_data and only if
the source file does not exist.
(cherry picked from commit 8a5877165e)
2017-12-22 12:51:46 -08:00
Miss Islington (bot) 3bc68cff5b bpo-26133: Dont unsubscribe signals in UNIX even loop on interpreter shutdown (GH-4956) (#4962)
(cherry picked from commit 4a02543cf9)
2017-12-21 19:42:32 +02:00
Miss Islington (bot) fdb148f949 bpo-32323: urllib.parse.urlsplit() must not lowercase() IPv6 scope value (GH-4867) (#4959)
(cherry picked from commit fbd605151f)
2017-12-21 14:54:45 +02:00
Ned Deily fb301cb703 Python 3.6.4
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAlo4m+sACgkQLTR+pqpl
 Qh3oPhAAu+gAOZRzRLZ6P5tuICKMzBQmMSbVd5XZyXRlgW8yiNRzsRcS+6uJqDZO
 c6/BZYPYpIATZZlffY9jKSPUa/HgKt1r3d3TTeOcOrdj+pfr0xBwFGa0Wns1+BrU
 cm1NMnMDevn5SHf3+wRX+RBe/3BN4u4XEvsO3IgBguT0PqNG90cRTwdt583YB66Q
 0M0G9Sd3w5o6DJLyJzvT/zneU2SgRO+cf/8IIKO1YGgrgbjEvws3Fp1AVBnRZ4B3
 SIYaSWro+o7c4xvbXKZu1Rjtf9mgbms9qwqmFI0cIB3azYwMM6lqiofNFsmKOl+G
 yGpgBxL14zdWVYdR0VfsYpUs/3O9npRCQCoXnAMDN7nPvEI7QAKKOLlJKXkPdaV8
 SOuqat1cPyXJrOttuU6xO4Kq0k/drKiEt390iuvi7Kvfo0CbGG5L7/Z+wJJVvsSM
 XDd3zsC2/SYpGTXlSkybB8P4o72RXc5ehg/u3DfzwM6RMOWFvPjG5HL9HacX7BXE
 zgeQqjAyRspnSof2Kvpr7QSqfk4OxxkN90To6R+AAZs9wuZzfj8L8//oOp6XCbIk
 qwl8lJ6eBjdqvufB7fdj9gbnlSK+/QechCVqNE5jTjNKRaPzcXz5BNsFN+tB0Da+
 n9hmSBiv76Xj5qKak+vBHC1vszWPe9e/0uLpyzWNkMYJD3fZcxI=
 =zrPM
 -----END PGP SIGNATURE-----

Merge tag 'v3.6.4' into 3.6
2017-12-19 02:46:01 -05:00
Ned Deily c7d7f7729e Update NEWS for 3.6.4 final 2017-12-18 23:50:55 -05:00
Yury Selivanov 572636d425
bpo-27456: Ensure TCP_NODELAY is set on linux (#4231) (#4898)
(cherry picked from commit e796b2fe26)
2017-12-15 21:53:08 -05:00
Serhiy Storchaka b580f4f2bf
[3.6] bpo-30416: Protect the optimizer during constant folding. (#4865)
It no longer spends much time doing complex calculations and no
longer consumes much memory for creating large constants that will
be dropped later.

This fixes also bpo-21074.
2017-12-15 14:12:14 +02:00
Serhiy Storchaka b82da9ebb2
[3.6] bpo-27169: The __debug__ constant is now optimized out at compile time. (GH-4880) (#4882)
This fixes also bpo-22091..
(cherry picked from commit 3325a6780c)
2017-12-15 13:26:26 +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
Miss Islington (bot) 645fa19f15 bpo-32302: Fix distutils bdist_wininst for CRT v142 (GH-4851) (#4861)
CRT v142 is binary compatible with CRT v140.
(cherry picked from commit 9e7c136ad8)
2017-12-14 12:00:50 +01:00