]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-43795: Note Stable ABI PEP in What's New (GH-26479)
Petr Viktorin [Tue, 8 Jun 2021 15:20:07 +0000 (17:20 +0200)] 
bpo-43795: Note Stable ABI PEP in What's New (GH-26479)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-44329: Refactor sqlite3 statement creation (GH-26566)
Erlend Egeberg Aasland [Tue, 8 Jun 2021 15:00:56 +0000 (17:00 +0200)] 
bpo-44329: Refactor sqlite3 statement creation (GH-26566)

Call SQLite API's first, and return early in case of error. At the end,
allocate the object and initialise members. We now avoid unneeded
alloc/dealloc's in case the statement creation fails.

4 years agoRevert "bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. ...
Pablo Galindo [Tue, 8 Jun 2021 12:17:55 +0000 (13:17 +0100)] 
Revert "bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. (gh-26396)" (GH-26597)

This reverts commit 631f9938b1604d4f893417ec339b9e0fa9196fb1.

4 years agoFix compiler errors for unused variables (GH-26601)
Pablo Galindo [Tue, 8 Jun 2021 12:16:24 +0000 (13:16 +0100)] 
Fix compiler errors for unused variables (GH-26601)

4 years agobpo-44335: Fix a regression when identifying invalid characters in syntax errors...
Pablo Galindo [Tue, 8 Jun 2021 11:25:22 +0000 (12:25 +0100)] 
bpo-44335: Fix a regression when identifying invalid characters in syntax errors (GH-26589)

4 years agobpo-44348: Revert "bpo-39573: Py_TYPE becomes a static inline function (GH-26493...
Pablo Galindo [Tue, 8 Jun 2021 11:24:40 +0000 (12:24 +0100)] 
bpo-44348: Revert "bpo-39573: Py_TYPE becomes a static inline function (GH-26493)" (GH-26596)

This reverts commit f3fa63ec75fdbb4a08a10957a5c631bf0c4a5970 as is
causing crashes in some Windows tests in the buildbots.

4 years agoUse `from` imports (GH-26594)
Machinexa2 [Tue, 8 Jun 2021 09:47:15 +0000 (15:32 +0545)] 
Use `from` imports (GH-26594)

from imports

4 years agobpo-42238: Doc CI: Disable suspicious checks. (GH-26575)
Julien Palard [Tue, 8 Jun 2021 07:22:58 +0000 (09:22 +0200)] 
bpo-42238: Doc CI: Disable suspicious checks. (GH-26575)

They are slow and raise too many false positive, I'm in the slow
process to try to change this.

4 years agofix: use unambiguous punction in 'invalid escape sequence' message (GH-26582) 26592/head
Ned Batchelder [Tue, 8 Jun 2021 00:15:46 +0000 (20:15 -0400)] 
fix: use unambiguous punction in 'invalid escape sequence' message (GH-26582)

4 years agobpo-43693: Silence some compiler warnings. (gh-26588)
Eric Snow [Mon, 7 Jun 2021 23:58:38 +0000 (17:58 -0600)] 
bpo-43693: Silence some compiler warnings. (gh-26588)

The plan is to eventually make PyCodeObject opaque in the public C-API, with the full struct moved to Include/internal/pycore_code.h. _PyLocalsPlusKinds and _PyLocalsPlusKind started off there but were needed on PyCodeObject, hence the duplication. This led to warnings with some compilers. (Apparently it does not trigger a warning on my install of GCC.)

This change eliminates the superfluous typedef.

https://bugs.python.org/issue43693

4 years agobpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. (gh-26396)
Eric Snow [Mon, 7 Jun 2021 22:52:00 +0000 (16:52 -0600)] 
bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. (gh-26396)

This moves logic out of the frame initialization code and into the compiler and eval loop.  Doing so simplifies the runtime code and allows us to optimize it better.

https://bugs.python.org/issue43693

