Commit Graph

110104 Commits

Author SHA1 Message Date
Miss Islington (bot) 448abe8d8b
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.

(cherry picked from commit 4e2e5c1c4f)
2021-05-28 09:39:36 +03:00
Miss Islington (bot) da9e0cb4de
bpo-42972: Fully implement GC protocol for re types (GH-26368) (GH-26414)
(cherry picked from commit fba42d1188)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-28 02:23:37 +02:00
Miss Islington (bot) 59f9594f90
[3.10] bpo-44246: Update What's New for importlib.metadata. (GH-26408) (GH-26415)
* [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>
(cherry picked from commit 28f12c9f4f)


Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Automerge-Triggered-By: GH:jaraco
2021-05-27 16:57:04 -07:00
Miss Islington (bot) d1c732912e
bpo-42972: Fully support GC protocol for _operator heap types (GH-26371) (GH-26413)
(cherry picked from commit f4b70c22c8)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-27 23:49:43 +02:00
Miss Islington (bot) 0574b0686d
bpo-43667: Add news fragment for Solaris changes (GH-26405) (GH-26409)
(cherry picked from commit 164a4f46d1)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2021-05-27 19:23:43 +02:00
Miss Islington (bot) da8097aaf5
bpo-42972: Fully support GC for mmap heap types (GH-26373)
(cherry picked from commit 318adeba78)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-27 09:43:56 -07:00
Miss Islington (bot) e73b3b1cd4
bpo-42972: Fully support GC protocol for _queue.SimpleQueue (GH-26372) (GH-26406)
(cherry picked from commit 4d7f8f9f7f)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-27 18:25:50 +02:00
Miss Islington (bot) ea47a8a71a
bpo-42972: Fully implement GC protocol for ssl heap types (GH-26370) (GH-26399)
(cherry picked from commit dcb8786a98)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-27 18:25:22 +02:00
Miss Islington (bot) 0bf0500baa
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
(cherry picked from commit 59af59c2df)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-27 08:26:15 -07:00
Miss Islington (bot) 5e6219b8fa
bpo-41611: IDLE: fix freezing on completion on macOS (GH-26400)
(cherry picked from commit abc4bd5db9)

Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
2021-05-27 07:53:53 -07:00
Miss Islington (bot) 09696a3e21
[3.10] bpo-38908: [docs] Add changes to 3.10 whatsnew and fix some minor inaccuracies in news (GH-26096) (GH-26337)
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.
(cherry picked from commit 8450e8a81f)


Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-05-27 06:50:58 -07:00
Miss Islington (bot) 4431922f92
[3.10] bpo-42972: Fully support GC for hashlib heap types (GH-26374) (GH-26398)
(cherry picked from commit 6ef5ba391d)


Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

Automerge-Triggered-By: GH:tiran
2021-05-27 01:10:39 -07:00
Miss Islington (bot) 5d569ef9dd
[3.10] bpo-44241: Incorporate changes from importlib_metadata 4.1. (GH-26382) (GH-26395)
(cherry picked from commit 06ac3a4742)


Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Automerge-Triggered-By: GH:jaraco
2021-05-26 18:22:25 -07:00
Miss Islington (bot) 4115996342
bpo-42161: mathmodule.c: move _PyLong_GetOne() loop invariant (GH-26391) (GH-26393)
Move _PyLong_GetZero() and _PyLong_GetOne() loop invariants outside
loops in functions:

* math.comb()
* math.gcd()
* math.lcm()
* math.perm()
(cherry picked from commit 3e7ee02327)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-05-27 01:13:17 +02:00
Miss Islington (bot) 150a8e8a3e
[3.10] bpo-42392: [docs] Add deprecated-removed loop labels for asyncio (GH-26357) (GH-26390)
* Add deprecated-removed loop labels for all reelvant functions/classes in asyncio
(cherry picked from commit d8fd8c8568)


Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>

Automerge-Triggered-By: GH:gpshead
2021-05-26 15:19:42 -07:00
Miss Islington (bot) 97b4576f65
bpo-38693: Prefer f-strings in importlib.resources (importlib_resources 5.0.6). (GH-26387) (#26389)
Automerge-Triggered-By: GH:jaraco
(cherry picked from commit f6fbdb90ee)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-05-26 17:09:27 -04:00
Miss Islington (bot) 78a8428548
bpo-38693: importlib.metadata f-strings (GH-26383)
Automerge-Triggered-By: GH:jaraco
(cherry picked from commit e6c815d2e3)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-05-26 12:11:41 -07:00
Miss Islington (bot) 1261941e02
bpo-41147: [doc] contextlib.redirect_stdout() provides the new stream as context var (GH-21199) (GH-26379)
(cherry picked from commit 46db39d7bd)

Co-authored-by: Peter Law <PeterJCLaw@gmail.com>
2021-05-26 15:34:22 +01:00
Miss Islington (bot) 7b3b6982a5
bpo-44232: Fix type_new() error reporting (GH-26359) (GH-26365)
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.
(cherry picked from commit bd199e72fb)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-05-26 11:30:55 +02:00
Miss Islington (bot) 2442b342bc
Point to recent link to PyFLTK (GH-26315) (GH-26366)
(cherry picked from commit ee3d78ef73)

Co-authored-by: Mark <mark@qtrac.eu>

Co-authored-by: Mark <mark@qtrac.eu>
2021-05-25 18:04:26 -03:00
Miss Islington (bot) 534da740a2
bpo-42972: Fully implement GC protocol for arraymodule types (GH-26114)
(cherry picked from commit bd404ccac0)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-25 11:49:19 -07:00
Miss Islington (bot) e8d9df0089
bpo-42972: Fully implement GC protocol for sqlite3 heap types (GH-26104)
(cherry picked from commit d3c277a59c)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-25 11:08:39 -07:00
Miss Islington (bot) 05f8ad0c74
bpo-20408: Fix memoryview() signature in docs (GH-24431)
(cherry picked from commit d18e5dae91)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-05-25 17:30:00 +03:00
Miss Islington (bot) 68b9c20a98
bpo-43795: Remove Py_FrozenMain from the Limited API & Stable ABI (GH-26241) (GH-26353)
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.
(cherry picked from commit d16856960e)

Co-authored-by: Petr Viktorin <encukou@gmail.com>

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2021-05-25 12:59:10 +01:00
Miss Islington (bot) ddc503c8d2
bpo-43109: configure doc: LTO requires "ar" on macOS (GH-26349)
(cherry picked from commit 63f17c252a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-05-25 03:56:37 -07:00
Miss Islington (bot) a6825197e9
bpo-44151: Various grammar, word order, and markup fixes (GH-26344) (GH-26345) 2021-05-24 23:23:10 -07:00
Miss Islington (bot) 25a9cf197e
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.
(cherry picked from commit 59acfd4a09)

Co-authored-by: Ned Deily <nad@python.org>
2021-05-24 21:18:53 -07:00
Miss Islington (bot) 86779878df
bpo-44151: linear_regression() minor API improvements (GH-26199) (GH-26338) 2021-05-24 18:11:12 -07:00
Miss Islington (bot) 1c454eb2e4
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>
(cherry picked from commit 563bd5a4dc)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2021-05-24 16:13:19 -07:00
Miss Islington (bot) d309bcc9e3
bpo-44195: Use 'TraversableResources' in the docs to match the implementation. (GH-26317)
(cherry picked from commit 7148293d96)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-05-24 10:30:05 -07:00
Miss Islington (bot) 04a4934a84
Fix typo in whatsnew/3.10.rst (GH-26310) (GH-26323)
(cherry picked from commit 3ad101b317)

Co-authored-by: Tushar Sadhwani <tushar.sadhwani000@gmail.com>
2021-05-23 23:12:13 +01:00
Miss Islington (bot) 069bc4f5b4
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
(cherry picked from commit 8b9310d902)

Co-authored-by: Junnosuke Kuroda <Isa-rentacs@users.noreply.github.com>
2021-05-23 12:37:16 -07:00
Miss Islington (bot) e394573c3c
bpo-44210: make importlib.metadata._meta.PackageMetadata public (GH-26299)
Signed-off-by: Filipe Laíns <lains@riseup.net>

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

Co-authored-by: Filipe Laíns <lains@riseup.net>
2021-05-23 12:29:17 -07:00
Miss Islington (bot) 1fb6b9e91d
bpo-44201: Avoid side effects of "invalid_*" rules in the REPL (GH-26298) (GH-26313)
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.

(cherry picked from commit bd7476dae3)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-05-22 23:23:26 +01:00
Miss Islington (bot) 413df57968
bpo-30757: Improve "How to make stand-alone binaries" FAQ (GH-26309) (GH-26311)
Co-authored-by: denfromufa <denfromufa@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 2a1e6698b1)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-22 23:23:03 +01:00
Miss Islington (bot) 37da1f09a2
Remove duplicate words in docs. (GH-26167) (GH-26296)
(cherry picked from commit b06ed1d883)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-05-22 21:55:17 +01:00
Miss Islington (bot) 50b0d148a6
bpo-44184: Fix subtype_dealloc() for freed type (GH-26274) (GH-26290)
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.
(cherry picked from commit 615069eb08)

Co-authored-by: Victor Stinner <vstinner@python.org>

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-05-22 00:50:11 +02:00
Miss Islington (bot) 856958d0e7
Specify Python Cookbook edition for reference (GH-26301) (#26302)
(cherry picked from commit 604cd71e50)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-05-21 23:48:56 +01:00
Miss Islington (bot) ae1732d461
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.
(cherry picked from commit c878a97968)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-05-21 11:20:43 -07:00
Miss Islington (bot) 150bc1f4aa
bpo-43927: Change 'IOError' to 'OSError' (GH-26289)
This is the last remaining instance, at least for this chapter, in 3.10 & 3.11.
(cherry picked from commit 2f47d8dcc7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-05-21 11:15:36 -07:00
Miss Islington (bot) fdb65e399e
[3.10] bpo-43643: Sync with python/importlib_resources@c17a610aad. (GH-26284) (GH-26286)
* [bpo-43643](): Sync with python/importlib_resources@c17a610aad.
* Sync with python/importlib_resources@89fd5e961a.
(cherry picked from commit 875b3d84b3)


Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Automerge-Triggered-By: GH:jaraco
2021-05-21 10:52:24 -07:00
Miss Islington (bot) 1886b8496b
[doc] Fix indentation in inspect documentation (GH-24846) (GH-26287)
(cherry picked from commit 642fdfdc04)

Co-authored-by: Numerlor <25886452+Numerlor@users.noreply.github.com>
2021-05-21 18:06:41 +01:00
Miss Islington (bot) 07dba474c5
bpo-44180: Report generic syntax errors in the furthest position reached in the first parser pass (GH-26253) (GH-26281)
(cherry picked from commit b51081c1a8)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-05-21 16:29:58 +01:00
Senthil Kumaran f14015adf5
[3.10] bpo-43882 - Mention urllib.parse changes in Whats new section. (GH-26275)
* [3.10] bpo-43882 - Mention urllib.parse changes in Whats new section.

* escape the \n chars, ReSTify :rfc:, urllib.parse is a :mod:

* minor formatting.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2021-05-21 05:29:24 -07:00
Barney Gale ee51c56c02
[3.10] bpo-38671: Add test that `pathlib.Path.resolve()` returns an absolute path. (GH-26184) (GH-26270)
Issue should be fixed in [bpo-43757]()

Co-Authored-by: Tzu-ping Chung <uranusjr@gmail.com>
(cherry picked from commit 18f41c04ff)

Co-authored-by: Barney Gale <barney.gale@gmail.com>

Automerge-Triggered-By: GH:encukou
2021-05-21 04:54:56 -07:00
Miss Islington (bot) 36843f716d
bpo-38820: Test with OpenSSL 3.0.0-alpha17 (GH-26266)
(cherry picked from commit 7109624d45)

Co-authored-by: Christian Heimes <christian@python.org>
2021-05-20 08:10:52 -07:00
Miss Islington (bot) 4389711ce9
bpo-36160: Fix test_site so that it can run independently of other tests (GH-12131) (GH-26262)
(cherry picked from commit 1270ad6ec8)

Co-authored-by: native-api <vano@mail.mipt.ru>
2021-05-20 11:42:00 +01:00
Miss Islington (bot) 548d8828b0
Update link in SECURITY.md (GH-21320) (GH-26259)
(cherry picked from commit 4d396e7d79)

Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
2021-05-19 22:06:17 -04:00
Miss Islington (bot) 9d16b1ae58
[doc] Fix typo in asyncio-eventloop documentation (GH-22311) (GH-26256)
(cherry picked from commit b66a03a491)

Co-authored-by: Bruno <brunogeninatti@gmail.com>
2021-05-19 22:19:53 +01:00
Miss Islington (bot) 65dede60fa
bpo-40975: [doc] Identify AsyncExitStack.enter_async_context()/aclose() as coroutine methods (GH-20870) (GH-26254)
(cherry picked from commit c054e8f78f)

Co-authored-by: naglis <naglis@users.noreply.github.com>
2021-05-19 21:37:32 +01:00