]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-28254: Add PyGC_ functions to the stable ABI manifest (GH-25720) 11789/head
Petr Viktorin [Thu, 29 Apr 2021 13:46:48 +0000 (15:46 +0200)] 
bpo-28254: Add PyGC_ functions to the stable ABI manifest (GH-25720)

Co-authored-by: Senthil Kumaran <senthil@uthcode.com>
Co-authored-by: scoder <stefan_ml@behnel.de>
4 years agobpo-42739: Don't use sentinels to mark end of line table. (GH-25657)
Mark Shannon [Thu, 29 Apr 2021 12:12:51 +0000 (13:12 +0100)] 
bpo-42739: Don't use sentinels to mark end of line table. (GH-25657)

* Add length parameter to PyLineTable_InitAddressRange and doen't use sentinel values at end of table. Makes the line number table more robust.

* Update PyCodeAddressRange to match PEP 626.

4 years agobpo-43651: Fix test_logging (GH-25715)
Inada Naoki [Thu, 29 Apr 2021 11:37:32 +0000 (20:37 +0900)] 
bpo-43651: Fix test_logging (GH-25715)

4 years agobpo-43774: Enhance debug build documentation (GH-25712)
Victor Stinner [Thu, 29 Apr 2021 11:06:59 +0000 (13:06 +0200)] 
bpo-43774: Enhance debug build documentation (GH-25712)

* Add also references to --with-trace-refs option.
* Move _ob_next and _ob_prev at the end, since they don't exist by
  default and are related to debug.

4 years agobpo-37892: Use space indents in IDLE Shell (GH-25678)
Terry Jan Reedy [Thu, 29 Apr 2021 10:48:18 +0000 (06:48 -0400)] 
bpo-37892: Use space indents in IDLE Shell (GH-25678)

Adding a newline to the prompt moves it out of the way of
user code input, which now starts at the left margin,
along with continuation lines.

4 years agobpo-43795: Generate python3dll.c and doc data from manifest (PEP 652) (GH-25315)
Petr Viktorin [Thu, 29 Apr 2021 09:33:14 +0000 (11:33 +0200)] 
bpo-43795: Generate python3dll.c and doc data from manifest (PEP 652) (GH-25315)

4 years agobpo-43774: Remove unused PYMALLOC_DEBUG macro (GH-25711)
Victor Stinner [Thu, 29 Apr 2021 08:47:47 +0000 (10:47 +0200)] 
bpo-43774: Remove unused PYMALLOC_DEBUG macro (GH-25711)

Enhance also the documentation of debug hooks on memory allocators.

4 years agobpo-28254: Cleanup test_subprocess.test_preexec_gc_module_failure() (GH-25709)
Victor Stinner [Thu, 29 Apr 2021 08:26:53 +0000 (10:26 +0200)] 
bpo-28254: Cleanup test_subprocess.test_preexec_gc_module_failure() (GH-25709)

Saving/restoring gc.disable and gc.isenabled is no longer needed.

4 years agobpo-43908: Document Static Types in the C API (GH-25710)
Victor Stinner [Thu, 29 Apr 2021 08:26:34 +0000 (10:26 +0200)] 
bpo-43908: Document Static Types in the C API (GH-25710)

Update also PyTypeObject structure definition in the doc.

4 years agobpo-43908: Make array.array type immutable (GH-25696)
Erlend Egeberg Aasland [Thu, 29 Apr 2021 06:47:48 +0000 (08:47 +0200)] 
bpo-43908: Make array.array type immutable (GH-25696)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-43908: Make re types immutable (GH-25697)
Erlend Egeberg Aasland [Thu, 29 Apr 2021 06:47:11 +0000 (08:47 +0200)] 
bpo-43908: Make re types immutable (GH-25697)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-43892: Make match patterns explicit in the AST (GH-25585)
Nick Coghlan [Thu, 29 Apr 2021 05:58:44 +0000 (15:58 +1000)] 
bpo-43892: Make match patterns explicit in the AST (GH-25585)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
4 years agobpo-41139: Deprecate `cgi.log()` (GH-25625)
Inada Naoki [Thu, 29 Apr 2021 02:36:04 +0000 (11:36 +0900)] 
bpo-41139: Deprecate `cgi.log()` (GH-25625)

4 years agobpo-43651: Fix EncodingWarning in `os.fdopen()` and test_os (GH-25654)
Inada Naoki [Thu, 29 Apr 2021 02:35:36 +0000 (11:35 +0900)] 
bpo-43651: Fix EncodingWarning in `os.fdopen()` and test_os (GH-25654)