4 years agoUse absolute imports in IDLE tests (GH-26581)
Terry Jan Reedy [Mon, 7 Jun 2021 21:56:34 +0000 (17:56 -0400)] 
Use absolute imports in IDLE tests (GH-26581)

Relative imports do not work when running test_x as main.

4 years agobpo-41299: Reduce lag in Windows threading timeouts by using a higher precision time...
Ryan Hileman [Mon, 7 Jun 2021 20:26:02 +0000 (13:26 -0700)] 
bpo-41299: Reduce lag in Windows threading timeouts by using a higher precision time source (GH-26568)

4 years agobpo-43693: Un-revert commits 2c1e258 and b2bf2bc. (gh-26577)
Eric Snow [Mon, 7 Jun 2021 18:22:26 +0000 (12:22 -0600)] 
bpo-43693: Un-revert commits 2c1e258 and b2bf2bc. (gh-26577)

These were reverted in gh-26530 (commit 17c4edc) due to refleaks.

2c1e258 - Compute deref offsets in compiler (gh-25152)
b2bf2bc - Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388)

This change fixes the refleaks.

https://bugs.python.org/issue43693

4 years agobpo-44187: Quickening infrastructure (GH-26264)
Mark Shannon [Mon, 7 Jun 2021 17:38:06 +0000 (18:38 +0100)] 
bpo-44187: Quickening infrastructure (GH-26264)

* Add co_firstinstr field to code object.

* Implement barebones quickening.

* Use non-quickened bytecode when tracing.

* Add NEWS item

* Add new file to Windows build.

* Don't specialize instructions with EXTENDED_ARG.

4 years agobpo-44258: support PEP 515 for Fraction's initialization from string (GH-26422)
Sergey B Kirpichev [Mon, 7 Jun 2021 07:06:33 +0000 (10:06 +0300)] 
bpo-44258: support PEP 515 for Fraction's initialization from string (GH-26422)

* bpo-44258: support PEP 515 for Fraction's initialization from string

* regexps's version

* A different regexps version, which doesn't suffer from catastrophic backtracking

* revert denom -> den

* strip "_" from the decimal str, add few tests

* drop redundant tests

* Add versionchanged & whatsnew entry

* Amend Fraction constructor docs

* Change .. versionchanged:...

