]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602)
Antonio Cuni [Wed, 6 Jan 2021 11:38:26 +0000 (12:38 +0100)] 
bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602)

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.

4 years agobpo-14014: Clarify StreamWriter.reset() documentation (GH-13716)
Berker Peksag [Wed, 6 Jan 2021 02:14:42 +0000 (04:14 +0200)] 
bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716)

4 years agobpo-40959: Remove unused declarations from sqlite3 headers (GH-20828)
Erlend Egeberg Aasland [Wed, 6 Jan 2021 00:56:05 +0000 (01:56 +0100)] 
bpo-40959: Remove unused declarations from sqlite3 headers (GH-20828)

4 years agobpo-24464: Deprecate sqlite3.enable_shared_cache (GH-24008)
Erlend Egeberg Aasland [Wed, 6 Jan 2021 00:36:04 +0000 (01:36 +0100)] 
bpo-24464: Deprecate sqlite3.enable_shared_cache (GH-24008)

4 years agobpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159)
Vladimir [Wed, 6 Jan 2021 00:18:46 +0000 (16:18 -0800)] 
bpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159)

4 years agobpo-40810: Require SQLite 3.7.15 (GH-24106)
Erlend Egeberg Aasland [Wed, 6 Jan 2021 00:02:43 +0000 (01:02 +0100)] 
bpo-40810: Require SQLite 3.7.15 (GH-24106)

4 years agobpo-40956: Convert _sqlite3.Cursor to Argument Clinic (GH-24007)
Erlend Egeberg Aasland [Tue, 5 Jan 2021 23:57:25 +0000 (00:57 +0100)] 
bpo-40956: Convert _sqlite3.Cursor to Argument Clinic (GH-24007)

4 years agobpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675)
Erlend Egeberg Aasland [Tue, 5 Jan 2021 22:01:56 +0000 (23:01 +0100)] 
bpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675)

4 years agobpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125)
Steve Dower [Tue, 5 Jan 2021 21:35:01 +0000 (21:35 +0000)] 
bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125)

4 years agobpo-42823: Fix frame lineno when frame.f_trace is set (GH-24099)
Mark Shannon [Tue, 5 Jan 2021 12:04:10 +0000 (12:04 +0000)] 
bpo-42823: Fix frame lineno when frame.f_trace is set (GH-24099)

* Add test for frame.f_lineno with/without tracing.

* Make sure that frame.f_lineno is correct regardless of whether frame.f_trace is set.

* Update importlib

* Add NEWS

4 years agobpo-32631: IDLE: Enable zzdummy example extension module (GH-14491)
Cheryl Sabella [Tue, 5 Jan 2021 07:26:43 +0000 (02:26 -0500)] 
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>
4 years agobpo-42681: Fix test_curses failures related to color pairs (GH-24089)
Serhiy Storchaka [Tue, 5 Jan 2021 07:13:15 +0000 (09:13 +0200)] 
bpo-42681: Fix test_curses failures related to color pairs (GH-24089)

On ncurses 6.1 pair numbers are limited by SHORT_MAX-1, even
with extended color support.

Improve error reporting and tests for color functions.

4 years agobpo-40636: Remove overly-strict zip pickling tests (GH-24109)
Brandt Bucher [Tue, 5 Jan 2021 07:05:29 +0000 (23:05 -0800)] 
bpo-40636: Remove overly-strict zip pickling tests (GH-24109)

4 years agoFix broken NEWS markup (GH-24110)
Brandt Bucher [Tue, 5 Jan 2021 06:55:14 +0000 (22:55 -0800)] 
Fix broken NEWS markup (GH-24110)

4 years agobpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530)
Erlend Egeberg Aasland [Mon, 4 Jan 2021 23:16:43 +0000 (00:16 +0100)] 
bpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530)

