]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-44273: Improve syntax error message for assigning to "..." (GH-26477)
Serhiy Storchaka [Tue, 1 Jun 2021 11:07:05 +0000 (14:07 +0300)] 
bpo-44273: Improve syntax error message for assigning to "..." (GH-26477)

Use "ellipsis" instead of "Ellipsis" in syntax error messages to eliminate confusion with built-in variable Ellipsis.

4 years agobpo-42972: Track sqlite3 statement objects (GH-26475)
Erlend Egeberg Aasland [Tue, 1 Jun 2021 10:47:37 +0000 (12:47 +0200)] 
bpo-42972: Track sqlite3 statement objects (GH-26475)

Allocate and track statement objects in pysqlite_statement_create.

By allocating and tracking creation of statement object in
pysqlite_statement_create(), the caller does not need to worry about GC
syncronization, and eliminates the possibility of getting a badly
created object. All related fault handling is moved to
pysqlite_statement_create().

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-44260: Do not read system entropy without need in Random() (GH-26455)
Serhiy Storchaka [Mon, 31 May 2021 20:24:20 +0000 (23:24 +0300)] 
bpo-44260: Do not read system entropy without need in Random() (GH-26455)

4 years agobpo-44246: Remove note about access by index now that a compatibility shim is offered...
Jason R. Coombs [Mon, 31 May 2021 16:29:24 +0000 (12:29 -0400)] 
bpo-44246: Remove note about access by index now that a compatibility shim is offered. (GH-26472)

4 years agobpo-44246: Restore compatibility in entry_points (GH-26468)
Jason R. Coombs [Mon, 31 May 2021 16:19:42 +0000 (12:19 -0400)] 
bpo-44246: Restore compatibility in entry_points (GH-26468)

* bpo-44246: Entry points performance improvements.

From importlib_metadata 4.3.1.

* bpo-44246: Sync with importlib_metadata 4.4

4 years agobpo-44246: Entry points performance improvements. (GH-26467)
Jason R. Coombs [Mon, 31 May 2021 15:52:29 +0000 (11:52 -0400)] 
bpo-44246: Entry points performance improvements. (GH-26467)

From importlib_metadata 4.3.1.

4 years agobpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464)
Victor Stinner [Mon, 31 May 2021 11:10:31 +0000 (13:10 +0200)] 
bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464)

* _testcapi.heapgctype: implement a traverse function since the type
  is defined with Py_TPFLAGS_HAVE_GC.
* _decimal: PyDecSignalDictMixin_Type is no longer defined with
  Py_TPFLAGS_HAVE_GC since it has no traverse function.

4 years agobpo-42972: Fix sqlite3 traverse/clear functions (GH-26452)
Erlend Egeberg Aasland [Mon, 31 May 2021 08:24:56 +0000 (10:24 +0200)] 
bpo-42972: Fix sqlite3 traverse/clear functions (GH-26452)

4 years agobpo-42972: Fully implement GC protocol for xxlimited (GH-26451)
Hai Shi [Mon, 31 May 2021 07:51:19 +0000 (15:51 +0800)] 
bpo-42972: Fully implement GC protocol for xxlimited (GH-26451)

4 years agoFixing typos in turtle.rst (GH-24385)
Jules Lasne [Sun, 30 May 2021 16:35:30 +0000 (18:35 +0200)] 
Fixing typos in turtle.rst (GH-24385)

* Fixing typos in turtle.rst

* Update turtle.rst

* Update turtle.rst

* Update turtle.rst

* Update turtle.rst

4 years agobpo-44235: Remove deprecated functions in the gettext module. (GH-26378)
Dong-hee Na [Sun, 30 May 2021 01:29:45 +0000 (10:29 +0900)] 
bpo-44235: Remove deprecated functions in the gettext module. (GH-26378)

4 years agoTrivial change in fractions module docs: real -> rational numbers (GH-25009)
Sergey B Kirpichev [Sat, 29 May 2021 22:49:31 +0000 (01:49 +0300)] 
Trivial change in fractions module docs: real -> rational numbers (GH-25009)

Obviously, the former was a little misleading: not only rationals
may be considered as "infinite-precision, real numbers" - but, for
example, any real finite extension of the rationals.

4 years agobpo-43750: Fix incorrect reference to PACKET_MULTIHOST in the docs (GH-25241)
Zackery Spytz [Sat, 29 May 2021 22:46:01 +0000 (15:46 -0700)] 
bpo-43750: Fix incorrect reference to PACKET_MULTIHOST in the docs (GH-25241)