4 years agobpo-43651: Fix EncodingWarning in tests. (GH-25655)
Inada Naoki [Thu, 29 Apr 2021 02:34:56 +0000 (11:34 +0900)] 
bpo-43651: Fix EncodingWarning in tests. (GH-25655)

* test_httplib
* test_httpservers
* test_logging

4 years agobpo-24275: Don't downgrade unicode-only dicts to mixed on lookups (GH-25186)
Hristo Venev [Thu, 29 Apr 2021 02:06:03 +0000 (05:06 +0300)] 
bpo-24275: Don't downgrade unicode-only dicts to mixed on lookups (GH-25186)

4 years ago[doc] Be more clear on super() regarding multiple base classes methods (GH-21789)
Andre Delfino [Thu, 29 Apr 2021 01:12:15 +0000 (22:12 -0300)] 
[doc] Be more clear on super() regarding multiple base classes methods (GH-21789)

4 years ago[doc] Do some polishing in IDEs section (GH-22070)
Andre Delfino [Thu, 29 Apr 2021 01:06:53 +0000 (22:06 -0300)] 
[doc] Do some polishing in IDEs section (GH-22070)

4 years agoDocument importlib.metadata.PackagePath.locate method (GH-25669)
Paul Moore [Wed, 28 Apr 2021 23:27:37 +0000 (00:27 +0100)] 
Document importlib.metadata.PackagePath.locate method (GH-25669)

4 years agobpo-43970: Optimize Path.cwd() in pathlib by not instantiating a class unnecessarily...
kfollstad [Wed, 28 Apr 2021 23:01:51 +0000 (16:01 -0700)] 
bpo-43970: Optimize Path.cwd() in pathlib by not instantiating a class unnecessarily (GH-25699)

4 years agobpo-37903: IDLE: Shell sidebar with prompts (GH-22682)
Tal Einat [Wed, 28 Apr 2021 22:27:55 +0000 (01:27 +0300)] 
bpo-37903: IDLE: Shell sidebar with prompts (GH-22682)

The first followup will change shell indents to spaces.
More are expected.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-28254: _posixsubprocess uses PyGC_Enable/PyGC_Disable (GH-25693)
Victor Stinner [Wed, 28 Apr 2021 17:09:29 +0000 (19:09 +0200)] 
bpo-28254: _posixsubprocess uses PyGC_Enable/PyGC_Disable (GH-25693)

4 years agobpo-43908: Add Py_TPFLAGS_IMMUTABLETYPE flag (GH-25520)
Erlend Egeberg Aasland [Wed, 28 Apr 2021 17:02:42 +0000 (19:02 +0200)] 
bpo-43908: Add Py_TPFLAGS_IMMUTABLETYPE flag (GH-25520)

Introduce Py_TPFLAGS_IMMUTABLETYPE flag for immutable type objects, and
modify PyType_Ready() to set it for static types.

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-28254: Add a C-API for controlling the GC state (GH-25687)
scoder [Wed, 28 Apr 2021 16:12:16 +0000 (18:12 +0200)] 
bpo-28254: Add a C-API for controlling the GC state (GH-25687)

