]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years ago[3.9] bpo-42163, bpo-42189, bpo-42659: Support uname_tuple._replace (for all but...
Jason R. Coombs [Sat, 16 Jan 2021 19:45:30 +0000 (14:45 -0500)] 
[3.9] bpo-42163, bpo-42189, bpo-42659: Support uname_tuple._replace (for all but processor) (GH-23010) (#24232)

* Add test capturing missed expectation with uname_result._replace.

* bpo-42163: Override uname_result._make to allow uname_result._replace to work (for everything but 'processor'.

* Replace hard-coded length with one derived from the definition.

* Add test capturing missed expectation with copy/deepcopy on namedtuple (bpo-42189).

* bpo-42189: Exclude processor parameter when constructing uname_result.

* In _make, rely on __new__ to strip processor.

* Add blurb.

* iter is not necessary here.

* Rely on num_fields in __new__

* Add test for slices on uname

* Add test for copy and pickle.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* import pickle

* Fix equality test after pickling.

* Simply rely on __reduce__ for pickling.

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

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
4 years agobpo-42931: randbytes missing from random.__all__ (GH-24219) (GH-24225)
Miss Islington (bot) [Fri, 15 Jan 2021 18:21:52 +0000 (10:21 -0800)] 
bpo-42931: randbytes missing from random.__all__ (GH-24219) (GH-24225)

4 years agoDocs: Remove stray semicolon in init.rst (GH-23974)
Miss Islington (bot) [Thu, 14 Jan 2021 16:17:44 +0000 (08:17 -0800)] 
Docs: Remove stray semicolon in init.rst (GH-23974)

Removed stray semicolon which was causing the docs to render weirdly (it's the function right under the one [here](https://docs.python.org/3/c-api/init.htmlGH-c._PyInterpreterState_GetEvalFrameFunc)).
(cherry picked from commit 971235827754eee6c0d9f7d39b52fecdfd4cb7b4)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183)
Miss Islington (bot) [Sun, 10 Jan 2021 07:30:43 +0000 (23:30 -0800)] 
bpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183)

If __repr__ uses instance attributes, as normal, and one steps
through the __init__ method, debugger may try to get repr before
the instance attributes exist.  reprlib.repr handles the error.
(cherry picked from commit 81f87bbf9f65702062021a78abd9b8f82c98a414)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years ago[3.9] bpo-42851: [Enum] remove brittle __init_subclass__ support (GH-24154) (GH-24155)
Ethan Furman [Thu, 7 Jan 2021 21:55:59 +0000 (13:55 -0800)] 
[3.9] bpo-42851: [Enum] remove brittle __init_subclass__ support (GH-24154) (GH-24155)

Solution to support calls to `__init_subclass__` with members defined is too brittle and breaks with certain mixins..
(cherry picked from commit a581a868d97f649aedf868a1d27865a10925c73a)

4 years ago[3.9] bpo-42811: Update importlib.utils.resolve_name() docs to use __spec__.parent...
Yair Frid [Thu, 7 Jan 2021 18:06:13 +0000 (20:06 +0200)] 
[3.9] bpo-42811: Update importlib.utils.resolve_name() docs to use __spec__.parent (GH-24100) (GH-24149)

This is a backport of
https://github.com/python/cpython/pull/24100

Automerge-Triggered-By: GH:brettcannon
4 years agobpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159)
Vladimir [Wed, 6 Jan 2021 20:57:24 +0000 (12:57 -0800)] 
bpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159)

(cherry picked from commit f9949f82e17c88609adb53eff3a7d5cd63a645bd)

4 years agobpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602) (GH-24139)
Miss Islington (bot) [Wed, 6 Jan 2021 12:54:18 +0000 (04:54 -0800)] 
bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602) (GH-24139)

I think that none of these API calls can fail, but only few of them are
documented as such. Add the sentence "This function always succeeds" (which is
the same already used e.g. by PyNumber_Check) to all of them.
(cherry picked from commit 315fc52db17b19fe30aa9193f26adf69e18d8844)

Co-authored-by: Antonio Cuni <anto.cuni@gmail.com>
Co-authored-by: Antonio Cuni <anto.cuni@gmail.com>
4 years agobpo-14014: Clarify StreamWriter.reset() documentation (GH-13716)
Miss Islington (bot) [Wed, 6 Jan 2021 02:27:30 +0000 (18:27 -0800)] 
bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716)

(cherry picked from commit 1a9f51ed12feb4d95ad6d0faf610a030c05b9f5e)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
4 years agobpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675)
Steve Dower [Wed, 6 Jan 2021 00:09:08 +0000 (00:09 +0000)] 
bpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125)
Steve Dower [Tue, 5 Jan 2021 23:37:29 +0000 (23:37 +0000)] 
bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125)

4 years ago[3.9] bpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674) (GH-24130)
Erlend Egeberg Aasland [Tue, 5 Jan 2021 22:52:55 +0000 (23:52 +0100)] 
[3.9] bpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674) (GH-24130)

(cherry picked from commit c94ee13ad596d26d1859078bc09806aa59bb0000)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Automerge-Triggered-By: GH:ned-deily
4 years ago[3.9] bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999) (GH-24005)
Miss Islington (bot) [Tue, 5 Jan 2021 15:46:58 +0000 (07:46 -0800)] 
[3.9] bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999) (GH-24005)