It should be PACKET_MULTICAST, not PACKET_MULTIHOST.

4 years agobpo-42085: [docs] Add versionadded for am_send in type object documentation (GH-25465)
Martmists [Sat, 29 May 2021 20:30:27 +0000 (22:30 +0200)] 
bpo-42085: [docs] Add versionadded for am_send in type object documentation (GH-25465)

4 years agobpo-44254: On Mac, remove disfunctional colors from turtledemo buttons (GH-26448)
Terry Jan Reedy [Sat, 29 May 2021 07:19:50 +0000 (03:19 -0400)] 
bpo-44254: On Mac, remove disfunctional colors from turtledemo buttons (GH-26448)

On macOS, tk defers to system setting for button background when in normal state.
Give turtledemo button text a color that works on either light or dark background.

4 years agobpo-44263: Mention PyType_Ready in the gc protocol warning (GH-26445)
Pablo Galindo [Sat, 29 May 2021 03:32:42 +0000 (04:32 +0100)] 
bpo-44263: Mention PyType_Ready in the gc protocol warning (GH-26445)

4 years agobpo-44263: Better explain the GC contract for PyType_FromSpecWithBases (GH-26442)
Pablo Galindo [Sat, 29 May 2021 02:57:39 +0000 (03:57 +0100)] 
bpo-44263: Better explain the GC contract for PyType_FromSpecWithBases (GH-26442)

4 years agoRemove duplicate mime type mapping .bmp -> image/x-ms-bmp (GH-26300)
Andreas Jansson [Sat, 29 May 2021 01:20:46 +0000 (18:20 -0700)] 
Remove duplicate mime type mapping .bmp -> image/x-ms-bmp (GH-26300)

Thanks for the contribution @andreasjansson

4 years agoFix MSVC compiler warnings in dictobject.c (GH-26432)
Mark Shannon [Sat, 29 May 2021 00:40:12 +0000 (01:40 +0100)] 
Fix MSVC compiler warnings in dictobject.c (GH-26432)

4 years agobpo-44252: Correctly implement gc support for SSLError objects (GH-26439)
Pablo Galindo [Fri, 28 May 2021 23:29:52 +0000 (00:29 +0100)] 
bpo-44252: Correctly implement gc support for SSLError objects (GH-26439)

4 years agobpo-44206: Fix compiler warnings in dictobject.c (GH-26440)
Pablo Galindo [Fri, 28 May 2021 23:14:33 +0000 (00:14 +0100)] 
bpo-44206: Fix compiler warnings in dictobject.c (GH-26440)

4 years agoFix dataclass comment typo _eq__ -> __eq__ (GH-26433)
Sean Grady [Fri, 28 May 2021 20:57:18 +0000 (13:57 -0700)] 
Fix dataclass comment typo _eq__ -> __eq__ (GH-26433)

4 years agobpo-44045: fix spelling of uppercase vs upper-case (GH-25985)
Jürgen Gmach [Fri, 28 May 2021 20:54:25 +0000 (22:54 +0200)] 
bpo-44045: fix spelling of uppercase vs upper-case (GH-25985)

And also of lowercase vs lower-case.

The `-` notation should only be used for adjectives.

4 years agobpo-44249: Fix 3 README.rst typos (GH-26385)
Ayush Parikh [Fri, 28 May 2021 19:52:00 +0000 (01:22 +0530)] 
bpo-44249: Fix 3 README.rst typos (GH-26385)