Ref. [SQLite 3.7.15 changelog](https://sqlite.org/changes.html#version_3_7_15):
_"Avoid invoking the sqlite3_trace() callback multiple times when a statement is automatically reprepared due to SQLITE_SCHEMA errors."_

4 years agobpo-1635741: Convert _multibytecodec to multi-phase init (GH-24095)
Erlend Egeberg Aasland [Mon, 4 Jan 2021 21:33:45 +0000 (22:33 +0100)] 
bpo-1635741: Convert _multibytecodec to multi-phase init (GH-24095)

Convert the _multibytecodec extension module (CJK codecs) to multi-phase
initialization (PEP 489).

4 years agoPost 3.10.0a4
Pablo Galindo [Mon, 4 Jan 2021 21:17:03 +0000 (21:17 +0000)] 
Post 3.10.0a4

4 years agoMerge tag 'v3.10.0a4'
Pablo Galindo [Mon, 4 Jan 2021 21:16:13 +0000 (21:16 +0000)] 
Merge tag 'v3.10.0a4'

Python 3.10.0a4

4 years agoDo not remove x bit from published directories (GH-24101)
Steve Dower [Mon, 4 Jan 2021 20:56:32 +0000 (20:56 +0000)] 
Do not remove x bit from published directories (GH-24101)

4 years agobpo-42810: Mark jumps at end of if and try statements as artificial. (GH-24091)
Mark Shannon [Mon, 4 Jan 2021 18:06:55 +0000 (18:06 +0000)] 
bpo-42810: Mark jumps at end of if and try statements as artificial. (GH-24091)

* Mark jumps at end of if and try statements as artificial.

* Update importlib

* Add comment explaining the purpose of ADDOP_JUMP_NOLINE.

4 years agoPython 3.10.0a4 v3.10.0a4
Pablo Galindo [Mon, 4 Jan 2021 17:24:56 +0000 (17:24 +0000)] 
Python 3.10.0a4

4 years agoFix 'make suspicious' for the itertools module (GH-24097)
Pablo Galindo [Mon, 4 Jan 2021 17:24:22 +0000 (17:24 +0000)] 
Fix 'make suspicious' for the itertools module (GH-24097)

4 years agobpo-1635741: Port pyexpat to multi-phase init (PEP 489) (GH-22222)
Mohamed Koubaa [Mon, 4 Jan 2021 14:34:26 +0000 (08:34 -0600)] 
bpo-1635741: Port pyexpat to multi-phase init (PEP 489) (GH-22222)

4 years agoDelete the now unused c_do_not_emit_bytecode field. (#24094)
Mark Shannon [Mon, 4 Jan 2021 13:51:17 +0000 (13:51 +0000)] 
Delete the now unused c_do_not_emit_bytecode field. (#24094)

4 years agobpo-42692: fix __builtin_available check on older compilers (GH-23873)
Joshua Root [Mon, 4 Jan 2021 10:36:58 +0000 (21:36 +1100)] 
bpo-42692: fix __builtin_available check on older compilers (GH-23873)

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
4 years agobpo-42789: Enable using /dev/tty in test_curses. (GH-24085)
Serhiy Storchaka [Mon, 4 Jan 2021 10:30:20 +0000 (12:30 +0200)] 
bpo-42789: Enable using /dev/tty in test_curses. (GH-24085)

It was temporary disabled for debugging.

4 years agoUpdate Sphinx version for macOS installer build. (GH-24082)
Ned Deily [Mon, 4 Jan 2021 09:43:53 +0000 (04:43 -0500)] 
Update Sphinx version for macOS installer build. (GH-24082)

4 years agobpo-42361: Update macOS installer build to use Tcl/Tk 8.6.11 (GH-24081)
Ned Deily [Mon, 4 Jan 2021 09:43:11 +0000 (04:43 -0500)] 
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.

4 years agobpo-41837: Update macOS installer build to use OpenSSL 1.1.1i. (GH-24080)
Ned Deily [Mon, 4 Jan 2021 09:39:47 +0000 (04:39 -0500)] 
bpo-41837: Update macOS installer build to use OpenSSL 1.1.1i. (GH-24080)

4 years agobpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674)
Erlend Egeberg Aasland [Mon, 4 Jan 2021 04:48:19 +0000 (05:48 +0100)] 
bpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674)

4 years agobpo-42681: Fix range checks for color and pair numbers in curses (GH-23874)
Serhiy Storchaka [Sun, 3 Jan 2021 20:51:11 +0000 (22:51 +0200)] 
bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874)

