]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years agoFix argument ordering of embuilder command documented in `Tools/wasm/README.md` ...
OmniTroid [Tue, 26 Sep 2023 20:22:00 +0000 (22:22 +0200)] 
Fix argument ordering of embuilder command documented in `Tools/wasm/README.md` (GH-109863)

2 years agogh-109845: Make test_ftplib more stable under load (GH-109912)
Serhiy Storchaka [Tue, 26 Sep 2023 19:58:46 +0000 (22:58 +0300)] 
gh-109845: Make test_ftplib more stable under load (GH-109912)

recv() can return partial data cut in the middle of a multibyte
character. Test raw binary data instead of data incorrectly decoded by parts.

2 years agogh-109276, gh-109508: Fix libregrtest stdout (#109903)
Victor Stinner [Tue, 26 Sep 2023 19:34:50 +0000 (21:34 +0200)] 
gh-109276, gh-109508: Fix libregrtest stdout (#109903)

Remove replace_stdout(): call sys.stdout.reconfigure() instead of set
the error handler to backslashreplace.

display_header() logs an empty line and flush stdout.

Remove encoding workaround in display_header() since stdout error
handler is now set to backslashreplace earlier.

2 years agoRemove concurrent.futures deadcode: process_result_item() (#109906)
Victor Stinner [Tue, 26 Sep 2023 19:33:59 +0000 (21:33 +0200)] 
Remove concurrent.futures deadcode: process_result_item() (#109906)

process_result_item() cannot be called with an int anymore, the
protocol changed.

2 years agogh-109566: regrtest reexecutes the process (#109909)
Victor Stinner [Tue, 26 Sep 2023 18:46:52 +0000 (20:46 +0200)] 
gh-109566: regrtest reexecutes the process (#109909)

When --fast-ci or --slow-ci option is used, regrtest now replaces the
current process with a new process to add "-u -W default -bb -E"
options to Python.

Changes:

* PCbuild/rt.bat and Tools/scripts/run_tests.py no longer need to add
  "-u -W default -bb -E" options to Python: it's now done by
  regrtest.
* Fix Tools/scripts/run_tests.py: flush stdout before replacing the
  process. Previously, buffered messages were lost.

2 years agoGH-109187: Improve symlink loop handling in `pathlib.Path.resolve()` (GH-109192)
Barney Gale [Tue, 26 Sep 2023 16:57:17 +0000 (17:57 +0100)] 
GH-109187: Improve symlink loop handling in `pathlib.Path.resolve()` (GH-109192)

Treat symlink loops like other errors: in strict mode, raise `OSError`, and
in non-strict mode, do not raise any exception.

2 years agogh-109566, regrtest: Add --fast-ci and --slow-ci options (#109570)
Victor Stinner [Tue, 26 Sep 2023 15:22:50 +0000 (17:22 +0200)] 
gh-109566, regrtest: Add --fast-ci and --slow-ci options (#109570)

* Add --fast-ci and --slow-ci options to libregrtest:

  * --fast-ci uses a default timeout of 10 minutes and "-u all,-cpu"
    (skip slowest tests).
  * --slow-ci uses a default timeout of 20 minues and "-u all" (run
    all tests).

* regrtest header now lists test resources.
* Makefile changes:

  * "make test", "make hostrunnertest" and "make coverage-report" now
    use --fast-ci option and TESTTIMEOUT variable.
  * "make buildbottest" now uses "--slow-ci". Remove options which
    became redundant with "--slow-ci".
  * "make testall" and "make testuniversal" now use --slow-ci option
    and TESTTIMEOUT variable.
  * "make testall" now uses "find -exec rm ..." instead of
    "find ... -print|xargs rm ...", same as "make clean".

* GitHub Actions workflow:

  * Ubuntu and Address Sanitizer jobs now use "make test". Remove
    options which became redundant with "--fast-ci".
  * Windows jobs now use --fast-ci option.
  * Use -j0 to detect the number of CPUs.

* Set Makefile TESTTIMEOUT default to an empty string, since
  --slow-ci and --fast-ci use different default timeout. It's now
  accepted to pass "--timeout=" to regrtest: treated as not timeout.
* Tools/scripts/run_tests.py now uses --fast-ci option.
* Tools/buildbot/test.bat now uses --slow-ci option. Remove
  --timeout=1200 option, redundant with --slow-ci.

2 years agoMore informative docstrings in the random module (gh-109745)
Raymond Hettinger [Tue, 26 Sep 2023 13:20:17 +0000 (08:20 -0500)] 
More informative docstrings in the random module (gh-109745)

2 years agono-issue: Fix a typo in the parameter name of random.expovariate. (gh-109902)
lohaswinner [Tue, 26 Sep 2023 13:12:32 +0000 (22:12 +0900)] 
no-issue: Fix a typo in the parameter name of random.expovariate. (gh-109902)

2 years agogh-109593: Fix reentrancy issue in multiprocessing resource_tracker (#109629)
Antoine Pitrou [Tue, 26 Sep 2023 11:57:25 +0000 (13:57 +0200)] 
gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (#109629)

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 years agogh-109832: concurrent.futures test_deadlock restores sys.stderr (#109887)
Victor Stinner [Tue, 26 Sep 2023 10:43:45 +0000 (12:43 +0200)] 
gh-109832: concurrent.futures test_deadlock restores sys.stderr (#109887)

test_error_at_task_unpickle() and
test_error_during_result_unpickle_in_result_handler() now restore
sys.stderr which is overriden by _raise_error_ignore_stderr().

2 years agogh-109631: Allow interruption of short repeated regex matches (GH-109867)
Serhiy Storchaka [Tue, 26 Sep 2023 07:56:33 +0000 (10:56 +0300)] 
gh-109631: Allow interruption of short repeated regex matches (GH-109867)

Counting for signal checking now continues in new match from the point where
it ended in the previous match instead of starting from 0.

2 years agogh-101100: Fix Sphinx warnings in `Doc/library/weakref.rst` (#109881)
Nikita Sobolev [Tue, 26 Sep 2023 07:46:09 +0000 (10:46 +0300)] 
gh-101100: Fix Sphinx warnings in `Doc/library/weakref.rst` (#109881)

2 years agogh-109370: Fix unexpected traceback output in test_concurrent_futures (GH-109780)
Serhiy Storchaka [Tue, 26 Sep 2023 07:06:07 +0000 (10:06 +0300)] 
gh-109370: Fix unexpected traceback output in test_concurrent_futures (GH-109780)

Follow-up of gh-107219.

* Only close the connection writer on Windows.
* Also use existing constant _winapi.ERROR_OPERATION_ABORTED instead of
  WSA_OPERATION_ABORTED.

2 years agogh-109739: regrtest disables load tracker if refleak (#109871)
Victor Stinner [Tue, 26 Sep 2023 01:05:07 +0000 (03:05 +0200)] 
gh-109739: regrtest disables load tracker if refleak (#109871)

regrtest: Fix reference leak check on Windows. Disable the load
tracker on Windows in the reference leak check mode (-R option).

2 years agogh-109401: Fix threading barrier test_default_timeout() (#109875)
Victor Stinner [Tue, 26 Sep 2023 00:07:12 +0000 (02:07 +0200)] 
gh-109401: Fix threading barrier test_default_timeout() (#109875)

Increase timeouts. Barrier default timeout should be long enough to
spawn 4 threads on a slow CI.

2 years agogh-88233: zipfile: refactor _strip_extra (#102084)
Jason R. Coombs [Mon, 25 Sep 2023 23:46:58 +0000 (19:46 -0400)] 
gh-88233: zipfile: refactor _strip_extra (#102084)

* Refactor zipfile._strip_extra to use higher level abstractions for extras instead of a heavy-state loop.

* Add blurb

* Remove _strip_extra and use _Extra.strip directly.

* Use memoryview to avoid unnecessary copies while splitting Extras.

2 years agogh-109748: Fix venv test_zippath_from_non_installed_posix() (#109872)
Victor Stinner [Mon, 25 Sep 2023 23:16:30 +0000 (01:16 +0200)] 
gh-109748: Fix venv test_zippath_from_non_installed_posix() (#109872)

Fix test_zippath_from_non_installed_posix() of test_venv: don't copy
__pycache__/ sub-directories, because they can be modified by other
Python tests running in parallel.

2 years agogh-109823: Adjust labels in compiler when removing an empty basic block which is...
Irit Katriel [Mon, 25 Sep 2023 18:25:05 +0000 (19:25 +0100)] 
gh-109823: Adjust labels in compiler when removing an empty basic block which is a jump target (#109839)

2 years agogh-109599: Add types.CapsuleType (#109600)
Antoine Pitrou [Mon, 25 Sep 2023 17:50:39 +0000 (19:50 +0200)] 
gh-109599: Add types.CapsuleType (#109600)

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 years agogh-89363: Skip threading test_is_alive_after_fork() if ASAN (#109835)
Victor Stinner [Mon, 25 Sep 2023 16:02:04 +0000 (18:02 +0200)] 
gh-89363: Skip threading test_is_alive_after_fork() if ASAN (#109835)

Skip test_is_alive_after_fork() of test_threading if Python is built
with Address Sanitizer (ASAN).

2 years agogh-109795: `_thread.start_new_thread`: allocate thread bootstate using raw memory...
Radislav Chugunov [Mon, 25 Sep 2023 15:38:06 +0000 (18:38 +0300)] 
gh-109795: `_thread.start_new_thread`: allocate thread bootstate using raw memory allocator (#109808)

2 years agoCode: Update Donghee Na's name (#109744)
Hugo van Kemenade [Mon, 25 Sep 2023 15:17:34 +0000 (09:17 -0600)] 
Code: Update Donghee Na's name (#109744)

2 years agogh-109723: Fix build of _testclinic_limited on WASM (#109842)
Victor Stinner [Mon, 25 Sep 2023 14:43:54 +0000 (16:43 +0200)] 
gh-109723: Fix build of _testclinic_limited on WASM (#109842)

Make sure that the Py_BUILD_CORE macro is not defined.

2 years agoGH-109190: Copyedit 3.12 What's New: Sort Other Language Changes (#109836)
Adam Turner [Mon, 25 Sep 2023 14:42:03 +0000 (15:42 +0100)] 
GH-109190: Copyedit 3.12 What's New: Sort Other Language Changes (#109836)

2 years agogh-109276: regrtest re-runs "env changed" tests (#109831)
Victor Stinner [Mon, 25 Sep 2023 14:21:01 +0000 (16:21 +0200)] 
gh-109276: regrtest re-runs "env changed" tests (#109831)

When a test fails with "env changed" and --rerun option is used, the
test is now re-run in verbose mode in a fresh process.

2 years agoGH-109190: Copyedit 3.12 What's New: Synchronise C API deprecations with the 3.12...
Adam Turner [Mon, 25 Sep 2023 14:04:36 +0000 (15:04 +0100)] 
GH-109190: Copyedit 3.12 What's New: Synchronise C API deprecations with the 3.12 branch (#109844)

2 years agogh-109276: Enhance libregrtest results (#109828)
Victor Stinner [Mon, 25 Sep 2023 13:50:15 +0000 (15:50 +0200)] 
gh-109276: Enhance libregrtest results (#109828)

* Factorize code listing "bad / env changed / ..." tests.
* Add TestResults.is_all_good() method.
* Move "All 400 tests OK." to the end
* Move "Test suite interrupted by signal SIGINT." to the end.

2 years agogh-109833: Fix asyncio test_wait_for() (#109834)
Victor Stinner [Mon, 25 Sep 2023 13:27:36 +0000 (15:27 +0200)] 
gh-109833: Fix asyncio test_wait_for() (#109834)

Expect the test to be "short" but don't measure the exact performance
of the CI. SHORT_TIMEOUT is about 30 seconds whereas the cancelled
coroutine takes around 1 hour.

2 years agoGH-109190: Copyedit 3.12 What's New: Improve the C-API deprecations section (#109751)
Adam Turner [Mon, 25 Sep 2023 12:38:07 +0000 (13:38 +0100)] 
GH-109190: Copyedit 3.12 What's New: Improve the C-API deprecations section (#109751)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agono-issue: Capitalise 'PhotoImage' (gh-108958)
DongWoo Son [Mon, 25 Sep 2023 12:37:40 +0000 (21:37 +0900)] 
no-issue: Capitalise 'PhotoImage' (gh-108958)

2 years agoGH-109190: Copyedit 3.12 What's New: Use the present tense (#109754)
Adam Turner [Mon, 25 Sep 2023 12:18:22 +0000 (13:18 +0100)] 
GH-109190: Copyedit 3.12 What's New: Use the present tense (#109754)

2 years agoGH-109190: Copyedit 3.12 What's New: Trivia (#109760)
Adam Turner [Mon, 25 Sep 2023 12:11:37 +0000 (13:11 +0100)] 
GH-109190: Copyedit 3.12 What's New: Trivia (#109760)

2 years agoGH-109190: Copyedit 3.12 What's New: Prefer GitHub issues links (#109753)
Adam Turner [Mon, 25 Sep 2023 12:11:06 +0000 (13:11 +0100)] 
GH-109190: Copyedit 3.12 What's New: Prefer GitHub issues links (#109753)

2 years agogh-104469: Convert _testcapi/vectorcall_limited.c to use AC (#109691)
Victor Stinner [Mon, 25 Sep 2023 11:24:19 +0000 (13:24 +0200)] 
gh-104469: Convert _testcapi/vectorcall_limited.c to use AC (#109691)

Co-authored-by: nahyeon <55136494+nahyeon-an@users.noreply.github.com>
2 years agogh-101100: Fix sphinx warnings in `Doc/library/__future__.rst` (#109814)
Nikita Sobolev [Mon, 25 Sep 2023 06:31:56 +0000 (09:31 +0300)] 
gh-101100: Fix sphinx warnings in `Doc/library/__future__.rst` (#109814)

2 years agoGH-109190: Copyedit 3.12 What's New: Update the ``imp`` porting guidance (#109755)
Adam Turner [Mon, 25 Sep 2023 06:24:02 +0000 (07:24 +0100)] 
GH-109190: Copyedit 3.12 What's New: Update the ``imp`` porting guidance (#109755)

2 years agoGH-109190: Copyedit 3.12 What's New: Increase the prominence of the setuptools remova...
Adam Turner [Mon, 25 Sep 2023 06:22:00 +0000 (07:22 +0100)] 
GH-109190: Copyedit 3.12 What's New: Increase the prominence of the setuptools removal (#109768)

2 years agoSync whatsnew with the edit I made in the 3.12 backport PR. (#109807)
Gregory P. Smith [Sun, 24 Sep 2023 17:27:24 +0000 (10:27 -0700)] 
Sync whatsnew with the edit I made in the 3.12 backport PR. (#109807)

A post main merge edit to the text was added in the 3.12 backport PR.
  https://github.com/python/cpython/pull/109773/commits/e38d7104b8f245e5db6d487932c44edf0d2c4762

This includes that in main.  It's a minor edit over #109767 to resolve the comment there.

2 years agogh-109653: Avoid a top-level import of `types` in `functools` (#109804)
Alex Waygood [Sun, 24 Sep 2023 16:18:27 +0000 (17:18 +0100)] 
gh-109653: Avoid a top-level import of `types` in `functools` (#109804)

2 years agoGH-109190: Copyedit 3.12 What's New: Use the ``:file:`` role (#109756)
Adam Turner [Sun, 24 Sep 2023 16:05:57 +0000 (17:05 +0100)] 
GH-109190: Copyedit 3.12 What's New: Use the ``:file:`` role (#109756)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agogh-109653: Remove unused imports in the `Lib/` directory (#109803)
Alex Waygood [Sun, 24 Sep 2023 14:07:23 +0000 (15:07 +0100)] 
gh-109653: Remove unused imports in the `Lib/` directory (#109803)

2 years agogh-101100: Fix sphinx warnings in `Doc/library/xml.etree.elementtree.rst` (#109799)
Nikita Sobolev [Sun, 24 Sep 2023 09:49:02 +0000 (12:49 +0300)] 
gh-101100: Fix sphinx warnings in `Doc/library/xml.etree.elementtree.rst` (#109799)

gh-101100: Fix shpinx warnings in `Doc/library/xml.etree.elementtree.rst`

2 years agogh-109653: Improve `enum` import time by avoiding import of `functools` (GH-109789)
Alex Waygood [Sat, 23 Sep 2023 18:31:17 +0000 (19:31 +0100)] 
gh-109653: Improve `enum` import time by avoiding import of `functools` (GH-109789)

2 years agogh-109653: `typing.py`: improve import time by creating soft-deprecated members on...
Alex Waygood [Sat, 23 Sep 2023 07:46:35 +0000 (08:46 +0100)] 
gh-109653: `typing.py`: improve import time by creating soft-deprecated members on demand (#109651)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2 years agogh-109521: Fix obscure cases handling in PyImport_GetImporter() (GH-109522)
Serhiy Storchaka [Sat, 23 Sep 2023 06:39:24 +0000 (09:39 +0300)] 
gh-109521: Fix obscure cases handling in PyImport_GetImporter() (GH-109522)

PyImport_GetImporter() now sets RuntimeError if it fails to get sys.path_hooks
or sys.path_importer_cache or they are not list and dict correspondingly.

Previously it could return NULL without setting error in obscure cases,
crash or raise SystemError if these attributes have wrong type.

2 years agogh-109611: Add convenient C API function _PyFile_Flush() (GH-109612)
Serhiy Storchaka [Sat, 23 Sep 2023 06:35:30 +0000 (09:35 +0300)] 
gh-109611: Add convenient C API function _PyFile_Flush() (GH-109612)

2 years agogh-109634: Use :samp: role (GH-109635)
Serhiy Storchaka [Sat, 23 Sep 2023 06:31:20 +0000 (09:31 +0300)] 
gh-109634: Use :samp: role (GH-109635)

2 years agogh-100228: Document the os.fork threads DeprecationWarning. (#109767)
Gregory P. Smith [Sat, 23 Sep 2023 05:04:20 +0000 (22:04 -0700)] 
gh-100228: Document the os.fork threads DeprecationWarning. (#109767)

Document the `os.fork` posix threads detected `DeprecationWarning` in 3.12 What's New, os, multiprocessing, and concurrent.futures docs.

Many reviews and doc cleanup edits by Adam & Hugo. 🥳

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agogh-109505: Remove unnecessary `hasattr` checks from `test_asyncio` (#109506)
Nikita Sobolev [Sat, 23 Sep 2023 04:14:15 +0000 (07:14 +0300)] 
gh-109505: Remove unnecessary `hasattr` checks from `test_asyncio` (#109506)

2 years agoGH-95913: Add the release date for Python 3.11 (#109750)
Adam Turner [Sat, 23 Sep 2023 04:07:06 +0000 (05:07 +0100)] 
GH-95913: Add the release date for Python 3.11 (#109750)

2 years agoFix indentation in 3.13 What's New (#109769)
Jelle Zijlstra [Sat, 23 Sep 2023 03:45:26 +0000 (20:45 -0700)] 
Fix indentation in 3.13 What's New (#109769)

The previous layout made it look like the other three deprecations are part of the first one, when in fact they are independent.

The new layout is consistent with that used for sqlite3 in 3.12 (https://docs.python.org/3.13/whatsnew/3.12.html#deprecated).

2 years agogh-109706: Fix multiprocessing test_nested_startmethod() (#109707)
Victor Stinner [Fri, 22 Sep 2023 21:49:32 +0000 (23:49 +0200)] 
gh-109706: Fix multiprocessing test_nested_startmethod() (#109707)

Don't check order, queue items can be written in any order.

2 years agoGH-107265: Add missing deoptimizations for ENTER_EXECUTOR's original opcode (GH-109420)
Tian Gao [Fri, 22 Sep 2023 21:13:31 +0000 (14:13 -0700)] 
GH-107265: Add missing deoptimizations for ENTER_EXECUTOR's original opcode (GH-109420)

2 years agogh-109721: Guard `_testinternalcapi` imports in tests (GH-109722)
Nikita Sobolev [Fri, 22 Sep 2023 20:51:58 +0000 (23:51 +0300)] 
gh-109721: Guard `_testinternalcapi` imports in tests (GH-109722)

2 years agoDocs: Update Donghee Na's name (#109743)
Hugo van Kemenade [Fri, 22 Sep 2023 18:52:57 +0000 (12:52 -0600)] 
Docs: Update Donghee Na's name (#109743)

2 years agogh-109596: Ensure repeated rules in the grammar are not allowed and fix incorrect...
Pablo Galindo Salgado [Fri, 22 Sep 2023 18:03:23 +0000 (19:03 +0100)] 
gh-109596: Ensure repeated rules in the grammar are not allowed and fix incorrect soft keywords (#109606)

2 years agogh-109719: Fix missing jump target labels when compiler reorders cold/warm blocks...
Irit Katriel [Fri, 22 Sep 2023 16:59:35 +0000 (17:59 +0100)] 
gh-109719: Fix missing jump target labels when compiler reorders cold/warm blocks (#109734)

2 years agogh-109164: Replace `getopt` with `argparse` in pdb (#109165)
Tian Gao [Fri, 22 Sep 2023 16:55:48 +0000 (09:55 -0700)] 
gh-109164: Replace `getopt` with `argparse` in pdb (#109165)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 years agoACKS: Fix ordering; Correct Itamar Oren's surname; Add Adam Turner (#109737)
Adam Turner [Fri, 22 Sep 2023 14:56:07 +0000 (15:56 +0100)] 
ACKS: Fix ordering; Correct Itamar Oren's surname; Add Adam Turner  (#109737)

2 years agogh-109723: Disable Py_BUILD_CORE in _testcapi (#109727)
Victor Stinner [Fri, 22 Sep 2023 14:54:37 +0000 (16:54 +0200)] 
gh-109723: Disable Py_BUILD_CORE in _testcapi (#109727)

Make sure that the internal C API is not tested by mistake by
_testcapi.

Undefine Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE macros in
Modules/_testcapi/parts.h: move code from _testcapimodule.c.

heaptype_relative.c and vectorcall_limited.c are using the limited C
API which is incompatible with the internal C API.

Move test_long_numbits() from _testcapi to _testinternalcapi since it
uses the internal C API "pycore_long.h".

Fix Modules/_testcapi/pyatomic.c: don't include Python.h directly,
just include _testcapi/parts.h.

Ajust "make check-c-globals" for these changes.

2 years agoGH-109190: Copyedit 3.12 What's New: asyncio (#109661)
Adam Turner [Fri, 22 Sep 2023 13:32:32 +0000 (14:32 +0100)] 
GH-109190: Copyedit 3.12 What's New: asyncio (#109661)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Itamar Oren <itamarost@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago GH-109190: Copyedit 3.12 What's New: PEP 669 (#109658)
Adam Turner [Fri, 22 Sep 2023 13:31:49 +0000 (14:31 +0100)] 
 GH-109190: Copyedit 3.12 What's New: PEP 669 (#109658)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agogh-109709: Fix asyncio test_stdin_broken_pipe() (#109710)
Victor Stinner [Fri, 22 Sep 2023 13:29:42 +0000 (15:29 +0200)] 
gh-109709: Fix asyncio test_stdin_broken_pipe() (#109710)

Replace harcoded sleep of 500 ms with synchronization using a pipe.

Fix also Process._feed_stdin(): catch also BrokenPipeError on
stdin.write(input), not only on stdin.drain().

2 years agoRemove outdated docstring from the `quantify` itertools recipe (#109726)
Łukasz Langa [Fri, 22 Sep 2023 13:09:32 +0000 (15:09 +0200)] 
Remove outdated docstring from the `quantify` itertools recipe (#109726)

2 years agoGH-109190: Copyedit 3.12 What's New: Other Language Changes (#109660)
Adam Turner [Fri, 22 Sep 2023 13:05:39 +0000 (14:05 +0100)] 
GH-109190: Copyedit 3.12 What's New: Other Language Changes (#109660)

2 years agogh-105829: Fix concurrent.futures.ProcessPoolExecutor deadlock (#108513)
elfstrom [Fri, 22 Sep 2023 12:55:56 +0000 (14:55 +0200)] 
gh-105829: Fix concurrent.futures.ProcessPoolExecutor deadlock (#108513)

This fixes issue #105829, https://github.com/python/cpython/issues/105829

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Antoine Pitrou <antoine@python.org>
Co-authored-by: Chris Withers <chris@withers.org>
Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>
2 years agoGH-109190: Copyedit 3.12 What's New: PEP 684 (#109657)
Adam Turner [Fri, 22 Sep 2023 12:53:53 +0000 (13:53 +0100)] 
GH-109190: Copyedit 3.12 What's New: PEP 684 (#109657)

2 years agoGH-109190: Copyedit 3.12 What's New: bytecode (LOAD_METHOD) (#109665)
Adam Turner [Fri, 22 Sep 2023 12:50:20 +0000 (13:50 +0100)] 
GH-109190: Copyedit 3.12 What's New: bytecode (LOAD_METHOD) (#109665)

bytecode: suppress reference to removed LOAD_METHOD

2 years agogh-106584: Fix exit code for unittest in Python 3.12 (#106588)
EliseevEgor [Fri, 22 Sep 2023 12:26:27 +0000 (15:26 +0300)] 
gh-106584: Fix exit code for unittest in Python 3.12 (#106588)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years agoGH-109190: Copyedit 3.12 What's New: calendar (#109662)
Adam Turner [Fri, 22 Sep 2023 06:29:48 +0000 (07:29 +0100)] 
GH-109190: Copyedit 3.12 What's New: calendar (#109662)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agoGH-109190: Copyedit 3.12 What's New: tokenize (#109663)
Adam Turner [Fri, 22 Sep 2023 06:28:13 +0000 (07:28 +0100)] 
GH-109190: Copyedit 3.12 What's New: tokenize (#109663)

2 years ago GH-109190: Copyedit 3.12 What's New: Consistently show module names (#109664)
Adam Turner [Fri, 22 Sep 2023 05:37:44 +0000 (06:37 +0100)] 
 GH-109190: Copyedit 3.12 What's New: Consistently show module names (#109664)

Consistently show module names

2 years agogh-109566: Fix typo in PCbuild/rt.bat (#109701)
Victor Stinner [Fri, 22 Sep 2023 02:43:48 +0000 (04:43 +0200)] 
gh-109566: Fix typo in PCbuild/rt.bat (#109701)

2 years agogh-109702: Increase concurrent_futures deadlock timeout (#109703)
Victor Stinner [Fri, 22 Sep 2023 01:13:31 +0000 (03:13 +0200)] 
gh-109702: Increase concurrent_futures deadlock timeout (#109703)

Replace SHORT_TIMEOUT with LONG_TIMEOUT in test_deadlock of
test_concurrent_futures.

2 years agogh-108996: fix and enable test_msvcrt (#109226)
AN Long [Fri, 22 Sep 2023 00:19:48 +0000 (08:19 +0800)] 
gh-108996: fix and enable test_msvcrt (#109226)

* Add _testconsole.flush_console_input_buffer() function.
* test_kbhit(), test_getwch() and test_getwche() now call
  flush_console_input_buffer().
* Don't override sys.stdin anymore (not needed).

2 years agogh-104469: Disallow using Py_LIMITED_API with Py_BUILD_CORE (#109690)
Victor Stinner [Thu, 21 Sep 2023 23:21:07 +0000 (01:21 +0200)] 
gh-104469: Disallow using Py_LIMITED_API with Py_BUILD_CORE (#109690)

Fix make check-c-globals: complete USE_LIMITED_C_API list of the
c-analyzer.

2 years agogh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697)
Victor Stinner [Thu, 21 Sep 2023 22:59:08 +0000 (00:59 +0200)] 
gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697)

On FreeBSD, regular users cannot set the sticky bit. Skip the test if
chmod() fails with EFTYPE error.

2 years agogh-109582: test_fork_signal_handling should wait for event (#109605)
Davide Rizzo [Thu, 21 Sep 2023 21:20:29 +0000 (23:20 +0200)] 
gh-109582: test_fork_signal_handling should wait for event (#109605)

Sometimes the child_handled event was missing because either
the child quits before it gets a chance to handle the signal,
or the parent asserts before the event notification is
delivered via IPC.  Synchronize explicitly to avoid this.

2 years agogh-109693: Remove pycore_atomic_funcs.h (#109694)
Sam Gross [Thu, 21 Sep 2023 20:57:20 +0000 (16:57 -0400)] 
gh-109693: Remove pycore_atomic_funcs.h (#109694)

_PyUnicode_FromId() now uses pyatomic.h functions instead.

2 years agogh-108303: Update test_fractions for new Lib/test/mathdata/ (#109686)
Victor Stinner [Thu, 21 Sep 2023 19:48:20 +0000 (21:48 +0200)] 
gh-108303: Update test_fractions for new Lib/test/mathdata/ (#109686)

2 years agoGH-109190: Copyedit 3.12 What's New: PEP 701 (#109655)
Adam Turner [Thu, 21 Sep 2023 19:37:28 +0000 (20:37 +0100)] 
GH-109190: Copyedit 3.12 What's New: PEP 701 (#109655)

2 years agoGH-109190: Copyedit 3.12 What's New: Improved Error Messages (#109654)
Adam Turner [Thu, 21 Sep 2023 19:24:44 +0000 (20:24 +0100)] 
GH-109190: Copyedit 3.12 What's New: Improved Error Messages (#109654)

2 years agogh-108303: Move all math files to `Lib/test/mathdata/` (#109512)
Nikita Sobolev [Thu, 21 Sep 2023 19:14:41 +0000 (22:14 +0300)] 
gh-108303: Move all math files to `Lib/test/mathdata/` (#109512)

2 years agoGH-109190: Copyedit 3.12 What's New: Typing PEPs (#109659)
Adam Turner [Thu, 21 Sep 2023 19:05:54 +0000 (20:05 +0100)] 
GH-109190: Copyedit 3.12 What's New: Typing PEPs (#109659)

2 years agoGH-109190: Copyedit 3.12 What's New: PEP 709 (#109656)
Adam Turner [Thu, 21 Sep 2023 18:50:33 +0000 (19:50 +0100)] 
GH-109190: Copyedit 3.12 What's New: PEP 709 (#109656)

2 years agogh-74481: Add missing debug function docs and constants to msvcrt (GH-109650)
AN Long [Thu, 21 Sep 2023 15:44:24 +0000 (23:44 +0800)] 
gh-74481: Add missing debug function docs and constants to msvcrt (GH-109650)

2 years agogh-109613: _pystat_fromstructstat() checks for exceptions (#109618)
Victor Stinner [Thu, 21 Sep 2023 07:55:06 +0000 (09:55 +0200)] 
gh-109613: _pystat_fromstructstat() checks for exceptions (#109618)

Fix os.stat() and os.DirEntry.stat(): check for exceptions.
Previously, on Python built in debug mode, these functions could
trigger a fatal Python error (and abort the process) when a function
succeeded with an exception set.

_pystat_fromstructstat() now exits immediately if an exception is
raised, rather only checking for exceptions at the end. It fix
following fatal error in fill_time():

    Fatal Python error: _Py_CheckSlotResult:
    Slot * of type int succeeded with an exception set

2 years agogh-109625: Move _ready_to_import() from test_import to support.import_helper (#109626)
Nikita Sobolev [Thu, 21 Sep 2023 07:39:36 +0000 (10:39 +0300)] 
gh-109625: Move _ready_to_import() from test_import to support.import_helper (#109626)

2 years agoGH-109209: Bump the minimum Sphinx version to 4.2 (#109210)
Adam Turner [Thu, 21 Sep 2023 06:06:36 +0000 (07:06 +0100)] 
GH-109209: Bump the minimum Sphinx version to 4.2 (#109210)

2 years agogh-109627: duplicated smalll exit blocks need to be assigned jump target labels ...
Irit Katriel [Wed, 20 Sep 2023 23:08:06 +0000 (00:08 +0100)] 
gh-109627: duplicated smalll exit blocks need to be assigned jump target labels (#109630)

2 years agogh-109408: Move Windows builds from Azure Pipelines PR to GitHub Actions (#109569)
Hugo van Kemenade [Wed, 20 Sep 2023 18:56:42 +0000 (12:56 -0600)] 
gh-109408: Move Windows builds from Azure Pipelines PR to GitHub Actions (#109569)

2 years agoFix typos in docs and comments (#109619)
Heinz-Alexander Fuetterer [Wed, 20 Sep 2023 16:58:23 +0000 (18:58 +0200)] 
Fix typos in docs and comments (#109619)

2 years agogh-109390: add dump_symtable utility under #if 0 (#109391)
Carl Meyer [Wed, 20 Sep 2023 16:55:56 +0000 (10:55 -0600)] 
gh-109390: add dump_symtable utility under #if 0 (#109391)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years agogh-109054: Document configure variables (#109224)
Victor Stinner [Wed, 20 Sep 2023 16:51:53 +0000 (18:51 +0200)] 
gh-109054: Document configure variables (#109224)

2 years agogh-108973: Fix asyncio test_subprocess_consistent_callbacks() (#109431)
Victor Stinner [Wed, 20 Sep 2023 13:54:19 +0000 (15:54 +0200)] 
gh-108973: Fix asyncio test_subprocess_consistent_callbacks() (#109431)

SubprocessProtocol process_exited() method can be called before
pipe_data_received() and pipe_connection_lost() methods. Document it
and adapt the test for that.

Revert commit 282edd7b2a74c4dfe1bfe3c5b1d30f9c21d554d6.
_child_watcher_callback() calls immediately _process_exited(): don't
add an additional delay with call_soon(). The reverted change didn't
make _process_exited() more determistic: it can still be called
before pipe_connection_lost() for example.

Co-authored-by: Davide Rizzo <sorcio@gmail.com>
2 years agogh-109559: Update unicodedata checksums for 15.1.0. (#109597)
Benjamin Peterson [Wed, 20 Sep 2023 05:40:34 +0000 (22:40 -0700)] 
gh-109559: Update unicodedata checksums for 15.1.0. (#109597)

Update unicodedata checksums for 15.1.0.

2 years agofixes gh-109559: Update `unicodedata` for Unicode 15.1.0 (GH-109560)
James Gerity [Wed, 20 Sep 2023 05:07:47 +0000 (01:07 -0400)] 
fixes gh-109559: Update `unicodedata` for Unicode 15.1.0 (GH-109560)

---------

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2 years agogh-109543: Remove unnecessary hasattr check (#109544)
Jelle Zijlstra [Wed, 20 Sep 2023 03:15:52 +0000 (20:15 -0700)] 
gh-109543: Remove unnecessary hasattr check (#109544)

Also added a new test case covering the scenario I thought this
might be about.

2 years agogh-103053: Skip test_freeze_simple_script() on PGO build (#109591)
Victor Stinner [Wed, 20 Sep 2023 01:58:34 +0000 (03:58 +0200)] 
gh-103053: Skip test_freeze_simple_script() on PGO build (#109591)

Skip test_freeze_simple_script() of test_tools.test_freeze if Python
is built with "./configure --enable-optimizations", which means with
Profile Guided Optimization (PGO): it just makes the test too slow.
The freeze tool is tested by many other CIs with other (faster)
compiler flags.

test.pythoninfo now gets also get_build_info() of
test.libregrtests.utils.