]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years agoRevert "Fix a code snippet typo in asyncio docs (#108427)" (GH-111271)
Zachary Ware [Tue, 24 Oct 2023 16:09:13 +0000 (11:09 -0500)] 
Revert "Fix a code snippet typo in asyncio docs (#108427)" (GH-111271)

This reverts commit 7f316763402a7d5556deecc3acd06cb719e189b3.

The change resulted in a tautology and should not have been made.  There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)

Ref: https://github.com/python/cpython/pull/108427#issuecomment-1777525740

2 years agogh-111151: Convert monospaced directives to :ref: (#111152)
InSync [Tue, 24 Oct 2023 15:22:08 +0000 (22:22 +0700)] 
gh-111151: Convert monospaced directives to :ref: (#111152)

2 years agogh-75666: Tkinter: add tests for binding (GH-111202)
Serhiy Storchaka [Tue, 24 Oct 2023 10:02:12 +0000 (13:02 +0300)] 
gh-75666: Tkinter: add tests for binding (GH-111202)

2 years agogh-97928: Change the behavior of tkinter.Text.count() (GH-98484)
Serhiy Storchaka [Tue, 24 Oct 2023 09:59:19 +0000 (12:59 +0300)] 
gh-97928: Change the behavior of tkinter.Text.count() (GH-98484)

It now always returns an integer if one or less counting options are specified.
Previously it could return a single count as a 1-tuple, an integer (only if
option "update" was specified) or None if no items found.
The result is now the same if wantobjects is set to 0.

2 years agogh-110019: Refactor summarize_stats (GH-110398)
Michael Droettboom [Tue, 24 Oct 2023 08:57:39 +0000 (04:57 -0400)] 
gh-110019: Refactor summarize_stats (GH-110398)

2 years agoFix typo in sys docs (#111196)
James Tocknell [Tue, 24 Oct 2023 08:03:35 +0000 (19:03 +1100)] 
Fix typo in sys docs (#111196)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agoGH-94438: Restore ability to jump over None tests (GH-111237)
Savannah Ostrowski [Tue, 24 Oct 2023 06:13:16 +0000 (23:13 -0700)] 
GH-94438: Restore ability to jump over None tests (GH-111237)

2 years agogh-110572: Remove `test_*` from `_testcapi/getargs.c` (GH-111214)
Nikita Sobolev [Tue, 24 Oct 2023 05:50:11 +0000 (08:50 +0300)] 
gh-110572: Remove `test_*` from `_testcapi/getargs.c` (GH-111214)

2 years agogh-109894: Fix initialization of static `MemoryError` in subinterpreter (gh-110911)
Radislav Chugunov [Mon, 23 Oct 2023 23:06:59 +0000 (02:06 +0300)] 
gh-109894: Fix initialization of static `MemoryError` in subinterpreter (gh-110911)

Fixes #109894

* set `interp.static_objects.last_resort_memory_error.args` to empty tuple to avoid crash on `PyErr_Display()` call
* allow `_PyExc_InitGlobalObjects()` to be called on subinterpreter init

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 years agogh-101100: Fix Sphinx warnings for `fileno` (#111118)
Hugo van Kemenade [Mon, 23 Oct 2023 19:05:56 +0000 (22:05 +0300)] 
gh-101100: Fix Sphinx warnings for `fileno` (#111118)

2 years agoAdd a version added note for PY_VECTORCALL_ARGUMENTS_OFFSET (#110963)
Anthony Shaw [Mon, 23 Oct 2023 16:00:52 +0000 (03:00 +1100)] 
Add a version added note for PY_VECTORCALL_ARGUMENTS_OFFSET (#110963)

2 years agotypo: missing line of output in pull parser example (#111068)
Don Patterson [Mon, 23 Oct 2023 15:54:29 +0000 (12:54 -0300)] 
typo: missing line of output in pull parser example (#111068)

2 years agoFix typo in 3.13's whatsnew (#111215)
Pablo Martí Gamboa [Mon, 23 Oct 2023 15:43:08 +0000 (17:43 +0200)] 
Fix typo in 3.13's whatsnew (#111215)

2 years agogh-105931: Fix surprising compileall stripdir behaviour (GH-108671)
hetmankp [Mon, 23 Oct 2023 13:55:39 +0000 (00:55 +1100)] 
gh-105931: Fix surprising compileall stripdir behaviour (GH-108671)

Before, the '-s STRIPDIR' option on
compileall lead to some surprising results as it only strips away
path components that match, but leaves alone the non-matching ones
interspersed in between.

For example, with: python -m compileall -s/path/to/another/src
/path/to/build/src/file.py

The resulting written path will be: build/file.py

This fix only strips directories that are a fully matching prefix of the
source path. If a stripdir is provided that is not a valid prefix, a
warning will be displayed (which can be silenced with '-qq').

2 years agoGH-109369: Add machinery for deoptimizing tier2 executors, both individually and...
Mark Shannon [Mon, 23 Oct 2023 13:49:09 +0000 (14:49 +0100)] 
GH-109369: Add machinery for deoptimizing tier2 executors, both individually and globally. (GH-110384)

2 years agogh-67565: Remove redundant C-contiguity checks (GH-105521)
Furkan Onder [Mon, 23 Oct 2023 09:54:46 +0000 (12:54 +0300)] 
gh-67565: Remove redundant C-contiguity checks (GH-105521)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
2 years agogh-110383: Italicize variable name (#111206)
Nick [Mon, 23 Oct 2023 07:56:36 +0000 (10:56 +0300)] 
gh-110383: Italicize variable name (#111206)

2 years agogh-110383: Added explanation about simplest regex use case for quantifiers. (#111110)
Nick [Mon, 23 Oct 2023 07:22:17 +0000 (10:22 +0300)] 
gh-110383: Added explanation about simplest regex use case for quantifiers. (#111110)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agogh-110828: AIX 32bit build needs -latomic for _testcapi module (#110962)
Ayappan Perumal [Sun, 22 Oct 2023 20:58:52 +0000 (02:28 +0530)] 
gh-110828: AIX 32bit build needs -latomic for _testcapi module (#110962)

2 years agogh-110196: Fix ipaddress.IPv6Address.__reduce__ (GH-110198)
Tian Gao [Sun, 22 Oct 2023 18:50:51 +0000 (11:50 -0700)] 
gh-110196: Fix ipaddress.IPv6Address.__reduce__ (GH-110198)

2 years agogh-109975: What's new in 3.13: Add module headers to removals and sort (#110994)
Hugo van Kemenade [Sun, 22 Oct 2023 18:45:17 +0000 (21:45 +0300)] 
gh-109975: What's new in 3.13: Add module headers to removals and sort (#110994)

2 years agogh-101100: Fix sphinx warnings in `library/asyncio-dev.rst` (GH-111179)
Nikita Sobolev [Sun, 22 Oct 2023 17:11:57 +0000 (20:11 +0300)] 
gh-101100: Fix sphinx warnings in `library/asyncio-dev.rst` (GH-111179)

* gh-101100: Fix sphinx warnings in `library/asyncio-dev.rst`

* Update Doc/library/asyncio-eventloop.rst

* Update Doc/library/asyncio-eventloop.rst

---------

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2 years agogh-101100: Fix Sphinx warning in `tutorial/introduction.rst` (#111173) 111183/head
Maciej Olko [Sun, 22 Oct 2023 11:53:17 +0000 (13:53 +0200)] 
gh-101100: Fix Sphinx warning in `tutorial/introduction.rst` (#111173)

2 years agogh-109975: What's new in 3.13: Add PEP 594 to release highlights (#110993)
Hugo van Kemenade [Sun, 22 Oct 2023 07:17:03 +0000 (10:17 +0300)] 
gh-109975: What's new in 3.13: Add PEP 594 to release highlights (#110993)

2 years agogh-111085: Fix invalid state handling in TaskGroup and Timeout (#111111)
Serhiy Storchaka [Sat, 21 Oct 2023 19:18:34 +0000 (22:18 +0300)] 
gh-111085: Fix invalid state handling in TaskGroup and Timeout (#111111)

asyncio.TaskGroup and asyncio.Timeout classes now raise proper RuntimeError
if they are improperly used.

* When they are used without entering the context manager.
* When they are used after finishing.
* When the context manager is entered more than once (simultaneously or
  sequentially).
* If there is no current task when entering the context manager.

They now remain in a consistent state after an exception is thrown,
so subsequent operations can be performed correctly (if they are allowed).

Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
2 years agogh-111159: Fix `doctest` output comparison for exceptions with notes (#111160)
Nikita Sobolev [Sat, 21 Oct 2023 18:02:00 +0000 (21:02 +0300)] 
gh-111159: Fix `doctest` output comparison for exceptions with notes (#111160)

2 years agogh-111157: Mention `__notes__` in `traceback.format_exception_only` docstring (#111158)
Nikita Sobolev [Sat, 21 Oct 2023 15:30:14 +0000 (18:30 +0300)] 
gh-111157: Mention `__notes__` in `traceback.format_exception_only` docstring (#111158)

2 years agogh-110918: regrtest: allow to intermix --match and --ignore options (GH-110919)
Serhiy Storchaka [Sat, 21 Oct 2023 14:44:46 +0000 (17:44 +0300)] 
gh-110918: regrtest: allow to intermix --match and --ignore options (GH-110919)

Test case matching patterns specified by options --match, --ignore,
--matchfile and --ignorefile are now tested in the order of
specification, and the last match determines whether the test case be run
or ignored.

2 years agogh-111123: symtable should visit exception handlers before the else block (#111142)
Irit Katriel [Sat, 21 Oct 2023 12:38:29 +0000 (13:38 +0100)] 
gh-111123: symtable should visit exception handlers before the else block (#111142)

2 years agogh-110572: Fix potential leaks in test_*_code in _testcapi/getargs.c (GH-110573)
Nikita Sobolev [Sat, 21 Oct 2023 12:23:09 +0000 (15:23 +0300)] 
gh-110572: Fix potential leaks in test_*_code in _testcapi/getargs.c (GH-110573)

2 years agogh-111155: Fix direct invocation of test_pprint (GH-111156)
Nikita Sobolev [Sat, 21 Oct 2023 12:09:01 +0000 (15:09 +0300)] 
gh-111155: Fix direct invocation of test_pprint (GH-111156)

2 years agogh-110974: Make sure all test_zoneinfo tests are collected (GH-110975)
Nikita Sobolev [Sat, 21 Oct 2023 11:26:03 +0000 (14:26 +0300)] 
gh-110974: Make sure all test_zoneinfo tests are collected (GH-110975)

Test classes from the test_zoneinfo submodule were overridden by
test classes from the test_zoneinfo_property submodule with the same name.

2 years agogh-110932: Fix regrtest for SOURCE_DATE_EPOCH (#111143)
Victor Stinner [Sat, 21 Oct 2023 08:37:48 +0000 (10:37 +0200)] 
gh-110932: Fix regrtest for SOURCE_DATE_EPOCH (#111143)

If the SOURCE_DATE_EPOCH environment variable is defined, use its
value as the random seed.

2 years agogh-106310 - document the __signature__ attribute (#106311)
Gouvernathor [Fri, 20 Oct 2023 22:54:02 +0000 (00:54 +0200)] 
gh-106310 - document the __signature__ attribute (#106311)

Document the __signature__ attribute

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-111046: for wasi-threads, export memory as well via the linker (GH-111099)
YAMAMOTO Takashi [Fri, 20 Oct 2023 21:54:03 +0000 (06:54 +0900)] 
gh-111046: for wasi-threads, export memory as well via the linker (GH-111099)

2 years agogh-110964: clinic: refactor output_templates() (#110982)
Victor Stinner [Fri, 20 Oct 2023 21:42:02 +0000 (23:42 +0200)] 
gh-110964: clinic: refactor output_templates() (#110982)

2 years agogh-111133: Remove unnecessary PyFrozenSet_Check() calls in const folding (GH-111137)
Kirill Podoprigora [Fri, 20 Oct 2023 20:37:38 +0000 (23:37 +0300)] 
gh-111133: Remove unnecessary PyFrozenSet_Check() calls in const folding (GH-111137)

frozenset does not support multiplication.

2 years agogh-111132: Fix crash on interactive_filename in `run_mod` (#111136)
Nikita Sobolev [Fri, 20 Oct 2023 20:31:26 +0000 (23:31 +0300)] 
gh-111132: Fix crash on interactive_filename in `run_mod` (#111136)

2 years agogh-111089: Use PyUnicode_AsUTF8() in sqlite3 (#111122)
Victor Stinner [Fri, 20 Oct 2023 18:04:27 +0000 (20:04 +0200)] 
gh-111089: Use PyUnicode_AsUTF8() in sqlite3 (#111122)

PyUnicode_AsUTF8() now raises an exception if the string contains
embedded null characters.

2 years agogh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing` ...
Nikita Sobolev [Fri, 20 Oct 2023 18:03:32 +0000 (21:03 +0300)] 
gh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing` (#111127)

2 years agogh-111089: PyUnicode_AsUTF8AndSize() sets size on error (#111106)
Victor Stinner [Fri, 20 Oct 2023 18:03:11 +0000 (20:03 +0200)] 
gh-111089: PyUnicode_AsUTF8AndSize() sets size on error (#111106)

On error, PyUnicode_AsUTF8AndSize() now sets the size argument to -1,
to avoid undefined value.

2 years agogh-111089: Add PyUnicode_AsUTF8() to the limited C API (#111121)
Victor Stinner [Fri, 20 Oct 2023 17:29:27 +0000 (19:29 +0200)] 
gh-111089: Add PyUnicode_AsUTF8() to the limited C API (#111121)

Add PyUnicode_AsUTF8() function to the limited C API.

multiprocessing posixshmem now uses PyUnicode_AsUTF8() instead of
PyUnicode_AsUTF8AndSize(): the extension is built with the limited C
API. The function now raises an exception if the filename contains an
embedded null character instead of truncating silently the filename.

2 years agogh-111119: Fix flaky test test_lock_two_threads (gh-111124)
Sam Gross [Fri, 20 Oct 2023 16:51:34 +0000 (18:51 +0200)] 
gh-111119: Fix flaky test test_lock_two_threads (gh-111124)

2 years agogh-110093: Partially revert previous change in socketmodule.c (GH-111120)
Serhiy Storchaka [Fri, 20 Oct 2023 16:39:45 +0000 (19:39 +0300)] 
gh-110093: Partially revert previous change in socketmodule.c (GH-111120)

2 years agogh-111089: PyUnicode_AsUTF8() now raises on embedded NUL (#111091)
Victor Stinner [Fri, 20 Oct 2023 15:59:29 +0000 (17:59 +0200)] 
gh-111089: PyUnicode_AsUTF8() now raises on embedded NUL (#111091)

* PyUnicode_AsUTF8() now raises an exception if the string contains
  embedded null characters.
* Update related C API tests (test_capi.test_unicode).
* type_new_set_doc() uses PyUnicode_AsUTF8AndSize() to silently
  truncate doc containing null bytes.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agogh-110093: Replace trivial Py_BuildValue() with direct C API call (GH-110094)
Serhiy Storchaka [Fri, 20 Oct 2023 15:08:41 +0000 (18:08 +0300)] 
gh-110093: Replace trivial Py_BuildValue() with direct C API call (GH-110094)

2 years agoSynchronize test_contextlib with test_contextlib_async (GH-111000)
Serhiy Storchaka [Fri, 20 Oct 2023 14:07:14 +0000 (17:07 +0300)] 
Synchronize test_contextlib with test_contextlib_async (GH-111000)

2 years agogh-110913: Fix WindowsConsoleIO chunking of UTF-8 text (GH-111007)
Tamás Hegedűs [Fri, 20 Oct 2023 11:52:31 +0000 (13:52 +0200)] 
gh-110913: Fix WindowsConsoleIO chunking of UTF-8 text (GH-111007)

2 years agoAdd tests for failing PyUnicode_AsUTF8AndSize() with psize=NULL (GH-111100)
Serhiy Storchaka [Fri, 20 Oct 2023 09:54:00 +0000 (12:54 +0300)] 
Add tests for failing PyUnicode_AsUTF8AndSize() with psize=NULL (GH-111100)

2 years agogh-101100: Fix Sphinx warnings in `library/tty.rst` (#111079)
Hugo van Kemenade [Fri, 20 Oct 2023 04:33:17 +0000 (07:33 +0300)] 
gh-101100: Fix Sphinx warnings in `library/tty.rst` (#111079)

Fix Sphinx warnings in library/tty.rst

2 years agogh-111092: Make turtledemo run without default root enabled (#111093)
Terry Jan Reedy [Fri, 20 Oct 2023 03:58:41 +0000 (23:58 -0400)] 
gh-111092: Make turtledemo run without default root enabled (#111093)

Add missing 'root' argument to PanedWindow call.
Other root children already have it.

2 years agogh-85283: Build posixshmem extension with Limited C API (#111087)
Victor Stinner [Thu, 19 Oct 2023 22:23:49 +0000 (00:23 +0200)] 
gh-85283: Build posixshmem extension with Limited C API (#111087)

Build the _multiprocessing.posixshmem extension with the Limited C
API.

* Add <errno.h> include.
* Replace PyUnicode_AsUTF8() with PyUnicode_AsUTF8AndSize().

2 years agogh-67565: Add tests for C-contiguity checks (GH-110951)
Furkan Onder [Thu, 19 Oct 2023 22:09:57 +0000 (01:09 +0300)] 
gh-67565: Add tests for C-contiguity checks (GH-110951)

2 years agoRemove unnecessary while in SocketIO.readinto (GH-111057)
sc07kvm [Thu, 19 Oct 2023 21:26:30 +0000 (00:26 +0300)] 
Remove unnecessary while in SocketIO.readinto (GH-111057)

It is unnecessary after removing "continue" in 6e6c59b (bpo-42357).

2 years agoadd 3.13 as an option on the bug form (#111083)
Ned Batchelder [Thu, 19 Oct 2023 16:52:56 +0000 (12:52 -0400)] 
add 3.13 as an option on the bug form (#111083)

2 years agogh-109510: Clearly explain "Which Docstrings Are Examined" (#109696)
Unique-Usman [Thu, 19 Oct 2023 15:10:06 +0000 (20:40 +0530)] 
gh-109510: Clearly explain "Which Docstrings Are Examined" (#109696)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
Co-authored-by: Jacob Coffee <jacob@z7x.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2 years agoGH-101100: Fix reference warnings for ``__enter__`` and ``__exit__`` (#110112)
Adam Turner [Thu, 19 Oct 2023 15:05:17 +0000 (16:05 +0100)] 
GH-101100: Fix reference warnings for ``__enter__`` and ``__exit__`` (#110112)

2 years agoGH-101100: Fix reference warnings for ``__getitem__`` (#110118)
Adam Turner [Thu, 19 Oct 2023 15:05:05 +0000 (16:05 +0100)] 
GH-101100: Fix reference warnings for ``__getitem__`` (#110118)

2 years agogh-101100: Fix sphinx warnings in `library/getpass.rst` (#110461)
Nikita Sobolev [Thu, 19 Oct 2023 15:04:29 +0000 (18:04 +0300)] 
gh-101100: Fix sphinx warnings in `library/getpass.rst` (#110461)

2 years agogh-76785: Make interpreters.*Channel Objects Shareable (gh-110607)
Eric Snow [Thu, 19 Oct 2023 14:52:02 +0000 (08:52 -0600)] 
gh-76785: Make interpreters.*Channel Objects Shareable (gh-110607)

This restores their shareability, which was disabled by gh-110318 due to ref leaks.

2 years agogh-76785: Add *Channel.is_closed (gh-110606)
Eric Snow [Thu, 19 Oct 2023 14:51:21 +0000 (08:51 -0600)] 
gh-76785: Add *Channel.is_closed (gh-110606)

2 years agogh-101100: Fix sphinx warnings in `library/codecs.rst` (#110979)
Nikita Sobolev [Thu, 19 Oct 2023 14:20:52 +0000 (17:20 +0300)] 
gh-101100: Fix sphinx warnings in `library/codecs.rst` (#110979)

2 years agogh-111031: Check more files in `test_tokenize` (#111032)
Nikita Sobolev [Thu, 19 Oct 2023 08:29:45 +0000 (11:29 +0300)] 
gh-111031: Check more files in `test_tokenize` (#111032)

2 years agogh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (#111053)
Terry Jan Reedy [Thu, 19 Oct 2023 04:03:24 +0000 (00:03 -0400)] 
gh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (#111053)

Replace tuple value with internal name, removing numbers.
Remove sorting of already ordered dislay names.
Remove '[0]' indexing into now-gone tuple.

2 years agoGH-103082: Clean up the sys.monitoring docs (GH-110532)
Tian Gao [Wed, 18 Oct 2023 23:15:42 +0000 (16:15 -0700)] 
GH-103082: Clean up the sys.monitoring docs (GH-110532)

2 years agoFix a misspelling of Interpeter -> Interpreter (GH-111040)
Nikita Sobolev [Wed, 18 Oct 2023 22:09:45 +0000 (01:09 +0300)] 
Fix a misspelling of Interpeter -> Interpreter (GH-111040)

2 years agoGH-104232: Fix statement about trace return values (GH-110516)
Tian Gao [Wed, 18 Oct 2023 20:24:00 +0000 (13:24 -0700)] 
GH-104232: Fix statement about trace return values (GH-110516)

2 years agoGH-102895 Add an option local_exit in code.interact to block exit() from terminating...
Tian Gao [Wed, 18 Oct 2023 18:36:43 +0000 (11:36 -0700)] 
GH-102895 Add an option local_exit in code.interact to block exit() from terminating the whole process (GH-102896)

2 years agogh-111015: Install IDLE.app and Python Launcher.app on macOS with correct permissions...
Joshua Root [Wed, 18 Oct 2023 13:02:36 +0000 (00:02 +1100)] 
gh-111015: Install IDLE.app and Python Launcher.app on macOS with correct permissions (gh-111016)

Co-authored-by: Ned Deily <nad@python.org>
2 years agogh-100445: Improve error message for unterminated strings with escapes (#100446)
Shantanu [Wed, 18 Oct 2023 12:58:51 +0000 (05:58 -0700)] 
gh-100445: Improve error message for unterminated strings with escapes (#100446)

2 years agogh-103737: IDLE - Remove unneeded .keys() for dict iteration (#110960)
Terry Jan Reedy [Wed, 18 Oct 2023 08:14:52 +0000 (04:14 -0400)] 
gh-103737: IDLE - Remove unneeded .keys() for dict iteration (#110960)

Add comments where .keys() is needed.
Leave debugger usages along because situation is unclear as indicated in expanded comment.
Most testing is manual.

2 years agogh-111019: Align expected and actual titles in test output (#111020)
James [Wed, 18 Oct 2023 07:36:16 +0000 (03:36 -0400)] 
gh-111019: Align expected and actual titles in test output (#111020)

Align expected and actual titles in output from
assert_has_calls/assert_called_with for greater readability

2 years agogh-108747: Add unit tests for site.{usercustomize,sitecustomize} hooks (#109470)
Charles Machalow [Wed, 18 Oct 2023 05:05:41 +0000 (22:05 -0700)] 
gh-108747: Add unit tests for site.{usercustomize,sitecustomize} hooks (#109470)

2 years agogh-110938: More syntax tests for PEP695 funcs and classes (#110986)
Nikita Sobolev [Wed, 18 Oct 2023 05:00:04 +0000 (08:00 +0300)] 
gh-110938: More syntax tests for PEP695 funcs and classes (#110986)

2 years agogh-109975: What's new in 3.13: longer full support (#110997)
Hugo van Kemenade [Wed, 18 Oct 2023 04:42:28 +0000 (07:42 +0300)] 
gh-109975: What's new in 3.13: longer full support (#110997)

2 years agogh-110961: Fixed asyncio.wait docstring to remove deprecated coroutine reference...
Bar Harel [Wed, 18 Oct 2023 04:40:26 +0000 (05:40 +0100)] 
gh-110961: Fixed asyncio.wait docstring to remove deprecated coroutine reference (#111017)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 years agoRegen Doc/requirements-oldest-sphinx.txt (#111012)
Victor Stinner [Wed, 18 Oct 2023 04:21:35 +0000 (06:21 +0200)] 
Regen Doc/requirements-oldest-sphinx.txt (#111012)

Fix https://github.com/python/cpython/security/dependabot/4: use
urllib3 version 2.0.7.

2 years agogh-76785: Clean Up the Channels Module (gh-110568)
Eric Snow [Tue, 17 Oct 2023 23:51:52 +0000 (17:51 -0600)] 
gh-76785: Clean Up the Channels Module (gh-110568)

2 years agogh-85283: Build _uuid extension with limited C API (#111010)
Victor Stinner [Tue, 17 Oct 2023 23:07:12 +0000 (01:07 +0200)] 
gh-85283: Build _uuid extension with limited C API (#111010)

2 years agogh-84570: Add Timeouts to SendChannel.send() and RecvChannel.recv() (gh-110567)
Eric Snow [Tue, 17 Oct 2023 23:05:49 +0000 (17:05 -0600)] 
gh-84570: Add Timeouts to SendChannel.send() and RecvChannel.recv() (gh-110567)

2 years agogh-85283: Build _scproxy extension with limited C API (#111008)
Victor Stinner [Tue, 17 Oct 2023 22:32:53 +0000 (00:32 +0200)] 
gh-85283: Build _scproxy extension with limited C API (#111008)

* Replace Py_SETREF(v, NULL) with Py_CLEAR(v).
* Reformat the code.

2 years agogh-84570: Send-Wait Fixes for _xxinterpchannels (gh-111006)
Eric Snow [Tue, 17 Oct 2023 22:32:00 +0000 (16:32 -0600)] 
gh-84570: Send-Wait Fixes for _xxinterpchannels (gh-111006)

There were a few things I did in gh-110565 that need to be fixed. I also forgot to add tests in that PR.

(Note that this PR exposes a refleak introduced by gh-110246. I'll take care of that separately.)

2 years agogh-85283: Build resource extension with limited C API (#110989)
Victor Stinner [Tue, 17 Oct 2023 21:52:58 +0000 (23:52 +0200)] 
gh-85283: Build resource extension with limited C API (#110989)

* Replace PyStructSequence_SET_ITEM() with
  PyStructSequence_SetItem().
* Replace PyTuple_GET_SIZE() with PyTuple_Size().
* Replace PyTuple_GET_ITEM() with PyTuple_GetItem().

2 years agogh-85283: Fix _ctypes_test build on Windows in release mode (#111005)
Victor Stinner [Tue, 17 Oct 2023 21:45:24 +0000 (23:45 +0200)] 
gh-85283: Fix _ctypes_test build on Windows in release mode (#111005)

Define Py_BUILD_CORE to not attempt to link the extension to
python3.lib (which fails).

2 years agoAdd `.ruff_cache/` to `.gitignore` (#110983)
Nikita Sobolev [Tue, 17 Oct 2023 20:12:58 +0000 (23:12 +0300)] 
Add `.ruff_cache/` to `.gitignore` (#110983)

2 years agogh-110995: Fix test_gdb check_usable_gdb() (#110998)
Victor Stinner [Tue, 17 Oct 2023 18:19:14 +0000 (20:19 +0200)] 
gh-110995: Fix test_gdb check_usable_gdb() (#110998)

Fix detection of gdb built without Python scripting support.

* check_usable_gdb() doesn't check gdb exit code when calling
  run_gdb().
* Use shutil.which() to get the path to the gdb program.

2 years agogh-109693: Remove pycore_atomic.h (gh-110992)
Donghee Na [Tue, 17 Oct 2023 15:33:50 +0000 (00:33 +0900)] 
gh-109693: Remove pycore_atomic.h (gh-110992)

2 years agogh-85283: Add PySys_Audit() to the limited C API (#108571)
Victor Stinner [Tue, 17 Oct 2023 14:02:23 +0000 (16:02 +0200)] 
gh-85283: Add PySys_Audit() to the limited C API (#108571)

The PySys_Audit() function was added in Python 3.8 by the PEP 578
"Python Runtime Audit Hooks".

Add also PySys_AuditTuple() to the limited C API, function added
to Python 3.13.

Move non-limited "PerfMap" C API from Include/sysmodule.h to
Include/cpython/sysmodule.h.

2 years agogh-85283: Build winsound extension with limited C API (#110978)
Victor Stinner [Tue, 17 Oct 2023 13:57:10 +0000 (15:57 +0200)] 
gh-85283: Build winsound extension with limited C API (#110978)

Replace type->tp_name with PyType_GetQualName().

2 years agogh-107457: update dis documentation with changes in 3.12 (#108900)
Matthieu Dartiailh [Tue, 17 Oct 2023 12:59:34 +0000 (14:59 +0200)] 
gh-107457: update dis documentation with changes in 3.12 (#108900)

2 years agogh-110938: Fix error messages for indented blocks with functions and classes with...
Pablo Galindo Salgado [Tue, 17 Oct 2023 12:45:13 +0000 (13:45 +0100)] 
gh-110938: Fix error messages for indented blocks with functions and classes with generic type parameters (#110973)

2 years agogh-110964: Remove private _PyArg functions (#110966)
Victor Stinner [Tue, 17 Oct 2023 12:30:31 +0000 (14:30 +0200)] 
gh-110964: Remove private _PyArg functions (#110966)

Move the following private functions and structures to
pycore_modsupport.h internal C API:

* _PyArg_BadArgument()
* _PyArg_CheckPositional()
* _PyArg_NoKeywords()
* _PyArg_NoPositional()
* _PyArg_ParseStack()
* _PyArg_ParseStackAndKeywords()
* _PyArg_Parser structure
* _PyArg_UnpackKeywords()
* _PyArg_UnpackKeywordsWithVararg()
* _PyArg_UnpackStack()
* _Py_ANY_VARARGS()

Changes:

* Python/getargs.h now includes pycore_modsupport.h to export
  functions.
* clinic.py now adds pycore_modsupport.h when one of these functions
  is used.
* Add pycore_modsupport.h includes when a C extension uses one of
  these functions.
* Define Py_BUILD_CORE_MODULE in C extensions which now include
  directly or indirectly (via code generated by Argument Clinic)
  pycore_modsupport.h:

  * _csv
  * _curses_panel
  * _dbm
  * _gdbm
  * _multiprocessing.posixshmem
  * _sqlite.row
  * _statistics
  * grp
  * resource
  * syslog

* _testcapi: bad_get() no longer uses METH_FASTCALL calling
  convention but METH_VARARGS. Replace _PyArg_UnpackStack() with
  PyArg_ParseTuple().
* _testcapi: add PYTESTCAPI_NEED_INTERNAL_API macro which is defined
  by _testcapi sub-modules which need the internal C API
  (pycore_modsupport.h): exceptions.c, float.c, vectorcall.c,
  watchers.c.
* Remove Include/cpython/modsupport.h header file.
  Include/modsupport.h no longer includes the removed header file.
* Fix mypy clinic.py

2 years agogh-85283: Fix Argument Clinic for md5 extension (#110976)
Victor Stinner [Tue, 17 Oct 2023 11:46:16 +0000 (13:46 +0200)] 
gh-85283: Fix Argument Clinic for md5 extension (#110976)

Limited C API supports the defining class under some conditions.

2 years agogh-85283: Build md5 extension with limited C API (#110967)
Victor Stinner [Tue, 17 Oct 2023 10:57:41 +0000 (12:57 +0200)] 
gh-85283: Build md5 extension with limited C API (#110967)

* Replace _Py_strhex() with few lines of code.
* Replace _PyType_GetModuleState() with PyType_GetModuleState().
* Fix make check-c-globals.

2 years agoBump test deps: `ruff` and `pre-commit-hooks` (#110972)
Nikita Sobolev [Tue, 17 Oct 2023 10:32:29 +0000 (13:32 +0300)] 
Bump test deps: `ruff` and `pre-commit-hooks` (#110972)

2 years agogh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED new in 3.13. (#110969)
Victor Stinner [Tue, 17 Oct 2023 10:27:16 +0000 (12:27 +0200)] 
gh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED new in 3.13. (#110969)

* Only add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED to limited C API
  version 3.13.
* errno, xxlimited and _ctypes_test extensions now need the limited C
  API version 3.13 to get Py_MOD_PER_INTERPRETER_GIL_SUPPORTED.  They
  now include standard header files explicitly: <errno.h>, <string.h>
  and <stdio.h>.
* xxlimited_35: Remove Py_mod_multiple_interpreters slot,
  incompatible with limited C API version 3.5.

2 years agogh-110695: test_asyncio uses 50 ms for clock resolution (#110952)
Victor Stinner [Tue, 17 Oct 2023 09:34:04 +0000 (11:34 +0200)] 
gh-110695: test_asyncio uses 50 ms for clock resolution (#110952)

Before utils.CLOCK_RES constant was added (20 ms), test_asyncio
already used 50 ms.

2 years agoBump sphinx-lint to v0.8.1 (#110933)
Alex Waygood [Tue, 17 Oct 2023 05:26:06 +0000 (06:26 +0100)] 
Bump sphinx-lint to v0.8.1 (#110933)

2 years agogh-85283: Build errno and _ctypes_test with limited C API (#110955)
Victor Stinner [Tue, 17 Oct 2023 01:05:20 +0000 (03:05 +0200)] 
gh-85283: Build errno and _ctypes_test with limited C API (#110955)

_testimportmultiple is now built with limited C API version 3.2.

2 years agogh-85283: Add PyMem_RawMalloc() to the limited C API (#108570)
Victor Stinner [Tue, 17 Oct 2023 00:41:51 +0000 (02:41 +0200)] 
gh-85283: Add PyMem_RawMalloc() to the limited C API (#108570)

Add PyMem_RawMalloc(), PyMem_RawCalloc(), PyMem_RawRealloc() and
PyMem_RawFree() to the limited C API.

These functions were added by Python 3.4 and are needed to port
stdlib extensions to the limited C API, like grp and pwd.

Co-authored-by: Erlend E. Aasland <erlend@python.org>