]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-44562: Use PyType_GenericAlloc in Py_GenericAlias (GH-27021)
Miss Islington (bot) [Mon, 5 Jul 2021 11:33:53 +0000 (04:33 -0700)] 
bpo-44562: Use PyType_GenericAlloc in Py_GenericAlias (GH-27021)

* bpo-44562: Use PyType_GenericAlloc in Py_GenericAlias

* Update Objects/genericaliasobject.c

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit b324c4c5f763c5116a97db8591e6dcb94456570a)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-44558: Make the implementation consistency of operator.indexOf (GH-27012)
Miss Islington (bot) [Mon, 5 Jul 2021 09:51:46 +0000 (02:51 -0700)] 
bpo-44558: Make the implementation consistency of operator.indexOf (GH-27012)

(cherry picked from commit 09302405d22e86884d6058226790c0cdf5b72f14)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
4 years agobpo-41486: zlib uses an UINT32_MAX sliding window for the output buffer (GH-26143)
Miss Islington (bot) [Mon, 5 Jul 2021 01:32:56 +0000 (18:32 -0700)] 
bpo-41486: zlib uses an UINT32_MAX sliding window for the output buffer (GH-26143)

* zlib uses an UINT32_MAX sliding window for the output buffer

These funtions have an initial output buffer size parameter:
- zlib.decompress(data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE)
- zlib.Decompress.flush([length])

If the initial size > UINT32_MAX, use an UINT32_MAX sliding window, instead of clamping to UINT32_MAX.
Speed up when (the initial size == the actual size).

This fixes a memory consumption and copying performance regression in earlier 3.10 beta releases if someone used an output buffer larger than 4GiB with zlib.decompress.

Reviewed-by: Gregory P. Smith
(cherry picked from commit a9a69bb3ea1e6cf54513717212aaeae0d61b24ee)

Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
4 years agobpo-44562: Remove invalid PyObject_GC_Del from error path of types.GenericAlias ...
Miss Islington (bot) [Sun, 4 Jul 2021 17:55:35 +0000 (10:55 -0700)] 
bpo-44562: Remove invalid PyObject_GC_Del from error path of types.GenericAlias … (GH-27016)

(cherry picked from commit d33943a6c368c2184e238019c63ac7a267da5594)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years ago[3.10] bpo-44559: [Enum] revert enum module to 3.9 (GH-27010)
Ethan Furman [Sun, 4 Jul 2021 04:08:42 +0000 (21:08 -0700)] 
[3.10] bpo-44559: [Enum] revert enum module to 3.9 (GH-27010)

* [Enum] revert enum module to 3.9

4 years agobpo-44553: Correct failure in tp_new for the union object (GH-27008) (GH-27009)
Miss Islington (bot) [Sat, 3 Jul 2021 20:51:10 +0000 (13:51 -0700)] 
bpo-44553: Correct failure in tp_new for the union object (GH-27008) (GH-27009)

(cherry picked from commit bc3961485639cc73de7c4c7eed1b56f3c74939bf)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agoFix a small typo in the docs (GH-26991) (GH-27003)
Miss Islington (bot) [Sat, 3 Jul 2021 18:15:49 +0000 (11:15 -0700)] 
Fix  a small typo in the docs (GH-26991) (GH-27003)

(cherry picked from commit a79e2b6497f7d31017c01a41a290a9b3349398fe)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
4 years ago[3.10] bpo-34266: [pdb] handle ValueError from shlex.split() (GH-26656) (GH-27006)
Irit Katriel [Sat, 3 Jul 2021 16:28:46 +0000 (17:28 +0100)] 
[3.10] bpo-34266: [pdb] handle ValueError from shlex.split() (GH-26656) (GH-27006)

(cherry picked from commit d968a638fcbf9030c999cfacd4c9bf0656e779c4)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
4 years agobpo-44553 : Implement GC methods for types.Union (GH-26993)
Miss Islington (bot) [Sat, 3 Jul 2021 13:33:16 +0000 (06:33 -0700)] 
bpo-44553 : Implement GC methods for types.Union (GH-26993)

(cherry picked from commit 1097384ce964dd63686b1aac706cd0fa764c2dc9)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years ago[3.10] bpo-30256: [doc] Fix formatting error in news (GH-26994) (GH-26998)
Irit Katriel [Fri, 2 Jul 2021 17:39:52 +0000 (18:39 +0100)] 
[3.10] bpo-30256: [doc] Fix formatting error in news (GH-26994) (GH-26998)