```
In file included from /usr/include/python3.8/Python.h:147:
In file included from /usr/include/python3.8/abstract.h:837:
/usr/include/python3.8/cpython/abstract.h:91:11: error: cast from 'char *' to 'vectorcallfunc *'
(aka 'struct _object *(**)(struct _object *, struct _object *const *, unsigned long, struct _object *)')
increases required alignment from 1 to 8 [-Werror,-Wcast-align]

    ptr = (vectorcallfunc*)(((char *)callable) + offset);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-Authored-By: Andreas Schneider <asn@cryptomilk.org>
Co-Authored-By: Antoine Pitrou <antoine@python.org>
(cherry picked from commit 056c08211b402b4dbc1530a9de9d00ad5309909f)

4 years ago[3.9] bpo-42681: Fix test_curses failures related to color pairs (GH-24089) (GH-24113)
Serhiy Storchaka [Tue, 5 Jan 2021 12:23:19 +0000 (14:23 +0200)] 
[3.9] bpo-42681: Fix test_curses failures related to color pairs (GH-24089) (GH-24113)

On ncurses 6.1 pair numbers are limited by SHORT_MAX-1.

Improve error reporting and tests for color functions.
(cherry picked from commit 59f9b4e4509be67494f3d45489fa55523175ff69)

4 years ago[3.9] bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491)
Terry Jan Reedy [Tue, 5 Jan 2021 08:25:57 +0000 (03:25 -0500)] 
[3.9] bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491)

Make menu items work with formatter, add docstrings, add 100% tests.

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

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
4 years agoFix broken NEWS markup (GH-24110)
Miss Islington (bot) [Tue, 5 Jan 2021 08:18:17 +0000 (00:18 -0800)] 
Fix broken NEWS markup (GH-24110)

(cherry picked from commit cde988e893793f58bf87e7a8c014926fd2e32904)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
4 years agobpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530)
Miss Islington (bot) [Mon, 4 Jan 2021 23:41:03 +0000 (15:41 -0800)] 
bpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530)

Ref. [SQLite 3.7.15 changelog](https://sqlite.org/changes.htmlGH-version_3_7_15):
_"Avoid invoking the sqlite3_trace() callback multiple times when a statement is automatically reprepared due to SQLITE_SCHEMA errors."_
(cherry picked from commit f7f0ed59bcc41ed20674d4b2aa443d3b79e725f4)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agoDo not remove x bit from published directories (GH-24101)
Miss Islington (bot) [Mon, 4 Jan 2021 21:17:05 +0000 (13:17 -0800)] 
Do not remove x bit from published directories (GH-24101)

(cherry picked from commit af4cd16479f2d55bee3db899e7679d7cde1d2ab7)

Co-authored-by: Steve Dower <steve.dower@python.org>
4 years agoRevert "[3.9] [doc] Fix erroneous backslashes in signatures and names (GH-23658)...
Julien Palard [Mon, 4 Jan 2021 16:19:27 +0000 (17:19 +0100)] 
Revert "[3.9] [doc] Fix erroneous backslashes in signatures and names (GH-23658)" (GH-24092)

This partially reverts commit
e89993cff4e60fcf32643fc613d0544f3dbcd98a, which was removing
backslashes in documentations compiled with Sphinx < 3, used for
Python 3.8 and 3.9 docs.

4 years agobpo-42692: fix __builtin_available check on older compilers (GH-23873) (GH-24090)
Miss Islington (bot) [Mon, 4 Jan 2021 11:00:43 +0000 (03:00 -0800)] 
bpo-42692: fix __builtin_available check on older compilers (GH-23873) (GH-24090)

A compiler that doesn't define `__has_builtin` will error out when it is
used on the same line as the check for it.

Automerge-Triggered-By: GH:ronaldoussoren
(cherry picked from commit df21f502fdccec234282bf0a211af979fd23def4)

Co-authored-by: Joshua Root <jmr@macports.org>
4 years agobpo-41837: Update macOS installer build to use OpenSSL 1.1.1i. (GH-24080) (GH-24083)
Miss Islington (bot) [Mon, 4 Jan 2021 10:28:29 +0000 (02:28 -0800)] 
bpo-41837: Update macOS installer build to use OpenSSL 1.1.1i. (GH-24080) (GH-24083)

(cherry picked from commit 14097a2785414c728d41d8d730a469a8c46ecdb9)

Co-authored-by: Ned Deily <nad@python.org>
4 years agoUpdate Sphinx version for macOS installer build. (GH-24082) (GH-24087)
Miss Islington (bot) [Mon, 4 Jan 2021 10:22:07 +0000 (02:22 -0800)] 
Update Sphinx version for macOS installer build. (GH-24082) (GH-24087)

(cherry picked from commit 0f3b96b368dd7ebb5dcd3759a30322dbd027f292)

Co-authored-by: Ned Deily <nad@python.org>
4 years agobpo-42361: Update macOS installer build to use Tcl/Tk 8.6.11 (GH-24081)
Miss Islington (bot) [Mon, 4 Jan 2021 10:17:30 +0000 (02:17 -0800)] 
bpo-42361: Update macOS installer build to use Tcl/Tk 8.6.11 (GH-24081)

As of 2021-01-03, Tcl/Tk 8.6.11rc2 is expected to be the final release.
(cherry picked from commit a38e04b566879a5040ea97428d7ee4331d76513f)

Co-authored-by: Ned Deily <nad@python.org>
4 years ago[3.9] bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874...
Serhiy Storchaka [Sun, 3 Jan 2021 22:55:23 +0000 (00:55 +0200)] 
[3.9] bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874). (GH-24077)

(cherry picked from commit 1470edd6131c29b8a09ce012cdfee3afa269d553)

4 years ago[3.9] bpo-42789: Don't skip curses tests on non-tty. (GH-24009) (GH-24076)
Serhiy Storchaka [Sun, 3 Jan 2021 20:54:44 +0000 (22:54 +0200)] 
[3.9] bpo-42789: Don't skip curses tests on non-tty. (GH-24009) (GH-24076)

If __stdout__ is not attached to terminal, try to use __stderr__
if it is attached to terminal, or open the terminal device, or
use regular file as terminal, but some functions will be untested
in the latter case.
(cherry picked from commit 607501abb488fb37e33cf9d35260ab7baefa192f)

4 years ago[3.9] bpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067) (GH...
Pablo Galindo [Sun, 3 Jan 2021 01:32:43 +0000 (01:32 +0000)] 
[3.9] bpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067) (GH-24069)

(cherry picked from commit bd2728b1e8a99ba8f8c2d481f88aeb99b8b8360f)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years ago[3.9] bpo-40631: Disallow single parenthesized star target (GH-24027) (GH-24068)
Lysandros Nikolaou [Sun, 3 Jan 2021 00:59:39 +0000 (02:59 +0200)] 
[3.9] bpo-40631: Disallow single parenthesized star target (GH-24027) (GH-24068)

(cherry picked from commit 2ea320dddd553298038bb7d6789e50e199332f66)

Automerge-Triggered-By: GH:pablogsal
4 years agobpo-42809: Improve pickle tests for recursive data. (GH-24060)
Miss Islington (bot) [Sat, 2 Jan 2021 17:53:46 +0000 (09:53 -0800)] 
bpo-42809: Improve pickle tests for recursive data. (GH-24060)

(cherry picked from commit a25011be8c6f62cb3333903befe6295d57f0bd30)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years ago[3.9] bpo-42425: Fix possible leak in initialization of errmap for OSError (GH-23446...
Serhiy Storchaka [Sat, 2 Jan 2021 10:24:27 +0000 (12:24 +0200)] 
[3.9] bpo-42425: Fix possible leak in initialization of errmap for OSError (GH-23446). (GH-24057)

(cherry picked from commit ed1007c0d74e658d1e6c9b51b12ce7501eb8cbf9)

4 years ago[3.9] bpo-42756: Configure LMTP Unix-domain socket to use global default timeout...
Ross [Sat, 2 Jan 2021 03:44:04 +0000 (03:44 +0000)] 
[3.9] bpo-42756: Configure LMTP Unix-domain socket to use global default timeout when timeout not provided (GH-23969) (GH-24050)

4 years agobpo-39068: Fix race condition in base64 (GH-17627)
Miss Islington (bot) [Fri, 1 Jan 2021 20:42:44 +0000 (12:42 -0800)] 
bpo-39068: Fix race condition in base64 (GH-17627)

There was a race condition in base64 in lazy initialization of multiple globals.
(cherry picked from commit 9655434cca5dfbea97bf6d355aec028e840b289c)

Co-authored-by: Brandon Stansbury <brandonrstansbury@gmail.com>
4 years agoBring Python into the new year. (GH-24036)
Miss Islington (bot) [Fri, 1 Jan 2021 17:27:48 +0000 (09:27 -0800)] 
Bring Python into the new year. (GH-24036)

(cherry picked from commit de6f20a6de48d63066b2cf5b317f50629f01d74a)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
4 years agobpo-42794: Update test_nntplib to use offical group name for testing (GH-24037)
Miss Islington (bot) [Fri, 1 Jan 2021 14:42:43 +0000 (06:42 -0800)] 
bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037)

(cherry picked from commit ec3165320e81ac87edcb85c86c452528ddbaec1c)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
4 years agobpo-42781: Document the mechanics of cached_property from a user viewpoint (GH-24031...
Miss Islington (bot) [Fri, 1 Jan 2021 01:36:14 +0000 (17:36 -0800)] 
bpo-42781: Document the mechanics of cached_property from a user viewpoint (GH-24031) (#24035)

4 years agoFixes a typo in importlib.metadata. (GH-23921) (#24029)
Miss Islington (bot) [Thu, 31 Dec 2020 20:27:17 +0000 (12:27 -0800)] 
Fixes a typo in importlib.metadata. (GH-23921) (#24029)

Signed-off-by: Tao He <sighingnow@gmail.com>
(cherry picked from commit 3631d6deab064de0bb286ef2943885dca3c3075e)

Co-authored-by: Tao He <sighingnow@gmail.com>
Co-authored-by: Tao He <sighingnow@gmail.com>
4 years ago[3.9] bpo-41224: Add versionadded for Symbol.is_annotated (GH-23861). (GH-24017)
Andre Delfino [Thu, 31 Dec 2020 13:10:10 +0000 (10:10 -0300)] 
[3.9] bpo-41224: Add versionadded for Symbol.is_annotated (GH-23861). (GH-24017)

(cherry picked from commit 2edfc86f69d8a74f4821974678f664ff94a9dc22)

4 years agobpo-42655: Fix subprocess extra_groups gid conversion (GH-23762)
Miss Islington (bot) [Tue, 29 Dec 2020 13:22:13 +0000 (05:22 -0800)] 
bpo-42655: Fix subprocess extra_groups gid conversion (GH-23762)

(cherry picked from commit 0159e5efeebd12b3cf365c8569ca000eac7cb03e)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
4 years agobpo-42700: Swap descriptions in pyexpat.errors (GH-23876)
Miss Islington (bot) [Tue, 29 Dec 2020 12:55:33 +0000 (04:55 -0800)] 
bpo-42700: Swap descriptions in pyexpat.errors (GH-23876)

The descriptions of the `codes` and `messages` dictionaries in
`xml.parsers.expat.errors` were swapped, and this commit swaps them
back. For example, `codes` maps string descriptions of errors to numeric
error codes, not the other way around.
(cherry picked from commit 84402eb11086f97d31164aaa23e7238da3464f41)

Co-authored-by: Michael Wayne Goodman <goodman.m.w@gmail.com>
4 years agoAllow / character in username,password fields in _PROXY envvars. (GH-23973)
Miss Islington (bot) [Tue, 29 Dec 2020 12:46:05 +0000 (04:46 -0800)] 
Allow / character in username,password fields in _PROXY envvars. (GH-23973)

(cherry picked from commit 030a713183084594659aefd77b76fe30178e23c8)

Co-authored-by: Senthil Kumaran <senthil@uthcode.com>
4 years ago[doc] Fix missing commas in signatures (GH-23693)
Miss Islington (bot) [Tue, 29 Dec 2020 12:28:58 +0000 (04:28 -0800)] 
[doc] Fix missing commas in signatures (GH-23693)

* Fix star in signatures

* Fix comma in signatures
(cherry picked from commit 60eccd095624f39195cc5ae0b49a59022bbbb028)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
4 years agobpo-16396: fix BPO number in changelog (GH-23951) (GH-23956)
Miss Islington (bot) [Tue, 29 Dec 2020 11:52:12 +0000 (03:52 -0800)] 
bpo-16396: fix BPO number in changelog (GH-23951) (GH-23956)

Automerge-Triggered-By: GH:jaraco
(cherry picked from commit 7865f516f313bd31ca48ee1fdae2a80add2293b6)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
4 years agobpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968)
Miss Islington (bot) [Tue, 29 Dec 2020 11:18:26 +0000 (03:18 -0800)] 
bpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968)

Objects which belong to different Tcl interpreters are now always
different, even if they have the same name.
(cherry picked from commit 1df56bc0597a051c13d53514e120e9b6764185f8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years agobpo-42749: Use dynamic version to test for unsupported bignum in Tk (GH-23966)
Miss Islington (bot) [Tue, 29 Dec 2020 11:17:43 +0000 (03:17 -0800)] 
bpo-42749: Use dynamic version to test for unsupported bignum in Tk (GH-23966)

Tk can internally support bignum even if Tkinter is built without
support of bignum.
(cherry picked from commit 156b7f7052102ee1633a18e9a136ad8c38f66db0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years agobpo-42770: Fix a typo in the email.headerregistry docs (GH-23982)
Miss Islington (bot) [Tue, 29 Dec 2020 04:37:20 +0000 (20:37 -0800)] 
bpo-42770: Fix a typo in the email.headerregistry docs (GH-23982)

Automerge-Triggered-By: GH:zware
(cherry picked from commit c56988b88fecf6dc70f039704fda6051a0754db1)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
4 years agobpo-42740: Fix get_args for PEP 585 collections.abc.Callable (GH-23963)
Miss Islington (bot) [Mon, 28 Dec 2020 20:26:39 +0000 (12:26 -0800)] 
bpo-42740: Fix get_args for PEP 585 collections.abc.Callable (GH-23963)

PR 1/2. Needs backport to 3.9.
(cherry picked from commit 4140f10a16f06c32fd49f9e21fb2a53abe7357f0)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-42755: Fix sqlite3.Connection.backup docs (GH-23965)
Miss Islington (bot) [Sun, 27 Dec 2020 22:56:41 +0000 (14:56 -0800)] 
bpo-42755: Fix sqlite3.Connection.backup docs (GH-23965)

The `pages` argument default value now reflects the implementation.
(cherry picked from commit abba83b4b91f78dc556dc0b7700ecb46cba22c01)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-42749: Fix testing bignum if Tkinter is compiled with Tk 8.4 and dynamic linked...
Miss Islington (bot) [Sun, 27 Dec 2020 08:32:27 +0000 (00:32 -0800)] 
bpo-42749: Fix testing bignum if Tkinter is compiled with Tk 8.4 and dynamic linked with Tk >= 8.5 (GH-23955)

(cherry picked from commit b02ad2458bc127a7afdeef414fa68c9a7f1f32af)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years agoAdd convolve() to the itertools recipes (GH-23928) (GH-23949)
Miss Islington (bot) [Sat, 26 Dec 2020 04:23:35 +0000 (20:23 -0800)] 
Add convolve() to the itertools recipes (GH-23928) (GH-23949)

4 years agoRename Tkinter tests for widget options (GH-23944)
Miss Islington (bot) [Fri, 25 Dec 2020 22:30:40 +0000 (14:30 -0800)] 
Rename Tkinter tests for widget options (GH-23944)

Every test for widget option starts now with "test_configure_"
to distinguish it from tests for widget commands.
(cherry picked from commit c1ae21c965cb4d0566df2095e4bcb274d0bd9353)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years agobpo-42727: [Enum] use super() and include **kwds (GH-23927)
Miss Islington (bot) [Fri, 25 Dec 2020 16:07:30 +0000 (08:07 -0800)] 
bpo-42727: [Enum] use super() and include **kwds (GH-23927)

for multiple inheritance support:

use super().new
pass **kwds to super().new
(cherry picked from commit 786d97a66cac48e7a933010367b8993a5b3ab85b)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
4 years agobpo-42734: Fix crasher bogus_code_obj.py (GH-23939)
Miss Islington (bot) [Fri, 25 Dec 2020 15:22:56 +0000 (07:22 -0800)] 
bpo-42734: Fix crasher bogus_code_obj.py (GH-23939)

It did not work because the signature of code object constructor
was changed. Also, it used old format of bytecode (pre-wordcode).
(cherry picked from commit 954a7427ba9c2d02faed32c02090caeca873aeca)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years agobpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467)
Miss Islington (bot) [Fri, 25 Dec 2020 05:18:37 +0000 (21:18 -0800)] 
bpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467)

When the modern text= spelling of the universal_newlines= parameter was added
for Python 3.7, check_output's special case around input=None was overlooked.
So it behaved differently with universal_newlines=True vs text=True.  This
reconciles the behavior to be consistent and adds a test to guarantee it.

Also clarifies the existing check_output documentation.

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
(cherry picked from commit 64abf373444944a240274a9b6d66d1cb01ecfcdd)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
4 years agobpo-42727: Fix the NEWS entry .rst (GH-23932)
Miss Islington (bot) [Fri, 25 Dec 2020 04:53:27 +0000 (20:53 -0800)] 
bpo-42727: Fix the NEWS entry .rst (GH-23932)

It was causing CI failures.  the offending file came from https://github.com/python/cpython/pull/23917

```
python3 tools/rstlint.py ../Misc/NEWS.d/next/
[2] ../Misc/NEWS.d/next/Library/2020-12-23-19-43-06.bpo-42727.WH3ODh.rst:1: default role used
[2] ../Misc/NEWS.d/next/Library/2020-12-23-19-43-06.bpo-42727.WH3ODh.rst:2: default role used
2 problems with severity 2 found.
Makefile:204: recipe for target 'check' failed
```
(cherry picked from commit 8badadec53cbf9dc049c5b54198c5689481e3f3f)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
4 years ago[3.9] bpo-42727: [Enum] EnumMeta.__prepare__ now accepts **kwds (GH-23917). (GH-23926)
Ethan Furman [Thu, 24 Dec 2020 20:02:38 +0000 (12:02 -0800)] 
[3.9] bpo-42727: [Enum] EnumMeta.__prepare__ now accepts **kwds (GH-23917). (GH-23926)

* [3.9] [Enum] EnumMeta.__prepare__ now accepts **kwds (GH-23917).
(cherry picked from commit 6ec0adefad60ec7cdec61c44baecf1dccc1461ab)

4 years agocloses bpo-42726: gdb libpython: InstanceProxy support for py3 (GH-23912)
Miss Islington (bot) [Thu, 24 Dec 2020 17:37:07 +0000 (09:37 -0800)] 
closes bpo-42726: gdb libpython: InstanceProxy support for py3 (GH-23912)

On Fedora 31 gdb is using python 3.7.9, calling `proxyval` on an instance with a dictionary fails because of the `dict.iteritems` usage. This PR changes the code to be compatible with py2 and py3.

This changed seemed small enough to not need an issue and news blurb, if one is required please let me know.

Automerge-Triggered-By: GH:benjaminp
(cherry picked from commit b57ada98da0d5b0cf1ebc2c9c5502d04aa962042)

Co-authored-by: Augusto Hack <hack.augusto@gmail.com>
4 years agobpo-42195: Override _CallableGenericAlias's __getitem__ (GH-23915)
Miss Islington (bot) [Thu, 24 Dec 2020 03:07:51 +0000 (19:07 -0800)] 
bpo-42195: Override _CallableGenericAlias's __getitem__ (GH-23915)

Added `__getitem__` for `_CallableGenericAlias` so that it returns a subclass (itself) of `types.GenericAlias` rather than the default behavior of returning a plain `types.GenericAlias`. This fixes `repr` issues occuring after `TypeVar` substitution arising from the previous behavior.
(cherry picked from commit 6dd3da3cf4a0d6cb62d9c2a155434c127183454d)

Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agoBPO-42703: Fix incorrect documentation links for asyncio.Event (GH-23881)
Miss Islington (bot) [Wed, 23 Dec 2020 11:13:51 +0000 (03:13 -0800)] 
BPO-42703: Fix incorrect documentation links for asyncio.Event (GH-23881)

(cherry picked from commit d90ff376813843310a6f9ccc96551fa1521e8fef)

Co-authored-by: Matt Fowler <matt.fow@gmail.com>
4 years agobpo-42620: Improve socket.getsockname doc string (GH-23742)
Miss Islington (bot) [Wed, 23 Dec 2020 07:48:04 +0000 (23:48 -0800)] 
bpo-42620: Improve socket.getsockname doc string (GH-23742)

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

Co-authored-by: Christian Heimes <christian@python.org>
4 years agobpo-34463: Make python tracebacks identical to C tracebacks for SyntaxErrors without...
Miss Islington (bot) [Tue, 22 Dec 2020 22:12:30 +0000 (14:12 -0800)] 
bpo-34463: Make python tracebacks identical to C tracebacks for SyntaxErrors without a lineno (GH-23427)

(cherry picked from commit 069560b1171eb6385121ff3b6331e8814a4e7454)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
4 years agobpo-29030: Document interaction between *choices* and *metavar*. (GH-23884) (GH-23894)
Miss Islington (bot) [Tue, 22 Dec 2020 18:19:24 +0000 (10:19 -0800)] 
bpo-29030: Document interaction between *choices* and *metavar*. (GH-23884) (GH-23894)

4 years ago[3.9] [doc] Fix a few margins due to bad markup (GH-23619). (GH-23859)
Andre Delfino [Tue, 22 Dec 2020 02:53:50 +0000 (23:53 -0300)] 
[3.9] [doc] Fix a few margins due to bad markup (GH-23619). (GH-23859)

(cherry picked from commit 96a09df64483b70c4215c7025a19b9d2f1636c55)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
4 years ago[3.9] [doc] Fix erroneous backslashes in signatures and names (GH-23658) (GH-23827)
Andre Delfino [Tue, 22 Dec 2020 02:52:19 +0000 (23:52 -0300)] 
[3.9] [doc] Fix erroneous backslashes in signatures and names (GH-23658) (GH-23827)

The issue being resolved is shown in the 3.10 docs (if you select docs for older versions you won't see a visual glitch).

The newer sphinx version that produces the 3.10 docs doesn't treat the backslash to escape things in some situations it previously did..
(cherry picked from commit dcc997cd28ab33ebac44182ee55533c1b37689f7)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
4 years agoFix typo in docstring (GH-23515)
Miss Islington (bot) [Mon, 21 Dec 2020 14:29:57 +0000 (06:29 -0800)] 
Fix typo in docstring (GH-23515)

(cherry picked from commit 711381dfb09fbd434cc3b404656f7fd306161a64)

Co-authored-by: Fernando Toledo <42938011+fernandohtr@users.noreply.github.com>
4 years agobpo-42669: Document that `except` rejects nested tuples (GH-23822) (GH-23870)
Miss Islington (bot) [Sun, 20 Dec 2020 21:18:08 +0000 (13:18 -0800)] 
bpo-42669: Document that `except` rejects nested tuples (GH-23822) (GH-23870)

In Python 2, it was possible to use `except` with a nested tuple, and occasionally natural.  For example, `zope.formlib.interfaces.InputErrors` is a tuple of several exception classes, and one might reasonably think to do something like this:

    try:
        self.getInputValue()
        return True
    except (InputErrors, SomethingElse):
        return False

As of Python 3.0, this raises `TypeError: catching classes that do not inherit from BaseException is not allowed` instead: one must instead either break it up into multiple `except` clauses or flatten the tuple.  However, the reference documentation was never updated to match this new restriction.  Make it clear that the definition is no longer recursive.

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit c95f8bc2700b42f4568886505a819816c9b0ba28)

Co-authored-by: Colin Watson <cjwatson@debian.org>
Co-authored-by: Colin Watson <cjwatson@debian.org>
4 years agobpo-42572: Improve argparse docs for the type parameter. (GH-23849) (GH-23869)
Miss Islington (bot) [Sun, 20 Dec 2020 18:51:20 +0000 (10:51 -0800)] 
bpo-42572:  Improve argparse docs for the type parameter. (GH-23849) (GH-23869)

4 years agobpo-42604: always set EXT_SUFFIX=${SOABI}${SHLIB_SUFFIX} when using configure (GH...
Miss Islington (bot) [Sun, 20 Dec 2020 04:54:18 +0000 (20:54 -0800)] 
bpo-42604: always set EXT_SUFFIX=${SOABI}${SHLIB_SUFFIX} when using configure (GH-23708) (GH-23866)

Now all platforms use a value for the "EXT_SUFFIX" build variable derived
from SOABI (for instance in FreeBSD, "EXT_SUFFIX" is now ".cpython-310d.so"
instead of ".so"). Previously only Linux, Mac and VxWorks were using a value
for "EXT_SUFFIX" that included "SOABI".

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

Co-authored-by: Matti Picus <matti.picus@gmail.com>
Co-authored-by: Matti Picus <matti.picus@gmail.com>
4 years agobpo-41724: Explain when the conversion is not possible with detect_types enabled...
Miss Islington (bot) [Sun, 20 Dec 2020 00:02:25 +0000 (16:02 -0800)] 
bpo-41724: Explain when the conversion is not possible with detect_types enabled (GH-23855) (GH-23862)

* Explain when the conversion is not possible with detect_types enabled
(cherry picked from commit 09a36cdfb7c22f44df45b44e5561776206bcedfb)

Co-authored-by: sblondon <sblondon@users.noreply.github.com>
Co-authored-by: sblondon <sblondon@users.noreply.github.com>
4 years ago[3.9] bpo-42675: Document collections.abc.Callable changes (GH-23839) (#23852)
kj [Sat, 19 Dec 2020 22:32:06 +0000 (06:32 +0800)] 
[3.9] bpo-42675: Document collections.abc.Callable changes (GH-23839) (#23852)

4 years agobpo-40219: Lowered ttk LabeledScale dummy (GH-21467) (GH-23788)
Miss Islington (bot) [Sat, 19 Dec 2020 17:28:59 +0000 (09:28 -0800)] 
bpo-40219: Lowered ttk LabeledScale dummy (GH-21467) (GH-23788)

(cherry picked from commit b9ced83cf427ec86802ba4c9a562c6d9cafc72f5)

4 years ago[3.9] bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781...
Serhiy Storchaka [Sat, 19 Dec 2020 11:08:07 +0000 (13:08 +0200)] 
[3.9] bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781) (GH-23853)

* Tkinter functions and constructors which need a default root window
  raise now RuntimeError with descriptive message instead of obscure
  AttributeError or NameError if it is not created yet or cannot
  be created automatically.

* Add tests for all functions which use default root window.

* Fix import in the pynche script.

(cherry picked from commit 3d569fd6dccf9f582bafaca04d3535094cae393e)

4 years agobpo-42559: Not that getrandbits() is non-negative. (GH-23843) (GH-23851)
Miss Islington (bot) [Sat, 19 Dec 2020 03:10:06 +0000 (19:10 -0800)] 
bpo-42559: Not that getrandbits() is non-negative. (GH-23843) (GH-23851)

4 years agobpo-34805: Guarantee that __subclasses__() is in definition order. (GH-23844) (GH...
Miss Islington (bot) [Sat, 19 Dec 2020 01:17:32 +0000 (17:17 -0800)] 
bpo-34805:  Guarantee that __subclasses__() is in definition order. (GH-23844) (GH-23850)

4 years agobpo-42670: Fix a missing word in the itertools.product() docs (GH-23823) (GH-23824)
Miss Islington (bot) [Sat, 19 Dec 2020 00:55:52 +0000 (16:55 -0800)] 
bpo-42670: Fix a missing word in the itertools.product() docs (GH-23823) (GH-23824)

4 years agobpo-36769: Document that fnmatch.filter supports any kind of iterable (GH-13039)
Miss Islington (bot) [Fri, 18 Dec 2020 19:34:27 +0000 (11:34 -0800)] 
bpo-36769: Document that fnmatch.filter supports any kind of iterable (GH-13039)

(cherry picked from commit e8d22642105d57007ab1242848a8cbadc7f179df)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
4 years agobpo-41891: ensure asyncio.wait_for waits for task completion (GH-22461) (#23840)
Miss Islington (bot) [Fri, 18 Dec 2020 19:19:10 +0000 (11:19 -0800)] 
bpo-41891: ensure asyncio.wait_for waits for task completion (GH-22461) (#23840)

(cherry picked from commit 17ef4319a34f5a2f95e7823dfb5f5b8cff11882d)

Co-authored-by: Richard Kojedzinszky <rkojedzinszky@users.noreply.github.com>
Co-authored-by: Richard Kojedzinszky <rkojedzinszky@users.noreply.github.com>
4 years agobpo-17140: Document multiprocessing's ThreadPool (GH-23812)
Miss Islington (bot) [Fri, 18 Dec 2020 13:27:02 +0000 (05:27 -0800)] 
bpo-17140: Document multiprocessing's ThreadPool (GH-23812)

Up until now, the `multiprocessing.pool.ThreadPool` class has gone
undocumented, despite being a public class in multiprocessing that is
included in `multiprocessing.pool.__all__`.
(cherry picked from commit 84ebcf271a2cc8bfd1762acb279502b8b6ef236e)

Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
4 years agobpo-39096: Format specification documentation fixes for numeric types (GH-23575)
Miss Islington (bot) [Fri, 18 Dec 2020 09:49:19 +0000 (01:49 -0800)] 
bpo-39096: Format specification documentation fixes for numeric types (GH-23575)

(cherry picked from commit 886b2e5c7a2caf87070728dba8f18c3d65e51071)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
4 years agobpo-42613: Fix freeze.py config directory (GH-23792) (GH-23817)
Miss Islington (bot) [Thu, 17 Dec 2020 14:29:36 +0000 (06:29 -0800)] 
bpo-42613: Fix freeze.py config directory (GH-23792) (GH-23817)

Fix freeze.py tool to use the prope config and library directories.
(cherry picked from commit 1c653f17cb84d81df3a74ab0b42140d2bb68c5c4)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-26564: fix obsolete comment in traceback.c (GH-23819)
Miss Islington (bot) [Thu, 17 Dec 2020 13:19:58 +0000 (05:19 -0800)] 
bpo-26564: fix obsolete comment in traceback.c (GH-23819)

(cherry picked from commit 40125ab3252453bf205ed906e46bf9741c27bf9d)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
4 years agobpo-42375: subprocess DragonFlyBSD build update. (GH-23320) (GH-23388)
Miss Islington (bot) [Thu, 17 Dec 2020 11:15:20 +0000 (03:15 -0800)] 
bpo-42375: subprocess DragonFlyBSD build update. (GH-23320) (GH-23388)

Same as FreeBSD, file descriptors in /dev/fd id from 0 to 63.
(cherry picked from commit 13b865f0e17c88b081c23f7f05cf91166d220a50)

Co-authored-by: David CARLIER <devnexen@gmail.com>
Co-authored-by: David CARLIER <devnexen@gmail.com>
4 years agobpo-41804: Enhance test_epoll.test_control_and_wait() (GH-23795)
Miss Islington (bot) [Thu, 17 Dec 2020 08:03:50 +0000 (00:03 -0800)] 
bpo-41804: Enhance test_epoll.test_control_and_wait() (GH-23795)

Use shorter timeout and replace send() with sendall().
(cherry picked from commit 79782fe4f8cf73d7fdf8db02073bbadf7ff817b6)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agoFix indentation for get_stats_profile() docs (GH-23618)
Miss Islington (bot) [Wed, 16 Dec 2020 23:18:39 +0000 (15:18 -0800)] 
Fix indentation for get_stats_profile() docs (GH-23618)

The existing method is indented one too many times which
makes it look like a sub-method of print_callees().
(cherry picked from commit a6ba2b901543f3006ecdb2ad8b18cb00439ff9b2)

Co-authored-by: Matthew Suozzo <msuozzo@google.com>
4 years agobpo-37961: Fix regression in tracemalloc.Traceback.__repr__ (GH-23805)
Miss Islington (bot) [Wed, 16 Dec 2020 22:01:14 +0000 (14:01 -0800)] 
bpo-37961: Fix regression in tracemalloc.Traceback.__repr__ (GH-23805)

Regression in 8d59eb1b66c51b2b918da9881c57d07d08df43b7.
(cherry picked from commit 051b9818671625d125dee8198e0d2af5ad4c85b8)

Co-authored-by: Daniel Hahler <git@thequod.de>
4 years agoAdd symbols of the stable ABI to python3dll.c (GH-23598) (GH-23801)
Victor Stinner [Wed, 16 Dec 2020 21:41:47 +0000 (22:41 +0100)] 
Add symbols of the stable ABI to python3dll.c (GH-23598) (GH-23801)

Add the following symbols to python3dll.c:

* PyFrame_GetCode (bpo-40421)
* PyFrame_GetLineNumber (bpo-40421)
* PyObject_CallNoArgs (bpo-37194)
* PyThreadState_GetFrame (bpo-39947)
* PyThreadState_GetID (bpo-39947)
* PyThreadState_GetInterpreter (bpo-39947)

(cherry picked from commit fcc6935384b933fbe1a1ef659ed455a3b74c849a)

4 years agobpo-38323: Add guard clauses in MultiLoopChildWatcher. (GH-22756)
Miss Islington (bot) [Wed, 16 Dec 2020 18:10:37 +0000 (10:10 -0800)] 
bpo-38323: Add guard clauses in MultiLoopChildWatcher. (GH-22756)

This is a trivial refactor in preparation for a fix for bpo-38323.
(cherry picked from commit 66d3b589c44fcbcf9afe1e442d9beac3bd8bcd34)

Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
4 years agobpo-39101: Fixes BaseException hang in IsolatedAsyncioTestCase. (GH-22654)
Miss Islington (bot) [Wed, 16 Dec 2020 17:56:10 +0000 (09:56 -0800)] 
bpo-39101: Fixes BaseException hang in IsolatedAsyncioTestCase. (GH-22654)

(cherry picked from commit 8374d2ee1589791be8892b00f4bbf8121dde24bd)

Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
4 years agobpo-40686: Fix compiler warnings on _zoneinfo.c (GH-23614) (GH-23804)
Miss Islington (bot) [Wed, 16 Dec 2020 16:33:05 +0000 (08:33 -0800)] 
bpo-40686: Fix compiler warnings on _zoneinfo.c (GH-23614) (GH-23804)

"uint8_t day" is unsigned and so "day < 0" test is always true.
Remove the test to fix the following warnings on Windows:

modules\_zoneinfo.c(1224): warning C4068: unknown pragma
modules\_zoneinfo.c(1225): warning C4068: unknown pragma
modules\_zoneinfo.c(1227): warning C4068: unknown pragma
(cherry picked from commit aefb69b23f056c61e82ad228d950f348de090c70)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-19733: Re-enable tests for -image option in Tkinter (GH-23785)
Miss Islington (bot) [Wed, 16 Dec 2020 10:54:04 +0000 (02:54 -0800)] 
bpo-19733: Re-enable tests for -image option in Tkinter (GH-23785)

(cherry picked from commit 5f0fe8ec70120f4586d08978b0911b436f82c421)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years agobpo-42644: Validate values in logging.disable() (GH-23786)
Miss Islington (bot) [Wed, 16 Dec 2020 10:12:08 +0000 (02:12 -0800)] 
bpo-42644: Validate values in logging.disable() (GH-23786)

* bpo-42644: Validate values in logging.disable()

Technically make the value of manager a property that checks and convert
values assigned to it properly. This has the side effect of making
`logging.disable` also accept strings representing the various level of
warnings.

We want to validate the type of the disable attribute at assignment
time, as it is later compared to other levels when emitting warnings and
would generate a `TypeError: '>=' not supported between ....` in a
different part of the code base, which can make it difficult to track
down.

When assigned an incorrect value; it will raise a TypeError when the
wrong type, or ValueError if an invalid str.

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit b32d8b4f9bcd2e7d11240b6b9de0262cf8f5e09d)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
4 years ago[3.9] bpo-42318: Fix support of non-BMP characters in Tkinter on macOS (GH-23281...
Serhiy Storchaka [Tue, 15 Dec 2020 18:44:44 +0000 (20:44 +0200)] 
[3.9] bpo-42318: Fix support of non-BMP characters in Tkinter on macOS (GH-23281). (GH-23784)

(cherry picked from commit a26215db11cfcf7b5f55cab9e91396761a0e0bcf)

4 years agobpo-33610: Edit idlelib.codecontext (GH-23773) (GH-23775)
Miss Islington (bot) [Tue, 15 Dec 2020 12:51:56 +0000 (04:51 -0800)] 
bpo-33610: Edit idlelib.codecontext (GH-23773) (GH-23775)

Add sentence to module docstring and import tkinter items.
(cherry picked from commit 6f79e60b66dacefca147bdaa80eb37f936a72991)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years ago[3.9] bpo-42567: [Enum] call __init_subclass__ after members are added (GH-23714...
Ethan Furman [Tue, 15 Dec 2020 02:41:34 +0000 (18:41 -0800)] 
[3.9] bpo-42567: [Enum] call __init_subclass__ after members are added (GH-23714) (GH-23772)

When creating an Enum, `type.__new__` calls `__init_subclass__`, but at that point the members have not been added.

This patch suppresses the initial call, then manually calls the ancestor `__init_subclass__` before returning the new Enum class.
(cherry picked from commit 6bd94de168b58ac9358277ed6f200490ab26c174)

4 years ago[3.9] bpo-42517: [Enum] deprecate private name members (GH-23722) (GH-23748)
Miss Islington (bot) [Mon, 14 Dec 2020 23:56:58 +0000 (15:56 -0800)] 
[3.9] bpo-42517: [Enum] deprecate private name members (GH-23722) (GH-23748)

private names will raise a DeprecationWarning; in 3.10 they will become normal attributes

4 years agobpo-42591: Export missing Py_FrozenMain() symbol (GH-23730) (GH-23734)
Victor Stinner [Mon, 14 Dec 2020 23:31:54 +0000 (00:31 +0100)] 
bpo-42591: Export missing Py_FrozenMain() symbol (GH-23730) (GH-23734)

Export the Py_FrozenMain() function: fix a Python 3.9.0 regression.
Python 3.9 uses -fvisibility=hidden and the function was not exported
explicitly and so not exported.

(cherry picked from commit b5c7b38f5ebbc84b5b80192db1743d3e1cdcf4c5)

4 years agobpo-40084: Enum - dir() includes member attributes (GH-19219)
Miss Islington (bot) [Mon, 14 Dec 2020 22:43:43 +0000 (14:43 -0800)] 
bpo-40084: Enum - dir() includes member attributes (GH-19219)

(cherry picked from commit 68526fe258da8c01196fd7cf48e8e5f1280bf8fd)

Co-authored-by: Angelin BOOZ <9497359+lem2clide@users.noreply.github.com>
4 years agobpo-42059: Fix required/optional keys for TypedDict(..., total=False) (GH-22736)...
Miss Islington (bot) [Mon, 14 Dec 2020 22:33:27 +0000 (14:33 -0800)] 
bpo-42059: Fix required/optional keys for TypedDict(..., total=False) (GH-22736) (GH-23747)

(cherry picked from commit 67b769f5157c9dad1c7dd6b24e067b9fdab5b35d)

Co-authored-by: Alex Grönholm <alex.gronholm@nextday.fi>
4 years agobpo-36541: Add lib2to3 grammar PEP-570 pos-only arg parsing (GH-23759)
Miss Islington (bot) [Mon, 14 Dec 2020 17:38:03 +0000 (09:38 -0800)] 
bpo-36541: Add lib2to3 grammar PEP-570 pos-only arg parsing (GH-23759)

Add positional only args support to lib2to3 pgen2.

This adds 3.8's PEP-570 support to lib2to3's pgen2.  lib2to3, while
being deprecated is still used by things to parse all versions of Python
code today.  We need it to support parsing modern 3.8 and 3.9 constructs.

Also add tests for complex *expr and **expr's.
(cherry picked from commit 42c9f0fd0a5e67d4ae0022bfd7370cb9725a5b01)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
4 years ago[3.9] bpo-42195: Ensure consistency of Callable's __args__ in collections.abc and...
kj [Mon, 14 Dec 2020 16:30:45 +0000 (00:30 +0800)] 
[3.9] bpo-42195: Ensure consistency of Callable's __args__ in collections.abc and typing (GH-23765)

Backport of GH-23060.

4 years ago[3.9] bpo-42532: Check if NonCallableMock's spec_arg is not None instead of call...
Karthikeyan Singaravelan [Mon, 14 Dec 2020 05:49:16 +0000 (11:19 +0530)] 
[3.9] bpo-42532: Check if NonCallableMock's spec_arg is not None instead of call its __bool__ function (GH-23613) (GH-23676)

Check if NonCallableMock's spec_arg is not None instead of call its __bool__ function
(cherry picked from commit c598a04dd29b89ad072245ddaf738badcfb41ac7)

Co-authored-by: idanw206 <31290383+idanw206@users.noreply.github.com>
4 years agobpo-42598: Fix implicit function declarations in configure (GH-23690) (GH-23756)
Miss Islington (bot) [Sun, 13 Dec 2020 22:01:00 +0000 (14:01 -0800)] 
bpo-42598: Fix implicit function declarations in configure (GH-23690) (GH-23756)

This is invalid in C99 and later and is an error with some compilers
(e.g. clang in Xcode 12), and can thus cause configure checks to
produce incorrect results.
(cherry picked from commit 674fa0a740151e0416c9383f127b16014e805990)

Co-authored-by: Joshua Root <jmr@macports.org>