4 years agobpo-37449: ensurepip uses importlib.resources.files() traversable APIs (#22659)
wim glenn [Mon, 7 Jun 2021 02:14:47 +0000 (21:14 -0500)] 
bpo-37449: ensurepip uses importlib.resources.files() traversable APIs (#22659)

* `ensurepip` now uses `importlib.resources.files()` traversable APIs

* Update Lib/ensurepip/__init__.py

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* Update Misc/NEWS.d/next/Library/2020-10-11-20-23-48.bpo-37449.f-t3V6.rst

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
4 years agobpo-44322: Document more SyntaxError details. (GH-26562)
Terry Jan Reedy [Mon, 7 Jun 2021 01:42:31 +0000 (21:42 -0400)] 
bpo-44322: Document more SyntaxError details. (GH-26562)

1. SyntaxError args have a tuple of other attributes.
2. Attributes are adjusted for errors in f-string field expressions.
3. Compile() can raise SyntaxErrors.

4 years agobpo-44326: Remove unused members from pysqlite_Statement (GH-26564)
Erlend Egeberg Aasland [Sun, 6 Jun 2021 22:12:07 +0000 (00:12 +0200)] 
bpo-44326: Remove unused members from pysqlite_Statement (GH-26564)

* Remove unused db member of pysqlite_Statement

* Remove unused sql method from statement object

4 years agobpo-44327: Remove unused members from pysqlite_Connection (GH-26565)
Erlend Egeberg Aasland [Sun, 6 Jun 2021 22:11:44 +0000 (00:11 +0200)] 
bpo-44327: Remove unused members from pysqlite_Connection (GH-26565)

* Remove timeout_started

* Remove timeout member

4 years agoUpdate bisect docstrings (GH-26548)
hrchu [Sun, 6 Jun 2021 18:22:48 +0000 (02:22 +0800)] 
Update bisect docstrings (GH-26548)

4 years agobpo-44320: Fix markup for W3C C14N test suite (GH-26556)
NAKAMURA Osamu [Sun, 6 Jun 2021 02:34:10 +0000 (11:34 +0900)] 
bpo-44320: Fix markup for W3C C14N test suite (GH-26556)

4 years agobpo-44304: Ensure the sqlite3 destructor callback is always called with the GIL held...
Pablo Galindo [Sat, 5 Jun 2021 22:41:11 +0000 (23:41 +0100)] 
bpo-44304: Ensure the sqlite3 destructor callback is always called with the GIL held (GH-26551)

4 years agobpo-44304: Fix crash in the sqlite3 module when the GC clears Statement objects ...
Pablo Galindo [Sat, 5 Jun 2021 02:50:39 +0000 (03:50 +0100)] 
bpo-44304: Fix crash in the sqlite3 module when the GC clears Statement objects (GH-26545)

4 years agobpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test suite (GH...
Pablo Galindo [Fri, 4 Jun 2021 23:33:20 +0000 (00:33 +0100)] 
bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test suite (GH-26542)

4 years agoUpdate nonstandard variable names (GH-26540)
Raymond Hettinger [Fri, 4 Jun 2021 23:28:31 +0000 (16:28 -0700)] 
Update nonstandard variable names (GH-26540)

4 years agobpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492)
Irit Katriel [Fri, 4 Jun 2021 22:07:57 +0000 (23:07 +0100)] 
bpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492)

4 years agoAlign comment for better readability. (GH-26192)
Kazantcev Andrey [Fri, 4 Jun 2021 21:41:23 +0000 (00:41 +0300)] 
Align comment for better readability. (GH-26192)

4 years agobpo-44315: Remove unused connection argument from pysqlite_step() (GH-26535)
Erlend Egeberg Aasland [Fri, 4 Jun 2021 20:42:20 +0000 (22:42 +0200)] 
bpo-44315: Remove unused connection argument from pysqlite_step() (GH-26535)

4 years agobpo-43853: Handle sqlite3_value_text() errors (GH-25422)
Erlend Egeberg Aasland [Fri, 4 Jun 2021 18:34:00 +0000 (20:34 +0200)] 
bpo-43853: Handle sqlite3_value_text() errors (GH-25422)

4 years agobpo-44041: Add test for sqlite3 column count (GH-25907)
Erlend Egeberg Aasland [Fri, 4 Jun 2021 17:36:08 +0000 (19:36 +0200)] 
bpo-44041: Add test for sqlite3 column count (GH-25907)

4 years agobpo-43693: Revert commits 2c1e2583fdc4db6b43d163239ea42b0e8394171f and b2bf2bc1ece673...
Pablo Galindo [Fri, 4 Jun 2021 16:51:05 +0000 (17:51 +0100)] 
bpo-43693: Revert commits 2c1e2583fdc4db6b43d163239ea42b0e8394171f and b2bf2bc1ece673d387341e06c8d3c2bc6e259747  (GH-26530)

* Revert "bpo-43693: Compute deref offsets in compiler (gh-25152)"

This reverts commit b2bf2bc1ece673d387341e06c8d3c2bc6e259747.

* Revert "bpo-43693: Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388)"

This reverts commit 2c1e2583fdc4db6b43d163239ea42b0e8394171f.

These two commits are breaking the refleak buildbots.

4 years agobpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470)
stratakis [Fri, 4 Jun 2021 16:47:59 +0000 (18:47 +0200)] 
bpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470)

test_disallow_instantiation and test_readonly_types try to test all the available
digests, however under FIPS mode, while the algorithms are available, trying to use
them will fail with a ValueError.

4 years agoRemoving myself from ssl code ownership (GH-26529)
Christian Heimes [Fri, 4 Jun 2021 13:01:31 +0000 (15:01 +0200)] 
Removing myself from ssl code ownership (GH-26529)

I'm taking a break.