4 years agobpo-42972: Fix GC assertion error in _winapi by untracking Overlapped earlier (GH...
Ken Jin [Fri, 28 May 2021 16:29:19 +0000 (00:29 +0800)] 
bpo-42972: Fix GC assertion error in _winapi by untracking Overlapped earlier (GH(26429)

4 years agobpo-42972: Fully support GC for _winapi.Overlapped (GH-26381)
Ken Jin [Fri, 28 May 2021 09:06:46 +0000 (17:06 +0800)] 
bpo-42972: Fully support GC for _winapi.Overlapped (GH-26381)

4 years agobpo-42972: Fully implement GC protocol for functools LRU cache (GH-26423)
Erlend Egeberg Aasland [Fri, 28 May 2021 09:02:42 +0000 (11:02 +0200)] 
bpo-42972: Fully implement GC protocol for functools LRU cache (GH-26423)

4 years agobpo-44206: Add a version number to dictionary keys (GH-26333)
Mark Shannon [Fri, 28 May 2021 08:54:10 +0000 (09:54 +0100)] 
bpo-44206: Add a version number to dictionary keys (GH-26333)

* Store log2(size) instead of size in dict-keys.

* Use enum instead of function pointer to record kind of keys.

* Add version number to dict keys.

4 years agobpo-42972: Fully implement GC protocol for functools keywrapper and partial types...
Erlend Egeberg Aasland [Fri, 28 May 2021 08:41:16 +0000 (10:41 +0200)] 
bpo-42972: Fully implement GC protocol for functools keywrapper and partial types (GH-26363)

4 years agobpo-41611: IDLE: Catch TclError exceptions in AutoCompleteWindow.winconfig_event...
Tal Einat [Fri, 28 May 2021 06:07:21 +0000 (09:07 +0300)] 
bpo-41611: IDLE: Catch TclError exceptions in AutoCompleteWindow.winconfig_event() (GH-26404)

Since the <Configure> event may occur after the
completion window is gone, catch potential
TclError exceptions when accessing acw.

4 years agobpo-44256: Do not expose _functools._list_elem_type (GH-26416)
Inada Naoki [Fri, 28 May 2021 05:09:32 +0000 (14:09 +0900)] 
bpo-44256: Do not expose _functools._list_elem_type (GH-26416)

It is internal use only type.

4 years agobpo-44246: Update What's New for importlib.metadata. (#26408)
Jason R. Coombs [Thu, 27 May 2021 23:36:06 +0000 (19:36 -0400)] 
bpo-44246: Update What's New for importlib.metadata. (#26408)

* bpo-44246: Update What's New for importlib.metadata.

Bump version of importlib_metadata included.
Add note about compatibility notice and fix link to entry_points documentation.
Add note about removal of access by index on Distribution.entry_points.

* Fix syntax mistake in issue reference.

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* Fix broken reference in entry-points.

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-43916: Use test.support.check_disallow_instantiation() in test_tcl (GH-26412)
Erlend Egeberg Aasland [Thu, 27 May 2021 21:00:26 +0000 (23:00 +0200)] 
bpo-43916: Use test.support.check_disallow_instantiation() in test_tcl (GH-26412)

4 years agobpo-42972: Fully support GC protocol for _operator heap types (GH-26371)
Erlend Egeberg Aasland [Thu, 27 May 2021 20:59:07 +0000 (22:59 +0200)] 
bpo-42972: Fully support GC protocol for _operator heap types (GH-26371)

4 years agobpo-42972: Fully implement GC protocol for re types (GH-26368)
Erlend Egeberg Aasland [Thu, 27 May 2021 17:23:07 +0000 (19:23 +0200)] 
bpo-42972: Fully implement GC protocol for re types (GH-26368)

4 years agobpo-43667: Add news fragment for Solaris changes (GH-26405)
Jakub Kulík [Thu, 27 May 2021 17:08:16 +0000 (19:08 +0200)] 
bpo-43667: Add news fragment for Solaris changes (GH-26405)

4 years agobpo-43693: Add _PyCode_New(). (gh-26375)
Eric Snow [Thu, 27 May 2021 15:54:34 +0000 (09:54 -0600)] 
bpo-43693: Add _PyCode_New(). (gh-26375)

This is an internal-only API that helps us manage the many values used to create a code object.

https://bugs.python.org/issue43693

4 years agobpo-42972: Fully support GC for mmap heap types (GH-26373)
Erlend Egeberg Aasland [Thu, 27 May 2021 15:53:59 +0000 (17:53 +0200)] 
bpo-42972: Fully support GC for mmap heap types (GH-26373)

4 years agobpo-42972: Fully support GC protocol for _queue.SimpleQueue (GH-26372)
Erlend Egeberg Aasland [Thu, 27 May 2021 15:50:12 +0000 (17:50 +0200)] 
bpo-42972: Fully support GC protocol for _queue.SimpleQueue (GH-26372)

4 years agobpo-41611: IDLE: fix freezing on completion on macOS (GH-26400)
Tal Einat [Thu, 27 May 2021 14:29:55 +0000 (17:29 +0300)] 
bpo-41611: IDLE: fix freezing on completion on macOS (GH-26400)

4 years agobpo-43988: Document test.support.check_disallow_instantiation() (GH-26394)
Erlend Egeberg Aasland [Thu, 27 May 2021 10:55:38 +0000 (12:55 +0200)] 
bpo-43988: Document test.support.check_disallow_instantiation() (GH-26394)

4 years agobpo-42972: Fully implement GC protocol for ssl heap types (GH-26370)
Erlend Egeberg Aasland [Thu, 27 May 2021 07:50:09 +0000 (09:50 +0200)] 
bpo-42972: Fully implement GC protocol for ssl heap types (GH-26370)

4 years agobpo-42972: Fully support GC for hashlib heap types (GH-26374)
Erlend Egeberg Aasland [Thu, 27 May 2021 07:48:19 +0000 (09:48 +0200)] 
bpo-42972: Fully support GC for hashlib heap types (GH-26374)

4 years agobpo-42972: Fully support GC for pyexpat, unicodedata, and dbm/gdbm heap types (GH...
Erlend Egeberg Aasland [Thu, 27 May 2021 07:29:00 +0000 (09:29 +0200)] 
bpo-42972: Fully support GC for pyexpat, unicodedata, and dbm/gdbm heap types (GH-26376)

* bpo-42972: pyexpat
* bpo-42972: unicodedata
* bpo-42972: dbm/gdbm

4 years agobpo-43988: Use check disallow instantiation helper (GH-26392)
Erlend Egeberg Aasland [Thu, 27 May 2021 06:43:52 +0000 (08:43 +0200)] 
bpo-43988: Use check disallow instantiation helper (GH-26392)

4 years agobpo-42161: mathmodule.c: move _PyLong_GetOne() loop invariant (GH-26391)
Victor Stinner [Wed, 26 May 2021 22:51:07 +0000 (00:51 +0200)] 
bpo-42161: mathmodule.c: move _PyLong_GetOne() loop invariant (GH-26391)

Move _PyLong_GetZero() and _PyLong_GetOne() loop invariants outside
loops in functions:

* math.comb()
* math.gcd()
* math.lcm()
* math.perm()

4 years agobpo-42392: [docs] Add deprecated-removed loop labels for asyncio (GH-26357)
Ken Jin [Wed, 26 May 2021 21:59:34 +0000 (05:59 +0800)] 
bpo-42392: [docs] Add deprecated-removed loop labels for asyncio (GH-26357)

* Add deprecated-removed loop labels for all reelvant functions/classes in asyncio

4 years agobpo-38693: Prefer f-strings in importlib.resources (importlib_resources 5.0.6). ...
Jason R. Coombs [Wed, 26 May 2021 20:16:11 +0000 (16:16 -0400)] 
bpo-38693: Prefer f-strings in importlib.resources (importlib_resources 5.0.6). (GH-26387)

Automerge-Triggered-By: GH:jaraco
4 years agobpo-43693: Clean up the PyCodeObject fields. (GH-26364)
Eric Snow [Wed, 26 May 2021 19:15:40 +0000 (13:15 -0600)] 
bpo-43693: Clean up the PyCodeObject fields. (GH-26364)

* Move up the comment about fields using in hashing/comparision.

* Group the fields more clearly.

* Add co_ncellvars and co_nfreevars.

* Raise ValueError if nlocals != len(varnames), rather than aborting.

4 years agobpo-38693: importlib.metadata f-strings (GH-26383)
Jason R. Coombs [Wed, 26 May 2021 18:49:06 +0000 (14:49 -0400)] 
bpo-38693: importlib.metadata f-strings (GH-26383)

Automerge-Triggered-By: GH:jaraco
4 years agobpo-44241: Incorporate changes from importlib_metadata 4.1. (#26382)
Jason R. Coombs [Wed, 26 May 2021 17:40:05 +0000 (13:40 -0400)] 
bpo-44241: Incorporate changes from importlib_metadata 4.1. (#26382)

4 years agobpo-43879: Add native_thread_id field to PyThreadState (GH-25458)
Gabriele N. Tornetta [Wed, 26 May 2021 14:40:14 +0000 (15:40 +0100)] 
bpo-43879: Add native_thread_id field to PyThreadState (GH-25458)

4 years agobpo-43988: Add test.support.check_disallow_instantiation() (GH-25757)
Erlend Egeberg Aasland [Wed, 26 May 2021 14:15:27 +0000 (16:15 +0200)] 
bpo-43988: Add test.support.check_disallow_instantiation() (GH-25757)

4 years agobpo-41147: [doc] contextlib.redirect_stdout() provides the new stream as context...
Peter Law [Wed, 26 May 2021 14:13:09 +0000 (15:13 +0100)] 
bpo-41147: [doc] contextlib.redirect_stdout() provides the new stream as context var (GH-21199)

4 years agobpo-44222: Improve _removeHandlerRef() for a very long _handlerList (GH-26325)
Yonatan Goldschmidt [Tue, 25 May 2021 22:40:23 +0000 (01:40 +0300)] 
bpo-44222: Improve _removeHandlerRef() for a very long _handlerList (GH-26325)

The list lookups become a big burden for very long lists.
This patch changes the "happy flow" path of 2 lookups into 1 lookup.

Automerge-Triggered-By: GH:vsajip
4 years agoCorrect minor spelling typos (GH-26339)
Jero Bado [Tue, 25 May 2021 21:01:30 +0000 (05:01 +0800)] 
Correct minor spelling typos (GH-26339)

surroundeded to surrounded
extensins to extensions

4 years agoFix typo in NEWS. (GH-26346)
Mariusz Felisiak [Tue, 25 May 2021 20:58:49 +0000 (22:58 +0200)] 
Fix typo in NEWS. (GH-26346)

4 years agoPoint to recent link to PyFLTK (GH-26315)
Mark [Tue, 25 May 2021 20:37:28 +0000 (21:37 +0100)] 
Point to recent link to PyFLTK (GH-26315)

4 years agobpo-44232: Fix type_new() error reporting (GH-26359)
Victor Stinner [Tue, 25 May 2021 20:28:10 +0000 (22:28 +0200)] 
bpo-44232: Fix type_new() error reporting (GH-26359)

Fix a regression in type() when a metaclass raises an exception. The
C function type_new() must properly report the exception when a
metaclass constructor raises an exception and the winner class is not
the metaclass.

4 years agobpo-42972: Fully implement GC protocol for arraymodule types (GH-26114)
Erlend Egeberg Aasland [Tue, 25 May 2021 18:26:44 +0000 (20:26 +0200)] 
bpo-42972: Fully implement GC protocol for arraymodule types (GH-26114)

4 years agobpo-42972: Fully implement GC protocol for sqlite3 heap types (GH-26104)
Erlend Egeberg Aasland [Tue, 25 May 2021 17:43:56 +0000 (19:43 +0200)] 
bpo-42972: Fully implement GC protocol for sqlite3 heap types (GH-26104)

4 years agobpo-20408: Fix memoryview() signature in docs (GH-24431)
Mariusz Felisiak [Tue, 25 May 2021 14:24:30 +0000 (16:24 +0200)] 
bpo-20408: Fix memoryview() signature in docs (GH-24431)

4 years agobpo-44231: Don't export internal _PyTuple_FromArray() symbol (GH-26352)
Erlend Egeberg Aasland [Tue, 25 May 2021 13:58:14 +0000 (15:58 +0200)] 
bpo-44231: Don't export internal _PyTuple_FromArray() symbol (GH-26352)

4 years agobpo-44156: Make cached string constants in compile.c subinterpreter compatible (GH...
Ken Jin [Tue, 25 May 2021 13:55:34 +0000 (21:55 +0800)] 
bpo-44156: Make cached string constants in compile.c subinterpreter compatible (GH-26161)

4 years ago bpo-43795: Remove Py_FrozenMain from the Limited API & Stable ABI (GH-26241)
Petr Viktorin [Tue, 25 May 2021 11:42:03 +0000 (13:42 +0200)] 
 bpo-43795: Remove Py_FrozenMain from the Limited API & Stable ABI  (GH-26241)

Py_FrozenMain was added to the Limited C API in [bpo-42591]() (3.10.0a4);
but to fix that issue it would be enough to add it to the regular C API.

The function is undocumented, tests were added very recently ([bpo-44131]()),
and most importantly, it is not present in all builds of Python, as
the linker sometimes omits it as unused.
It should be added back when these issues are fixed.

Note that this does not affect Python's regular C API.

4 years agobpo-43109: configure doc: LTO requires "ar" on macOS (GH-26349)
Victor Stinner [Tue, 25 May 2021 10:25:22 +0000 (12:25 +0200)] 
bpo-43109: configure doc: LTO requires "ar" on macOS (GH-26349)

4 years agobpo-44151: Various grammar, word order, and markup fixes (GH-26344)
Raymond Hettinger [Tue, 25 May 2021 06:04:04 +0000 (23:04 -0700)] 
bpo-44151: Various grammar, word order, and markup fixes (GH-26344)

4 years agobpo-43109: Fix --with-lto configure option on macOS (GH-26341)
Ned Deily [Tue, 25 May 2021 03:00:04 +0000 (23:00 -0400)] 
bpo-43109: Fix --with-lto configure option on macOS (GH-26341)

Allow --with-lto configure option to work with Apple-supplied Xcode or
Command Line Tools which do not provide llvm-ar.

4 years agobpo-44151: linear_regression() minor API improvements (GH-26199)
Zack Kneupper [Tue, 25 May 2021 00:30:58 +0000 (20:30 -0400)] 
bpo-44151: linear_regression() minor API improvements (GH-26199)

4 years agobpo-38908: [docs] Add changes to 3.10 whatsnew and fix some minor inaccuracies in...
Ken Jin [Mon, 24 May 2021 23:51:08 +0000 (07:51 +0800)] 
bpo-38908: [docs] Add changes to 3.10 whatsnew and fix some minor inaccuracies in news (GH-26096)

The fix only applies to ``isinstance``. ``issubclass`` isn't affected (because it was always working to begin with). So I also fixed the news to reflect that.

4 years agobpo-41282: Fix broken `make install` (GH-26329)
Petr Viktorin [Mon, 24 May 2021 22:48:44 +0000 (00:48 +0200)] 
bpo-41282: Fix broken `make install` (GH-26329)

A previous commit broke a check in sysconfig when building cpython itself.
This caused builds of the standard library modules to search a wrong
location (the installed location rather than the source directory) for
header files with the net effect that a ``make install``
incorrectly caused all extension modules to be rebuilt again and
with incorrect include file paths.

When building Python, we need two distinct "include" directories:
- source .h files
- install target for .h files

Note that this doesn't matter except when building Python from source.

Historically:
- source .h files were in the distutils scheme under 'include'
- the install directory was in the distutils.command.install scheme
    under 'headers'

GH-24549 merged these; sysconfig is now the single source of truth and
distutils is derived from it.

This commit introduces a "secret" scheme path, 'headers', which contains
the install target. It is only present when building Python.
The distutils code uses it if present, and falls back to 'include'.

Co-authored-by: Ned Deily <nad@python.org>
4 years agobpo-44195: Use 'TraversableResources' in the docs to match the implementation. (GH...
Jason R. Coombs [Mon, 24 May 2021 17:08:10 +0000 (13:08 -0400)] 
bpo-44195: Use 'TraversableResources' in the docs to match the implementation. (GH-26317)

4 years agobpo-44032: Delay deletion of stack chunks until thread state is deleted. (GH-26285)
Mark Shannon [Mon, 24 May 2021 15:22:02 +0000 (16:22 +0100)] 
bpo-44032: Delay deletion of stack chunks until thread state is deleted. (GH-26285)

4 years agoFix typo in whatsnew/3.10.rst (GH-26310)
Tushar Sadhwani [Sun, 23 May 2021 22:10:24 +0000 (03:40 +0530)] 
Fix typo in whatsnew/3.10.rst (GH-26310)

4 years agobpo-43207: InspectLoader.is_package is not an abstract method (GH-24517)
Junnosuke Kuroda [Sun, 23 May 2021 19:19:52 +0000 (12:19 -0700)] 
bpo-43207: InspectLoader.is_package is not an abstract method (GH-24517)

Making the description of `InspectLoader.is_package` aligned with the current implementation.

Automerge-Triggered-By: GH:jaraco
4 years agobpo-44210: make importlib.metadata._meta.PackageMetadata public (GH-26299)
Filipe Laíns [Sun, 23 May 2021 19:04:05 +0000 (20:04 +0100)] 
bpo-44210: make importlib.metadata._meta.PackageMetadata public (GH-26299)

Signed-off-by: Filipe Laíns <lains@riseup.net>
Automerge-Triggered-By: GH:jaraco
4 years agobpo-28307: Tests and fixes for optimization of C-style formatting (GH-26318)
Serhiy Storchaka [Sun, 23 May 2021 16:06:48 +0000 (19:06 +0300)] 
bpo-28307: Tests and fixes for optimization of C-style formatting (GH-26318)

Fix errors:
* "%10.s" should be equal to "%10.0s", not "%10s".
* Tuples with starred expressions caused a SyntaxError.

4 years agobpo-44201: Avoid side effects of "invalid_*" rules in the REPL (GH-26298)
Pablo Galindo [Sat, 22 May 2021 22:05:00 +0000 (23:05 +0100)] 
bpo-44201: Avoid side effects of "invalid_*" rules in the REPL (GH-26298)

When the parser does a second pass to check for errors, these rules can
have some small side-effects as they may advance the parser more than
the point reached in the first pass. This can cause the tokenizer to ask
for extra tokens in interactive mode causing the tokenizer to show the
prompt instead of failing instantly.

To avoid this, add a new mode to the tokenizer that is activated in the
second pass and deactivates asking for new tokens when the interactive
line is finished. As the parsing should have reached the last line in
the first pass, the second pass should not need to ask for more tokens.

4 years agobpo-30757: Improve "How to make stand-alone binaries" FAQ (GH-26309)
Erlend Egeberg Aasland [Sat, 22 May 2021 22:03:09 +0000 (00:03 +0200)] 
bpo-30757: Improve "How to make stand-alone binaries" FAQ (GH-26309)

Co-authored-by: denfromufa <denfromufa@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-33809: add the TracebackException.print() method (GH-24231)
Irit Katriel [Sat, 22 May 2021 16:39:33 +0000 (17:39 +0100)] 
bpo-33809: add the TracebackException.print() method (GH-24231)

4 years agobpo-20684: Remove unused inspect._signature_get_bound_param (GH-21100)
Anthony Sottile [Sat, 22 May 2021 14:51:43 +0000 (07:51 -0700)] 
bpo-20684: Remove unused inspect._signature_get_bound_param (GH-21100)

4 years agoRemove effbot urls (GH-26308)
E-Paine [Sat, 22 May 2021 12:09:54 +0000 (13:09 +0100)] 
Remove effbot urls (GH-26308)

4 years agoFix typo for configure.ac (GH-26305)
Dong-hee Na [Fri, 21 May 2021 23:40:59 +0000 (08:40 +0900)] 
Fix typo for configure.ac (GH-26305)

4 years agoSpecify Python Cookbook edition for reference (GH-26301)
Terry Jan Reedy [Fri, 21 May 2021 22:17:10 +0000 (18:17 -0400)] 
Specify Python Cookbook edition for reference (GH-26301)

The timeit doc references Tim Peters introduction to the Chapter 18,
Algorithms, of the second edition.  The first editiion was before timeit.
The third edition instead has Chapter 1, Data Structures and Algorithms,
without Tim's introduction.

4 years agobpo-40736: Improve the error message for re.search() TypeError (GH-23312)
Zackery Spytz [Fri, 21 May 2021 21:02:42 +0000 (14:02 -0700)] 
bpo-40736: Improve the error message for re.search() TypeError (GH-23312)

Include the invalid type in the error message.

4 years agobpo-44032: Fix downcast conversion in frameobject.c (GH-26291)
Pablo Galindo [Fri, 21 May 2021 18:15:39 +0000 (19:15 +0100)] 
bpo-44032: Fix downcast conversion in frameobject.c (GH-26291)

4 years agoRemove duplicate words in docs. (GH-26167)
Mariusz Felisiak [Fri, 21 May 2021 18:09:09 +0000 (20:09 +0200)] 
Remove duplicate words in docs. (GH-26167)

4 years agobpo-43927: Change 'IOError' to 'OSError' (GH-26289)
Terry Jan Reedy [Fri, 21 May 2021 17:54:01 +0000 (13:54 -0400)] 
bpo-43927: Change 'IOError' to 'OSError' (GH-26289)

This is the last remaining instance, at least for this chapter, in 3.10 & 3.11.

4 years agobpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283)
Pablo Galindo [Fri, 21 May 2021 17:34:54 +0000 (18:34 +0100)] 
bpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283)

The invalid assignment rules are very delicate since the parser can
easily raise an invalid assignment when a keyword argument is provided.
As they are very deep into the grammar tree, is very difficult to
specify in which contexts these rules can be used and in which don't.
For that, we need to use a different version of the rule that doesn't do
error checking in those situations where we don't want the rule to raise
(keyword arguments and generator expressions).

We also need to check if we are in left-recursive rule, as those can try
to eagerly advance the parser even if the parse will fail at the end of
the expression. Failing to do this allows the parser to start parsing a
call as a tuple and incorrectly identify a keyword argument as an
invalid assignment, before it realizes that it was not a tuple after all.

4 years agobpo-44184: Fix subtype_dealloc() for freed type (GH-26274)
Victor Stinner [Fri, 21 May 2021 17:19:54 +0000 (19:19 +0200)] 
bpo-44184: Fix subtype_dealloc() for freed type (GH-26274)

Fix a crash at Python exit when a deallocator function removes the
last strong reference to a heap type.

Don't read type memory after calling basedealloc() since
basedealloc() can deallocate the type and free its memory.

_PyMem_IsPtrFreed() argument is now constant.

4 years ago[doc] Fix indentation in inspect documentation (GH-24846)
Numerlor [Fri, 21 May 2021 17:05:35 +0000 (19:05 +0200)] 
[doc] Fix indentation in inspect documentation (GH-24846)

4 years agobpo-43643: Sync with python/importlib_resources@c17a610aad. (GH-26284)
Jason R. Coombs [Fri, 21 May 2021 17:00:40 +0000 (13:00 -0400)] 
bpo-43643: Sync with python/importlib_resources@c17a610aad. (GH-26284)

* bpo-43643: Sync with python/importlib_resources@c17a610aad.
* Sync with python/importlib_resources@89fd5e961a.

4 years agobpo-44180: Report generic syntax errors in the furthest position reached in the first...
Pablo Galindo [Fri, 21 May 2021 15:09:51 +0000 (16:09 +0100)] 
bpo-44180: Report generic syntax errors in the furthest position reached in the first parser pass (GH-26253)

4 years agobpo-44032: Move data stack to thread from FrameObject. (GH-26076)
Mark Shannon [Fri, 21 May 2021 09:57:35 +0000 (10:57 +0100)] 
bpo-44032: Move data stack to thread from FrameObject. (GH-26076)

* Remove 'zombie' frames. We won't need them once we are allocating fixed-size frames.

* Add co_nlocalplus field to code object to avoid recomputing size of locals + frees + cells.

* Move locals, cells and freevars out of frame object into separate memory buffer.

* Use per-threadstate allocated memory chunks for local variables.

* Move globals and builtins from frame object to per-thread stack.

* Move (slow) locals frame object to per-thread stack.

* Move internal frame functions to internal header.

4 years agobpo-44150: Support optional weights parameter for fmean() (GH-26175)
Raymond Hettinger [Fri, 21 May 2021 03:22:26 +0000 (20:22 -0700)] 
bpo-44150: Support optional weights parameter for fmean() (GH-26175)

4 years agobpo-38671: Add test that `pathlib.Path.resolve()` returns an absolute path. (GH-26184)
Barney Gale [Thu, 20 May 2021 16:41:33 +0000 (17:41 +0100)] 
bpo-38671: Add test that `pathlib.Path.resolve()` returns an absolute path. (GH-26184)

Issue should be fixed in bpo-43757

Co-Authored-by: Tzu-ping Chung <uranusjr@gmail.com>
4 years agobpo-38820: Test with OpenSSL 3.0.0-alpha17 (#26266)
Christian Heimes [Thu, 20 May 2021 14:46:38 +0000 (16:46 +0200)] 
bpo-38820: Test with OpenSSL 3.0.0-alpha17 (#26266)

4 years agobpo-36160: Fix test_site so that it can run independently of other tests (GH-12131)
native-api [Thu, 20 May 2021 10:25:37 +0000 (13:25 +0300)] 
bpo-36160: Fix test_site so that it can run independently of other tests (GH-12131)

4 years agobpo-44131: Py_FrozenMain() uses PyConfig_SetBytesArgv() (GH-26201)
Victor Stinner [Thu, 20 May 2021 10:08:05 +0000 (12:08 +0200)] 
bpo-44131: Py_FrozenMain() uses PyConfig_SetBytesArgv() (GH-26201)

Moreover, Py_FrozenMain() relies on Py_InitializeFromConfig() to
handle the PYTHONUNBUFFERED environment variable and configure C
stdio streams like stdout (make the stream unbuffered).

4 years agoUpdate link in SECURITY.md (GH-21320)
Marcono1234 [Thu, 20 May 2021 01:52:25 +0000 (03:52 +0200)] 
Update link in SECURITY.md (GH-21320)