]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agoFix small typo (#92721)
Gabi Nagy [Fri, 13 May 2022 14:15:20 +0000 (16:15 +0200)] 
Fix small typo (#92721)

3 years agogh-92446: Argparse choices should be a sequence (#92450)
180909 [Fri, 13 May 2022 14:06:08 +0000 (22:06 +0800)] 
gh-92446: Argparse choices should be a sequence (#92450)

3 years agoDocument Py_ssize_t. (GH-92512)
Julien Palard [Fri, 13 May 2022 12:10:16 +0000 (14:10 +0200)] 
Document Py_ssize_t. (GH-92512)

It fixes 252 errors from a Sphinx nitpicky run (sphinx-build -n). But
there's 8182 errors left.

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
3 years agogh-85858: Remove PyUnicode_InternImmortal() function (#92579)
Victor Stinner [Fri, 13 May 2022 11:40:22 +0000 (13:40 +0200)] 
gh-85858: Remove PyUnicode_InternImmortal() function (#92579)

Remove the PyUnicode_InternImmortal() function and the
SSTATE_INTERNED_IMMORTAL macro.

The PyUnicode_InternImmortal() function is still exported in the
stable ABI. The function is removed from the API.

PyASCIIObject.state.interned size is now a single bit, rather than 2
bits.

Keep SSTATE_NOT_INTERNED and SSTATE_INTERNED_MORTAL macros for
backward compatibility, but no longer use them internally since the
interned member is now a single bit and so can only have two values
(interned or not interned).

Update stats of _PyUnicode_ClearInterned().

3 years agogh-89653: Use int type for Unicode kind (#92704)
Victor Stinner [Fri, 13 May 2022 10:41:05 +0000 (12:41 +0200)] 
gh-89653: Use int type for Unicode kind (#92704)

Use the same type that PyUnicode_FromKindAndData() kind parameter
type (public C API): int.

3 years agoGH-92236: Remove spurious "line" event when starting coroutine or generator. (GH...
Mark Shannon [Fri, 13 May 2022 10:24:45 +0000 (11:24 +0100)] 
GH-92236: Remove spurious "line" event when starting coroutine or generator. (GH-92722)

3 years agogh-89653: PEP 670: Convert PyUnicode_KIND() macro to function (#92705)
Victor Stinner [Fri, 13 May 2022 09:49:56 +0000 (11:49 +0200)] 
gh-89653: PEP 670: Convert PyUnicode_KIND() macro to function (#92705)

In the limited C API version 3.12, PyUnicode_KIND() is now
implemented as a static inline function. Keep the macro for the
regular C API and for the limited C API version 3.11 and older to
prevent introducing new compiler warnings.

Update _decimal.c and stringlib/eq.h for PyUnicode_KIND().

3 years agogh-90473: Increase stack size, disable obmalloc on WASI (GH-92732)
Christian Heimes [Fri, 13 May 2022 06:36:01 +0000 (08:36 +0200)] 
gh-90473: Increase stack size, disable obmalloc on WASI (GH-92732)

3 years agogh-92536: Doc update about Py_UNICODE removal (GH-92756)
Inada Naoki [Fri, 13 May 2022 04:15:41 +0000 (13:15 +0900)] 
gh-92536: Doc update about Py_UNICODE removal (GH-92756)

3 years agogh-92584: test_cppext uses setuptools (#92639)
Victor Stinner [Thu, 12 May 2022 22:20:13 +0000 (00:20 +0200)] 
gh-92584: test_cppext uses setuptools (#92639)

Rewrite test_cppext to run in a virtual environment and to build the
C++ extension with setuptools rather than distutils.

3 years agogh-92311: Add tests for frame_setlineno jumping over listcomps (#92741)
Dennis Sweeney [Thu, 12 May 2022 21:43:54 +0000 (17:43 -0400)] 
gh-92311: Add tests for frame_setlineno jumping over listcomps (#92741)

3 years agoCheck result of utc_to_seconds and skip fold probe in pure Python (#91582)
Paul Ganssle [Thu, 12 May 2022 21:00:50 +0000 (17:00 -0400)] 
Check result of utc_to_seconds and skip fold probe in pure Python (#91582)

The `utc_to_seconds` call can fail, here's a minimal reproducer on
Linux:

TZ=UTC python -c "from datetime import *; datetime.fromtimestamp(253402300799 + 1)"

The old behavior still raised an error in a similar way, but only
because subsequent calculations happened to fail as well. Better to fail
fast.

This also refactors the tests to split out the `fromtimestamp` and
`utcfromtimestamp` tests, and to get us closer to the actual desired
limits of the functions. As part of this, we also changed the way we
detect platforms where the same limits don't necessarily apply (e.g.
Windows).

As part of refactoring the tests to hit this condition explicitly (even
though the user-facing behvior doesn't change in any way we plan to
guarantee), I noticed that there was a difference in the places that
`datetime.utcfromtimestamp` fails in the C and pure Python versions, which
was fixed by skipping the "probe for fold" logic for UTC specifically —
since UTC doesn't have any folds or gaps, we were never going to find a
fold value anyway. This should prevent some failures in the pure python
`utcfromtimestamp` method on timestamps close to 0001-01-01.

There are two separate news entries for this because one is a
potentially user-facing change, the other is an internal code
correctness change that, if anything, changes some error messages. The
two happen to be coupled because of the test refactoring, but they are
probably best thought of as independent changes.

Fixes GH-91581

3 years agoAdd notes for maintaining ABCs (#92736)
Raymond Hettinger [Thu, 12 May 2022 18:18:39 +0000 (13:18 -0500)] 
Add notes for maintaining ABCs (#92736)

3 years agogh-91578: improved error message when trying to instantiate an abstract class with...
ravi140222 [Thu, 12 May 2022 15:26:11 +0000 (20:56 +0530)] 
gh-91578: improved error message when trying to instantiate an abstract class with missing methods (gh-47246)

3 years agogh-92514: Remove unused test.support.BasicTestRunner (#92515)
Jelle Zijlstra [Thu, 12 May 2022 14:24:04 +0000 (07:24 -0700)] 
gh-92514: Remove unused test.support.BasicTestRunner (#92515)

3 years agogh-92436: __future__ docs: add note on expectations for "from __future__ import annot...
Jelle Zijlstra [Thu, 12 May 2022 14:23:42 +0000 (07:23 -0700)] 
gh-92436: __future__ docs: add note on expectations for "from __future__ import annotations" (#92568)

3 years agoUpdate outdated `LOAD_METHOD` comments in `Python/ceval.c` (GH-92641)
Crowthebird [Thu, 12 May 2022 12:37:55 +0000 (20:37 +0800)] 
Update outdated `LOAD_METHOD` comments in `Python/ceval.c` (GH-92641)

3 years agogh-92536: PEP 623: Remove wstr and legacy APIs from Unicode (GH-92537)
Inada Naoki [Thu, 12 May 2022 05:48:38 +0000 (14:48 +0900)] 
gh-92536: PEP 623: Remove wstr and legacy APIs from Unicode (GH-92537)

3 years agogh-86388 Remove deprecated behaviors in randrange() (#92677)
Raymond Hettinger [Thu, 12 May 2022 04:54:51 +0000 (23:54 -0500)] 
gh-86388 Remove deprecated behaviors in randrange() (#92677)

3 years agoFix typo in argparse docs. (GH-92691)
thueringa [Thu, 12 May 2022 03:25:09 +0000 (05:25 +0200)] 
Fix typo in argparse docs. (GH-92691)

# Fix typo in argparse docs.

> Sometimes, when dealing with **a** particularly long argument list**s**, [...]

Mixture between plural and singular forms is incorrect. Use singular consistently since typically only a single argument list is employed. Change to:

> Sometimes, when dealing with a particularly long argument list, [...]

No issue was opened, since this is a trivial change.

Automerge-Triggered-By: GH:rhettinger
3 years agogh-89653: PEP 670: Fix Sphinx syntax in Unicode doc (#92707)
Victor Stinner [Thu, 12 May 2022 01:38:49 +0000 (03:38 +0200)] 
gh-89653: PEP 670: Fix Sphinx syntax in Unicode doc (#92707)

3 years agogh-89653: PEP 670: unicodeobject.h uses _Py_CAST() (#92696)
Victor Stinner [Wed, 11 May 2022 23:35:41 +0000 (01:35 +0200)] 
gh-89653: PEP 670: unicodeobject.h uses _Py_CAST() (#92696)

Use _Py_CAST() and _Py_STATIC_CAST() in macros wrapping static inline
functions of unicodeobject.h.

Change also the kind type from unsigned int to int: same parameter
type than PyUnicode_FromKindAndData().

The limited API version 3.11 no longer casts arguments to expected
types.

3 years agogh-89653: PEP 670: Update C API unicode documentation (#92702)
Victor Stinner [Wed, 11 May 2022 23:33:52 +0000 (01:33 +0200)] 
gh-89653: PEP 670: Update C API unicode documentation (#92702)

3 years agogh-89653: PEP 670: Convert PyDict_GET_SIZE() macro to function (#92695)
Victor Stinner [Wed, 11 May 2022 22:58:42 +0000 (00:58 +0200)] 
gh-89653: PEP 670: Convert PyDict_GET_SIZE() macro to function (#92695)

The limited C API version 3.12 no longer casts the argument.

3 years agoFix minor documentation error in bisect docs (GH-92697)
Steve Dower [Wed, 11 May 2022 22:56:58 +0000 (23:56 +0100)] 
Fix minor documentation error in bisect docs (GH-92697)

3 years agogh-92031, test_embed: Improve test for unquickening static code (#92440)
Dennis Sweeney [Wed, 11 May 2022 22:54:00 +0000 (18:54 -0400)] 
gh-92031, test_embed: Improve test for unquickening static code (#92440)

3 years agogh-89653: PEP 670: Use PyObject* type for parameters (#92694)
Victor Stinner [Wed, 11 May 2022 22:49:03 +0000 (00:49 +0200)] 
gh-89653: PEP 670: Use PyObject* type for parameters (#92694)

Use the PyObject* type for parameters of static inline functions:

* Py_SIZE(): same parameter type than PyObject_Size()
* PyList_GET_SIZE(), PyList_SET_ITEM(): same parameter type than
  PyList_Size() and PyList_SetItem()
* PyTuple_GET_SIZE(), PyTuple_SET_ITEM(): same parameter type than
  PyTuple_Size() and PyTuple_SetItem().

3 years agogh-89653: Add assertions to unicodeobject.h functions (#92692)
Victor Stinner [Wed, 11 May 2022 22:12:42 +0000 (00:12 +0200)] 
gh-89653: Add assertions to unicodeobject.h functions (#92692)

3 years agogh-89653: PEP 670: Limited API doesn't cast arguments (#92654)
Victor Stinner [Wed, 11 May 2022 22:01:42 +0000 (00:01 +0200)] 
gh-89653: PEP 670: Limited API doesn't cast arguments (#92654)

The limited API version 3.11 no longer casts arguments to expected
types of functions of functions:

* PyList_GET_SIZE(), PyList_SET_ITEM()
* PyTuple_GET_SIZE(), PyTuple_SET_ITEM()
* PyWeakref_GET_OBJECT()

3 years agogh-89653: PEP 670: Convert unicodeobject.h macros to functions (#92648)
Victor Stinner [Wed, 11 May 2022 21:28:39 +0000 (23:28 +0200)] 
gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#92648)

Convert the following Unicode macros to static inline functions.

Surrogate functions:

* Py_UNICODE_IS_SURROGATE()
* Py_UNICODE_IS_HIGH_SURROGATE()
* Py_UNICODE_IS_LOW_SURROGATE()
* Py_UNICODE_HIGH_SURROGATE()
* Py_UNICODE_LOW_SURROGATE()
* Py_UNICODE_JOIN_SURROGATES()

"Is" functions:

* Py_UNICODE_ISALNUM()
* Py_UNICODE_ISSPACE()

In the implementation of these functions, the character type is now
well defined to Py_UCS4.

3 years agogh-90978: asyncio TestSSL uses SHORT_TIMEOUT (#92642)
Victor Stinner [Wed, 11 May 2022 21:25:56 +0000 (23:25 +0200)] 
gh-90978: asyncio TestSSL uses SHORT_TIMEOUT (#92642)

TestSSL of asyncio now uses support.SHORT_TIMEOUT rather than
hardcoded timeouts like 5, 10 or 40 seconds.

3 years agogh-89653: PEP 670: Convert PyCell macros to functions (#92653)
Victor Stinner [Wed, 11 May 2022 21:24:48 +0000 (23:24 +0200)] 
gh-89653: PEP 670: Convert PyCell macros to functions (#92653)

Convert the following macros to static inline functions:

* PyCell_GET()
* PyCell_SET()

Limited C API version 3.12 no longer casts arguments.

Fix also usage of PyCell_SET(): only delete the old value after
setting the new value.

3 years agogh-92651: Remove the Include/token.h header file (#92652)
Victor Stinner [Wed, 11 May 2022 21:22:50 +0000 (23:22 +0200)] 
gh-92651: Remove the Include/token.h header file (#92652)

Remove the token.h header file. There was never any public tokenizer
C API. The token.h header file was only designed to be used by Python
internals.

Move Include/token.h to Include/internal/pycore_token.h. Including
this header file now requires that the Py_BUILD_CORE macro is
defined. It no longer checks for the Py_LIMITED_API macro.

Rename functions:

* PyToken_OneChar() => _PyToken_OneChar()
* PyToken_TwoChars() => _PyToken_TwoChars()
* PyToken_ThreeChars() => _PyToken_ThreeChars()

3 years agobpo-42627: Fix incorrect parsing of Windows registry proxy settings (GH-26307)
狂男风 [Wed, 11 May 2022 18:17:17 +0000 (02:17 +0800)] 
bpo-42627: Fix incorrect parsing of Windows registry proxy settings (GH-26307)

3 years agogh-89653: PEP 670: Convert pycore_gc.h macros to functions (#92649)
Victor Stinner [Wed, 11 May 2022 11:37:18 +0000 (13:37 +0200)] 
gh-89653: PEP 670: Convert pycore_gc.h macros to functions (#92649)

Convert the following macros to static inline functions:

* _Py_AS_GC()
* _PyGCHead_FINALIZED(), _PyGCHead_SET_FINALIZED()
* _PyGCHead_NEXT(), _PyGCHead_SET_NEXT()
* _PyGCHead_PREV(), _PyGCHead_SET_PREV()
* _PyGC_FINALIZED(), _PyGC_SET_FINALIZED()
* _PyObject_GC_IS_TRACKED()
* _PyObject_GC_MAY_BE_TRACKED()

Add a macro wrapping the _PyObject_GC_IS_TRACKED() function to cast
the argument to PyObject*.

3 years agogh-91810: ElementTree: Use text file's encoding by default in XML declaration (GH...
Serhiy Storchaka [Wed, 11 May 2022 06:31:07 +0000 (09:31 +0300)] 
gh-91810: ElementTree: Use text file's encoding by default in XML declaration (GH-91903)

ElementTree method write() and function tostring() now use the text file's
encoding ("UTF-8" if not available) instead of locale encoding in XML
declaration when encoding="unicode" is specified.

3 years agogh-89336: Fix configparser.RawConfigParser.readfp typo (GH-92636)
Hugo van Kemenade [Wed, 11 May 2022 06:18:45 +0000 (09:18 +0300)] 
gh-89336: Fix configparser.RawConfigParser.readfp typo (GH-92636)

3 years agoFix typo in unittest.rst: addCleanupModule -> addModuleCleanup (GH-92631)
Mikhail Terekhov [Wed, 11 May 2022 06:14:12 +0000 (02:14 -0400)] 
Fix typo in unittest.rst: addCleanupModule -> addModuleCleanup (GH-92631)

3 years agogh-92632: Make function starunpack_helper run faster when encounters starred argument...
zikcheng [Wed, 11 May 2022 06:09:40 +0000 (14:09 +0800)] 
gh-92632: Make function starunpack_helper run faster when encounters starred argument. (GH-92655)

3 years agogh-92550: Fix pathlib.Path.rglob() for empty pattern (GH-92604)
Serhiy Storchaka [Wed, 11 May 2022 04:43:04 +0000 (07:43 +0300)] 
gh-92550: Fix pathlib.Path.rglob() for empty pattern (GH-92604)

3 years agoRevert "gh-92550 - Fix regression in `pathlib.Path.rglob()` (GH-92583)" (GH-92598)
Serhiy Storchaka [Wed, 11 May 2022 04:14:25 +0000 (07:14 +0300)] 
Revert "gh-92550 - Fix regression in `pathlib.Path.rglob()` (GH-92583)" (GH-92598)

This reverts commit dcdf250d2de1428f7d8b4e9ecf51d2fd8200e21a.

3 years agogh-92584: test_decimal uses shutil.which() (#92640)
Victor Stinner [Tue, 10 May 2022 23:42:09 +0000 (01:42 +0200)] 
gh-92584: test_decimal uses shutil.which() (#92640)

test_decimal now uses shutil.which() rather than deprecated
distutils.spawn.find_executable().

3 years agoWhat's New 3.12: PyFrame_BlockSetup() was removed in 3.11 (#92645)
Victor Stinner [Tue, 10 May 2022 23:28:17 +0000 (01:28 +0200)] 
What's New 3.12: PyFrame_BlockSetup() was removed in 3.11 (#92645)

What's New in Python 3.11: "PyFrame_BlockSetup() and
PyFrame_BlockPop() have been removed.  (Contributed by Mark Shannon
in bpo-40222.)"
https://docs.python.org/dev/whatsnew/3.11.html#id8

3 years agogh-91966 Document where key functions are applied in the bisect module (#92602)
Raymond Hettinger [Tue, 10 May 2022 22:18:58 +0000 (17:18 -0500)] 
gh-91966 Document where key functions are applied in the bisect module (#92602)

3 years agobpo-39264: Fix UserDict.get() to account for __missing__() (GH-17910)
Bar Harel [Tue, 10 May 2022 21:23:45 +0000 (00:23 +0300)] 
bpo-39264: Fix UserDict.get() to account for __missing__() (GH-17910)

Here's the patch according to the discussion at the [Python-Dev mailing list](https://mail.python.org/archives/list/python-dev@python.org/thread/SDXOEMAEM6KQ3CQCJVBVRT5QNSPAVU6X/).
UserDict.get() will match dict's behavior and not call `__missing__`.

Automerge-Triggered-By: GH:rhettinger
3 years agobpo-39278: add docstrings to functions in pdb module (#17924)
Carl Bordum Hansen [Tue, 10 May 2022 20:59:58 +0000 (22:59 +0200)] 
bpo-39278: add docstrings to functions in pdb module (#17924)

3 years agobpo-43689: improve documentation for Differ (GH-25132)
Jürgen Gmach [Tue, 10 May 2022 20:57:12 +0000 (22:57 +0200)] 
bpo-43689: improve documentation for Differ (GH-25132)

Lines beginning with ``?`` try to help understanding the given diff.

The output can be hard to understand when it contains whitespace characters, such as spaces, tabs or line breaks.

While previously only tabs were mentioned, now all are listed.

Automerge-Triggered-By: GH:rhettinger
3 years agogh-84131: Remove the deprecated pathlib.Path.link_to method. (#92505)
Gregory P. Smith [Tue, 10 May 2022 19:31:41 +0000 (12:31 -0700)] 
gh-84131: Remove the deprecated pathlib.Path.link_to method. (#92505)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
3 years agoUpdate numbers.rst (#31995)
Géry Ogam [Tue, 10 May 2022 18:01:49 +0000 (20:01 +0200)] 
Update numbers.rst (#31995)

3 years agobpo-42259: clarify pprint saferepr docs (#30256)
andrei kulakov [Tue, 10 May 2022 17:22:36 +0000 (13:22 -0400)] 
bpo-42259: clarify pprint saferepr docs (#30256)

3 years agogh-80143: Add clarification for escape characters (#92292)
slateny [Tue, 10 May 2022 16:12:29 +0000 (09:12 -0700)] 
gh-80143: Add clarification for escape characters (#92292)

3 years agogh-91731: Fix typo in pymacro.h (#92618)
Pablo Galindo Salgado [Tue, 10 May 2022 12:47:22 +0000 (13:47 +0100)] 
gh-91731: Fix typo in pymacro.h (#92618)

* Fix typo in pymacro.h

* Update Include/pymacro.h

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agogh-92619: Fix bug where the compiler duplicates exit blocks unnecessarily (GH-92620)
Irit Katriel [Tue, 10 May 2022 12:36:08 +0000 (13:36 +0100)] 
gh-92619: Fix bug where the compiler duplicates exit blocks unnecessarily (GH-92620)

3 years agoAdd `__slots__` to `typing._NotIterable` (GH-92570)
Alex Waygood [Tue, 10 May 2022 09:17:54 +0000 (10:17 +0100)] 
Add `__slots__` to `typing._NotIterable` (GH-92570)

3 years agogh-92256: Improve Argument Clinic parser error messages (#92268)
Erlend Egeberg Aasland [Tue, 10 May 2022 07:23:42 +0000 (09:23 +0200)] 
gh-92256: Improve Argument Clinic parser error messages (#92268)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agogh-76773: Update docs mentioning no-longer-supported Windows versions & features...
CAM Gerlach [Tue, 10 May 2022 06:30:32 +0000 (00:30 -0600)] 
gh-76773: Update docs mentioning no-longer-supported Windows versions & features (GH-92529)

3 years agogh-92417: `zlib` docs, `binascii` docs: remove Python 2 compatibility notes (GH-92543)
Alex Waygood [Tue, 10 May 2022 05:48:18 +0000 (06:48 +0100)] 
gh-92417: `zlib` docs, `binascii` docs: remove Python 2 compatibility notes (GH-92543)

3 years agogh-92417: `unittest.mock` docs: remove references to Python <2.6 (GH-92539)
Alex Waygood [Tue, 10 May 2022 05:47:36 +0000 (06:47 +0100)] 
gh-92417: `unittest.mock` docs: remove references to Python <2.6 (GH-92539)

3 years agogh-91928: Add what's new entry for datetime.UTC alias (GH-92567)
Paul Ganssle [Tue, 10 May 2022 03:51:28 +0000 (23:51 -0400)] 
gh-91928: Add what's new entry for datetime.UTC alias (GH-92567)

I merged this without a What's New entry to avoid merge conflicts, so here's the follow-up adding the entry.

@Kab1r do you mind reviewing?

Closes #91928

Automerge-Triggered-By: GH:pganssle
3 years agobpo-13553: Document tkinter.Tk args (#4786)
Cheryl Sabella [Tue, 10 May 2022 03:49:00 +0000 (23:49 -0400)] 
bpo-13553: Document tkinter.Tk args (#4786)

3 years ago[Enum] Remove redundant check for existing members. (GH-92590)
Ethan Furman [Tue, 10 May 2022 02:40:42 +0000 (19:40 -0700)] 
[Enum] Remove redundant check for existing members. (GH-92590)

3 years agogh-92550 - Fix regression in `pathlib.Path.rglob()` (GH-92583)
Barney Gale [Tue, 10 May 2022 00:12:16 +0000 (01:12 +0100)] 
gh-92550 - Fix regression in `pathlib.Path.rglob()` (GH-92583)

We could try to remedy this by taking a slice, but we then run into an issue where the empty string will match altsep on POSIX. That rabbit hole could keep getting deeper.

A proper fix for the original issue involves making pathlib's path normalisation more configurable - in this case we want to retain trailing slashes, but in other we might want to preserve `./` prefixes, or elide `../` segments when we're sure we won't encounter symlinks.

This reverts commit ea2f5bcda1a392804487e6883be89fbad38a01a5.

3 years agogh-88750: On Windows, PyThread_acquire_lock() no longer checks for NULL (#92586)
Victor Stinner [Tue, 10 May 2022 00:00:38 +0000 (02:00 +0200)] 
gh-88750: On Windows, PyThread_acquire_lock() no longer checks for NULL (#92586)

On Windows, PyThread_acquire_lock(), PyThread_acquire_lock_timed()
and PyThread_release_lock() no longer check at runtime if the lock is
not NULL.

3 years agogh-88750: Remove the PYTHONTHREADDEBUG env var support. (#92509)
Gregory P. Smith [Mon, 9 May 2022 23:03:46 +0000 (16:03 -0700)] 
gh-88750: Remove the PYTHONTHREADDEBUG env var support. (#92509)

Remove the `PYTHONTHREADDEBUG` env var support.
Remove no-op dprintf() macro calls.

3 years agobpo-46907: Update Windows installer to SQLite 3.38.4. (#92322)
Mariusz Felisiak [Mon, 9 May 2022 21:37:01 +0000 (23:37 +0200)] 
bpo-46907: Update Windows installer to SQLite 3.38.4. (#92322)

3 years agoDoc: Update py2app link. (#91585)
Julien Palard [Mon, 9 May 2022 21:10:19 +0000 (23:10 +0200)] 
Doc: Update py2app link. (#91585)

See: https://mail.python.org/archives/list/docs@python.org/thread/KDVFGNGGUGGPVRZT7WZYHHWXCRS2GEN7/

3 years agogh-92171: Update Tcl/Tk download links in macOS installer script (GH-92179)
Erlend Egeberg Aasland [Mon, 9 May 2022 18:32:21 +0000 (20:32 +0200)] 
gh-92171: Update Tcl/Tk download links in macOS installer script (GH-92179)

3 years agogh-91731: Add macro compatibility for static_assert for old libcs (GH-92559)
Pablo Galindo Salgado [Mon, 9 May 2022 17:38:38 +0000 (18:38 +0100)] 
gh-91731: Add macro compatibility for static_assert for old libcs (GH-92559)

3 years agogh-86019: Add table for Windows installer options (GH-91809)
slateny [Mon, 9 May 2022 16:40:51 +0000 (09:40 -0700)] 
gh-86019: Add table for Windows installer options (GH-91809)

3 years agogh-91345: Talk about ``sys._getframe`` compatibility in 3.11 whatsnew (GH-92552)
Ken Jin [Mon, 9 May 2022 13:45:13 +0000 (21:45 +0800)] 
gh-91345: Talk about ``sys._getframe`` compatibility in 3.11 whatsnew (GH-92552)

3 years agoWhat's New in Python 3.12: move C API at the end (#92555)
Victor Stinner [Mon, 9 May 2022 12:26:30 +0000 (14:26 +0200)] 
What's New in Python 3.12: move C API at the end (#92555)

* Separate Build and C API changes in two sections
* Add sub-sections to the C API changes

3 years agoWhat's New in Python 3.11: move C API changes (#92390)
Victor Stinner [Mon, 9 May 2022 10:40:56 +0000 (12:40 +0200)] 
What's New in Python 3.11: move C API changes (#92390)

Move C API changes to the C API > Porting to Python 3.11 section.

3 years agoEnhance PyConfig documentation (#92394)
Victor Stinner [Mon, 9 May 2022 10:35:59 +0000 (12:35 +0200)] 
Enhance PyConfig documentation (#92394)

3 years agogh-90005: Cleanup after GH-31698 (#91642)
Erlend Egeberg Aasland [Mon, 9 May 2022 09:00:20 +0000 (11:00 +0200)] 
gh-90005: Cleanup after GH-31698 (#91642)

3 years agoCODEOWNERS: Add Erlend Aasland as sqlite3 code owner (#92535)
Erlend Egeberg Aasland [Mon, 9 May 2022 08:06:03 +0000 (10:06 +0200)] 
CODEOWNERS: Add Erlend Aasland as sqlite3 code owner (#92535)

Signed-off-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
3 years agoFix inconsistent return type for statistics median_grouped() gh-92531 (#92533)
Raymond Hettinger [Mon, 9 May 2022 07:08:41 +0000 (02:08 -0500)] 
Fix inconsistent return type for statistics median_grouped()  gh-92531 (#92533)

3 years agobpo-38056: overhaul Error Handlers section in codecs documentation (#15732)
Ma Lin [Mon, 9 May 2022 02:58:55 +0000 (10:58 +0800)] 
bpo-38056: overhaul Error Handlers section in codecs documentation (#15732)

* Some handlers were wrongly described as text-encoding only, but actually they can also be used in text-decoding.
* Add more description to each handler.
* Add two REPL examples.
* Add indexes for Error Handler's name.

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-39229: fix formatting in library/functions.rst (#17857)
Rafael Fontenelle [Sun, 8 May 2022 23:21:19 +0000 (20:21 -0300)] 
bpo-39229: fix formatting in library/functions.rst (#17857)

Missing reference of auditing event presents error when building translated documentation

3 years agopdb docs: workaround for double semicolon in strings (#17011)
Godefroid Chapelle [Sun, 8 May 2022 23:20:42 +0000 (01:20 +0200)] 
pdb docs: workaround for double semicolon in strings (#17011)

see https://github.com/gotcha/ipdb/issues/172

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-91968: Add socket constants SO_USER_COOKIE/SO_RTABLE from BSD (#91967)
David CARLIER [Sun, 8 May 2022 23:19:41 +0000 (00:19 +0100)] 
gh-91968: Add socket constants SO_USER_COOKIE/SO_RTABLE from BSD (#91967)

Those are somewhat equivalent to Linux' SO_MARK.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-77521: Add link to builtin module names in modules tutorial (#92438)
slateny [Sun, 8 May 2022 19:30:38 +0000 (12:30 -0700)] 
gh-77521: Add link to builtin module names in modules tutorial (#92438)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agoUse percentage over factor for 3.11 whatsnew performance (GH-92496)
Ken Jin [Sun, 8 May 2022 16:44:55 +0000 (00:44 +0800)] 
Use percentage over factor for 3.11 whatsnew performance (GH-92496)

3 years agogh-90622: Do not spawn ProcessPool workers on demand via fork method. (#91598)
Gregory P. Smith [Sun, 8 May 2022 16:20:34 +0000 (09:20 -0700)] 
gh-90622: Do not spawn ProcessPool workers on demand via fork method. (#91598)

Do not spawn ProcessPool workers on demand when they spawn via fork.

This avoids potential deadlocks in the child processes due to forking from
a multithreaded process.

3 years agogh-91760: More strict rules for numerical group references and group names in RE...
Serhiy Storchaka [Sun, 8 May 2022 16:19:29 +0000 (19:19 +0300)] 
gh-91760: More strict rules for numerical group references and group names in RE (GH-91792)

Only sequence of ASCII digits is now accepted as a numerical reference.
The group name in bytes patterns and replacement strings can now only
contain ASCII letters and digits and underscore.

3 years agogh-80856: doc: reveal doctest directives (#92318)
Davide Rizzo [Sun, 8 May 2022 16:14:55 +0000 (18:14 +0200)] 
gh-80856: doc: reveal doctest directives (#92318)

* Doc: Reveal doctest directives.

* Fix whitespace.

Co-authored-by: Julien Palard <julien@palard.fr>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
3 years agoFix typo in whatsnew (GH-92488)
Ezio Melotti [Sun, 8 May 2022 16:02:27 +0000 (18:02 +0200)] 
Fix typo in whatsnew (GH-92488)

Automerge-Triggered-By: GH:ezio-melotti
3 years agoFix the `versionadded` for asyncio.StreamWriter.start_tls() (#92378)
Oleg Iarygin [Sun, 8 May 2022 15:44:54 +0000 (18:44 +0300)] 
Fix the `versionadded` for asyncio.StreamWriter.start_tls() (#92378)

3 years agogh-92417: `logging` docs: Remove warning that only applies to Python <3.2 (#92425)
Alex Waygood [Sun, 8 May 2022 15:36:38 +0000 (16:36 +0100)] 
gh-92417: `logging` docs: Remove warning that only applies to Python <3.2 (#92425)

3 years agogh-91162: Fix substitution of unpacked tuples in generic aliases (GH-92335)
Serhiy Storchaka [Sun, 8 May 2022 15:32:32 +0000 (18:32 +0300)] 
gh-91162: Fix substitution of unpacked tuples in generic aliases (GH-92335)

3 years agoFix What's New for 3.12 (GH-92482)
Serhiy Storchaka [Sun, 8 May 2022 15:23:08 +0000 (18:23 +0300)] 
Fix What's New for 3.12 (GH-92482)

3 years ago`typing.Text`: tweak deprecation notice (#92405)
Alex Waygood [Sun, 8 May 2022 15:22:32 +0000 (16:22 +0100)] 
`typing.Text`: tweak deprecation notice (#92405)

https://github.com/python/cpython/pull/92351/files#r866869469

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agoUpdate What's New in 3.11 faster cpython figures and contributors (GH-92401)
Ken Jin [Sun, 8 May 2022 15:05:30 +0000 (23:05 +0800)] 
Update What's New in 3.11 faster cpython figures and contributors (GH-92401)

3 years agobpo-45046: Support context managers in unittest (GH-28045)
Serhiy Storchaka [Sun, 8 May 2022 14:49:09 +0000 (17:49 +0300)] 
bpo-45046: Support context managers in unittest (GH-28045)

Add methods enterContext() and enterClassContext() in TestCase.
Add method enterAsyncContext() in IsolatedAsyncioTestCase.
Add function enterModuleContext().

3 years agogh-77630: Change Charset to charset (GH-92439)
slateny [Sun, 8 May 2022 14:35:32 +0000 (07:35 -0700)] 
gh-77630: Change Charset to charset (GH-92439)

3 years agoAdd __class_getitem__ to csv.DictReader and csv.DictWriter (#92393)
Marc Mueller [Sun, 8 May 2022 14:24:54 +0000 (16:24 +0200)] 
Add __class_getitem__ to csv.DictReader and csv.DictWriter (#92393)

3 years agobpo-44712: Replace "type(literal)" with corresponding builtin types (GH-27294)
Serhiy Storchaka [Sun, 8 May 2022 14:10:11 +0000 (17:10 +0300)] 
bpo-44712: Replace "type(literal)" with corresponding builtin types (GH-27294)

I suppose it is a remnants of very old code written when str, int, list, dict, etc
were functions and not classes.

3 years agogh-89474: Improve Semaphore/BoundedSemaphore.release() for multiple thread waiting...
Dong-hee Na [Sun, 8 May 2022 13:33:53 +0000 (22:33 +0900)] 
gh-89474: Improve Semaphore/BoundedSemaphore.release() for multiple thread waiting (GH-92447)

3 years agogh-92417: `stdtypes` docs: delete discussion of Python 2 differences (GH-92423)
Alex Waygood [Sun, 8 May 2022 13:23:22 +0000 (14:23 +0100)] 
gh-92417: `stdtypes` docs: delete discussion of Python 2 differences (GH-92423)

Given that 2.7 has now been end-of-life for two and a half years,
I don't think we need such a detailed explanation here anymore of
the differences between Python 2 and Python 3.

3 years agogh-92261: Disallow iteration of Union (and other special forms) (GH-92262)
Matthew Rahtz [Sun, 8 May 2022 13:21:28 +0000 (14:21 +0100)] 
gh-92261: Disallow iteration of Union (and other special forms) (GH-92262)

3 years agoGH-92431: Fix footnotes in Doc/c-api/exceptions.rst (GH-92432)
Hugo van Kemenade [Sun, 8 May 2022 13:19:16 +0000 (16:19 +0300)] 
GH-92431: Fix footnotes in  Doc/c-api/exceptions.rst (GH-92432)

* Remove redundant footnote ref: the footnote has been removed
* Fix footnote ref to match footnote
* Convert footnotes into reST footnotes: will error if missing