]> granicus.if.org Git - python/log
python
5 years agobpo-36888, test_multiprocessing: Increase test_parent_process timeout (GH-14286)
Miss Islington (bot) [Tue, 25 Jun 2019 21:12:47 +0000 (14:12 -0700)]
bpo-36888, test_multiprocessing: Increase test_parent_process timeout (GH-14286)

(cherry picked from commit 594d9b9f58e1ef0a60b5ce9e590e0f45cd684f26)

Co-authored-by: Pierre Glaser <pierreglaser@msn.com>
5 years ago[3.8] bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError (GH-14119...
Abhilash Raj [Tue, 25 Jun 2019 18:38:48 +0000 (11:38 -0700)]
[3.8] bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError (GH-14119) (GH-14380)

When certain malformed messages have content-type set to 'mulitpart/*' but
still have a single part body, iter_attachments can raise AttributeError. This
patch fixes it by returning a None value instead when the body is single part.
(cherry picked from commit 02257012f6d3821d816cb6a7e8461a88a05b9a08)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
https://bugs.python.org/issue33972

5 years agobpo-37400: Fix test_os.test_chown() (GH-14374)
Miss Islington (bot) [Tue, 25 Jun 2019 15:26:56 +0000 (08:26 -0700)]
bpo-37400: Fix test_os.test_chown() (GH-14374)

Use os.getgroups() rather than grp.getgrall() to get groups.
Rename also the test to test_chown_gid().
(cherry picked from commit d7c87d982d4ec4ba201bcee14324ae5e0e90581f)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-4963: Fix for initialization and non-deterministic behavior issues in mimetypes...
Steve Dower [Tue, 25 Jun 2019 15:20:43 +0000 (08:20 -0700)]
bpo-4963: Fix for initialization and non-deterministic behavior issues in mimetypes (GH-14375)

5 years agoFix minor spelling error in What's new for Python 3.8 (GH-14371)
Miss Islington (bot) [Tue, 25 Jun 2019 11:02:49 +0000 (04:02 -0700)]
Fix minor spelling error in What's new for Python 3.8 (GH-14371)

(cherry picked from commit de9b606c90c16cea2780948431bb24e50cc5cd99)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years ago[3.8] bpo-37250: put back tp_print for backwards compatibility (GH-14193)
Jeroen Demeyer [Tue, 25 Jun 2019 10:58:58 +0000 (12:58 +0200)]
[3.8] bpo-37250: put back tp_print for backwards compatibility (GH-14193)

This is a 3.8-only compatibility measure for third-party Cython-based sdists.

https://bugs.python.org/issue37250

5 years agobpo-24214: Fixed the UTF-8 and UTF-16 incremental decoders. (GH-14304)
Miss Islington (bot) [Tue, 25 Jun 2019 09:12:16 +0000 (02:12 -0700)]
bpo-24214: Fixed the UTF-8 and UTF-16 incremental decoders. (GH-14304)

* The UTF-8 incremental decoders fails now fast if encounter
  a sequence that can't be handled by the error handler.
* The UTF-16 incremental decoders with the surrogatepass error
  handler decodes now a lone low surrogate with final=False.
(cherry picked from commit 894263ba80af4b7733c2df95b527e96953922656)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agobpo-36974: inherit tp_vectorcall_offset unconditionally (GH-13858) (GH-14342)
Miss Islington (bot) [Tue, 25 Jun 2019 08:19:16 +0000 (01:19 -0700)]
bpo-36974: inherit tp_vectorcall_offset unconditionally (GH-13858) (GH-14342)

(cherry picked from commit a8b27e623d75377aabe50df27e97cab4e81a174a)

Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
5 years agobpo-37393: Fix deprecation warnings in test_ntpath. (GH-14357)
Miss Islington (bot) [Tue, 25 Jun 2019 07:12:19 +0000 (00:12 -0700)]
bpo-37393: Fix deprecation warnings in test_ntpath. (GH-14357)

eval() was being called an extra time without a filter for
deprecation warnings.
(cherry picked from commit 9fe42b49c79c453d905d0395150ba0607fbab18b)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-36546: Mark first argument as position only (GH-14363) (GH-14364)
Miss Islington (bot) [Tue, 25 Jun 2019 03:07:00 +0000 (20:07 -0700)]
bpo-36546: Mark first argument as position only (GH-14363) (GH-14364)

5 years agobpo-37394: Fix pure Python implementation of the queue module (GH-14351)
Miss Islington (bot) [Tue, 25 Jun 2019 02:14:37 +0000 (19:14 -0700)]
bpo-37394: Fix pure Python implementation of the queue module (GH-14351)

(cherry picked from commit 3f5b9088b0ed08e1442cca37df78f609d5cd8c3c)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-35224: Add What's new entry for evaluation order in dict comprehensions (GH-14319)
Miss Islington (bot) [Tue, 25 Jun 2019 01:49:07 +0000 (18:49 -0700)]
bpo-35224: Add What's new entry for evaluation order in dict comprehensions (GH-14319)

(cherry picked from commit b51b7137faa22e12c570c70fe0462c662ccd935e)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-35360: Update Windows builds to use SQLite 3.28.0 (GH-14179)
Miss Islington (bot) [Mon, 24 Jun 2019 23:43:31 +0000 (16:43 -0700)]
bpo-35360: Update Windows builds to use SQLite 3.28.0 (GH-14179)

(cherry picked from commit 7fd2ba354ec2304743ffd9ba620e07d113532264)

Co-authored-by: animalize <animalize@users.noreply.github.com>
5 years agobpo-36889: Document asyncio Stream and StreamServer (GH-14203)
Miss Islington (bot) [Mon, 24 Jun 2019 18:33:11 +0000 (11:33 -0700)]
bpo-36889: Document asyncio Stream and StreamServer (GH-14203)

(cherry picked from commit 6793cce155f8875b10efd746cb0b34cb72263af7)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years agobpo-32627: Fix compile error when conflicting `_uuid` headers included (GH-11751)
Miss Islington (bot) [Mon, 24 Jun 2019 18:27:57 +0000 (11:27 -0700)]
bpo-32627: Fix compile error when conflicting `_uuid` headers included (GH-11751)

(cherry picked from commit 6ffd9b05dfade9e3a101fe039157856eb855f82e)

Co-authored-by: ziheng <zihenglv@gmail.com>
5 years agoGet rid of exception traceback printing in asyncio tests (GH-14343)
Miss Islington (bot) [Mon, 24 Jun 2019 17:21:35 +0000 (10:21 -0700)]
Get rid of exception traceback printing in asyncio tests (GH-14343)

(cherry picked from commit 549f7d45c8d61ab7b1d4a4e266b9d790ad6f7504)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agobpo-37363: Add audit events for a range of modules (GH-14301)
Miss Islington (bot) [Mon, 24 Jun 2019 16:09:47 +0000 (09:09 -0700)]
bpo-37363: Add audit events for a range of modules (GH-14301)

(cherry picked from commit 60419a7e96577cf783b3b45bf3984f9fb0d7ddff)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-37359: Fix regrtest --cleanup (GH-14336)
Miss Islington (bot) [Mon, 24 Jun 2019 11:37:55 +0000 (04:37 -0700)]
bpo-37359: Fix regrtest --cleanup (GH-14336)

(cherry picked from commit 9bbf4d7083a819cbcee2a6cd3df2802d4c50f734)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-37359: Add --cleanup option to python3 -m test (GH-14332) (GH-14334)
Victor Stinner [Mon, 24 Jun 2019 10:51:47 +0000 (12:51 +0200)]
bpo-37359: Add --cleanup option to python3 -m test (GH-14332) (GH-14334)

* regrtest: Add --cleanup option to remove "test_python_*" directories
  of previous failed test jobs.
* Add "make cleantest" to run "python3 -m test --cleanup".

(cherry picked from commit 47fbc4e45b35b3111e2d947a66490a43ac21d363)

5 years agoasyncio: Fix docs for default event loop (GH-14308)
Miss Islington (bot) [Mon, 24 Jun 2019 00:33:00 +0000 (17:33 -0700)]
asyncio: Fix docs for default event loop (GH-14308)

When the Windows default event loop changed, `asyncio-policy.rst` was updated but `asyncio-eventloop.rst` was missed.
(cherry picked from commit 9ffca670ed4df42eb256e7144619a9d3a830e7c0)

Co-authored-by: Ben Darnell <ben@bendarnell.com>
5 years agoImprove threading.daemon docstring (GH-14278)
Miss Islington (bot) [Sun, 23 Jun 2019 19:06:21 +0000 (12:06 -0700)]
Improve threading.daemon docstring (GH-14278)

Rephrase and clarify that "the entire Python program exits when only daemon threads are left". This matches the documentation at https://docs.python.org/3/library/threading.htmlGH-thread-objects.
(cherry picked from commit bb110cc2ed81447fb48805f31146cf31323a8fc3)

Co-authored-by: mbarkhau <mbarkhau@gmail.com>
5 years agobpo-35224: Bump the pyc magic number by 1 instead of by 10 in last modification ...
Miss Islington (bot) [Sun, 23 Jun 2019 16:19:25 +0000 (09:19 -0700)]
bpo-35224: Bump the pyc magic number by 1 instead of by 10 in last modification (GH-14320)

(cherry picked from commit b3ca7972c8d8c6479b6542ce28e0f7a6ebd5b8fe)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years ago[3.8] bpo-35431: Test math.comb() and math.perm() for OverflowError only on CPython...
Serhiy Storchaka [Sun, 23 Jun 2019 14:50:04 +0000 (17:50 +0300)]
[3.8] bpo-35431: Test math.comb() and math.perm() for OverflowError only on CPython. (GH-14146) (#14226)

Other implementation can raise MemoryError, but it can takes hours.
(cherry picked from commit 1b8a46d59734a77cd1f5ffcf3bdfcaafd58a87e7)

5 years agobpo-35224: Bump the pyc magic number after the change in MAP_ADD (GH-14313)
Miss Islington (bot) [Sat, 22 Jun 2019 23:04:43 +0000 (16:04 -0700)]
bpo-35224: Bump the pyc magic number after the change in MAP_ADD (GH-14313)

(cherry picked from commit 663131a6e2c6c8b83e9f982d8c6ca38fc7c238b4)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-35224: Reverse evaluation order of key: value in dict comprehensions (GH-14139)
Miss Islington (bot) [Sat, 22 Jun 2019 22:34:03 +0000 (15:34 -0700)]
bpo-35224: Reverse evaluation order of key: value in dict comprehensions (GH-14139)

… as proposed in PEP 572; key is now evaluated before value.

https://bugs.python.org/issue35224
(cherry picked from commit c8a35417db8853a253517a3e5190e174075c6384)

Co-authored-by: Jörn Heissler <joernheissler@users.noreply.github.com>
5 years agobpo-37351: Removes libpython38.a from standard Windows distribution (GH-14276)
Steve Dower [Sat, 22 Jun 2019 21:08:02 +0000 (14:08 -0700)]
bpo-37351: Removes libpython38.a from standard Windows distribution (GH-14276)

5 years agobpo-37323: Suppress DeprecationWarning raised by @asyncio.coroutine (GH-14293)
Miss Islington (bot) [Sat, 22 Jun 2019 10:43:07 +0000 (03:43 -0700)]
bpo-37323: Suppress DeprecationWarning raised by @asyncio.coroutine (GH-14293)

When the test is ran with `PYTHONWARNINGS=error` the environment variable is passed to the python interpreter used in `assert_python_ok` where `DeprecationWarning` from  `@asyncio.coroutine` is converted into an error. Ignore the `DeprecationWarning` in `assert_python_ok`.

https://bugs.python.org/issue37323
(cherry picked from commit 186f70905d07b42a9cbf0a29e448f30baf2b53cb)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years agobpo-37364: Use io.open_code() to read .pth files (GH-14299)
Miss Islington (bot) [Fri, 21 Jun 2019 22:35:44 +0000 (15:35 -0700)]
bpo-37364: Use io.open_code() to read .pth files (GH-14299)

https://bugs.python.org/issue37364
(cherry picked from commit 184f3d4f39056f6fe450d007d3b9b61d811a2a4d)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-37362: test_gdb now ignores stderr (GH-14287)
Miss Islington (bot) [Fri, 21 Jun 2019 21:39:58 +0000 (14:39 -0700)]
bpo-37362: test_gdb now ignores stderr (GH-14287)

test_gdb no longer fails if it gets an "unexpected" message on
stderr: it now ignores stderr. The purpose of test_gdb is to test
that python-gdb.py commands work as expected, not to test gdb.
(cherry picked from commit e56a123fd0acaa295a28b98d2e46d956b97d1263)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-36511: Fix -u parameters for ARM32 tests (GH-14280)
Steve Dower [Fri, 21 Jun 2019 21:39:49 +0000 (14:39 -0700)]
bpo-36511: Fix -u parameters for ARM32 tests (GH-14280)

5 years agoUpdate What's New in Python 3.8 (GH-14253) (GH-14294)
Victor Stinner [Fri, 21 Jun 2019 21:15:27 +0000 (23:15 +0200)]
Update What's New in Python 3.8 (GH-14253) (GH-14294)

Fix bpo number of PyByteArray_Init removal

(cherry picked from commit c68e3fb15d29607a1af2c19ebec552a87c24cb48)

5 years ago[3.8] bpo-32924: Fix the Show Source url in 3.8 documentation. (GH-14282)
Mariatta [Fri, 21 Jun 2019 18:06:26 +0000 (11:06 -0700)]
[3.8] bpo-32924: Fix the Show Source url in 3.8 documentation. (GH-14282)

The "Show Source" link in Python 3.8 docs is pointing
to the master branch. It should point to the 3.8 branch.

https://bugs.python.org/issue32924

5 years agobpo-37316: mmap.mmap() passes the wrong variable to PySys_Audit() (GH-14152)
Steve Dower [Fri, 21 Jun 2019 16:45:13 +0000 (09:45 -0700)]
bpo-37316: mmap.mmap() passes the wrong variable to PySys_Audit() (GH-14152)

Also, add a missing call to va_end() in PySys_Audit().

5 years agobpo-36511: Improve ARM32 buildbot scripts (GH-14251)
Steve Dower [Thu, 20 Jun 2019 21:35:51 +0000 (14:35 -0700)]
bpo-36511: Improve ARM32 buildbot scripts (GH-14251)

5 years agoFix typo, 'widger' -> 'widget', in idlelib/tree.py (GH-14263) (#14270)
Miss Islington (bot) [Thu, 20 Jun 2019 16:50:43 +0000 (09:50 -0700)]
Fix typo, 'widger' -> 'widget', in idlelib/tree.py (GH-14263) (#14270)

(cherry picked from commit 8713aa6dfb2a17d6de91943ef1eb0ddba58f5b4a)

Co-authored-by: İsmail Arılık <arilik.ismail@gmail.com>
5 years agoFix bpo number in News file. (GH-14260) (GH-14261)
Miss Islington (bot) [Thu, 20 Jun 2019 10:50:59 +0000 (03:50 -0700)]
Fix bpo number in News file. (GH-14260) (GH-14261)

(cherry picked from commit 0c48618cc0d28caf3db191879715e519546857fd)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
5 years agobpo-37342: Fix the incorrect nb_index's type in typeobj documentation (GH-14241)
Miss Islington (bot) [Thu, 20 Jun 2019 03:41:41 +0000 (20:41 -0700)]
bpo-37342: Fix the incorrect nb_index's type in typeobj documentation (GH-14241)

It was listed as `binaryfunc`. It should be `unaryfunc`.
(cherry picked from commit bc5caf88ca19b4c8cb9bc912c832b4807a515a60)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
5 years agoUpdate What's New in Python 3.8 (GH-14239)
Miss Islington (bot) [Wed, 19 Jun 2019 23:52:47 +0000 (16:52 -0700)]
Update What's New in Python 3.8 (GH-14239)

* Mention issue in which ByByteArray_Init() has been removed.
* Fix typo
(cherry picked from commit af41c567af81de7c4408e2e2617f1d3747408434)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
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)