]> granicus.if.org Git - python/log
python
5 years agoAdd missing single quote in io.TextIOWrapper.reconfigure documentation (GH-14246)
Miss Islington (bot) [Wed, 19 Jun 2019 21:14:49 +0000 (14:14 -0700)]
Add missing single quote in io.TextIOWrapper.reconfigure documentation (GH-14246)

Add a missing single quote character in the documentation for `io.TextIOWrapper.reconfigure`.
(cherry picked from commit 35068bd059a3d9bff084ca9dcb04d51185b9ec3b)

Co-authored-by: Harmon <Harmon758@gmail.com>
5 years agobpo-37333: Ensure IncludeTkinter has a value (GH-14240)
Miss Islington (bot) [Wed, 19 Jun 2019 20:25:44 +0000 (13:25 -0700)]
bpo-37333: Ensure IncludeTkinter has a value (GH-14240)

(cherry picked from commit 12f1c726d8328e5e096c35c36901f6d19bc942d3)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-37331: Clarify format of socket handler messages in the documentation. (GH-14234...
Miss Islington (bot) [Wed, 19 Jun 2019 14:42:35 +0000 (07:42 -0700)]
bpo-37331: Clarify format of socket handler messages in the documentation. (GH-14234) (GH-14235)

(cherry picked from commit f06b569305cf604f070776ea3f800ed61fdd7d61)

5 years agobpo-37258: Not a bug, but added a unit test and updated documentation. (GH-14229...
Miss Islington (bot) [Wed, 19 Jun 2019 13:46:55 +0000 (06:46 -0700)]
bpo-37258: Not a bug, but added a unit test and updated documentation. (GH-14229) (GH-14230)

(cherry picked from commit 015000165373f8db263ef5bc682f02d74e5782ac)

5 years agobpo-37163: Deprecate passing argument obj of dataclasses.replace() by keyword. (GH...
Serhiy Storchaka [Wed, 19 Jun 2019 07:33:27 +0000 (10:33 +0300)]
bpo-37163: Deprecate passing argument obj of dataclasses.replace() by keyword. (GH-13877)

5 years agoFix name of '\0'. (GH-14222)
Miss Islington (bot) [Wed, 19 Jun 2019 04:55:59 +0000 (21:55 -0700)]
Fix name of '\0'. (GH-14222)

'\0' is the NUL byte not NULL.
(cherry picked from commit 7821b4c6d29933511d50bb42255e39790c6abf00)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years agoDocument typing.ForwardRef (GH-14216)
Miss Islington (bot) [Wed, 19 Jun 2019 00:38:43 +0000 (17:38 -0700)]
Document typing.ForwardRef (GH-14216)

(cherry picked from commit 809ff1181ccc09c3b629f3d0ec66e13eaa111b2e)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
5 years ago[3.8] bpo-33416: Document changes in PyNode_AddChild and PyParser_AddToken (GH-14214...
Miss Islington (bot) [Wed, 19 Jun 2019 00:33:34 +0000 (17:33 -0700)]
[3.8] bpo-33416:  Document changes in PyNode_AddChild and PyParser_AddToken (GH-14214) (GH-14215)

I didn't find any entries in the docs about these functions, so I just mentioned them, in "What's New".
(cherry picked from commit 47c2de7725025341318860b9a2601ba7013d27a9)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
https://bugs.python.org/issue33416

5 years agobpo-37325: Fix focus traversal for 2 IDLE dialogs (GH-14209)
Miss Islington (bot) [Tue, 18 Jun 2019 21:36:09 +0000 (14:36 -0700)]
bpo-37325: Fix focus traversal for 2 IDLE dialogs (GH-14209)

Tab now moves focus across and down for Help Source and Custom Run.
(cherry picked from commit 54cf2e0780ca137dd9abea5d3d974578ce0c18a9)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-34903: Document that some strptime formats only require 1 digit (GH-14149)
Miss Islington (bot) [Tue, 18 Jun 2019 19:21:27 +0000 (12:21 -0700)]
bpo-34903: Document that some strptime formats only require 1 digit (GH-14149)

For datetime.datetime.strptime(), the leading zero for some two-digit formats is optional.

This adds a footnote to the strftime/strptime documentation to reflect this fact, and adds some tests to ensure that it is true.

bpo-34903
(cherry picked from commit 6b9c204ee77a0de87d6f51a3d4547a18604cef9e)

Co-authored-by: Mike Gleen <mike.gleen@gmail.com>
5 years agobpo-35360: Update macOS installer to use SQLite 3.28.0 (GH-14180)
Miss Islington (bot) [Tue, 18 Jun 2019 10:15:55 +0000 (03:15 -0700)]
bpo-35360: Update macOS installer to use SQLite 3.28.0 (GH-14180)

(cherry picked from commit d8f336fdc10decdd82d3bc81a63aea8be149c0c8)

Co-authored-by: animalize <animalize@users.noreply.github.com>
5 years agobpo-35031: also disable TLS 1.3 for test_start_tls_server_1 on macOS (GH-14188)
Miss Islington (bot) [Tue, 18 Jun 2019 08:56:51 +0000 (01:56 -0700)]
bpo-35031: also disable TLS 1.3 for test_start_tls_server_1 on macOS (GH-14188)

(cherry picked from commit a514f782b822bd7bca7c8d78be7bd53bc25c1908)

Co-authored-by: Ned Deily <nad@python.org>
5 years agobpo-34631: Updated OpenSSL to 1.1.1c in macOS installer (GH-14187)
Miss Islington (bot) [Tue, 18 Jun 2019 08:39:53 +0000 (01:39 -0700)]
bpo-34631: Updated OpenSSL to 1.1.1c in macOS installer (GH-14187)

(cherry picked from commit f3fb8393e3cbbdc0ec79e0fdefaadec6977e1491)

Co-authored-by: Ned Deily <nad@python.org>
5 years agobpo-5680: IDLE: Customize running a module (GH-13763)
Miss Islington (bot) [Tue, 18 Jun 2019 02:47:55 +0000 (19:47 -0700)]
bpo-5680: IDLE: Customize running a module (GH-13763)

The initialize options are 1) add command line options, which are appended to sys.argv as if passed on a real command line, and 2) skip the shell restart. The customization dialog is accessed by a new entry on the Run menu.
(cherry picked from commit 201bc2d18b60adb05810d2a6ab396047bc527088)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
5 years agoImprove release build performance using new artifacts tasks (GH-14175)
Miss Islington (bot) [Mon, 17 Jun 2019 23:32:05 +0000 (16:32 -0700)]
Improve release build performance using new artifacts tasks (GH-14175)

(cherry picked from commit fe2ad927f457043cb9f3a1148ed737af05a2b1c4)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-37189: Export old PyRun_XXX() functions (GH-14142)
Miss Islington (bot) [Mon, 17 Jun 2019 22:42:30 +0000 (15:42 -0700)]
bpo-37189: Export old PyRun_XXX() functions (GH-14142)

Many PyRun_XXX() functions like PyRun_String() were no longer
exported in libpython38.dll by mistake. Export them again to fix the
ABI compatibiliy.
(cherry picked from commit 343ed0ffe0d5ddd4f17c31e14a656a04ac7dfc19)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agoFix test_embed.test_pre_initialization_sys_options() env vars (GH-14172)
Miss Islington (bot) [Mon, 17 Jun 2019 22:31:43 +0000 (15:31 -0700)]
Fix test_embed.test_pre_initialization_sys_options() env vars (GH-14172)

test_pre_initialization_sys_options() of test_embed now removes
PYTHON* environment variables like PYTHONWARNINGS.
(cherry picked from commit dbdc991a62bc2b3393d287e90292e3603f47d98a)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-37321: Edit IDLE subprocess connection error messages. (GH-14170)
Miss Islington (bot) [Mon, 17 Jun 2019 21:51:08 +0000 (14:51 -0700)]
bpo-37321: Edit IDLE subprocess connection error messages. (GH-14170)

Mainly, add a doc reference to message in pyshell.
(cherry picked from commit 8fac1221097aaf6ac37ed9ea727ee7892085e183)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-37039: Make IDLE's Zoom Height adjust to users' screens (GH-13678) (GH-14168)
Miss Islington (bot) [Mon, 17 Jun 2019 20:15:53 +0000 (13:15 -0700)]
bpo-37039: Make IDLE's Zoom Height adjust to users' screens (GH-13678) (GH-14168)

Measure required height by quickly maximizing once per screen.
A search for a better method failed.
(cherry picked from commit 5bff3c86ab77e9d831b3cd19b45654c7eef22931)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
5 years agobpo-34631: Updated OpenSSL to 1.1.1c in Windows installer (GH-14163)
Miss Islington (bot) [Mon, 17 Jun 2019 19:54:19 +0000 (12:54 -0700)]
bpo-34631: Updated OpenSSL to 1.1.1c in Windows installer (GH-14163)

(cherry picked from commit a268edd6a411480281222b1fdb0f78053434d17f)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-37288: Fix Windows build when --no-tkinter is specified (GH-14096)
Miss Islington (bot) [Mon, 17 Jun 2019 15:43:35 +0000 (08:43 -0700)]
bpo-37288: Fix Windows build when --no-tkinter is specified (GH-14096)

(cherry picked from commit 00f6493084c385033fe5574314223217d9a26672)

Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
5 years agobpo-37194: Complete PyObject_CallXXX() docs (GH-14156) (GH-14157)
Victor Stinner [Mon, 17 Jun 2019 13:23:59 +0000 (15:23 +0200)]
bpo-37194: Complete PyObject_CallXXX() docs (GH-14156) (GH-14157)

Mention explicitly that PyObject_CallXXX() functions raise an
exception an failure.

(cherry picked from commit 1ce2656f13e726b3b99d4c968926908cff1f460a)

5 years agobpo-36922: use Py_TPFLAGS_METHOD_DESCRIPTOR in lookup_maybe_method() (GH-13865)
Miss Islington (bot) [Mon, 17 Jun 2019 12:12:42 +0000 (05:12 -0700)]
bpo-36922: use Py_TPFLAGS_METHOD_DESCRIPTOR in lookup_maybe_method() (GH-13865)

(cherry picked from commit 2e9954d3472a23919b96323fcd5bb6c1d6927155)

Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
5 years agobpo-35031, test_asycio: disable TLS 1.3 in test_start_tls_server_1() (GH-14148)
Miss Islington (bot) [Mon, 17 Jun 2019 10:06:41 +0000 (03:06 -0700)]
bpo-35031, test_asycio: disable TLS 1.3 in test_start_tls_server_1() (GH-14148)

bpo-35031, bpo-35998: Reintroduce workaround on Windows and FreeBSD
in test_start_tls_server_1() of test_asyncio: disable TLS v1.3 on the
client context.
(cherry picked from commit c034b7824f5a7c50f2946ab3931633200e31d903)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-37267: Do not check for FILE_TYPE_CHAR in os.dup() on Windows (GH-14051) (GH...
Miss Islington (bot) [Mon, 17 Jun 2019 08:45:26 +0000 (01:45 -0700)]
bpo-37267: Do not check for FILE_TYPE_CHAR in os.dup() on Windows (GH-14051) (GH-14140)

On Windows, os.dup() no longer creates an inheritable fd when handling a
character file.
(cherry picked from commit 28fca0c422b425a6be43be31add0a5328c16b0b8)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-36688: Adding an implementation of RLock in _dummy_thread (GH-12943)
Miss Islington (bot) [Mon, 17 Jun 2019 08:34:27 +0000 (01:34 -0700)]
bpo-36688: Adding an implementation of RLock in _dummy_thread (GH-12943)

(cherry picked from commit c5905f39bcf4ef895d42eede41bb5a2f071a501d)

Co-authored-by: Joost Lek <vlabakje@gmail.com>
5 years agobpo-28805: document METH_FASTCALL (GH-14079)
Miss Islington (bot) [Sun, 16 Jun 2019 23:25:37 +0000 (16:25 -0700)]
bpo-28805: document METH_FASTCALL (GH-14079)

(cherry picked from commit 5600b5e1b24a3491e83f1b3038a7ea047a34c0bf)

Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
5 years agobpo-37220: Fix 2.7 test -R crash on Windows. (GH-13957)
Miss Islington (bot) [Sun, 16 Jun 2019 21:10:49 +0000 (14:10 -0700)]
bpo-37220: Fix 2.7 test -R crash on Windows. (GH-13957)

The patch needed for 2.7 should make the test more stable on 3.x also.
(cherry picked from commit 66d47da86aff15be34adbec02596bb3188684c0d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agoTurn math.isqrt assertion into a comment to clarify its purpose. (GH-14131)
Miss Islington (bot) [Sun, 16 Jun 2019 17:14:02 +0000 (10:14 -0700)]
Turn math.isqrt assertion into a comment to clarify its purpose. (GH-14131)

(cherry picked from commit 2dfeaa9222e2ed6b6e32faaf08e5b0f77318f0a7)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
5 years agoSimplify negativity checks in math.comb and math.perm. (GH-13870) (#14125)
Miss Islington (bot) [Sun, 16 Jun 2019 11:38:07 +0000 (04:38 -0700)]
Simplify negativity checks in math.comb and math.perm. (GH-13870) (#14125)

(cherry picked from commit 45e0411eee023b21acf1615e995d26058d66c0f1)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
5 years agoDoc: Remove an ugly space before a dot. (GH-14123)
Miss Islington (bot) [Sun, 16 Jun 2019 08:32:30 +0000 (01:32 -0700)]
Doc: Remove an ugly space before a dot. (GH-14123)

(cherry picked from commit 552951563cd5968d25e95306362e41f07d661a88)

Co-authored-by: Julien Palard <julien@palard.fr>
5 years agobpo-35922: Fix RobotFileParser when robots.txt has no relevant crawl delay or request...
Miss Islington (bot) [Sun, 16 Jun 2019 07:07:54 +0000 (00:07 -0700)]
bpo-35922: Fix RobotFileParser when robots.txt has no relevant crawl delay or request rate (GH-11791)

Co-Authored-By: Tal Einat <taleinat+github@gmail.com>
(cherry picked from commit 8047e0e1c620f69cc21f9ca48b24bf2cdd5c3668)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
5 years agoDoc: Deprecation header: More precise wording. (GH-14109)
Miss Islington (bot) [Sat, 15 Jun 2019 18:42:45 +0000 (11:42 -0700)]
Doc: Deprecation header: More precise wording. (GH-14109)

(cherry picked from commit cfa0394b9760941bbdd089913a6420d2af54314a)

Co-authored-by: Julien Palard <julien@palard.fr>
5 years agobpo-28009: Fix uuid SkipUnless logic to be based on platform programs capable of...
Miss Islington (bot) [Sat, 15 Jun 2019 16:10:34 +0000 (09:10 -0700)]
bpo-28009: Fix uuid SkipUnless logic to be based on platform programs capable of introspection (GH-12777)

uuid could try fallback methods that had no chance of working on a particular
platform, and this could cause spurious test failures, as well as degraded
performance as fallback options were tried and failed.

This fixes both the uuid module and its test's SkipUnless logic to use a
prefiltered list of techniques that may at least potentially work on that platform.

Patch by Michael Felt (aixtools).
(cherry picked from commit 3a1d50e7e573efb577714146bed5c03b9c95f466)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
5 years agobpo-36785: PEP 574 What's New entry (GH-13931)
Miss Islington (bot) [Sat, 15 Jun 2019 16:02:57 +0000 (09:02 -0700)]
bpo-36785: PEP 574 What's New entry (GH-13931)

(cherry picked from commit c879ff247ae1b67a790ff98d2d59145302cd4e4e)

Co-authored-by: Antoine Pitrou <antoine@python.org>
5 years agobpo-37289: Remove 'if False' handling in the peephole optimizer (GH-14099) (GH-14112)
Miss Islington (bot) [Sat, 15 Jun 2019 15:22:08 +0000 (08:22 -0700)]
bpo-37289: Remove 'if False' handling in the peephole optimizer (GH-14099) (GH-14112)

(cherry picked from commit 7a68f8c28bb78d957555a5001dac4df6345434a0)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agoFix typo in Lib/concurrent/futures/thread.py (GH-13953)
Miss Islington (bot) [Sat, 15 Jun 2019 12:02:34 +0000 (05:02 -0700)]
Fix typo in Lib/concurrent/futures/thread.py (GH-13953)

(cherry picked from commit 552ace7498722f1add9f3782751b0d365f4c24c8)

Co-authored-by: ubordignon <48903745+ubordignon@users.noreply.github.com>
5 years ago[3.8] Use threadpool for reading from file in sendfile fallback mode (GH-14076) ...
Andrew Svetlov [Sat, 15 Jun 2019 11:55:52 +0000 (14:55 +0300)]
[3.8] Use threadpool for reading from file in sendfile fallback mode (GH-14076) (GH-14102)

(cherry picked from commit 0237265e8287141c40faa8719da3a2d21d511d0d)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agoUpdate weakref.rst (GH-14098)
Miss Islington (bot) [Sat, 15 Jun 2019 11:49:43 +0000 (04:49 -0700)]
Update weakref.rst (GH-14098)

(cherry picked from commit f475729a714a9fb13672f8989c4abbafb783e09b)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
5 years agobpo-37279: Fix asyncio sendfile support when extra data are sent in fallback mode...
Miss Islington (bot) [Sat, 15 Jun 2019 11:24:16 +0000 (04:24 -0700)]
bpo-37279: Fix asyncio sendfile support when  extra data are sent in fallback mode. (GH-14075)

(cherry picked from commit ef2152354f03a165c5e3adb53e2276934fabd50a)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agobpo-36707: Document "m" removal from sys.abiflags (GH-14090)
Miss Islington (bot) [Sat, 15 Jun 2019 01:31:44 +0000 (18:31 -0700)]
bpo-36707: Document "m" removal from sys.abiflags (GH-14090)

(cherry picked from commit 7efc526e5cfb929a79c192ac2dcf7eb78d3a4401)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agoImplement Windows release builds in Azure Pipelines (GH-14065)
Steve Dower [Fri, 14 Jun 2019 21:20:16 +0000 (14:20 -0700)]
Implement Windows release builds in Azure Pipelines (GH-14065)

Includes backported fixes from GH-14091

5 years agoDocument C API changes in What's New in Python 3.8 (GH-14092)
Miss Islington (bot) [Fri, 14 Jun 2019 17:51:32 +0000 (10:51 -0700)]
Document C API changes in What's New in Python 3.8 (GH-14092)

(cherry picked from commit bd5798f6d4f6960fd6b49976bdf4326be77f4277)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-35537: Rewrite setsid test for os.posix_spawn (GH-11721)
Miss Islington (bot) [Fri, 14 Jun 2019 17:49:22 +0000 (10:49 -0700)]
bpo-35537: Rewrite setsid test for os.posix_spawn (GH-11721)

bpo-35537, bpo-35876: Fix also test_start_new_session() of
test_subprocess: use os.getsid() rather than os.getpgid().
(cherry picked from commit 5884043252473ac733aba1d3251d4debe72511e5)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-37261: Document sys.unraisablehook corner cases (GH-14059)
Miss Islington (bot) [Fri, 14 Jun 2019 16:59:54 +0000 (09:59 -0700)]
bpo-37261: Document sys.unraisablehook corner cases (GH-14059)

Document reference cycle and resurrected objects issues in
sys.unraisablehook() and threading.excepthook() documentation.

Fix test.support.catch_unraisable_exception(): __exit__() no longer
ignores unraisable exceptions.

Fix test_io test_writer_close_error_on_close(): use a second
catch_unraisable_exception() to catch the BufferedWriter unraisable
exception.
(cherry picked from commit 212646cae6b7c4ddc8d98c8b9b6d39a5f259e864)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-19865: ctypes.create_unicode_buffer() supports non-BMP strings on Windows (GH...
Miss Islington (bot) [Fri, 14 Jun 2019 16:43:22 +0000 (09:43 -0700)]
bpo-19865: ctypes.create_unicode_buffer() supports non-BMP strings on Windows (GH-14081)

(cherry picked from commit 9765efcb39fc03d5b1abec3924388974470a8bd5)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() (GH-14080)
Miss Islington (bot) [Fri, 14 Jun 2019 16:12:48 +0000 (09:12 -0700)]
bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() (GH-14080)

(cherry picked from commit f0749da9a535375f05a2015e8960e8ae54877349)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agoUpdate concurrent.futures.rst (GH-14061)
Miss Islington (bot) [Fri, 14 Jun 2019 15:11:04 +0000 (08:11 -0700)]
Update concurrent.futures.rst (GH-14061)

This PR adds missing details in the [`concurrent.futures`](https://docs.python.org/3/library/concurrent.futures.html) documentation:

* the mention that `Future.cancel` also returns `False` if the call finished running;
* the mention of the states for `Future` that did not complete: pending or running.
(cherry picked from commit 431478d5d74d880692817323198b9605af972fa5)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
5 years agobpo-37278: Fix test_asyncio ProactorLoopCtrlC (GH-14074)
Miss Islington (bot) [Fri, 14 Jun 2019 11:53:13 +0000 (04:53 -0700)]
bpo-37278: Fix test_asyncio ProactorLoopCtrlC (GH-14074)

Join the thread to prevent leaking a running thread and leaking a
reference.

Cleanup also the test:

* asyncioWindowsProactorEventLoopPolicy became the default policy,
  there is no need to set it manually.
* Only start the thread once the loop is running.
* Use a shorter sleep in the thread (100 ms rather than 1 sec).
* Use close_loop(loop) rather than loop.close().
* Use longer variable names.
(cherry picked from commit 07559450b2d9179e4c99e0af088ce7550e549f94)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-37269: Correctly optimise conditionals with constant booleans (GH-14071)
Miss Islington (bot) [Fri, 14 Jun 2019 06:13:24 +0000 (23:13 -0700)]
bpo-37269: Correctly optimise conditionals with constant booleans (GH-14071)

Fix a regression introduced by af8646c8054d0f4180a2013383039b6a472f9698 that was causing code of the form:

if True and False:
   do_something()

to be optimized incorrectly, eliminating the block.
(cherry picked from commit 05f831865545b08c9a21cfb7773af58b76ec64cb)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-37077: Add native thread ID (TID) for AIX (GH-13624)
Miss Islington (bot) [Thu, 13 Jun 2019 22:54:04 +0000 (15:54 -0700)]
bpo-37077: Add native thread ID (TID) for AIX (GH-13624)

This is the followup  for issue36084

https://bugs.python.org/issue37077
(cherry picked from commit d0eeb936d8daf05d7d89f6935e3f4c0dee49c5be)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
5 years agobpo-37213: Handle negative line deltas correctly in the peephole optimizer (GH-13969)
Miss Islington (bot) [Thu, 13 Jun 2019 18:35:40 +0000 (11:35 -0700)]
bpo-37213: Handle negative line deltas correctly in the peephole optimizer (GH-13969)

The peephole optimizer was not optimizing correctly bytecode after negative deltas were introduced. This is due to the fact that some special values (255) were being searched for in both instruction pointer delta and line number deltas.
(cherry picked from commit 3498c642f4e83f3d8e2214654c0fa8e0d51cebe5)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-6689: os.path.commonpath raises ValueError for different drives isn't documented...
Miss Islington (bot) [Thu, 13 Jun 2019 14:12:49 +0000 (07:12 -0700)]
bpo-6689: os.path.commonpath raises ValueError for different drives isn't documented (GH-14045)

It would raise ValueError("Paths don't have the same drive") if the paths on different drivers, which is not documented.

os.path.commonpath raises ValueError when the *paths* are in different drivers, but it is not documented.
Update the document according @Windsooon 's suggestion.
It actually raise ValueError according line 355 of [test of path](https://github.com/python/cpython/blob/master/Lib/test/test_ntpath.py)

https://bugs.python.org/issue6689
(cherry picked from commit 95492032c48fef20b9c7076a23fe7e46927a4688)

Co-authored-by: Makdon <makdon@makdon.me>
5 years agobpo-37261: Fix support.catch_unraisable_exception() (GH-14052)
Miss Islington (bot) [Thu, 13 Jun 2019 13:25:59 +0000 (06:25 -0700)]
bpo-37261: Fix support.catch_unraisable_exception() (GH-14052)

The __exit__() method of test.support.catch_unraisable_exception
context manager now ignores unraisable exception raised when clearing
self.unraisable attribute.
(cherry picked from commit 6d22cc8e90ccb1e1965b1a4bc79456e2cc1e5a3e)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-36779: time.tzname returns empty string on Windows if default cod… (GH-13073...
Miss Islington (bot) [Thu, 13 Jun 2019 13:22:51 +0000 (06:22 -0700)]
bpo-36779: time.tzname returns empty string on Windows if default cod… (GH-13073) (GH-14032)

Calling setlocale(LC_CTYPE, "") on a system where GetACP() returns CP_UTF8 results in empty strings in _tzname[].

This causes time.tzname to be an empty string.
I have reported the bug to the UCRT team and will follow up, but it will take some time get a fix into production.

In the meantime one possible workaround is to temporarily change the locale by calling setlocale(LC_CTYPE, "C") before calling _tzset and restore the current locale after if the GetACP() == CP_UTF8 or CP_UTF7

@zooba

https://bugs.python.org/issue36779
(cherry picked from commit b4c7defe58695a6670a8fdeaef67a638bbb47e42)

Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
5 years agobpo-37210: Fix pure Python pickle when _pickle is unavailable (GH-14016)
Miss Islington (bot) [Thu, 13 Jun 2019 12:28:11 +0000 (05:28 -0700)]
bpo-37210: Fix pure Python pickle when _pickle is unavailable (GH-14016)

Allow pure Python implementation of pickle to work
even when the C _pickle module is unavailable.

Fix test_pickle when _pickle is missing: declare PyPicklerHookTests
outside "if has_c_implementation:" block.
(cherry picked from commit 63ab4ba07b492448844940c347787ba30735b7f2)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years ago[3.8] bpo-36402: Fix threading._shutdown() race condition (GH-13948) (GH-14050)
Victor Stinner [Thu, 13 Jun 2019 11:44:23 +0000 (13:44 +0200)]
[3.8] bpo-36402: Fix threading._shutdown() race condition (GH-13948) (GH-14050)

* bpo-36402: Fix threading._shutdown() race condition (GH-13948)

Fix a race condition at Python shutdown when waiting for threads.
Wait until the Python thread state of all non-daemon threads get
deleted (join all non-daemon threads), rather than just wait until
Python threads complete.

* Add threading._shutdown_locks: set of Thread._tstate_lock locks
  of non-daemon threads used by _shutdown() to wait until all Python
  thread states get deleted. See Thread._set_tstate_lock().
* Add also threading._shutdown_locks_lock to protect access to
  threading._shutdown_locks.
* Add test_finalization_shutdown() test.

(cherry picked from commit 468e5fec8a2f534f1685d59da3ca4fad425c38dd)

* bpo-36402: Fix threading.Thread._stop() (GH-14047)

Remove the _tstate_lock from _shutdown_locks, don't remove None.

(cherry picked from commit 6f75c873752a16a7ad8f35855b1e29f59d048e84)

5 years agobpo-37253: Remove PyAST_obj2mod_ex() function (GH-14020)
Miss Islington (bot) [Thu, 13 Jun 2019 07:46:01 +0000 (00:46 -0700)]
bpo-37253: Remove PyAST_obj2mod_ex() function (GH-14020)

PyAST_obj2mod_ex() is similar to PyAST_obj2mod() with an additional
'feature_version' parameter which is unused.
(cherry picked from commit 022ac0a497b668d8b15e34e582a6396ead1a35e1)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-35070: test_getgrouplist may fail on macOS if too many groups (GH-13071)
Miss Islington (bot) [Thu, 13 Jun 2019 07:27:23 +0000 (00:27 -0700)]
bpo-35070: test_getgrouplist may fail on macOS if too many groups (GH-13071)

(cherry picked from commit 8725c83ed5ca8959195ad8326db99d564a921749)

Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
5 years ago[3.8] bpo-37253: Document PyCompilerFlags.cf_feature_version (GH-14019) (GH-14038)
Victor Stinner [Thu, 13 Jun 2019 00:40:41 +0000 (02:40 +0200)]
[3.8] bpo-37253: Document PyCompilerFlags.cf_feature_version (GH-14019) (GH-14038)

* Update PyCompilerFlags structure documentation.
* Document the new cf_feature_version field in the Changes in the C
  API section of the What's New in Python 3.8 doc.

(cherry picked from commit 2c9b498759f4fc74da82a0a96d059d666fa73f16)

5 years agobpo-37253: Add _PyCompilerFlags_INIT macro (GH-14018)
Miss Islington (bot) [Thu, 13 Jun 2019 00:36:03 +0000 (17:36 -0700)]
bpo-37253: Add _PyCompilerFlags_INIT macro (GH-14018)

Add a new _PyCompilerFlags_INIT macro to initialize PyCompilerFlags
variables, rather than initializing cf_flags and cf_feature_version
explicitly in each variable.
(cherry picked from commit 37d66d7d4bc7dbac9809d69966a774ebb32563be)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-37223: test_io: silence destructor errors (GH-14031)
Victor Stinner [Wed, 12 Jun 2019 22:23:49 +0000 (00:23 +0200)]
bpo-37223: test_io: silence destructor errors (GH-14031)

* bpo-18748: Fix _pyio.IOBase destructor (closed case) (GH-13952)

_pyio.IOBase destructor now does nothing if getting the closed
attribute fails to better mimick _io.IOBase finalizer.

(cherry picked from commit 4f6f7c5a611905fb6b81671547f268c226bc646a)

* bpo-37223: test_io: silence destructor errors (GH-13954)

Implement also MockNonBlockWriterIO.seek() method.

(cherry picked from commit b589cef9c4dada2fb84ce0fae5040ecf16d9d5ef)

* bpo-37223, test_io: silence last 'Exception ignored in:' (GH-14029)

Use catch_unraisable_exception() to ignore 'Exception ignored in:'
error when the internal BufferedWriter of the BufferedRWPair is
destroyed. The C implementation doesn't give access to the
internal BufferedWriter, so just ignore the warning instead.

(cherry picked from commit 913fa1c8245d1cde6edb4254f4fb965cc91786ef)

5 years agoMake asyncio stream sendfile fail on error (was hang) (GH-14025)
Miss Islington (bot) [Wed, 12 Jun 2019 19:10:44 +0000 (12:10 -0700)]
Make asyncio stream sendfile fail on error (was hang) (GH-14025)

(cherry picked from commit 0d1942774a70d561dbaaa980742dd0927e8aa51a)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agobpo-37236: pragma optimize off for _Py_c_quot on Windows arm64 (GH-13983)
Miss Islington (bot) [Wed, 12 Jun 2019 18:27:15 +0000 (11:27 -0700)]
bpo-37236: pragma optimize off for _Py_c_quot on Windows arm64 (GH-13983)

(cherry picked from commit ff6bb0aa95259413f359d42410526ff0b4dccfb7)

Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
5 years agobpo-37201: fix test_distutils failures for Windows ARM64 (GH-13902)
Miss Islington (bot) [Wed, 12 Jun 2019 17:44:29 +0000 (10:44 -0700)]
bpo-37201: fix test_distutils failures for Windows ARM64 (GH-13902)

(cherry picked from commit daf62627518ad97ce66a48c49496aa0573cf0731)

Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
5 years agobpo-37160: Thread native ID NetBSD support (GH-13835)
Miss Islington (bot) [Wed, 12 Jun 2019 16:03:04 +0000 (09:03 -0700)]
bpo-37160: Thread native ID NetBSD support (GH-13835)

(cherry picked from commit 5287022eeeb3c017d49fc8580b52e18377bf23f3)

Co-authored-by: David Carlier <dcarlier@afilias.info>
5 years agobpo-35766: compile(): rename feature_version parameter (GH-13994) (GH-14001)
Victor Stinner [Wed, 12 Jun 2019 14:17:05 +0000 (16:17 +0200)]
bpo-35766: compile(): rename feature_version parameter (GH-13994) (GH-14001)

Rename compile() feature_version parameter to _feature_version and
convert it to a keyword-only parameter.

Update also test_type_comments to pass feature_version as a tuple.

(cherry picked from commit efdf6ca90f7702824e7aeee1ceca949e7c20288a)

5 years agobpo-35545: Skip `test_asyncio.test_create_connection_ipv6_scope` on AIX (GH-14011)
Miss Islington (bot) [Wed, 12 Jun 2019 12:20:12 +0000 (05:20 -0700)]
bpo-35545: Skip `test_asyncio.test_create_connection_ipv6_scope` on AIX (GH-14011)

because "getaddrinfo()" behaves different on AIX

https://bugs.python.org/issue35545
(cherry picked from commit 32dda263e4e8c8e0fadc2bb29b9856e2f177dde9)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
5 years agoAdd some placeholder notes for major 3.8 features (GH-13927) (#13929)
Miss Islington (bot) [Wed, 12 Jun 2019 11:31:13 +0000 (04:31 -0700)]
Add some placeholder notes for major 3.8 features (GH-13927) (#13929)

(cherry picked from commit b9438ceb20635b00f10615c5b6d8dbe56e1d486b)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
5 years agobpo-26219: Fix compiler warning in _PyCode_InitOpcache() (GH-13997) (GH-14000)
Miss Islington (bot) [Wed, 12 Jun 2019 10:14:43 +0000 (03:14 -0700)]
bpo-26219: Fix compiler warning in _PyCode_InitOpcache() (GH-13997) (GH-14000)

Fix MSVC warning:

    objects\codeobject.c(285): warning C4244: '=':
    conversion from 'Py_ssize_t' to 'unsigned char',
    possible loss of data
(cherry picked from commit 376ce9852eec4e97745c723f0dd0fe64383c6cd3)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-29505: Fuzz json module, enforce size limit on int(x) fuzz (GH-13991)
Miss Islington (bot) [Wed, 12 Jun 2019 04:48:17 +0000 (21:48 -0700)]
bpo-29505: Fuzz json module, enforce size limit on int(x) fuzz (GH-13991)

* bpo-29505: Enable fuzz testing of the json module, enforce size limit on int(x) fuzz and json input size to avoid timeouts.

Contributed by by Ammar Askar for Google.
(cherry picked from commit a6e190e94b47324f14e22a09200c68b722d55699)

Co-authored-by: Ammar Askar <aaskar@google.com>
5 years agobpo-32625: Updated documentation for EXTENDED_ARG. (GH-13985)
Miss Islington (bot) [Wed, 12 Jun 2019 03:53:58 +0000 (20:53 -0700)]
bpo-32625: Updated documentation for EXTENDED_ARG. (GH-13985)

Python 3.6 changed the size of bytecode instruction, while the documentation for `EXTENDED_ARG` was not updated accordingly.
(cherry picked from commit 405f648db7c44b07348582b5101d4716e0ce5ac3)

Co-authored-by: Yao Zuo <laike9m@users.noreply.github.com>
5 years agobpo-36918: Fix "Exception ignored in" in test_urllib (GH-13996)
Miss Islington (bot) [Wed, 12 Jun 2019 02:26:02 +0000 (19:26 -0700)]
bpo-36918: Fix "Exception ignored in" in test_urllib (GH-13996)

Mock the HTTPConnection.close() method in a few unit tests to avoid
logging "Exception ignored in: ..." messages.
(cherry picked from commit eb976e47e261760330c1bed224019b073b05e994)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-35766: Change format for feature_version to (major, minor) (GH-13992) (GH-13993)
Miss Islington (bot) [Wed, 12 Jun 2019 00:55:28 +0000 (17:55 -0700)]
bpo-35766: Change format for feature_version to (major, minor) (GH-13992) (GH-13993)

(A single int is still allowed, but undocumented.)

https://bugs.python.org/issue35766
(cherry picked from commit 10b55c1643b512b3a2cae8ab89c53683a13ca43e)

Co-authored-by: Guido van Rossum <guido@python.org>
5 years ago[3.8] bpo-36520: Email header folded incorrectly (GH-13608) (GH-13909)
Abhilash Raj [Tue, 11 Jun 2019 23:28:10 +0000 (19:28 -0400)]
[3.8] bpo-36520: Email header folded incorrectly (GH-13608) (GH-13909)

* [bpo-36520](https://bugs.python.org/issue36520): reset the encoded word offset when starting a new
line during an email header folding operation

* 📜🤖 Added by blurb_it.

* [bpo-36520](https://bugs.python.org/issue36520): add an additional test case, and provide descriptive
comments for the test_folding_with_utf8_encoding_* tests

* [bpo-36520](https://bugs.python.org/issue36520): fix whitespace issue

* [bpo-36520](https://bugs.python.org/issue36520): changes per reviewer request -- remove extraneous
backslashes; add whitespace between terminating quotes and
line-continuation backslashes; use "bpo-" instead of
"issue GH-" in comments
(cherry picked from commit f6713e84afc5addcfa8477dbdf2c027787f711c0)

Co-authored-by: websurfer5 <49998481+websurfer5@users.noreply.github.com>
https://bugs.python.org/issue36520

5 years agobpo-37238: Enable building for Windows using Visual Studio 2019 (GH-13988)
Miss Islington (bot) [Tue, 11 Jun 2019 22:35:55 +0000 (15:35 -0700)]
bpo-37238: Enable building for Windows using Visual Studio 2019 (GH-13988)

(cherry picked from commit 04856c2193eb72d72c46b57fa08095235d732a73)

Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
5 years agobpo-35766: What's new in the ast and typing modules (GH-13984)
Miss Islington (bot) [Tue, 11 Jun 2019 21:13:25 +0000 (14:13 -0700)]
bpo-35766: What's new in the ast and typing modules (GH-13984)

(cherry picked from commit 9b33ce48a7846dbdad32d4f8936b08e6b78a2faf)

Co-authored-by: Guido van Rossum <guido@python.org>
5 years agobpo-36607: Eliminate RuntimeError raised by asyncio.all_tasks() (GH-13971)
Miss Islington (bot) [Tue, 11 Jun 2019 20:32:12 +0000 (13:32 -0700)]
bpo-36607: Eliminate RuntimeError raised by asyncio.all_tasks() (GH-13971)

If internal tasks weak set is changed by another thread during iteration.

https://bugs.python.org/issue36607
(cherry picked from commit 65aa64fae89a24491aae84ba0329eb8f3c68c389)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agoFix test_posix if RWF_HIPRI is defined but not preadv2. (GH-13980)
Miss Islington (bot) [Tue, 11 Jun 2019 17:58:57 +0000 (10:58 -0700)]
Fix test_posix if RWF_HIPRI is defined but not preadv2. (GH-13980)

If preadv2 is not available, preadv will raise NotImplementedError.
(cherry picked from commit 44867bb9376e324493f0149ac8b3c33f23c9050d)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years agocloses bpo-33758: Skip test_get_type_hints_modules_forwardref. (GH-13977)
Miss Islington (bot) [Tue, 11 Jun 2019 16:37:59 +0000 (09:37 -0700)]
closes bpo-33758: Skip test_get_type_hints_modules_forwardref. (GH-13977)

This test "works" if things are run in the right order, so it's better to use @skip than @expectedFailure here.
(cherry picked from commit 910b3fcb01c29f18ffd53086e36cd2cb9e5fae55)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years agobpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965...
Miss Islington (bot) [Tue, 11 Jun 2019 08:41:23 +0000 (01:41 -0700)]
bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) (GH-13967)

(cherry picked from commit 1f11cf9521114447b3e32e2ac88f075ffaa37555)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years ago[3.8] bpo-37216: Fix version and filename in Mac using document (GH-13964)
Makdon [Tue, 11 Jun 2019 05:37:34 +0000 (13:37 +0800)]
[3.8] bpo-37216: Fix version and filename in Mac using document (GH-13964)

5 years agocloses bpo-35184: Fix XML_POOR_ENTROPY option that breaks makesetup parsing of pyexpa...
Miss Islington (bot) [Tue, 11 Jun 2019 02:14:23 +0000 (19:14 -0700)]
closes bpo-35184: Fix XML_POOR_ENTROPY option that breaks makesetup parsing of pyexpat line in Setup. (GH-13064)

When the line is uncommented, the equals character causes it to be incorrectly interpreted
as a macro definition by makesetup.  This results in invalid Makefile output.

The expat code only requires XML_POOR_ENTROPY to be defined; the value is unnecessary.
(cherry picked from commit 408a2ef1aceff1f4270c44552fa39ef93d9283e3)

Co-authored-by: aaronpaulhurst <aaronpaulhurst@gmail.com>
5 years agobpo-37215: Fix dtrace issue introduce by bpo-36842 (GH-13940)
Miss Islington (bot) [Mon, 10 Jun 2019 15:38:23 +0000 (08:38 -0700)]
bpo-37215: Fix dtrace issue introduce by bpo-36842 (GH-13940)

Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue37215
(cherry picked from commit 8a8b59c9794674b50b2242698c29038034f4864c)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-11122: fix hardcoded path checking for rpmbuild in bdist_rpm.py (GH-10594)
Miss Islington (bot) [Sat, 8 Jun 2019 21:25:21 +0000 (14:25 -0700)]
bpo-11122: fix hardcoded path checking for rpmbuild in bdist_rpm.py (GH-10594)

(cherry picked from commit 45a14942c969ed508b35abd5e116cb18f84ce5b4)

Co-authored-by: Marcin Niemira <marcin.niemira@gmail.com>
5 years agobpo-37178: Allow a one argument form of math.perm() (GH-13905) (GH-13919)
Miss Islington (bot) [Sat, 8 Jun 2019 16:17:33 +0000 (09:17 -0700)]
bpo-37178: Allow a one argument form of math.perm() (GH-13905) (GH-13919)

(cherry picked from commit e119b3d136bd94d880bce4b382096f6de3f38062)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-34886: Fix subprocess.run handling of exclusive arguments (GH-11727)
Miss Islington (bot) [Sat, 8 Jun 2019 15:15:02 +0000 (08:15 -0700)]
bpo-34886: Fix subprocess.run handling of exclusive arguments (GH-11727)

Fix an unintended ValueError from :func:`subprocess.run` when checking for
conflicting `input` and `stdin` or `capture_output` and `stdout` or `stderr` args
when they were explicitly provided but with `None` values within a passed in
`**kwargs` dict rather than as passed directly by name.
(cherry picked from commit 8cc605acdda5aff250ab4c9b524a7560f90ca9f3)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
5 years agobpo-29505: Fix interpreter in fuzzing targets to be relocatable (GH-13907)
Miss Islington (bot) [Sat, 8 Jun 2019 15:03:05 +0000 (08:03 -0700)]
bpo-29505: Fix interpreter in fuzzing targets to be relocatable (GH-13907)

(cherry picked from commit a15a7bcaea54e1845ab2abe27e6f583294cd715b)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
5 years agobpo-37173: Show passed class in inspect.getfile error (GH-13861)
Miss Islington (bot) [Sat, 8 Jun 2019 12:24:59 +0000 (05:24 -0700)]
bpo-37173: Show passed class in inspect.getfile error (GH-13861)

Currently, inspect.getfile(str) will report nonsense:

```pytb
>>> inspect.getfile(str)
TypeError: <module 'builtins' (built-in)> is a built-in class
```

This fixes that

https://bugs.python.org/issue37173
(cherry picked from commit d407d2a7265f6102e51a1d62b3fd28b4f7a78d16)

Co-authored-by: Philipp A <flying-sheep@web.de>
5 years ago[3.8] bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13911)
Miss Islington (bot) [Sat, 8 Jun 2019 09:46:53 +0000 (02:46 -0700)]
[3.8] bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13911)

5 years agocross port importlib-metadata PR GH-76 (GH-13903)
Miss Islington (bot) [Fri, 7 Jun 2019 21:44:03 +0000 (14:44 -0700)]
cross port importlib-metadata PR GH-76 (GH-13903)

https://gitlab.com/python-devs/importlib_metadata/merge_requests/76
(cherry picked from commit 65e5860fcc8ffe66f3c325d5484112f3b6540e8c)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
5 years agobpo-37150: Throw ValueError if FileType class object was passed in add_argument ...
Miss Islington (bot) [Fri, 7 Jun 2019 21:11:59 +0000 (14:11 -0700)]
bpo-37150: Throw ValueError if FileType class object was passed in add_argument (GH-13805)

There is a possibility that someone (like me) accidentally will omit parentheses with `FileType` arguments after `FileType`, and parser will contain wrong file until someone will try to use it.

Example:
```python
parser = argparse.ArgumentParser()
parser.add_argument('-x', type=argparse.FileType)
```

https://bugs.python.org/issue37150
(cherry picked from commit 03d5831a2d62c68654ec223168e574cd546efbf6)

Co-authored-by: zygocephalus <grrrr@protonmail.com>
5 years agoIDLE: Standardize naming convention for DummyEditwin in tests (GH-13876) (#13885)
Miss Islington (bot) [Fri, 7 Jun 2019 20:05:18 +0000 (13:05 -0700)]
IDLE: Standardize naming convention for DummyEditwin in tests (GH-13876) (#13885)

* Change from Dummy_Editwin to DummyEditwin to match other tests.
(cherry picked from commit 7f8a38a7c47823c17adab469fcb4f762f4e945b7)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
5 years agobpo-37138: fix undefined behaviour with memcpy() on NULL array (GH-13867)
Miss Islington (bot) [Fri, 7 Jun 2019 18:25:53 +0000 (11:25 -0700)]
bpo-37138: fix undefined behaviour with memcpy() on NULL array (GH-13867)

(cherry picked from commit 1f9531764cc0f8dbca1d8f429d162dc28282f4b4)

Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
5 years agobpo-37181: Fix test_regrtest failures on Windows arm64 (GH-13872)
Miss Islington (bot) [Fri, 7 Jun 2019 18:17:52 +0000 (11:17 -0700)]
bpo-37181: Fix test_regrtest failures on Windows arm64 (GH-13872)

(cherry picked from commit e7e5039d6940e41839dcef0433262ff363408dad)

Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
5 years agobpo-37191: Avoid declaration-after-statement in header included from Python.h (GH...
Petr Viktorin [Fri, 7 Jun 2019 16:31:56 +0000 (18:31 +0200)]
bpo-37191: Avoid declaration-after-statement in header included from Python.h (GH-13887)

5 years agobpo-37191: Move TestPEP590 from test_capi to test_call (GH-13892)
Miss Islington (bot) [Fri, 7 Jun 2019 16:13:16 +0000 (09:13 -0700)]
bpo-37191: Move TestPEP590 from test_capi to test_call (GH-13892)

(cherry picked from commit 740a84de73ad8d02655de0a084036f4b7e49a01b)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-37169: Rewrite _PyObject_IsFreed() unit tests (GH-13888) (GH-13895)
Victor Stinner [Fri, 7 Jun 2019 15:41:39 +0000 (17:41 +0200)]
bpo-37169: Rewrite _PyObject_IsFreed() unit tests (GH-13888) (GH-13895)

Replace two Python function calls with a single one to ensure that no
memory allocation is done between the invalid object is created and
when _PyObject_IsFreed() is called.

(cherry picked from commit 3bf0f3ad2046ac674d8e8a2c074a5a8b3327797d)

5 years ago[3.8] bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860...
Zackery Spytz [Fri, 7 Jun 2019 14:22:58 +0000 (08:22 -0600)]
[3.8] bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860) (GH-13891)

(cherry picked from commit dc2476500d91082f0c907772c83a044bf49af279)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-37177: make IDLE's search dialogs transient (GH-13869)
Miss Islington (bot) [Fri, 7 Jun 2019 06:17:13 +0000 (23:17 -0700)]
bpo-37177: make IDLE's search dialogs transient (GH-13869)

This avoids the search dialogs being hidden behind the editor window.
(cherry picked from commit 554450fb4e95066e825bdb4a2d544a490daeebdc)

Co-authored-by: Tal Einat <taleinat@gmail.com>