4 years agobpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061)
Hai Shi [Sun, 3 Jan 2021 15:47:44 +0000 (23:47 +0800)] 
bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061)

4 years agobpo-40077: Add traverse/clear/free to arraymodule (GH-24066)
Erlend Egeberg Aasland [Sun, 3 Jan 2021 13:11:15 +0000 (14:11 +0100)] 
bpo-40077: Add traverse/clear/free to arraymodule (GH-24066)

4 years agobpo-38308: Fix the "versionchanged" for the *weights* of harmonic_mean() (GH-23919)
Zackery Spytz [Sun, 3 Jan 2021 12:35:26 +0000 (05:35 -0700)] 
bpo-38308: Fix the "versionchanged" for the *weights* of harmonic_mean() (GH-23919)

4 years agobpo-42814: Fix undefined behavior in Objects/genericaliasobject.c (GH-24073)
Zackery Spytz [Sun, 3 Jan 2021 12:18:25 +0000 (05:18 -0700)] 
bpo-42814: Fix undefined behavior in Objects/genericaliasobject.c (GH-24073)

In is_typing_name(), va_end() is not always called before the
function returns.  It is undefined behavior to call va_start()
without also calling va_end().

4 years agobpo-42093: Tweak the what's new message about the new LOAD_ATTR opcode cache (GH...
Pablo Galindo [Sun, 3 Jan 2021 04:37:46 +0000 (04:37 +0000)] 
bpo-42093: Tweak the what's new message about the new LOAD_ATTR opcode cache (GH-24070)

4 years agobpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067)
Pablo Galindo [Sun, 3 Jan 2021 01:11:41 +0000 (01:11 +0000)] 
bpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067)

4 years agobpo-40631: Disallow single parenthesized star target (GH-24027)
Lysandros Nikolaou [Sat, 2 Jan 2021 23:14:21 +0000 (01:14 +0200)] 
bpo-40631: Disallow single parenthesized star target (GH-24027)

4 years agoNo need to test "istep==1" twice. (GH-24064)
Raymond Hettinger [Sat, 2 Jan 2021 20:09:56 +0000 (12:09 -0800)] 
No need to test "istep==1" twice. (GH-24064)

4 years agobpo-42772: Step argument ignored when stop is None. (GH-24018)
Raymond Hettinger [Sat, 2 Jan 2021 18:24:51 +0000 (10:24 -0800)] 
bpo-42772: Step argument ignored when stop is None. (GH-24018)

4 years agobpo-42789: Don't skip curses tests on non-tty. (GH-24009)
Serhiy Storchaka [Sat, 2 Jan 2021 17:35:15 +0000 (19:35 +0200)] 
bpo-42789: Don't skip curses tests on non-tty. (GH-24009)

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.

4 years agobpo-42809: Improve pickle tests for recursive data. (GH-24060)
Serhiy Storchaka [Sat, 2 Jan 2021 17:32:47 +0000 (19:32 +0200)] 
bpo-42809: Improve pickle tests for recursive data. (GH-24060)

4 years agobpo-40077: Convert arraymodule to use heap types and establish module state (GH-23124)
Erlend Egeberg Aasland [Sat, 2 Jan 2021 16:38:47 +0000 (17:38 +0100)] 
bpo-40077: Convert arraymodule to use heap types and establish module state (GH-23124)

4 years agobpo-42195: Disallow isinstance/issubclass for subclasses of genericaliases in Union...
Ken Jin [Sat, 2 Jan 2021 16:19:15 +0000 (00:19 +0800)] 
bpo-42195: Disallow isinstance/issubclass for subclasses of genericaliases in Union (GH-24059)