Signed-off-by: Christian Heimes <christian@python.org>
4 years agobpo-43693: Compute deref offsets in compiler (gh-25152)
Mark Shannon [Fri, 4 Jun 2021 00:03:54 +0000 (01:03 +0100)] 
bpo-43693: Compute deref offsets in compiler (gh-25152)

Merges locals and cells into a single array.
Saves a pointer in the interpreter and means that we don't need the LOAD_CLOSURE opcode any more

https://bugs.python.org/issue43693

4 years agobpo-32280: Store _PyRuntime in a named section (GH-4802)
Max Bélanger [Thu, 3 Jun 2021 23:37:29 +0000 (16:37 -0700)] 
bpo-32280: Store _PyRuntime in a named section (GH-4802)

This commit stores the _PyRuntime structure in a section of the same name. This allows a debugging or crash reporting tool to quickly locate this structure at runtime without requiring the symbol table.

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
4 years agobpo-44305: Improve syntax error for try blocks without except or finally (GH-26523)
Pablo Galindo [Thu, 3 Jun 2021 22:52:12 +0000 (23:52 +0100)] 
bpo-44305: Improve syntax error for try blocks without except or finally (GH-26523)

4 years agobpo-44042: Optimize sqlite3 begin transaction (GH-25908)
Erlend Egeberg Aasland [Thu, 3 Jun 2021 21:24:25 +0000 (23:24 +0200)] 
bpo-44042: Optimize sqlite3 begin transaction (GH-25908)

4 years agobpo-43921: Cleanup test_ssl.test_wrong_cert_tls13() (GH-26520)
Victor Stinner [Thu, 3 Jun 2021 20:12:31 +0000 (22:12 +0200)] 
bpo-43921: Cleanup test_ssl.test_wrong_cert_tls13() (GH-26520)

Don't catch OSError, and check the SSLError message.

4 years agobpo-11105: Do not crash when compiling recursive ASTs (GH-20594)
Batuhan Taskaya [Thu, 3 Jun 2021 20:01:02 +0000 (23:01 +0300)] 
bpo-11105: Do not crash when compiling recursive ASTs (GH-20594)

When compiling an AST object with a direct / indirect reference
cycles, on the conversion phase because of exceeding amount of
calls, a segfault was raised. This patch adds recursion guards to
places for preventing user inputs to not to crash AST but instead
raise a RecursionError.

4 years agobpo-42862: Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module (GH-24203)
Erlend Egeberg Aasland [Thu, 3 Jun 2021 19:59:26 +0000 (21:59 +0200)] 
bpo-42862: Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module (GH-24203)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-39573: Py_TYPE becomes a static inline function (GH-26493)
Victor Stinner [Thu, 3 Jun 2021 16:42:59 +0000 (18:42 +0200)] 
bpo-39573: Py_TYPE becomes a static inline function (GH-26493)

Convert the Py_TYPE() and Py_SIZE() macros to static inline
functions. The Py_SET_TYPE() and Py_SET_SIZE() functions must now be
used to set an object type and size.

4 years agobpo-42213: Remove redundant cyclic GC hack in sqlite3 (GH-26517)
Erlend Egeberg Aasland [Thu, 3 Jun 2021 16:38:19 +0000 (18:38 +0200)] 
bpo-42213: Remove redundant cyclic GC hack in sqlite3 (GH-26517)

The sqlite3 module now fully implements the GC protocol, so there's no
need for this workaround anymore.

- Add and use managed resource helper for connections using TESTFN
- Sort test imports
- Split open-tests into their own test case

Automerge-Triggered-By: GH:vstinner
4 years agobpo-43693: Add new internal code objects fields: co_fastlocalnames and co_fastlocalki...
Eric Snow [Thu, 3 Jun 2021 16:28:27 +0000 (10:28 -0600)] 
bpo-43693: Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388)