4 years agobpo-34798: [doc] clearer presentation of pprint.PrettyPrinter constru… (GH-26967...
Miss Islington (bot) [Fri, 2 Jul 2021 10:07:50 +0000 (03:07 -0700)] 
bpo-34798: [doc] clearer presentation of pprint.PrettyPrinter constru… (GH-26967) (GH-26990)

(cherry picked from commit 943e77d42d3f84b581f32c05f1fc8c05366b8ed3)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
4 years agobpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341) (#26987)
Miss Islington (bot) [Fri, 2 Jul 2021 04:15:47 +0000 (21:15 -0700)] 
bpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341) (#26987)

Co-authored-by: Jordan Speicher <jordan@jspeicher.com>
(cherry picked from commit 85b920498b42c69185540ecc2f5c4907fd38d877)

Co-authored-by: finefoot <33361833+finefoot@users.noreply.github.com>
4 years agobpo-43425: Update setup.py not to use distutils.log (GH-26969)
Miss Islington (bot) [Fri, 2 Jul 2021 02:05:11 +0000 (19:05 -0700)] 
bpo-43425: Update setup.py not to use distutils.log (GH-26969)

(cherry picked from commit a7e251b07aa5f1a858a3e791a30dea78e93ab728)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
4 years agobpo-43425: Update _osx_support not to use distutils.log (GH-26968)
Miss Islington (bot) [Thu, 1 Jul 2021 01:20:24 +0000 (18:20 -0700)] 
bpo-43425: Update _osx_support not to use distutils.log (GH-26968)

(cherry picked from commit c8979f780e4b7d6db5693cb26a2956cc785abb48)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
4 years agobpo-44535: Enable building with Visual Studio 2022 on Windows (GH-26962)
Miss Islington (bot) [Wed, 30 Jun 2021 19:24:42 +0000 (12:24 -0700)] 
bpo-44535: Enable building with Visual Studio 2022 on Windows (GH-26962)

(cherry picked from commit d3a95c1b6eacbbbd92c294744e7ed41932f3f63e)

Co-authored-by: Steve Dower <steve.dower@python.org>
4 years agobpo-41180: Replace marshal code.__new__ audit event with marshal.load[s] and marshal...
Steve Dower [Wed, 30 Jun 2021 17:52:25 +0000 (18:52 +0100)] 
bpo-41180: Replace marshal code.__new__ audit event with marshal.load[s] and marshal.dumps (GH-26970)

4 years agobpo-44523: Remove the pass-through for hash() in weakref proxy objects (GH-26950)
Miss Islington (bot) [Tue, 29 Jun 2021 23:19:06 +0000 (16:19 -0700)] 
bpo-44523: Remove the pass-through for hash() in weakref proxy objects (GH-26950)

(cherry picked from commit e2fea101fd5517f33371b04432842b971021c3bf)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-38062: [doc] clarify that atexit uses equality comparisons internally. (GH-26935...
Miss Islington (bot) [Tue, 29 Jun 2021 17:52:27 +0000 (10:52 -0700)] 
bpo-38062: [doc] clarify that atexit uses equality comparisons internally. (GH-26935) (GH-26956)

(cherry picked from commit 12803c59d54ff1a45a5b08cef82652ef199b3b07)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
4 years agobpo-42588: Update the docs for the TopologicalSorter.static_order() method (GH-26834)
Miss Islington (bot) [Tue, 29 Jun 2021 11:14:52 +0000 (04:14 -0700)] 
bpo-42588: Update the docs for the TopologicalSorter.static_order() method (GH-26834)

(cherry picked from commit 0d7f7975d55eff7e3dfcebd14e765fc6cd7d3e40)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
4 years ago[doc] Fix typo in what's new in 3.10 (GH-26911) (GH-26940)
Miss Islington (bot) [Tue, 29 Jun 2021 11:12:23 +0000 (04:12 -0700)] 
[doc] Fix typo in what's new in 3.10 (GH-26911) (GH-26940)

The `try` statement was missing a colon and therefore was not exemplifying the correct `SyntaxError`.
(cherry picked from commit dcb1caef5bd8e90e1ecb4c07d7114e51b49fe37a)

Co-authored-by: Rodrigo Girão Serrão <rodrigogiraoserrao@gmail.com>
4 years agobpo-40939: Remove documentation for `PyParser_*` & add porting notes (GH-26855) ...
Miss Islington (bot) [Mon, 28 Jun 2021 09:35:52 +0000 (02:35 -0700)] 
bpo-40939: Remove documentation for `PyParser_*` & add porting notes (GH-26855) (GH-26898)

I tried to be relatively thorough and give lots of links.
One reason is that this wasn't deprecated very long; also it seems people running into this tend to not be familiar with similar APIs.

(cherry picked from commit 29987f72650b7cccee4df216c8297e8484a44e6a)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
4 years agobpo-44464: Remove special exclusion for flake8 in the deprecation warnings. (GH-26807...
Miss Islington (bot) [Sun, 27 Jun 2021 22:19:24 +0000 (15:19 -0700)] 
bpo-44464: Remove special exclusion for flake8 in the deprecation warnings. (GH-26807) (GH-26929)

Sync with importlib_metadata 4.6.
(cherry picked from commit efe7d08d178a7c09bcca994f2068b019c8633d83)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
4 years agobpo-40620: Clarify tutorial controlflow.rst ``range`` examples (GH-26919) (GH-26927)
Miss Islington (bot) [Sun, 27 Jun 2021 19:51:16 +0000 (12:51 -0700)] 
bpo-40620: Clarify tutorial controlflow.rst ``range`` examples (GH-26919) (GH-26927)

(cherry picked from commit 2f49c9debc2efe010c757be3bdbd6493f1ebc5f6)

Co-authored-by: jdevries3133 <58614260+jdevries3133@users.noreply.github.com>
4 years agoClarify the order of a stacked `abstractmethod` (GH-26892)
Miss Islington (bot) [Sun, 27 Jun 2021 18:50:38 +0000 (11:50 -0700)] 
Clarify the order of a stacked `abstractmethod` (GH-26892)

Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
(cherry picked from commit 74d60eab558bffdf5ca8ea2f5305e19b36bdb9a8)

Co-authored-by: Ram Rachum <ram@rachum.com>
4 years agobpo-44404: tkinter `after` support callable classes (GH-26812)
Miss Islington (bot) [Sun, 27 Jun 2021 08:02:02 +0000 (01:02 -0700)] 
bpo-44404: tkinter `after` support callable classes (GH-26812)

(cherry picked from commit e9c8f784fa13ea3a51df3b72a498a3896ec9e768)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
4 years ago[3.10] bpo-44468: Never skip base classes in `typing.get_type_hints()`, even with...
Miss Islington (bot) [Sat, 26 Jun 2021 23:52:28 +0000 (16:52 -0700)] 
[3.10] bpo-44468: Never skip base classes in `typing.get_type_hints()`, even with invalid `.__module__`. (GH-26862) (GH-26920)

(cherry picked from commit 7569c0fe91dfcf562dee8c29798ecda74d738aa8)

Co-authored-by: will-ca <willchencontact@gmail.com>
Automerge-Triggered-By: GH:gvanrossum
4 years ago[3.10] Update vendored pip to 21.1.3 (GH-26912) (gh-26917)
Stéphane Bidoul [Sat, 26 Jun 2021 19:58:39 +0000 (21:58 +0200)] 
[3.10] Update vendored pip to 21.1.3 (GH-26912) (gh-26917)

4 years agobpo-43977: Properly update the tp_flags of existing subclasses when their parents...
Miss Islington (bot) [Fri, 25 Jun 2021 15:46:23 +0000 (08:46 -0700)] 
bpo-43977: Properly update the tp_flags of existing subclasses when their parents are registered (GH-26864)

(cherry picked from commit ca2009d72a52a98bf43aafa9ad270a4fcfabfc89)

Co-authored-by: Brandt Bucher <brandt@python.org>
4 years agobpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in tests...
Miss Islington (bot) [Thu, 24 Jun 2021 23:38:01 +0000 (16:38 -0700)] 
bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in tests (GH-26905) (GH-26907)

(cherry picked from commit 22e7effad571f8e524d2f71ff55bbf2a25306753)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
4 years ago[3.10] bpo-44498: Issue a deprecation warning on asynchat, asyncore and smtpd import...
Miss Islington (bot) [Thu, 24 Jun 2021 19:57:55 +0000 (12:57 -0700)] 
[3.10] bpo-44498: Issue a deprecation warning on asynchat, asyncore and smtpd import (GH-26882) (GH-26904)

* Issue a deprecation warning on smtpd import

* Also issue DeprecationWarnings for asynchat and asyncore

* Fix some tests

* test___all__ requires the word 'module' or 'package' in the deprecation
  warning text, so add those to smtpd, asynchat, and asyncore.
* In test_support, use pprint now instead of asyncore as the landmark.

* Add What's New

* Use ..deprecated::

* Use ..deprecated::

* Update Lib/smtpd.py

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* Update Doc/library/smtpd.rst

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* Import async{hat,ore} after the DeprecationWarning for this module

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
(cherry picked from commit 8488b85c6397fe58f17fc00e047044c959ac0b04)

Co-authored-by: Barry Warsaw <barry@python.org>
Automerge-Triggered-By: GH:warsaw
4 years agobpo-44456: Improve the syntax error when mixing keyword and positional patterns ...
Miss Islington (bot) [Thu, 24 Jun 2021 15:34:28 +0000 (08:34 -0700)] 
bpo-44456: Improve the syntax error when mixing keyword and positional patterns (GH-26793)

(cherry picked from commit 0acc258fe6f0ec200ca2f6f9294adbf52a244802)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-44229: Ignore spurious EPROTOTYPE on macOS in test_ssl (GH-26893)
Miss Islington (bot) [Thu, 24 Jun 2021 12:27:35 +0000 (05:27 -0700)] 
bpo-44229: Ignore spurious EPROTOTYPE on macOS in test_ssl (GH-26893)

(cherry picked from commit b5a52eef67997246b4235b5407e52a01e822ce56)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-43916: Use test.support.check_disallow_instantiation() in test_tcl (GH-26412...
Miss Islington (bot) [Thu, 24 Jun 2021 12:12:11 +0000 (05:12 -0700)] 
bpo-43916: Use test.support.check_disallow_instantiation() in test_tcl (GH-26412) (GH-26888)

(cherry picked from commit e90e0422182f4ca7faefd19c629f84aebb34e2ee)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-44297: Add a regression test for line numbers in with statements (GH-26891)
Mark Shannon [Thu, 24 Jun 2021 12:09:14 +0000 (13:09 +0100)] 
bpo-44297: Add a regression test for line numbers in with statements (GH-26891)

4 years ago[3.10] bpo-43988: Add test.support.check_disallow_instantiation() (GH-25757) (GH...
Erlend Egeberg Aasland [Wed, 23 Jun 2021 23:46:25 +0000 (01:46 +0200)] 
[3.10] bpo-43988: Add test.support.check_disallow_instantiation() (GH-25757) (GH-26885)

(cherry picked from commit 4f725261c6cf23d259e8fdc205e12b76ef4d2d31fbff5387c3e1f3904420fa5a27738c6c5881305b, and 8cec740820fc875117bfa7b6bdb10202ebeb8fd5)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Automerge-Triggered-By: GH:vstinner
4 years agobpo-44441: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26877)
Victor Stinner [Wed, 23 Jun 2021 15:47:38 +0000 (17:47 +0200)] 
bpo-44441: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26877)

Py_RunMain() now resets PyImport_Inittab to its initial value at
exit. It must be possible to call PyImport_AppendInittab() or
PyImport_ExtendInittab() at each Python initialization.

(cherry picked from commit 489699ca05bed5cfd10e847d8580840812b476cd)

4 years agobpo-41621: Document defaultdict's default_factory parameter (GH-21945)
Miss Islington (bot) [Wed, 23 Jun 2021 14:58:20 +0000 (07:58 -0700)] 
bpo-41621: Document defaultdict's default_factory parameter (GH-21945)

It defaults to None and is positional only.
(cherry picked from commit d1ae57027fc39ff60dcfc1b63881400e5ca3ce56)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
4 years agobpo-44482: Fix very unlikely resource leak in glob in non-CPython implementations...
Miss Islington (bot) [Wed, 23 Jun 2021 10:28:08 +0000 (03:28 -0700)] 
bpo-44482: Fix very unlikely resource leak in glob in non-CPython implementations (GH-26843) (GH-26872)

(cherry picked from commit 5c7940257e1f611e7284fd504887bd29a63d0a94)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years agobpo-28395: Remove unnecessary semicolons in tests (GH-26868)
Miss Islington (bot) [Wed, 23 Jun 2021 10:02:40 +0000 (03:02 -0700)] 
bpo-28395: Remove unnecessary semicolons in tests (GH-26868)

(cherry picked from commit 5a3108044d2e5b694da2d1f4176c9bbaef15c142)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
4 years agobpo-44483: Fix crash in union object with bad ``__module__`` (GH-26848) (GH-26852)
Miss Islington (bot) [Wed, 23 Jun 2021 09:38:49 +0000 (02:38 -0700)] 
bpo-44483: Fix crash in union object with bad ``__module__`` (GH-26848) (GH-26852)

(cherry picked from commit adfa1ba398c74720b42f16f06fd3ec0353599fa5)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years ago[doc] Improve punctuation atexit doc (GH-25629) (GH-26856)
Miss Islington (bot) [Tue, 22 Jun 2021 17:10:22 +0000 (10:10 -0700)] 
[doc] Improve punctuation atexit doc (GH-25629) (GH-26856)

(cherry picked from commit a6b47de07a304eaa37a1c5554ed00a3ec91f8407)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
4 years agobpo-44439: BZ2File.write() / LZMAFile.write() handle buffer protocol correctly (GH...
Miss Islington (bot) [Tue, 22 Jun 2021 13:59:53 +0000 (06:59 -0700)] 
bpo-44439: BZ2File.write() / LZMAFile.write() handle buffer protocol correctly (GH-26764) (GH-26845)

No longer use len() to get the length of the input data. For some buffer protocol objects,
the length obtained by using len() is wrong.
(cherry picked from commit bc6c12c72a9536acc96e7b9355fd69d1083a43c1)

Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
4 years agobpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated. (GH-26808) (GH...
Miss Islington (bot) [Tue, 22 Jun 2021 07:10:23 +0000 (00:10 -0700)] 
bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated. (GH-26808) (GH-26844)

* bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated.
(cherry picked from commit 92c2e91580521ba5c85aa3205a0211df5b48689b)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
4 years agobpo-44287: asyncio test_popen() uses longer timeout (GH-26832)
Miss Islington (bot) [Tue, 22 Jun 2021 00:22:02 +0000 (17:22 -0700)] 
bpo-44287: asyncio test_popen() uses longer timeout (GH-26832)

Fix asyncio test_popen() of test_windows_utils by using a longer
timeout. Use military grade battle-tested test.support.SHORT_TIMEOUT
timeout rather than a hardcoded timeout of 10 seconds: it's 30
seconds by default, but it is made longer on slow buildbots.

WaitForMultipleObjects() timeout argument is in milliseconds.
(cherry picked from commit be1cb3214d09d4bf0288bc45f3c1f167f67e4514)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-13814: Explain why generators are not context managers (GH-26835)
Miss Islington (bot) [Mon, 21 Jun 2021 22:02:43 +0000 (15:02 -0700)] 
bpo-13814: Explain why generators are not context managers (GH-26835)

Put entry in Design FAQ after a question about a context manager for assignment.
Original patch by Aidan Lowe.
(cherry picked from commit 51f45d085dad3b708f6fe166af517aba69e7e9f7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-44395: Fix MIMEPart.as_string to pass unixfrom properly (GH-26685)
Miss Islington (bot) [Mon, 21 Jun 2021 14:27:26 +0000 (07:27 -0700)] 
bpo-44395: Fix MIMEPart.as_string to pass unixfrom properly (GH-26685)

(cherry picked from commit 30f7a77f359a0fc6e37988b0f317a77a15d66b7b)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
4 years agobpo-44434: Don't call PyThread_exit_thread() explicitly (GH-26758) (GH-26824)
Miss Islington (bot) [Mon, 21 Jun 2021 12:29:17 +0000 (05:29 -0700)] 
bpo-44434: Don't call PyThread_exit_thread() explicitly (GH-26758) (GH-26824)

_thread.start_new_thread() no longer calls PyThread_exit_thread()
explicitly at the thread exit, the call was redundant.

On Linux with the glibc, pthread_cancel() loads dynamically the
libgcc_s.so.1 library. dlopen() can fail if there is no more
available file descriptor to open the file. In this case, the process
aborts with the error message:

"libgcc_s.so.1 must be installed for pthread_cancel to work"

pthread_cancel() unwinds back to the thread's wrapping function that
calls the thread entry point.

The unwind function is dynamically loaded from the libgcc_s library
since it is tightly coupled to the C compiler (GCC). The unwinder
depends on DWARF, the compiler generates DWARF, so the unwinder
belongs to the compiler.

Thanks Florian Weimer and Carlos O'Donell for their help on
investigating this issue.
(cherry picked from commit 45a78f906d2d5fe5381d78466b11763fc56d57ba)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-44466: Faulthandler now detects the GC (GH-26823) (GH-26826)
Victor Stinner [Mon, 21 Jun 2021 12:23:13 +0000 (14:23 +0200)] 
bpo-44466: Faulthandler now detects the GC (GH-26823) (GH-26826)

The faulthandler module now detects if a fatal error occurs during a
garbage collector collection (only if all_threads is true).

(cherry picked from commit d19163912bfc790283724f05328bd31e4e65003d)

4 years agobpo-44297: Fix missing line number in generator expressions (GH-26821)
Mark Shannon [Mon, 21 Jun 2021 10:47:16 +0000 (11:47 +0100)] 
bpo-44297: Fix missing line number in generator expressions (GH-26821)

* Make sure that line number is set when entering comprehension scope in compiler.

(cherry picked from commit 82e5c28af7049c4f5343c808f172cbe2e145f49b)

4 years agobpo-44469: Fix tests for "async with" with bad object (GH-26817)
Miss Islington (bot) [Mon, 21 Jun 2021 07:57:07 +0000 (00:57 -0700)] 
bpo-44469: Fix tests for "async with" with bad object (GH-26817)

Test for execution of the body was null. It would pass
even if the code which should be skipped was executed.
(cherry picked from commit 5d2b3a0d688cf8a33db3d266c9e7049c13766a4c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years ago [3.10] bpo-44087: Disallow instantiation of sqlite3.Statement (GH-26567) (GH-26816)
Erlend Egeberg Aasland [Sun, 20 Jun 2021 21:07:31 +0000 (23:07 +0200)] 
 [3.10] bpo-44087: Disallow instantiation of sqlite3.Statement (GH-26567) (GH-26816)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-44077: Expose IP_RECVTOS in the socket module (GH-25992)
Miss Islington (bot) [Sun, 20 Jun 2021 20:36:21 +0000 (13:36 -0700)] 
bpo-44077: Expose IP_RECVTOS in the socket module (GH-25992)

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit a317778fd58b1c6b250feffbdb4ecf15e293ef48)

Co-authored-by: Georg Sauthoff <mail@georg.so>
4 years agobpo-43298: Improved error message when building without the Windows SDK installed...
Miss Islington (bot) [Sun, 20 Jun 2021 20:12:46 +0000 (13:12 -0700)] 
bpo-43298: Improved error message when building without the Windows SDK installed (GH-26800) (GH-26802)

(cherry picked from commit 80190b3e533097b55077becddc75423318ab2371)

Co-authored-by: Steve Dower <steve.dower@python.org>
Co-authored-by: Steve Dower <steve.dower@python.org>
4 years agobpo-41299: Reduce lag in Windows threading timeouts by using a higher precision time...
Miss Islington (bot) [Sun, 20 Jun 2021 20:12:27 +0000 (13:12 -0700)] 
bpo-41299: Reduce lag in Windows threading timeouts by using a higher precision time source (GH-26568) (GH-26580)

(cherry picked from commit 449e6f0ef395231e3abe467f910b02d7f075c27f)

Co-authored-by: Ryan Hileman <lunixbochs@gmail.com>
Co-authored-by: Ryan Hileman <lunixbochs@gmail.com>
4 years agobpo-43667: Add news fragment for Solaris changes (GH-26405) (GH-26498)
Miss Islington (bot) [Sun, 20 Jun 2021 20:12:12 +0000 (13:12 -0700)] 
bpo-43667: Add news fragment for Solaris changes (GH-26405) (GH-26498)

(cherry picked from commit 164a4f46d1606e21d82babc010e397a9116e6730)

4 years agoFix typos and grammatical changes in the 3.10 what's new document (GH-26319) (GH...
Miss Islington (bot) [Sun, 20 Jun 2021 19:53:14 +0000 (12:53 -0700)] 
Fix typos and grammatical changes in the 3.10 what's new document (GH-26319) (GH-26814)

4 years agoAdd a note about NameError/AttributeError suggestions with custom error functions...
Miss Islington (bot) [Sun, 20 Jun 2021 19:22:40 +0000 (12:22 -0700)] 
Add a note about NameError/AttributeError suggestions with custom error functions (GH-26794) (GH-26796)

(cherry picked from commit 83c9dad8da5fc90b717eef683304aaa49448615a)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-44426: Fix use of the C keyword 'default' as a variable name (GH-26798) (GH-26804)
Miss Islington (bot) [Sat, 19 Jun 2021 15:16:13 +0000 (08:16 -0700)] 
bpo-44426: Fix use of the C keyword 'default' as a variable name (GH-26798) (GH-26804)

(cherry picked from commit 291848195f85e23c01adb76d5a0ff9c6eb7f2614)

4 years ago[3.10] bpo-38820: Test with OpenSSL 3.0.0-beta1 (GH-26769) (GH-26799)
Miss Islington (bot) [Sat, 19 Jun 2021 10:44:37 +0000 (03:44 -0700)] 
[3.10] bpo-38820: Test with OpenSSL 3.0.0-beta1 (GH-26769) (GH-26799)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 44fb55149934d8fb095edb6fc3f8167208035b96)

Co-authored-by: Christian Heimes <christian@python.org>
Automerge-Triggered-By: GH:tiran
4 years agoRemove dubious suggestion (GH-26789) (#26797)
Miss Islington (bot) [Sat, 19 Jun 2021 04:27:47 +0000 (21:27 -0700)] 
Remove dubious suggestion (GH-26789) (#26797)

4 years ago[3.10] bpo-43945: [Enum] reduce scope of new format() behavior (GH-26752)
Ethan Furman [Fri, 18 Jun 2021 21:25:42 +0000 (14:25 -0700)] 
[3.10] bpo-43945: [Enum] reduce scope of new format() behavior (GH-26752)

* [Enum] reduce scope of new format behavior

Instead of treating all Enums the same for format(), only user mixed-in
enums will be affected.  In other words, IntEnum and IntFlag will not be
changing the format() behavior, due to the requirement that they be
drop-in replacements of existing integer constants.

If a user creates their own integer-based enum, then the new behavior
will apply:

    class Grades(int, Enum):
        A = 5
        B = 4
        C = 3
        D = 2
        F = 0

Now:  format(Grades.B)  -> DeprecationWarning and '4'
3.12:                   -> no warning, and 'B'.

(cherry picked from commit f60b07ab6c943fce084772c3c7731ab3bbd213ff)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
4 years ago[3.10] bpo-44368: Improve syntax errors with invalid as pattern targets (GH-26632...
Pablo Galindo [Fri, 18 Jun 2021 21:15:57 +0000 (22:15 +0100)] 
[3.10] bpo-44368: Improve syntax errors with invalid as pattern targets (GH-26632) (GH-26792)

(cherry picked from commit 05073036dcecefc00b0c3e7397601809da41e2f1)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-44451: Reset DeprecationWarning filters in test_importlib.test_entry_points_by_in...
Miss Islington (bot) [Fri, 18 Jun 2021 20:30:53 +0000 (13:30 -0700)] 
bpo-44451: Reset DeprecationWarning filters in test_importlib.test_entry_points_by_index (GH-26784)

This avoids the following error if DeprecationWarnings are ignored.

    ======================================================================
    ERROR: test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests)
    Prior versions of Distribution.entry_points would return a
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/builddir/build/BUILD/Python-3.10.0b3/Lib/test/test_importlib/test_metadata_api.py", line 145, in test_entry_points_by_index
        expected = next(iter(caught))
    StopIteration
    ----------------------------------------------------------------------
    Ran 1402 tests in 2.125s
    FAILED (errors=1, skipped=18, expected failures=1)
(cherry picked from commit df1502e47fc1e0cf1e7d460ae04530c3e2e4a7c6)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
4 years ago[3.10] Reorganize the pattern matching suite (GH-26661) (GH-26787)
Miss Islington (bot) [Fri, 18 Jun 2021 17:48:07 +0000 (10:48 -0700)] 
[3.10] Reorganize the pattern matching suite (GH-26661) (GH-26787)

(cherry picked from commit c106cf31f816f719de0a83ff31b9f4d0bea3519b)

Co-authored-by: Brandt Bucher <brandt@python.org>
Automerge-Triggered-By: GH:brandtbucher
4 years agobpo-44310: Add a FAQ entry for caching method calls (GH-26731) (GH-26777)
Miss Islington (bot) [Thu, 17 Jun 2021 21:14:36 +0000 (14:14 -0700)] 
bpo-44310: Add a FAQ entry for caching method calls (GH-26731) (GH-26777)

4 years agobpo-43024: improve signature (in help, etc) for functions taking sent… (GH-24331...
Miss Islington (bot) [Thu, 17 Jun 2021 16:41:46 +0000 (09:41 -0700)] 
bpo-43024: improve signature (in help, etc) for functions taking sent… (GH-24331) (GH-26773)

…inel defaults
(cherry picked from commit f73377d57c5272390de63cccc3c292c44689310a)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
4 years agoPost 3.10.0b3
Pablo Galindo [Thu, 17 Jun 2021 12:20:47 +0000 (13:20 +0100)] 
Post 3.10.0b3

4 years agoPython 3.10.0b3 v3.10.0b3
Pablo Galindo [Thu, 17 Jun 2021 10:27:08 +0000 (11:27 +0100)] 
Python 3.10.0b3

4 years agobpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351) (GH-26766)
Miss Islington (bot) [Thu, 17 Jun 2021 10:19:44 +0000 (03:19 -0700)] 
bpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351) (GH-26766)

* Make functools types immutable

* Multibyte codec types are now immutable

* pyexpat.xmlparser is now immutable

* array.arrayiterator is now immutable

* _thread types are now immutable

* _csv types are now immutable

* _queue.SimpleQueue is now immutable

* mmap.mmap is now immutable

* unicodedata.UCD is now immutable

* sqlite3 types are now immutable

* _lsprof.Profiler is now immutable

* _overlapped.Overlapped is now immutable

* _operator types are now immutable

* winapi__overlapped.Overlapped is now immutable

* _lzma types are now immutable

* _bz2 types are now immutable

* _dbm.dbm and _gdbm.gdbm are now immutable
(cherry picked from commit 00710e6346fd2394aa020b2dfae170093effac98)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-44389: Fix typo in ssl deprecation warning message (GH-26754)
Miss Islington (bot) [Thu, 17 Jun 2021 10:00:56 +0000 (03:00 -0700)] 
bpo-44389: Fix typo in ssl deprecation warning message (GH-26754)

`ssl.SSL_NO_TLS` should be `ssl.OP_NO_TLS`.
(cherry picked from commit c544393b89f9b3e2b1a22588fc9ae58019314879)

Co-authored-by: Joe <nigelchiang@outlook.com>
4 years agobpo-44426: Use of 'complex' as a C variable name confuses Sphinx; change it to 'num...
Miss Islington (bot) [Wed, 16 Jun 2021 19:13:37 +0000 (12:13 -0700)] 
bpo-44426: Use of 'complex' as a C variable name confuses Sphinx; change it to 'num'. (GH-26744) (GH-26760)

(cherry picked from commit 7247f6f433846c6e37308a550e8e5eb6be379856)

4 years agobpo-44392: Add Py_GenericAlias to C API docs (GH-26724)
Miss Islington (bot) [Wed, 16 Jun 2021 14:34:45 +0000 (07:34 -0700)] 
bpo-44392: Add Py_GenericAlias to C API docs (GH-26724)

Also fix stable ABI type definitions
(cherry picked from commit 6773c3eaa735b5061b4a97f2c730703a32d8c9ff)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-43795: Don't list private names in the limited API (GH-26740)
Miss Islington (bot) [Wed, 16 Jun 2021 09:53:12 +0000 (02:53 -0700)] 
bpo-43795: Don't list private names in the limited API (GH-26740)

* Remove struct _node from the stable ABI list

This struct was removed along with the old parser in Python 3.9 (PEP 617)

* Stable ABI list: Use the public name "PyFrameObject" rather than "_frame"

* Ensure limited API doesn't contain private names

Names prefixed by an underscore are private by definition.

* Add a blurb
(cherry picked from commit 7cad9cb51bdae2144cbab330f13a607ba3471742)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
4 years ago[3.10] bpo-44342: [Enum] improve test, add andrei kulakov to ACKS (GH-26726)
Ethan Furman [Wed, 16 Jun 2021 01:50:59 +0000 (18:50 -0700)] 
[3.10] bpo-44342: [Enum] improve test, add andrei kulakov to ACKS (GH-26726)

* [3.10] [Enum] improve test, add andrei kulakov to ACKS (GH-26726).
(cherry picked from commit cb2014f2077c92c35486bf0db7e646a68478a7a5)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
4 years agobpo-44342: [Enum] fix data type search (GH-26667) 26742/head
Miss Islington (bot) [Tue, 15 Jun 2021 21:07:37 +0000 (14:07 -0700)] 
bpo-44342: [Enum] fix data type search (GH-26667)

In an inheritance chain of

  int -> my_int -> final_int

the data type is now final_int (not my_int)
(cherry picked from commit 3a7cccfd6cd3693e1a2ab65ee05d7f45f8501dfa)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
4 years ago[3.10] bpo-43475: Add what's new entry for NaN hash changes (GH-26725) (GH-26743)
Mark Dickinson [Tue, 15 Jun 2021 19:13:10 +0000 (20:13 +0100)] 
[3.10] bpo-43475: Add what's new entry for NaN hash changes (GH-26725) (GH-26743)

(cherry picked from commit 1d10bf0bb9409a406c56b0de8870df998637fd0f)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
4 years agoFix a typo in _make_class_unpicklable() docstring (GH-26729)
Miss Islington (bot) [Tue, 15 Jun 2021 18:25:07 +0000 (11:25 -0700)] 
Fix a typo in _make_class_unpicklable() docstring (GH-26729)

(cherry picked from commit 689a84475e7b1da79d5ae82df67ab8897316f98c)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
4 years agobpo-44422: Fix threading.enumerate() reentrant call (GH-26727)
Miss Islington (bot) [Tue, 15 Jun 2021 14:34:42 +0000 (07:34 -0700)] 
bpo-44422: Fix threading.enumerate() reentrant call (GH-26727)

The threading.enumerate() function now uses a reentrant lock to
prevent a hang on reentrant call.
(cherry picked from commit 243fd01047ddce1a7eb0f99a49732d123e942c63)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-42972: _thread.RLock implements the GH protocol (GH-26734)
Miss Islington (bot) [Tue, 15 Jun 2021 13:29:44 +0000 (06:29 -0700)] 
bpo-42972: _thread.RLock implements the GH protocol (GH-26734)

The _thread.RLock type now fully implement the GC protocol: add a
traverse function and the Py_TPFLAGS_HAVE_GC flag.
(cherry picked from commit 1cd3d859a49b047dd08abb6f44f0539564d3525a)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-44351: Restore back parse_makefile in distutils.sysconfig (GH-26637) (GH-26673)
Miss Islington (bot) [Tue, 15 Jun 2021 12:36:45 +0000 (05:36 -0700)] 
bpo-44351: Restore back parse_makefile in distutils.sysconfig (GH-26637) (GH-26673)

The function uses distutils.text_file.TextFile and therefore
behaves differently than _parse_makefile in sysconfig.
(cherry picked from commit fc98266ff627ba0f56f8ae241245b66bc983baa3)

Co-authored-by: Lumír 'Frenzy' Balhar <lbalhar@redhat.com>
4 years agobpo-44409: Fix error location in tokenizer errors that happen during initialization...
Miss Islington (bot) [Mon, 14 Jun 2021 17:07:52 +0000 (10:07 -0700)] 
bpo-44409: Fix error location in tokenizer errors that happen during initialization (GH-26712)

(cherry picked from commit 507ed6fa1d6661e0f8e6d3282764aa9625a99594)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-38291: Remove mention of typing.io and typing.re again (GH-26113)
Miss Islington (bot) [Mon, 14 Jun 2021 15:06:33 +0000 (08:06 -0700)] 
bpo-38291: Remove mention of typing.io and typing.re again (GH-26113)

They were originally removed in GH-10173 per bpo-35089, but then
readded in GH-21574. Cf. bpo-38291 for decision to remove.
(cherry picked from commit 8a76683cfb842e12b57f6d276839f6c68fd94e1a)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
4 years agobpo-44310: Note that lru_cache keep references to both arguments and results (GH...
Miss Islington (bot) [Mon, 14 Jun 2021 13:43:48 +0000 (06:43 -0700)] 
bpo-44310:  Note that lru_cache keep references to both arguments and results (GH-26715) (GH-26716)

4 years agobpo-43425: Update test_c_parser not to use TempdirManager (GH-26693)
Miss Islington (bot) [Mon, 14 Jun 2021 00:24:11 +0000 (17:24 -0700)] 
bpo-43425: Update test_c_parser not to use TempdirManager (GH-26693)

(cherry picked from commit 736ed6f7a9f465ba728198e8bca81e5fbe71bc37)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
4 years agobpo-43475: Fix the Python implementation of hash of Decimal NaN (GH-26679)
Miss Islington (bot) [Sun, 13 Jun 2021 14:05:28 +0000 (07:05 -0700)] 
bpo-43475: Fix the Python implementation of hash of Decimal NaN (GH-26679)

(cherry picked from commit 9f1c5f6e8af6ba3f659b2aea1e221ac9695828ba)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years ago[3.10] bpo-44389: Fix deprecation of OP_NO_TLSv1_3 (GH-26700) (GH-26705)
Miss Islington (bot) [Sun, 13 Jun 2021 12:07:00 +0000 (05:07 -0700)] 
[3.10] bpo-44389: Fix deprecation of OP_NO_TLSv1_3 (GH-26700) (GH-26705)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit bf527277d4e4907e32d76ca7ba667ab3149fe258)

Co-authored-by: Christian Heimes <christian@python.org>
Automerge-Triggered-By: GH:tiran
4 years agobpo-44389: Remove duplicate SSL_OP_NO_TLSv1_2 flag (GH-26680)
Miss Islington (bot) [Sun, 13 Jun 2021 10:29:33 +0000 (03:29 -0700)] 
bpo-44389: Remove duplicate SSL_OP_NO_TLSv1_2 flag (GH-26680)

(cherry picked from commit cb7230c7a7d6d497e54c25e9ba640eec79de10f2)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years ago[3.10] Fix a potential reference-counting bug in long_pow (GH-26690) (GH-26703)
Mark Dickinson [Sun, 13 Jun 2021 07:58:32 +0000 (08:58 +0100)] 
[3.10] Fix a potential reference-counting bug in long_pow (GH-26690) (GH-26703)

(cherry picked from commit 59242431991794064824cf2ab70886367613f29e)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
4 years agobpo-44396: Update multi-line-start location when reallocating tokenizer buffers ...
Miss Islington (bot) [Sat, 12 Jun 2021 20:27:02 +0000 (13:27 -0700)] 
bpo-44396: Update multi-line-start location when reallocating tokenizer buffers (GH-26676) (GH-26695)

Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit a342cc5891dbd8a08d40e9444f2e2c9e93258721)

4 years ago[3.10] Add more const modifiers. (GH-26691). (GH-26692)
Serhiy Storchaka [Sat, 12 Jun 2021 17:44:32 +0000 (20:44 +0300)] 
[3.10] Add more const modifiers. (GH-26691). (GH-26692)

(cherry picked from commit be8b631b7a587aa781245e14c8cca32970e1be5b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years agobpo-40128: Fix IDLE autocomplete on macOS (GH-26672)
Miss Islington (bot) [Fri, 11 Jun 2021 23:24:16 +0000 (16:24 -0700)] 
bpo-40128: Fix IDLE autocomplete on macOS (GH-26672)

In particular, when running with tk8.6.8, as in PSF 3.9.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 3ec3ee7d2e9b45b586e486e429b412d6d0ca530f)

Co-authored-by: Kaustubh J <kaustubhkj@gmail.com>
4 years agobpo-44381: Windows build now allows enabling control flow guard (GH-26645)
Miss Islington (bot) [Fri, 11 Jun 2021 21:21:12 +0000 (14:21 -0700)] 
bpo-44381: Windows build now allows enabling control flow guard (GH-26645)

(cherry picked from commit 5af56c6f2a0d11df37fed7ecaaf321cf6926ba13)

Co-authored-by: Steve Dower <steve.dower@python.org>
4 years agobpo-43318: Fix a bug where pdb does not always echo cleared breakpoints (GH-24646...
Miss Islington (bot) [Fri, 11 Jun 2021 16:18:19 +0000 (09:18 -0700)] 
bpo-43318: Fix a bug where pdb does not always echo cleared breakpoints (GH-24646) (GH-26674)

(cherry picked from commit 4cb6ba14325cff98589c2660d1d2c65f4aacfee4)

Co-authored-by: huzhaojie <hu.zj@foxmail.com>
4 years agobpo-44242: [Enum] improve error messages (GH-26669)
Miss Islington (bot) [Fri, 11 Jun 2021 09:58:57 +0000 (02:58 -0700)] 
bpo-44242: [Enum] improve error messages (GH-26669)

(cherry picked from commit c956734d7af83ad31f847d31d0d26df087add9a4)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
4 years agobpo-44378: Fix a compiler warning in Py_IS_TYPE() (GH-26644)
Miss Islington (bot) [Fri, 11 Jun 2021 08:57:16 +0000 (01:57 -0700)] 
bpo-44378: Fix a compiler warning in Py_IS_TYPE() (GH-26644)

Py_IS_TYPE() no longer uses Py_TYPE() to avoid a compiler warning:
no longer cast "const PyObject*" to "PyObject*".
(cherry picked from commit 304dfec8d3c0763734ea8b5fa2af1d9e1ce69ffa)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-44362: ssl: improve deprecation warnings and docs (GH-26646)
Miss Islington (bot) [Fri, 11 Jun 2021 07:36:17 +0000 (00:36 -0700)] 
bpo-44362: ssl: improve deprecation warnings and docs (GH-26646)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit e26014f1c47d26d6097ff7a0f25384bfbde714a9)

Co-authored-by: Christian Heimes <christian@python.org>
4 years agobpo-44342: [Enum] changed pickling from by-value to by-name (GH-26658) (GH-26660)
Miss Islington (bot) [Thu, 10 Jun 2021 23:37:27 +0000 (16:37 -0700)] 
bpo-44342: [Enum] changed pickling from by-value to by-name (GH-26658) (GH-26660)

by-value lookups could fail on complex enums, necessitating a check for
__reduce__ and possibly sabotaging the final enum;

by-name lookups should never fail, and sabotaging is no longer necessary
for class-based enum creation.
(cherry picked from commit 62f1d2b3d7dda99598d053e10b785c463fdcf591)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
4 years agobpo-44385: Remove unused grammar rules (GH-26655)
Miss Islington (bot) [Thu, 10 Jun 2021 22:31:09 +0000 (15:31 -0700)] 
bpo-44385: Remove unused grammar rules (GH-26655)

Automerge-Triggered-By: GH:lysnikolaou
(cherry picked from commit e7b4644607789848f9752a3bd20ff216e25b4156)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
4 years agobpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649...
Miss Islington (bot) [Thu, 10 Jun 2021 22:01:03 +0000 (15:01 -0700)] 
bpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649) (GH-26653)

This enables, for example, two base Enums to both inherit from `str`, and then both be mixed into the same final Enum:

    class Str1Enum(str, Enum):
        GH- some behavior here

    class Str2Enum(str, Enum):
        GH- some more behavior here

    class FinalStrEnum(Str1Enum, Str2Enum):
        GH- this now works
(cherry picked from commit 8a4f0850d75747af8c96ca0e7eef1f5c1abfba25)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
4 years agobpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr ...
Miss Islington (bot) [Thu, 10 Jun 2021 20:56:57 +0000 (13:56 -0700)] 
bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr (GH-18180) (GH-26650)

(cherry picked from commit 6544b2532df82d137b71323445a07a6e29bcdec0)

Co-authored-by: Daniel Hahler <git@thequod.de>