Previously this didn't raise an error. Now it will:
```python
from collections.abc import Callable
isinstance(int, list | Callable[..., str])
```
Also added tests in Union since there were previously none for stuff like ``isinstance(list, list | list[int])`` either.

Backport to 3.9 not required.

Automerge-Triggered-By: GH:gvanrossum
4 years agohandle empty string in variable executable in platform.libc_ver() (#23140)
Kurochan [Sat, 2 Jan 2021 16:03:53 +0000 (01:03 +0900)] 
handle empty string in variable executable in platform.libc_ver() (#23140)

4 years agobpo-41559: Documentation for PEP 612 (GH-24000)
Ken Jin [Sat, 2 Jan 2021 00:45:50 +0000 (08:45 +0800)] 
bpo-41559: Documentation for PEP 612 (GH-24000)

4 years agobpo-42756: Configure LMTP Unix-domain socket to use global default timeout when timeo...
Ross [Fri, 1 Jan 2021 17:20:25 +0000 (17:20 +0000)] 
bpo-42756: Configure LMTP Unix-domain socket to use global default timeout when timeout not provided (GH-23969)

4 years agoBring Python into the new year. (GH-24036)
Dong-hee Na [Fri, 1 Jan 2021 15:37:23 +0000 (00:37 +0900)] 
Bring Python into the new year. (GH-24036)

4 years agobpo-42794: Update test_nntplib to use offical group name for testing (GH-24037)
Dong-hee Na [Fri, 1 Jan 2021 14:20:33 +0000 (23:20 +0900)] 
bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037)

4 years agobpo-42781: Document the mechanics of cached_property from a user viewpoint (GH-24031)
Raymond Hettinger [Fri, 1 Jan 2021 01:05:58 +0000 (17:05 -0800)] 
bpo-42781: Document the mechanics of cached_property from a user viewpoint (GH-24031)

4 years agobpo-37193: Remove thread objects which finished process its request (GH-23127)
Jason R. Coombs [Thu, 31 Dec 2020 20:19:30 +0000 (15:19 -0500)] 
bpo-37193: Remove thread objects which finished process its request (GH-23127)

This reverts commit aca67da4fe68d5420401ac1782203d302875eb27.

4 years agoFixes a typo in importlib.metadata. (#23921)
Tao He [Thu, 31 Dec 2020 19:37:53 +0000 (03:37 +0800)] 
Fixes a typo in importlib.metadata. (#23921)

Signed-off-by: Tao He <sighingnow@gmail.com>
4 years agobpo-42163, bpo-42189, bpo-42659: Support uname_tuple._replace (for all but processor...
Jason R. Coombs [Thu, 31 Dec 2020 19:08:03 +0000 (14:08 -0500)] 
bpo-42163, bpo-42189, bpo-42659: Support uname_tuple._replace (for all but processor) (#23010)

* 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>
4 years agobpo-42382: In importlib.metadata, `EntryPoint` objects now expose `dist` (#23758)
Jason R. Coombs [Thu, 31 Dec 2020 17:56:43 +0000 (12:56 -0500)] 
bpo-42382: In importlib.metadata, `EntryPoint` objects now expose `dist` (#23758)

* bpo-42382: In importlib.metadata, `EntryPoint` objects now expose a `.dist` object referencing the `Distribution` when constructed from a `Distribution`.

Also, sync importlib_metadata 3.3:

- Add support for package discovery under package normalization rules.
- The object returned by `metadata()` now has a formally-defined protocol called `PackageMetadata` with declared support for the `.get_all()` method.

* Add blurb

* Remove latent footnote.

4 years agobpo-42393: Raise OverflowError iso. DeprecationWarning on overflow in socket.ntohs...
Erlend Egeberg Aasland [Thu, 31 Dec 2020 13:16:50 +0000 (14:16 +0100)] 
bpo-42393: Raise OverflowError iso. DeprecationWarning on overflow in socket.ntohs and socket.htons (GH-23980)

4 years agobpo-39068: Fix race condition in base64 (GH-17627)
Brandon Stansbury [Thu, 31 Dec 2020 09:44:46 +0000 (01:44 -0800)] 
bpo-39068: Fix race condition in base64 (GH-17627)

There was a race condition in base64 in lazy initialization of multiple globals.

4 years agoMinor improvements to the convolve() recipe (GH-24012)
Raymond Hettinger [Wed, 30 Dec 2020 20:51:19 +0000 (12:51 -0800)] 
Minor improvements to the convolve() recipe (GH-24012)

* Minor improvement to speed and space efficiency for the convolve() recipe
* Don't require convolve's kernel to be a sequence.

4 years agobpo-42773: fix tests not being run on pushes (GH-24004)
Filipe Laíns [Wed, 30 Dec 2020 14:53:58 +0000 (14:53 +0000)] 
bpo-42773: fix tests not being run on pushes (GH-24004)

There was a typo, we were checking if the "GITHUB_BASE_REF" string
literal was empty instead of the $GITHUB_BASE_REF value. When
$GITHUB_BASE_REF is empty, the action that triggered the run was not a
pull request, so we always run the full test suite.

Signed-off-by: Filipe Laíns <lains@riseup.net>
4 years agobpo-27640: Add --disable-test-modules configure option (GH-23886)
pxinwr [Wed, 30 Dec 2020 12:50:39 +0000 (20:50 +0800)] 
bpo-27640: Add --disable-test-modules configure option (GH-23886)

Added --disable-test-modules option to the configure script:
don't build nor install test modules.

Patch by Xavier de Gaye, Thomas Petazzoni and Peixing Xin.

Co-Authored-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
4 years agobpo-27794: Add `name` attribute to `property` class (GH-23967)
Yurii Karabas [Wed, 30 Dec 2020 09:51:24 +0000 (11:51 +0200)] 
bpo-27794: Add `name` attribute to `property` class (GH-23967)

4 years agobpo-40137: Fix refleak in _functools_exec() (GH-24006)
Victor Stinner [Wed, 30 Dec 2020 01:24:43 +0000 (02:24 +0100)] 
bpo-40137: Fix refleak in _functools_exec() (GH-24006)

4 years agobpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999)
Petr Viktorin [Tue, 29 Dec 2020 23:32:07 +0000 (00:32 +0100)] 
bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999)

```
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: Andreas Schneider <asn@cryptomilk.org>
Co-Authored-By: Antoine Pitrou <antoine@python.org>
4 years agobpo-41224: Add versionadded for Symbol.is_annotated (GH-23861)
Andre Delfino [Tue, 29 Dec 2020 13:32:10 +0000 (10:32 -0300)] 
bpo-41224: Add versionadded for Symbol.is_annotated (GH-23861)

4 years agobpo-40956: Convert _sqlite3.Row to Argument Clinic (GH-23964)
Erlend Egeberg Aasland [Tue, 29 Dec 2020 13:22:55 +0000 (14:22 +0100)] 
bpo-40956: Convert _sqlite3.Row to Argument Clinic (GH-23964)

4 years agobpo-42655: Fix subprocess extra_groups gid conversion (GH-23762)
Jakub Kulík [Tue, 29 Dec 2020 12:58:27 +0000 (13:58 +0100)] 
bpo-42655: Fix subprocess extra_groups gid conversion (GH-23762)

4 years agobpo-40137: Convert _functools module to use PyType_FromModuleAndSpec. (GH-23405)
Hai Shi [Tue, 29 Dec 2020 12:45:07 +0000 (20:45 +0800)] 
bpo-40137: Convert _functools module to use PyType_FromModuleAndSpec. (GH-23405)

4 years agobpo-42700: Swap descriptions in pyexpat.errors (GH-23876)
Michael Wayne Goodman [Tue, 29 Dec 2020 12:33:15 +0000 (20:33 +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.

4 years agoFix minor typo in comments in readline.c (GH-23911)
Jero Bado [Tue, 29 Dec 2020 12:26:57 +0000 (20:26 +0800)] 
Fix minor typo in comments in readline.c (GH-23911)

4 years agoAllow / character in username,password fields in _PROXY envvars. (#23973)
Senthil Kumaran [Tue, 29 Dec 2020 12:18:42 +0000 (04:18 -0800)] 
Allow / character in username,password fields in _PROXY envvars. (#23973)

4 years agobpo-41781: Fix typo in internal function name in typing (GH-23957)
Ross [Tue, 29 Dec 2020 11:55:28 +0000 (11:55 +0000)] 
bpo-41781: Fix typo in internal function name in typing (GH-23957)

4 years agoFix typo in NEWS (GH23958)
Zackery Spytz [Tue, 29 Dec 2020 11:50:22 +0000 (04:50 -0700)] 
Fix typo in NEWS (GH23958)

4 years agobpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968)
Serhiy Storchaka [Tue, 29 Dec 2020 10:56:55 +0000 (12:56 +0200)] 
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.

4 years agobpo-42749: Use dynamic version to test for unsupported bignum in Tk (GH-23966)
Serhiy Storchaka [Tue, 29 Dec 2020 10:55:55 +0000 (12:55 +0200)] 
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.

4 years agobpo-42770: Fix a typo in the email.headerregistry docs (GH-23982)
Zackery Spytz [Tue, 29 Dec 2020 04:12:37 +0000 (21:12 -0700)] 
bpo-42770: Fix a typo in the email.headerregistry docs (GH-23982)

Automerge-Triggered-By: GH:zware
4 years agobpo-42740: Support PEP 604, 612 for typing.py get_args and get_origin (GH-23942)
Ken Jin [Tue, 29 Dec 2020 02:26:19 +0000 (10:26 +0800)] 
bpo-42740: Support PEP 604, 612 for typing.py get_args and get_origin (GH-23942)

4 years agoFix compiler warnings regarding loss of data (GH-23983)
Pablo Galindo [Tue, 29 Dec 2020 00:28:09 +0000 (00:28 +0000)] 
Fix compiler warnings regarding loss of data (GH-23983)

4 years agoUse Py_NewRef in Modules/_struct.c (GH-23981)
Pablo Galindo [Mon, 28 Dec 2020 23:59:16 +0000 (23:59 +0000)] 
Use Py_NewRef in Modules/_struct.c (GH-23981)

4 years agobpo-42740: Fix get_args for PEP 585 collections.abc.Callable (GH-23963)
Ken Jin [Mon, 28 Dec 2020 20:06:19 +0000 (04:06 +0800)] 
bpo-42740: Fix get_args for PEP 585 collections.abc.Callable (GH-23963)

PR 1/2. Needs backport to 3.9.

4 years agobpo-42222: Modernize integer test/conversion in randrange() (#23064)
Raymond Hettinger [Mon, 28 Dec 2020 19:10:34 +0000 (11:10 -0800)] 
bpo-42222: Modernize integer test/conversion in randrange() (#23064)

4 years ago[workflow] Use MSVC problem matcher for Windows action build (GH-18532)
Ammar Askar [Mon, 28 Dec 2020 18:28:40 +0000 (13:28 -0500)] 
[workflow] Use MSVC problem matcher for Windows action build (GH-18532)

This makes warnings and errors from the compiler very prominent so this should help prevent warnings from sneaking into the code base and catch them in review. See https://discuss.python.org/t/using-github-problem-matchers-to-catch-warnings-early/4254 for more details

You can see a demo of this in action here: https://github.com/ammaraskar/cpython/pull/15/files#diff-9ba2eeca0f254ece0a9df4d7cb68e870

GCC and Sphinx matchers have previously been added in GH-18567 and GH-20325, respectively.

4 years agobpo-40077: Fix typo in simplequeue_get_state_by_type() (GH-23975)
Erlend Egeberg Aasland [Mon, 28 Dec 2020 17:47:16 +0000 (18:47 +0100)] 
bpo-40077: Fix typo in simplequeue_get_state_by_type() (GH-23975)

The typo did no damage, but it looks suspicious and confusing.
Introduced by GH-23136.

Skip news.

Automerge-Triggered-By: GH:pitrou
4 years agobpo-1635741: sqlite3: Fix ref leak introduced by commit bf64d90 (GH-23972)
Erlend Egeberg Aasland [Mon, 28 Dec 2020 02:09:26 +0000 (03:09 +0100)] 
bpo-1635741: sqlite3: Fix ref leak introduced by commit bf64d90 (GH-23972)

4 years agobpo-42755: Fix sqlite3.Connection.backup docs (GH-23965)
Erlend Egeberg Aasland [Sun, 27 Dec 2020 22:35:17 +0000 (23:35 +0100)] 
bpo-42755: Fix sqlite3.Connection.backup docs (GH-23965)

The `pages` argument default value now reflects the implementation.

4 years agobpo-1635741: sqlite3 uses Py_NewRef/Py_XNewRef (GH-23170)
Erlend Egeberg Aasland [Sun, 27 Dec 2020 11:05:33 +0000 (12:05 +0100)] 
bpo-1635741: sqlite3 uses Py_NewRef/Py_XNewRef (GH-23170)

4 years agobpo-40956: Convert _sqlite3.Connection to Argument Clinic, part 2 (GH-23838)
Erlend Egeberg Aasland [Sun, 27 Dec 2020 08:32:18 +0000 (09:32 +0100)] 
bpo-40956: Convert _sqlite3.Connection to Argument Clinic, part 2 (GH-23838)

4 years agobpo-42749: Fix testing bignum if Tkinter is compiled with Tk 8.4 and dynamic linked...
Serhiy Storchaka [Sun, 27 Dec 2020 08:13:30 +0000 (10:13 +0200)] 
bpo-42749: Fix testing bignum if Tkinter is compiled with Tk 8.4 and dynamic linked with Tk >= 8.5 (GH-23955)

4 years agobpo-42745: finalize_interp_types() calls _PyType_Fini() (GH-23953)
Victor Stinner [Sat, 26 Dec 2020 19:26:08 +0000 (20:26 +0100)] 
bpo-42745: finalize_interp_types() calls _PyType_Fini() (GH-23953)

Call _PyType_Fini() in subinterpreters.

Fix reference leaks in subinterpreters.

4 years agoAdd small validator utility for PEG grammars (GH-23519)
Pablo Galindo [Sat, 26 Dec 2020 19:11:29 +0000 (19:11 +0000)] 
Add small validator utility for PEG grammars (GH-23519)

4 years agobpo-16396: fix BPO number in changelog (GH-23951)
Shantanu [Sat, 26 Dec 2020 15:36:56 +0000 (09:36 -0600)] 
bpo-16396: fix BPO number in changelog (GH-23951)

Automerge-Triggered-By: GH:jaraco
4 years agobpo-42748: test_asdl_parser now uses exec_module instead of load_module (#23954)
Dong-hee Na [Sat, 26 Dec 2020 13:25:21 +0000 (22:25 +0900)] 
bpo-42748: test_asdl_parser now uses exec_module instead of load_module (#23954)

4 years agobpo-40521: Per-interpreter interned strings (GH-20085)
Victor Stinner [Sat, 26 Dec 2020 01:58:33 +0000 (02:58 +0100)] 
bpo-40521: Per-interpreter interned strings (GH-20085)

Make the Unicode dictionary of interned strings compatible with
subinterpreters.

Remove the INTERN_NAME_STRINGS macro in typeobject.c: names are
always now interned (even if EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
macro is defined).

_PyUnicode_ClearInterned() now uses PyDict_Next() to no longer
allocate memory, to ensure that the interned dictionary is cleared.

4 years agobpo-42694: Prevent creating _curses_panel.panel (GH-23948)
Victor Stinner [Sat, 26 Dec 2020 01:17:46 +0000 (02:17 +0100)] 
bpo-42694: Prevent creating _curses_panel.panel (GH-23948)

Fix regression introduced in
commit 1baf030a902392fe92d934ed0fb6a385cf7d8869: restore removed code
to prevent creating a _curses_panel.panel instance directly.

4 years agobpo-42745: Make the type cache per-interpreter (GH-23947)
Victor Stinner [Sat, 26 Dec 2020 00:45:43 +0000 (01:45 +0100)] 
bpo-42745: Make the type cache per-interpreter (GH-23947)

Make the type attribute lookup cache per-interpreter.

Add private _PyType_InitCache() function, called by PyInterpreterState_New().

Continue to share next_version_tag between interpreters, since static
types are still shared by interpreters.

Remove MCACHE macro: the cache is no longer disabled if the
EXPERIMENTAL_ISOLATED_SUBINTERPRETERS macro is defined.

4 years agoAdd convolve() to the itertools recipes (GH-23928)
Raymond Hettinger [Sat, 26 Dec 2020 00:43:20 +0000 (16:43 -0800)] 
Add convolve() to the itertools recipes (GH-23928)

4 years agobpo-39465: Fix _PyUnicode_FromId() for subinterpreters (GH-20058)
Victor Stinner [Fri, 25 Dec 2020 23:41:46 +0000 (00:41 +0100)] 
bpo-39465: Fix _PyUnicode_FromId() for subinterpreters (GH-20058)

Make _PyUnicode_FromId() function compatible with subinterpreters.
Each interpreter now has an array of identifier objects (interned
strings decoded from UTF-8).

* Add PyInterpreterState.unicode.identifiers: array of identifiers
  objects.
* Add _PyRuntimeState.unicode_ids used to allocate unique indexes
  to _Py_Identifier.
* Rewrite the _Py_Identifier structure.

Microbenchmark on _PyUnicode_FromId(&PyId_a) with _Py_IDENTIFIER(a):

[ref] 2.42 ns +- 0.00 ns -> [atomic] 3.39 ns +- 0.00 ns: 1.40x slower

This change adds 1 ns per _PyUnicode_FromId() call in average.

4 years agoSync what's new in 3.9 with 3.9 branch (GH-23943)
Ken Jin [Fri, 25 Dec 2020 23:08:17 +0000 (07:08 +0800)] 
Sync what's new in 3.9 with 3.9 branch (GH-23943)

4 years agobpo-36876: [c-analyzer tool] Additional CLI updates for "capi" command. (gh-23929)
Eric Snow [Fri, 25 Dec 2020 22:57:30 +0000 (15:57 -0700)] 
bpo-36876: [c-analyzer tool] Additional CLI updates for "capi" command. (gh-23929)

https://bugs.python.org/issue36876

4 years agoRename Tkinter tests for widget options (GH-23944)
Serhiy Storchaka [Fri, 25 Dec 2020 22:10:29 +0000 (00:10 +0200)] 
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.

4 years agobpo-35728: Add root parameter to tkinter.font.nametofont() (GH-23885)
Desmond Cheong [Fri, 25 Dec 2020 21:18:06 +0000 (05:18 +0800)] 
bpo-35728: Add root parameter to tkinter.font.nametofont() (GH-23885)

4 years agobpo-42721: Improve using simple dialogs without root window (GH-23897)
Serhiy Storchaka [Fri, 25 Dec 2020 18:19:20 +0000 (20:19 +0200)] 
bpo-42721: Improve using simple dialogs without root window (GH-23897)

When simple query dialogs (tkinter.simpledialog), message boxes
(tkinter.messagebox) or color choose dialog (tkinter.colorchooser)
are created without arguments master and parent, and the default
root window is not yet created, a new temporary hidden root window
will be created automatically. It will not be set as the default root
window and will be destroyed right after closing the dialog window.
It will help to use these simple dialog windows in programs which do
not need other GUI.

Previously, message boxes and color chooser created the blank root
window and left it after closing the dialog window, and query dialogs
just raised an exception.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>