A number of places in the code base (notably ceval.c and frameobject.c) rely on mapping variable names to indices in the frame "locals plus" array (AKA fast locals), and thus opargs.  Currently the compiler indirectly encodes that information on the code object as the tuples co_varnames, co_cellvars, and co_freevars.  At runtime the dependent code must calculate the proper mapping from those, which isn't ideal and impacts performance-sensitive sections.  This is something we can easily address in the compiler instead.

This change addresses the situation by replacing internal use of co_varnames, etc. with a single combined tuple of names in locals-plus order, along with a minimal array mapping each to its kind (local vs. cell vs. free).  These two new PyCodeObject fields, co_fastlocalnames and co_fastllocalkinds, are not exposed to Python code for now, but co_varnames, etc. are still available with the same values as before (though computed lazily).

Aside from the (mild) performance impact, there are a number of other benefits:

* there's now a clear, direct relationship between locals-plus and variables
* code that relies on the locals-plus-to-name mapping is simpler
* marshaled code objects are smaller and serialize/de-serialize faster

Also note that we can take this approach further by expanding the possible values in co_fastlocalkinds to include specific argument types (e.g. positional-only, kwargs).  Doing so would allow further speed-ups in _PyEval_MakeFrameVector(), which is where args get unpacked into the locals-plus array.  It would also allow us to shrink marshaled code objects even further.

https://bugs.python.org/issue43693

4 years agobpo-43921: Fix test_ssl.test_wrong_cert_tls13() on Windows (GH-26502)
Victor Stinner [Thu, 3 Jun 2021 16:04:25 +0000 (18:04 +0200)] 
bpo-43921: Fix test_ssl.test_wrong_cert_tls13() on Windows (GH-26502)

Fix test_ssl.test_wrong_cert_tls13(): use suppress_ragged_eofs=False,
since read() can raise ssl.SSLEOFError on Windows.

4 years agobpo-42213: Check connection in sqlite3.Connection.__enter__ (GH-26512)
Erlend Egeberg Aasland [Thu, 3 Jun 2021 15:53:47 +0000 (17:53 +0200)] 
bpo-42213: Check connection in sqlite3.Connection.__enter__ (GH-26512)

Try to harden connection close:

- add tests that exercise stuff against a closed database
- add wrapper for sqlite3_close_v2()
- check connection on __enter__
- explicitly free pending statements before close()
- sqlite3_close_v2() always returns SQLITE_OK

4 years agobpo-44298: Fix line numbers for early exits in with statements. (GH-26513)
Mark Shannon [Thu, 3 Jun 2021 15:45:58 +0000 (16:45 +0100)] 
bpo-44298: Fix line numbers for early exits in with statements. (GH-26513)

4 years agobpo-39560: Document PyUnicode_FromKindAndData() kind transformation (GH-23848)
Zackery Spytz [Thu, 3 Jun 2021 13:33:44 +0000 (06:33 -0700)] 
bpo-39560: Document PyUnicode_FromKindAndData() kind transformation (GH-23848)

4 years agobpo-43858: Add logging.getLevelNamesMapping() (GH-26459)
andrei kulakov [Thu, 3 Jun 2021 08:12:59 +0000 (04:12 -0400)] 
bpo-43858: Add logging.getLevelNamesMapping() (GH-26459)

Added a function that returns a copy of a dict of logging levels.

4 years agoAdd bpo-42914 to What's New (GH-25124)
Wm. Keith van der Meulen [Thu, 3 Jun 2021 03:45:34 +0000 (22:45 -0500)] 
Add bpo-42914 to What's New (GH-25124)

BPO-42914 was not added to the What's New in #24864. This includes it in the "Improved Modules" section.

Automerge-Triggered-By: GH:gpshead
4 years agobpo-44022: Improve the regression test. (GH-26503)
Gregory P. Smith [Thu, 3 Jun 2021 03:43:38 +0000 (20:43 -0700)] 
bpo-44022: Improve the regression test. (GH-26503)

It wasn't actually detecting the regression due to the
assertion being too lenient.