Add new C-API functions to control the state of the garbage collector:
PyGC_Enable(), PyGC_Disable(), PyGC_IsEnabled(),
corresponding to the functions in the gc module.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-43757: Make pathlib use os.path.realpath() to resolve symlinks in a path (GH...
Barney Gale [Wed, 28 Apr 2021 15:50:17 +0000 (16:50 +0100)] 
bpo-43757: Make pathlib use os.path.realpath() to resolve symlinks in a path (GH-25264)

Also adds a new "strict" argument to realpath() to avoid changing the default behaviour of pathlib while sharing the implementation.

4 years agobpo-41559: Change PEP 612 implementation to pure Python (#25449)
Ken Jin [Wed, 28 Apr 2021 15:38:14 +0000 (23:38 +0800)] 
bpo-41559: Change PEP 612 implementation to pure Python (#25449)

4 years agobpo-43955: Handle the case where the distutils warning has already been triggered...
Steve Dower [Wed, 28 Apr 2021 15:21:55 +0000 (16:21 +0100)] 
bpo-43955: Handle the case where the distutils warning has already been triggered (GH-25675)

4 years agobpo-43959: clarify the documentation of the PyContextVar C-API (GH-25671)
scoder [Wed, 28 Apr 2021 14:03:19 +0000 (16:03 +0200)] 
bpo-43959: clarify the documentation of the PyContextVar C-API (GH-25671)

Automerge-Triggered-By: GH:scoder
4 years agobpo-43961: Fix test_logging.test_namer_rotator_inheritance() (GH-25684)
Victor Stinner [Wed, 28 Apr 2021 13:47:10 +0000 (15:47 +0200)] 
bpo-43961: Fix test_logging.test_namer_rotator_inheritance() (GH-25684)

Fix test_logging.test_namer_rotator_inheritance() on Windows: use
os.replace() rather than os.rename().

4 years agobpo-43962: Fix _PyInterpreterState_IDIncref() (GH-25683)
Victor Stinner [Wed, 28 Apr 2021 11:40:44 +0000 (13:40 +0200)] 
bpo-43962: Fix _PyInterpreterState_IDIncref() (GH-25683)

_PyInterpreterState_IDIncref() now calls
_PyInterpreterState_IDInitref() and always increments id_refcount.

4 years agobpo-43960: test_pdb resets breakpoints (GH-25673)
Irit Katriel [Wed, 28 Apr 2021 10:38:29 +0000 (11:38 +0100)] 
bpo-43960: test_pdb resets breakpoints (GH-25673)

Reset global breakpoint state at the beginning of
test_pdb_next_command_in_generator_for_loop() to make it deterministic.

4 years agobpo-43776: Remove list call from args in Popen repr (GH-25338)
M. Kocher [Wed, 28 Apr 2021 08:16:38 +0000 (01:16 -0700)] 
bpo-43776: Remove list call from args in Popen repr (GH-25338)

Removes the `list` call in the Popen `repr`.

Current implementation:

For cmd = `python --version`,  with `shell=True`.

```bash
<Popen: returncode: None args: ['p', 'y', 't', 'h', 'o', 'n', ' ', '-', '-',...>
```

For `shell=False` and args=`['python', '--version']`, the output is correct:

```bash
<Popen: returncode: None args: ['python', '--version']>
```

With the new changes the `repr`  yields:

For cmd = `python --version`,  with `shell=True`:

```bash
<Popen: returncode: None args: 'python --version'>
```

For `shell=False` and args=`['python', '--version']`, the output:

```bash
<Popen: returncode: None args: ['python', '--version']>
```

Automerge-Triggered-By: GH:gpshead
4 years agobpo-41486: Faster bz2/lzma/zlib via new output buffering (GH-21740)
Ma Lin [Wed, 28 Apr 2021 06:58:54 +0000 (14:58 +0800)] 
bpo-41486: Faster bz2/lzma/zlib via new output buffering (GH-21740)

Faster bz2/lzma/zlib via new output buffering.
Also adds .readall() function to _compression.DecompressReader class
to take best advantage of this in the consume-all-output at once scenario.

Often a 5-20% speedup in common scenarios due to less data copying.

Contributed by Ma Lin.

4 years agobpo-43963: Add _signal module state (GH-25676)
Victor Stinner [Wed, 28 Apr 2021 01:02:55 +0000 (03:02 +0200)] 
bpo-43963: Add _signal module state (GH-25676)

* Add signal_state_t structure and signal_global_state variable.
* Add a module state to the _signal module.
* Move and rename variables:

  * DefaultHandler becomes state->default_handler
  * IgnoreHandler becomes state->ignore_handler
  * sigint_event becomes state->sigint_event
  * ItimerError becomes modstate->itimer_error

* Rename SetHandler() to set_handler() to be consistent with
  get_handler().

4 years agobpo-37751: Update `codecs.register()` doc. (GH-25643)
Inada Naoki [Wed, 28 Apr 2021 00:37:02 +0000 (09:37 +0900)] 
bpo-37751: Update `codecs.register()` doc. (GH-25643)

4 years agobpo-43963: Fix import _signal in subinterpreters (GH-25674)
Victor Stinner [Tue, 27 Apr 2021 23:50:04 +0000 (01:50 +0200)] 
bpo-43963: Fix import _signal in subinterpreters (GH-25674)

Importing the _signal module in a subinterpreter has no longer side
effects.

signal_module_exec() no longer modifies Handlers and no longer attempts
to set SIGINT signal handler in subinterpreters.

4 years agobpo-43957: [Enum] Deprecate ``TypeError`` from containment checks. (GH-25670)
Ethan Furman [Tue, 27 Apr 2021 20:05:08 +0000 (13:05 -0700)] 
bpo-43957: [Enum] Deprecate ``TypeError`` from containment checks. (GH-25670)

In 3.12 ``True`` or ``False`` will be returned for all containment checks,
with ``True`` being returned if the value is either a member of that enum
or one of its members' value.

4 years agobpo-8978: improve tarfile.open error message when lzma / bz2 are missing (GH-24850)
Anthony Sottile [Tue, 27 Apr 2021 17:39:01 +0000 (10:39 -0700)] 
bpo-8978: improve tarfile.open error message when lzma / bz2 are missing (GH-24850)

Automerge-Triggered-By: GH:pablogsal
4 years agoFix generated file name for installer builds on macOS 11+. (GH-25661)
Ned Deily [Tue, 27 Apr 2021 17:23:39 +0000 (13:23 -0400)] 
Fix generated file name for installer builds on macOS 11+. (GH-25661)

4 years agobpo-43492: Update macOS installer to use SQLite 3.35.5 (GH-25640)
Erlend Egeberg Aasland [Tue, 27 Apr 2021 17:19:14 +0000 (19:19 +0200)] 
bpo-43492: Update macOS installer to use SQLite 3.35.5 (GH-25640)

4 years agobpo-43492: Upgrade Windows installer to use SQLite 3.35.5 (GH-25641)
Erlend Egeberg Aasland [Tue, 27 Apr 2021 16:23:53 +0000 (18:23 +0200)] 
bpo-43492: Upgrade Windows installer to use SQLite 3.35.5 (GH-25641)

4 years agobpo-43864: Silence deprecation warning in test_importlib.test_module_found and test_i...
Shreyan Avigyan [Tue, 27 Apr 2021 15:56:08 +0000 (21:26 +0530)] 
bpo-43864: Silence deprecation warning in test_importlib.test_module_found and test_importlib.test_module_not_found (GH-25656)

4 years agobpo-43766: Fix TypeGuard docs (#25660)
Ken Jin [Tue, 27 Apr 2021 15:55:08 +0000 (23:55 +0800)] 
bpo-43766: Fix TypeGuard docs (#25660)

4 years agobpo-43766: Implement PEP 647 (User-Defined Type Guards) in typing.py (#25282)
Ken Jin [Tue, 27 Apr 2021 14:31:04 +0000 (22:31 +0800)] 
bpo-43766: Implement PEP 647 (User-Defined Type Guards) in typing.py (#25282)

4 years agobpo-43312: Functions returning default and preferred sysconfig schemes (GH-24644)
Tzu-ping Chung [Tue, 27 Apr 2021 08:45:55 +0000 (16:45 +0800)] 
bpo-43312: Functions returning default and preferred sysconfig schemes (GH-24644)

4 years agoFix thread locks in zlib module may go wrong in rare case. (#22126)
Ma Lin [Tue, 27 Apr 2021 08:37:11 +0000 (16:37 +0800)] 
Fix thread locks in zlib module may go wrong in rare case. (#22126)

Setting `next_in` before acquiring the thread lock may mix up compress/decompress state in other threads.

4 years agobpo-43651: Fix EncodingWarning in fileinput and its test (GH-25648)
Inada Naoki [Tue, 27 Apr 2021 06:47:16 +0000 (15:47 +0900)] 
bpo-43651: Fix EncodingWarning in fileinput and its test (GH-25648)

4 years agobpo-43651: Fix EncodingWarning in zipfile (GH-25650)
Inada Naoki [Tue, 27 Apr 2021 06:45:31 +0000 (15:45 +0900)] 
bpo-43651: Fix EncodingWarning in zipfile (GH-25650)

4 years agobpo-43945: [Enum] Deprecate non-standard mixin format() behavior (GH-25649)
Ethan Furman [Tue, 27 Apr 2021 05:42:57 +0000 (22:42 -0700)] 
bpo-43945: [Enum] Deprecate non-standard mixin format() behavior (GH-25649)

In 3.12 the enum member, not the member's value, will be used for
format() calls.  Format specifiers can be used to retain the current
display of enum members:

Example enumeration:

    class Color(IntEnum):
        RED = 1
        GREEN = 2
        BLUE = 3

Current behavior:

    f'{Color.RED}'  -->  '1'

Future behavior:

    f'{Color.RED}'  --> 'RED'

Using d specifier:

    f'{Color.RED:d}'  --> '1'

Using specifiers can be done now and is future-compatible.

4 years agobpo-43651: PEP 597: Fix `socket.makefile()` (GH-25645)
Inada Naoki [Tue, 27 Apr 2021 04:16:28 +0000 (13:16 +0900)] 
bpo-43651: PEP 597: Fix `socket.makefile()` (GH-25645)

4 years ago[doc] Remove duplicated operator.itemgetter example (GH-24178)
Andre Delfino [Tue, 27 Apr 2021 04:15:31 +0000 (01:15 -0300)] 
[doc] Remove duplicated operator.itemgetter example (GH-24178)

* Remove duplicated itemgetter example
* Add spaces

4 years agobpo-43651: Fix EncodingWarning in `pydoc`. (GH-25644)
Inada Naoki [Tue, 27 Apr 2021 03:46:20 +0000 (12:46 +0900)] 
bpo-43651: Fix EncodingWarning in `pydoc`. (GH-25644)

4 years agobpo-38530: Require 50% similarity in NameError and AttributeError suggestions (GH...
Dennis Sweeney [Tue, 27 Apr 2021 00:22:27 +0000 (20:22 -0400)] 
bpo-38530: Require 50% similarity in NameError and AttributeError suggestions (GH-25584)

4 years agobpo-43762: Add audit events for loading of sqlite3 extensions (GH-25246)
Erlend Egeberg Aasland [Mon, 26 Apr 2021 23:16:46 +0000 (01:16 +0200)] 
bpo-43762: Add audit events for loading of sqlite3 extensions (GH-25246)

4 years agoUse the zero argument form of super() in examples for Python3 docs. (GH-22314)
Andre Delfino [Mon, 26 Apr 2021 22:13:54 +0000 (19:13 -0300)] 
Use the zero argument form of super() in examples for Python3 docs. (GH-22314)

4 years agobpo-40432: Use python 3.8 or higher to compile CPython on Windows (#25389)
Ken Jin [Mon, 26 Apr 2021 19:11:43 +0000 (03:11 +0800)] 
bpo-40432: Use python 3.8 or higher to compile CPython on Windows (#25389)

4 years agobpo-43938: improve dataclasses.FrozenInstanceError documentation (GH-25603)
Llandy Riveron Del Risco [Mon, 26 Apr 2021 18:53:28 +0000 (20:53 +0200)] 
bpo-43938: improve dataclasses.FrozenInstanceError documentation (GH-25603)

4 years agobpo-42904: Change search order of typing.get_type_hints eval (#25632)
Ken Jin [Mon, 26 Apr 2021 17:31:21 +0000 (01:31 +0800)] 
bpo-42904: Change search order of typing.get_type_hints eval (#25632)

While surprising (searching globals before locals in one specific case), this is needed for backwards compatibility.

4 years agoAdd additional keyword-only tests. (GH-25633)
Eric V. Smith [Mon, 26 Apr 2021 17:14:28 +0000 (13:14 -0400)] 
Add additional keyword-only tests. (GH-25633)

4 years agoDoc: Fix the array.fromfile method doc (GH-22037)
Adorilson Bezerra [Mon, 26 Apr 2021 14:19:21 +0000 (11:19 -0300)] 
Doc: Fix the array.fromfile method doc (GH-22037)

The check about the f argument type was removed in this commit:
https://github.com/python/cpython/commit/2c94aa567e525c82041ad68a3174d8c3acbf37e2

Thanks for Pedro Arthur Duarte (pedroarthur.jedi at gmail.com) by the help with
this bug.

4 years agobpo-43466: Link with libz in PY_UNSUPPORTED_OPENSSL_BUILD path (GH-25587)
Christian Heimes [Mon, 26 Apr 2021 13:13:34 +0000 (15:13 +0200)] 
bpo-43466: Link with libz in PY_UNSUPPORTED_OPENSSL_BUILD path (GH-25587)

Some OpenSSL build flavors need libz for compression support.

4 years agobpo-18233: Add internal methods to access peer chain (GH-25467)
Christian Heimes [Mon, 26 Apr 2021 13:01:40 +0000 (15:01 +0200)] 
bpo-18233: Add internal methods to access peer chain (GH-25467)

The internal `_ssl._SSLSocket` object now provides methods to retrieve
the peer cert chain and verified cert chain as a list of Certificate
objects. Certificate objects have methods to convert the cert to a dict,
PEM, or DER (ASN.1).

These are private APIs for now. There is a slim chance to stabilize the
approach and provide a public API for 3.10. Otherwise I'll provide a
stable API in 3.11.

Signed-off-by: Christian Heimes <christian@python.org>
4 years agobpo-38820: Old OpenSSL 3.0.0 releases are in /old/3.0/ (GH-25624)
Christian Heimes [Mon, 26 Apr 2021 08:54:12 +0000 (10:54 +0200)] 
bpo-38820: Old OpenSSL 3.0.0 releases are in /old/3.0/ (GH-25624)

Signed-off-by: Christian Heimes <christian@python.org>
4 years agoUpdate asyncio-subprocess.rst (GH-21680)
Gabriel R F [Mon, 26 Apr 2021 04:38:16 +0000 (01:38 -0300)] 
Update asyncio-subprocess.rst (GH-21680)

4 years agodocumentation: clarification about the function remove in os library (GH-19024)
Etienne Gautier [Mon, 26 Apr 2021 04:21:50 +0000 (06:21 +0200)] 
documentation: clarification about the function remove in os library (GH-19024)

4 years agoFix documentation typos of argparse exit_on_error (GH-22706)
Taneli Hukkinen [Mon, 26 Apr 2021 04:04:26 +0000 (06:04 +0200)] 
Fix documentation typos of argparse exit_on_error (GH-22706)

4 years agoQuick pydoc update to smtplib.py (GH-22292)
uy-rrodriguez [Mon, 26 Apr 2021 01:56:37 +0000 (02:56 +0100)] 
Quick pydoc update to smtplib.py (GH-22292)

Fixing minor mistake in the quotes around a couple of arguments for the constructor of the class `SMTP`, in smtplib.py.

4 years agoFix id of 'Internet Message Format' RFC in email doc (GH-24137)
Denis Laxalde [Mon, 26 Apr 2021 01:38:12 +0000 (03:38 +0200)] 
Fix id of 'Internet Message Format' RFC in email doc (GH-24137)

Previous ID (5233) refers to "Sieve Email Filtering: Subaddress
Extension". It seems that the actual reference should be "Internet
Message Format" RFC 5322 (https://tools.ietf.org/html/rfc5322).

(The typo probably comes from commit 29d1bc0842 in which the ID of
this RFC got updated from the obsolete 2822.)

Co-authored-by: Ambrose Chua <ambrose@hey.com>
4 years agoFix copy.Error casing in documentation GH-22004
Andre Delfino [Mon, 26 Apr 2021 01:22:28 +0000 (22:22 -0300)] 
Fix copy.Error casing in documentation GH-22004

4 years agoFix broken links and improve stand-alone tools list in FAQ GH-22124
Andre Delfino [Mon, 26 Apr 2021 01:10:05 +0000 (22:10 -0300)] 
Fix broken links and improve stand-alone tools list in FAQ GH-22124

4 years agoAdd keyword-only fields to dataclasses. (GH=25608)
Eric V. Smith [Mon, 26 Apr 2021 00:42:39 +0000 (20:42 -0400)] 
Add keyword-only fields to dataclasses. (GH=25608)

4 years agoRemove mention of dst parameter from description of os.lstat() (GH-24704)
Sergey Fedoseev [Sun, 25 Apr 2021 21:24:41 +0000 (02:24 +0500)] 
Remove mention of dst parameter from description of os.lstat() (GH-24704)

It looks like it was accidentally copy-pasted in
6fa7aada9bd3616e0beeb266e818497b2ec1c859.

4 years agoFix a typo in datamodel reference document (GH-24930)
Géry Ogam [Sun, 25 Apr 2021 21:13:19 +0000 (23:13 +0200)] 
Fix a typo in datamodel reference document (GH-24930)

4 years agobpo-38605: Update __future__ module doc as `annotations` is now "mandatory in 3.11...
Saiyang Gou [Sun, 25 Apr 2021 19:49:26 +0000 (12:49 -0700)] 
bpo-38605: Update __future__ module doc as `annotations` is now "mandatory in 3.11" (GH-25602)

4 years agofix typo in warning (#20620)
Allen [Sun, 25 Apr 2021 17:45:05 +0000 (13:45 -0400)] 
fix typo in warning (#20620)

* Add space after period to warning in _tzpath.py

Currently:
InvalidTZPathWarning: Invalid paths specified in PYTHONTZPATH environment variable.Paths should be absolute but found the following relative paths: ...

* Update _tzpath.py

4 years agoBaseHTTPRequestHandler, that path includes query (#25597)
Senthil Kumaran [Sun, 25 Apr 2021 17:08:29 +0000 (10:08 -0700)] 
BaseHTTPRequestHandler, that path includes query (#25597)

* Clarify, for BaseHTTPRequestHandler, that path includes query

Co-authored-by: David Jones <drj@pobox.com>
4 years agoSet the release for `__future__.annotations` to 3.11 (#25596)
Anthony Sottile [Sun, 25 Apr 2021 16:09:24 +0000 (09:09 -0700)] 
Set the release for `__future__.annotations` to 3.11 (#25596)

4 years agobpo-43534: Fix the turtle module working with multiple root windows (GH-25591)
Serhiy Storchaka [Sun, 25 Apr 2021 14:49:32 +0000 (17:49 +0300)] 
bpo-43534: Fix the turtle module working with multiple root windows (GH-25591)

4 years agobpo-38490: statistics: Add covariance, Pearson's correlation, and simple linear regre...
Tymoteusz Wołodźko [Sun, 25 Apr 2021 11:45:09 +0000 (13:45 +0200)] 
bpo-38490: statistics: Add covariance, Pearson's correlation, and simple linear regression (#16813)

Co-authored-by: Tymoteusz Wołodźko <twolodzko+gitkraken@gmail.com
4 years agobpo-39529: Deprecate creating new event loop in asyncio.get_event_loop() (GH-23554)
Serhiy Storchaka [Sun, 25 Apr 2021 10:40:44 +0000 (13:40 +0300)] 
bpo-39529: Deprecate creating new event loop in asyncio.get_event_loop() (GH-23554)

asyncio.get_event_loop() emits now a deprecation warning when it creates a new event loop.
In future releases it will became an alias of asyncio.get_running_loop().

4 years agobpo-42609: Check recursion depth in the AST validator and optimizer (GH-23744)
Serhiy Storchaka [Sun, 25 Apr 2021 10:38:00 +0000 (13:38 +0300)] 
bpo-42609: Check recursion depth in the AST validator and optimizer (GH-23744)

4 years agobpo-43534: Make dialogs in turtle.textinput() and turtle.numinput() transitient again...
Serhiy Storchaka [Sun, 25 Apr 2021 10:16:49 +0000 (13:16 +0300)] 
bpo-43534: Make dialogs in turtle.textinput() and turtle.numinput() transitient again (GH-24923)

4 years agobpo-43655: Tkinter and IDLE dialog windows are now recognized as dialogs by window...
Serhiy Storchaka [Sun, 25 Apr 2021 10:07:58 +0000 (13:07 +0300)] 
bpo-43655: Tkinter and IDLE dialog windows are now recognized as dialogs by window managers on macOS and X Window (#25187)

4 years agobpo-42737: annotations with complex targets no longer causes any runtime effects...
Batuhan Taskaya [Sun, 25 Apr 2021 02:31:20 +0000 (05:31 +0300)] 
bpo-42737: annotations with complex targets no longer causes any runtime effects (GH-23952)

4 years agobpo-43930: Update bundled pip to 21.1 and setuptools to 56.0.0 (GH-25576)
Stéphane Bidoul [Sat, 24 Apr 2021 16:21:50 +0000 (18:21 +0200)] 
bpo-43930: Update bundled pip to 21.1 and setuptools to 56.0.0 (GH-25576)

Update bundled pip to 21.1 and setuptools to 56.0.0

4 years agobpo-43780: Sync with importlib_metadata 3.10 (GH-25297)
Jason R. Coombs [Sat, 24 Apr 2021 14:13:51 +0000 (10:13 -0400)] 
bpo-43780: Sync with importlib_metadata 3.10 (GH-25297)

* bpo-43780: Sync with importlib_metadata 3.10.

* Add blurb

* Apply changes from importlib_metadata 3.10.1.

4 years agobpo-43921: also accept EOF in post-handshake auth test (GH-25574)
Christian Heimes [Sat, 24 Apr 2021 13:08:13 +0000 (15:08 +0200)] 
bpo-43921: also accept EOF in post-handshake auth test (GH-25574)

4 years agobpo-41282: Consistent message and filter warning in setup.py (GH-25571)
Christian Heimes [Sat, 24 Apr 2021 07:55:15 +0000 (09:55 +0200)] 
bpo-41282: Consistent message and filter warning in setup.py (GH-25571)

Signed-off-by: Christian Heimes <christian@python.org>
4 years agobpo-37322: Fix ResourceWarning and exception handling in test (GH-25553)
Christian Heimes [Sat, 24 Apr 2021 07:17:54 +0000 (09:17 +0200)] 
bpo-37322: Fix ResourceWarning and exception handling in test (GH-25553)

Revert 73ea546, increase logging, and improve stability of test.

Handle all OSErrors in a single block. OSError also takes care of
SSLError and socket's connection errors.

Partly reverts commit fb7e750. The
threaded connection handler must not raise an unhandled exception.

4 years agobpo-31870: Fix test_get_server_certificate_timeout on Windows (GH-25570)
Christian Heimes [Sat, 24 Apr 2021 05:54:08 +0000 (07:54 +0200)] 
bpo-31870: Fix test_get_server_certificate_timeout on Windows (GH-25570)

Some OS do not support millisecond granularity in select(). Use 100ms
timeout and a server callback with sleep to emulate a slow server.

4 years agobpo-31870: Add a timeout parameter to ssl.get_server_certificate() (GH-22270)
Zackery Spytz [Sat, 24 Apr 2021 04:46:01 +0000 (22:46 -0600)] 
bpo-31870: Add a timeout parameter to ssl.get_server_certificate() (GH-22270)

4 years agobpo-38659: [Enum] do not check '_inverted_' during simple test (GH-25566)
Ethan Furman [Sat, 24 Apr 2021 02:08:22 +0000 (19:08 -0700)] 
bpo-38659: [Enum] do not check '_inverted_' during simple test (GH-25566)

Depending on usage, it's possible for Flag members to have the _inverted_ attribute when they are testing, while the Flag being testing against will not have that attribute on its members -- so skip that comparison.

4 years agoRestrict GITHUB_TOKEN permissions for the 'stale' workflow (GH-25564)
Brett Cannon [Fri, 23 Apr 2021 22:18:50 +0000 (15:18 -0700)] 
Restrict GITHUB_TOKEN permissions for the 'stale' workflow (GH-25564)

It should only need write-level permissions to pull requests.

4 years agobpo-30555: Fix WindowsConsoleIO fails in the presence of fd redirection (GH-1927)
Segev Finer [Fri, 23 Apr 2021 22:00:27 +0000 (01:00 +0300)] 
bpo-30555: Fix WindowsConsoleIO fails in the presence of fd redirection (GH-1927)

This works by not caching the handle and instead getting the handle from
the file descriptor each time, so that if the actual handle changes by
fd redirection closing/opening the console handle beneath our feet, we
will keep working correctly.

4 years agobop-43652: Update Tcl and Tk to 8.6.11 in Windows installer (GH-25170)
Terry Jan Reedy [Fri, 23 Apr 2021 21:40:42 +0000 (17:40 -0400)] 
bop-43652: Update Tcl and Tk to 8.6.11 in Windows installer (GH-25170)

4 years agoSilence find_module() DeprecationWarning on Windows tests (GH-25563)
Brett Cannon [Fri, 23 Apr 2021 21:40:18 +0000 (14:40 -0700)] 
Silence find_module() DeprecationWarning on Windows tests (GH-25563)

4 years agobpo-43907: add missing memoize call in pure python pickling of bytearray (GH-25501)
Carl Friedrich Bolz-Tereick [Fri, 23 Apr 2021 21:27:14 +0000 (23:27 +0200)] 
bpo-43907: add missing memoize call in pure python pickling of bytearray (GH-25501)

4 years agobpo-39950: add `pathlib.Path.hardlink_to()` method that supersedes `link_to()` (GH...
Barney Gale [Fri, 23 Apr 2021 20:48:52 +0000 (21:48 +0100)] 
bpo-39950: add `pathlib.Path.hardlink_to()` method that supersedes `link_to()` (GH-18909)

The argument order of `link_to()` is reversed compared to what one may expect, so:

    a.link_to(b)

Might be expected to create *a* as a link to *b*, in fact it creates *b* as a link to *a*, making it function more like a "link from". This doesn't match `symlink_to()` nor the documentation and doesn't seem to be the original author's intent.

This PR deprecates `link_to()` and introduces `hardlink_to()`, which has the same argument order as `symlink_to()`.

4 years agobpo-43921: ignore failing test_wrong_cert_tls13 on Windows (GH-25561)
Christian Heimes [Fri, 23 Apr 2021 18:03:25 +0000 (20:03 +0200)] 
bpo-43921: ignore failing test_wrong_cert_tls13 on Windows (GH-25561)

test_wrong_cert_tls13 sometimes fails on some Windows buildbots. Turn
failing test case into skipped test case until we have more time to
investigate.

Signed-off-by: Christian Heimes <christian@python.org>
4 years agobpo-43538: Add extra arguments to os.startfile (GH-25538)
Steve Dower [Fri, 23 Apr 2021 17:03:17 +0000 (18:03 +0100)] 
bpo-43538: Add extra arguments to os.startfile (GH-25538)