4 years agobpo-44282: Fix occasional test_incremental_editing failures on buildbots (GH-26491)
Tal Einat [Wed, 2 Jun 2021 23:53:41 +0000 (02:53 +0300)] 
bpo-44282: Fix occasional test_incremental_editing failures on buildbots (GH-26491)

Signed-off-by: Tal Einat <532281+taleinat@users.noreply.github.com>
4 years agobpo-43921: Fix test_ssl.test_pha_required_nocert() (GH-26489)
Victor Stinner [Wed, 2 Jun 2021 20:25:26 +0000 (22:25 +0200)] 
bpo-43921: Fix test_ssl.test_pha_required_nocert() (GH-26489)

Fix test_pha_required_nocert() of test_ssl: catch two more EOF cases
(when the recv() method returns an empty string).

4 years agobuild(deps): bump actions/cache from 2.1.5 to 2.1.6 (GH-26476)
dependabot[bot] [Wed, 2 Jun 2021 17:34:45 +0000 (14:34 -0300)] 
build(deps): bump actions/cache from 2.1.5 to 2.1.6 (GH-26476)

Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.5...v2.1.6)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years agoTypo fix in asyncio-eventloop.rst (GH-26482)
Zac Bentley [Wed, 2 Jun 2021 15:00:25 +0000 (08:00 -0700)] 
Typo fix in asyncio-eventloop.rst (GH-26482)

4 years agobpo-44285: getpath.c: Assert that env_file is NULL during an error check (GH-26486)
stratakis [Wed, 2 Jun 2021 14:54:33 +0000 (16:54 +0200)] 
bpo-44285: getpath.c: Assert that env_file is NULL during an error check (GH-26486)

This was flagged by a static analyzer, but the logic of why this is NULL on error is hard to follow for humans as well.

4 years agobpo-44165: pysqlite_statement_create now returns a Py object, not an int (GH-26484)
Erlend Egeberg Aasland [Wed, 2 Jun 2021 13:22:15 +0000 (15:22 +0200)] 
bpo-44165: pysqlite_statement_create now returns a Py object, not an int (GH-26484)

GH-26206 was broken by GH-26475.

4 years agobpo-17792: more accurate error message for unbound variable access exceptions (GH...
Irit Katriel [Wed, 2 Jun 2021 13:09:04 +0000 (14:09 +0100)] 
bpo-17792: more accurate error message for unbound variable access exceptions (GH-24976)

4 years agoRemove duplicate address in CommonTestMixin_v4.test_leading_zeros() (GH-26326)
Mariusz Felisiak [Wed, 2 Jun 2021 12:30:13 +0000 (14:30 +0200)] 
Remove duplicate address in CommonTestMixin_v4.test_leading_zeros() (GH-26326)

4 years agobpo-44165: Optimise sqlite3 statement preparation by passing string size (GH-26206)
Erlend Egeberg Aasland [Wed, 2 Jun 2021 12:26:06 +0000 (14:26 +0200)] 
bpo-44165: Optimise sqlite3 statement preparation by passing string size (GH-26206)

4 years agobpo-44263: Py_TPFLAGS_HAVE_GC requires tp_traverse (GH-26463)
Victor Stinner [Tue, 1 Jun 2021 21:37:12 +0000 (23:37 +0200)] 
bpo-44263: Py_TPFLAGS_HAVE_GC requires tp_traverse (GH-26463)

The PyType_Ready() function now raises an error if a type is defined
with the Py_TPFLAGS_HAVE_GC flag set but has no traverse function
(PyTypeObject.tp_traverse).

4 years agoFix typo in block comment in Include/internal/pycore_condvar.h (GH-26457)
Rishi [Tue, 1 Jun 2021 21:30:05 +0000 (23:30 +0200)] 
Fix typo in block comment in Include/internal/pycore_condvar.h (GH-26457)

4 years agobpo-44279: [doc] reword contextlib.suppress documentation (GH-26428)
MapleCCC [Tue, 1 Jun 2021 20:15:30 +0000 (04:15 +0800)] 
bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428)

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