]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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.

2 years agogh-90108: Disable LTO on _freeze_module and _testembed (#109581)
Victor Stinner [Wed, 20 Sep 2023 01:40:32 +0000 (03:40 +0200)] 
gh-90108: Disable LTO on _freeze_module and _testembed (#109581)

LTO optimization is nice to make Python faster, but _freeze_module
and _testembed performance is not important. Using LTO to build these
two programs make a whole Python build way slower, especially
combined with a sanitizer (like ASAN).

2 years agogh-109109: Expose retrieving certificate chains in SSL module (#109113)
Mateusz Nowak [Wed, 20 Sep 2023 01:20:54 +0000 (03:20 +0200)] 
gh-109109: Expose retrieving certificate chains in SSL module (#109113)

Adds APIs to get the TLS certificate chains, verified or full unverified, from SSLSocket and SSLObject.

Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2 years agogh-109033: Return filename with os.utime errors (#109034)
Ronan Pigott [Tue, 19 Sep 2023 23:18:23 +0000 (16:18 -0700)] 
gh-109033: Return filename with os.utime errors (#109034)

The filename was previously intentionally omitted from exception because
"it might confuse the user". Uncaught exceptions are not generally a
replacement for user-facing error messages, so obscuring this
information only has the effect of making the programmer's life more
difficult.

2 years agogh-76785: Use Pending Calls When Releasing Cross-Interpreter Data (gh-109556)
Eric Snow [Tue, 19 Sep 2023 21:01:34 +0000 (15:01 -0600)] 
gh-76785: Use Pending Calls When Releasing Cross-Interpreter Data (gh-109556)

This fixes some crashes in the _xxinterpchannels module, due to a race between interpreters.

2 years agogh-109580: Skip test_perf_profiler on ASAN build (#109584)
Victor Stinner [Tue, 19 Sep 2023 17:42:51 +0000 (19:42 +0200)] 
gh-109580: Skip test_perf_profiler on ASAN build (#109584)

Skip test_perf_profiler if Python is built with ASAN, MSAN or UBSAN
sanitizer. Python does crash randomly in this test on such build.

2 years agogh-108724: Fix _PySemaphore compile error on WASM (gh-109583)
Sam Gross [Tue, 19 Sep 2023 17:35:11 +0000 (13:35 -0400)] 
gh-108724: Fix _PySemaphore compile error on WASM (gh-109583)

Some WASM platforms have POSIX semaphores, but not sem_timedwait.

2 years agogh-108724: Add PyMutex and _PyParkingLot APIs (gh-109344)
Sam Gross [Tue, 19 Sep 2023 15:54:29 +0000 (11:54 -0400)] 
gh-108724: Add PyMutex and _PyParkingLot APIs (gh-109344)

PyMutex is a one byte lock with fast, inlineable lock and unlock functions for the common uncontended case.  The design is based on WebKit's WTF::Lock.

PyMutex is built using the _PyParkingLot APIs, which provides a cross-platform futex-like API (based on WebKit's WTF::ParkingLot).  This internal API will be used for building other synchronization primitives used to implement PEP 703, such as one-time initialization and events.

This also includes tests and a mini benchmark in Tools/lockbench/lockbench.py to compare with the existing PyThread_type_lock.

Uncontended acquisition + release:
* Linux (x86-64): PyMutex: 11 ns, PyThread_type_lock: 44 ns
* macOS (arm64): PyMutex: 13 ns, PyThread_type_lock: 18 ns
* Windows (x86-64): PyMutex: 13 ns, PyThread_type_lock: 38 ns

PR Overview:

The primary purpose of this PR is to implement PyMutex, but there are a number of support pieces (described below).

* PyMutex:  A 1-byte lock that doesn't require memory allocation to initialize and is generally faster than the existing PyThread_type_lock.  The API is internal only for now.
* _PyParking_Lot:  A futex-like API based on the API of the same name in WebKit.  Used to implement PyMutex.
* _PyRawMutex:  A word sized lock used to implement _PyParking_Lot.
* PyEvent:  A one time event.  This was used a bunch in the "nogil" fork and is useful for testing the PyMutex implementation, so I've included it as part of the PR.
* pycore_llist.h:  Defines common operations on doubly-linked list.  Not strictly necessary (could do the list operations manually), but they come up frequently in the "nogil" fork. ( Similar to https://man.freebsd.org/cgi/man.cgi?queue)

---------

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years agogh-109496: Skip test_capi.test_decref_freed_object() on ASAN (#109573)
Victor Stinner [Tue, 19 Sep 2023 14:42:08 +0000 (16:42 +0200)] 
gh-109496: Skip test_capi.test_decref_freed_object() on ASAN (#109573)

Skip test_decref_freed_object() of test_capi.test_misc if Python is
built with ASAN, MSAN or UBSAN sanitizers.

2 years agogh-109566: Run GHA and buildbot tests with --fail-rerun (#109567)
Victor Stinner [Tue, 19 Sep 2023 13:50:27 +0000 (15:50 +0200)] 
gh-109566: Run GHA and buildbot tests with --fail-rerun (#109567)

2 years agoMisc itertool recipe improvements, mostly docstrings and comments (gh-109555)
Raymond Hettinger [Tue, 19 Sep 2023 12:39:44 +0000 (07:39 -0500)] 
Misc itertool recipe improvements, mostly docstrings and comments (gh-109555)

2 years agogh-109485: Further improve `test_future_stmt` tests (#109486)
Nikita Sobolev [Tue, 19 Sep 2023 12:01:59 +0000 (15:01 +0300)] 
gh-109485: Further improve `test_future_stmt` tests (#109486)

Add assertSyntaxError() which run tests with an additional docstring
and without docstring, and checks for the error message.

2 years agogh-109435: Add Doc/library/cmdline.rst (#109436)
Victor Stinner [Tue, 19 Sep 2023 11:57:28 +0000 (13:57 +0200)] 
gh-109435: Add Doc/library/cmdline.rst (#109436)

Document modules providing a command-line interface (CLI).

2 years agono-issue: Fix typo TestContentTyopeHeader to TestContentTypeHeader (gh-109069)
Jenner [Tue, 19 Sep 2023 09:50:35 +0000 (18:50 +0900)] 
no-issue: Fix typo TestContentTyopeHeader to TestContentTypeHeader (gh-109069)

2 years agogh-109125: Run mypy on `Tools/wasm` (#109126)
Nikita Sobolev [Tue, 19 Sep 2023 05:49:26 +0000 (08:49 +0300)] 
gh-109125: Run mypy on `Tools/wasm` (#109126)

2 years agogh-109469: Silence compiler warnings on string comparisons in _testcapi (GH-109533)
Serhiy Storchaka [Tue, 19 Sep 2023 05:12:29 +0000 (08:12 +0300)] 
gh-109469: Silence compiler warnings on string comparisons in _testcapi (GH-109533)

2 years agogh-109546: Add more tests for formatting floats and fractions (GH-109548)
Serhiy Storchaka [Tue, 19 Sep 2023 05:09:11 +0000 (08:09 +0300)] 
gh-109546: Add more tests for formatting floats and fractions (GH-109548)

2 years agoFix error handling in _PySys_UpdateConfig() (GH-109524)
Serhiy Storchaka [Mon, 18 Sep 2023 17:09:59 +0000 (20:09 +0300)] 
Fix error handling in _PySys_UpdateConfig() (GH-109524)

2 years agogh-102757: fix function signature mismatch for `functools.reduce` between code and...
Xuehai Pan [Mon, 18 Sep 2023 16:42:58 +0000 (00:42 +0800)] 
gh-102757: fix function signature mismatch for `functools.reduce` between code and documentation (#102759)

2 years agogh-109496: Detect Py_DECREF() after dealloc in debug mode (#109539)
Victor Stinner [Mon, 18 Sep 2023 14:59:09 +0000 (16:59 +0200)] 
gh-109496: Detect Py_DECREF() after dealloc in debug mode (#109539)

On a Python built in debug mode, Py_DECREF() now calls
_Py_NegativeRefcount() if the object is a dangling pointer to
deallocated memory: memory filled with 0xDD "dead byte" by the debug
hook on memory allocators. The fix is to check the reference count
*before* checking for _Py_IsImmortal().

Add test_decref_freed_object() to test_capi.test_misc.

2 years agogh-109508: Fix libregrtest formatting of getcwd() (#109537)
Victor Stinner [Mon, 18 Sep 2023 14:45:48 +0000 (16:45 +0200)] 
gh-109508: Fix libregrtest formatting of getcwd() (#109537)

2 years agogh-109371: Fix monitoring with instruction events set (gh-109385)
Tian Gao [Mon, 18 Sep 2023 14:30:08 +0000 (07:30 -0700)] 
gh-109371: Fix monitoring with instruction events set (gh-109385)

2 years agogh-108843: fix ast.unparse for f-string with many quotes (#108981)
Shantanu [Mon, 18 Sep 2023 13:56:19 +0000 (06:56 -0700)] 
gh-108843: fix ast.unparse for f-string with many quotes (#108981)

2 years agogh-108303: Fix and move `badsyntax_pep3120.py` (#109513)
Nikita Sobolev [Mon, 18 Sep 2023 13:04:17 +0000 (16:04 +0300)] 
gh-108303: Fix and move `badsyntax_pep3120.py` (#109513)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-109408: Azure Pipelines: test 3.12 branch (#109453)
Hugo van Kemenade [Mon, 18 Sep 2023 12:37:23 +0000 (06:37 -0600)] 
gh-109408: Azure Pipelines: test 3.12 branch (#109453)

2 years agoDocs: getopt is deprecated in Python 3.13 (#109438)
Hugo van Kemenade [Mon, 18 Sep 2023 10:45:59 +0000 (04:45 -0600)] 
Docs: getopt is deprecated in Python 3.13 (#109438)

2 years agoFix a typo in c-analyzer (#109213)
DongWoo Son [Mon, 18 Sep 2023 07:27:54 +0000 (16:27 +0900)] 
Fix a typo in c-analyzer (#109213)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Dale Collison <92315623+dcollison@users.noreply.github.com>
2 years agoFix extraneous backslashes in hashlib docs (#109468)
Anthony Sottile [Mon, 18 Sep 2023 07:25:33 +0000 (03:25 -0400)] 
Fix extraneous backslashes in hashlib docs (#109468)

2 years agogh-109413: Improve mypy config for libregrtest (#109518)
Alex Waygood [Mon, 18 Sep 2023 00:35:51 +0000 (01:35 +0100)] 
gh-109413: Improve mypy config for libregrtest (#109518)

Improve the mypy config file for libregrtest

2 years agogh-109408: Remove Ubuntu unit tests from Azure Pipelines (#109452)
Hugo van Kemenade [Sun, 17 Sep 2023 17:46:15 +0000 (11:46 -0600)] 
gh-109408: Remove Ubuntu unit tests from Azure Pipelines (#109452)

2 years agogh-108511: Add C API functions which do not silently ignore errors (GH-109025)
Serhiy Storchaka [Sun, 17 Sep 2023 11:23:31 +0000 (14:23 +0300)] 
gh-108511: Add C API functions which do not silently ignore errors (GH-109025)

Add the following functions:

* PyObject_HasAttrWithError()
* PyObject_HasAttrStringWithError()
* PyMapping_HasKeyWithError()
* PyMapping_HasKeyStringWithError()

2 years agogh-108303: Move all certificates to `Lib/test/certdata/` (#109489)
Nikita Sobolev [Sat, 16 Sep 2023 16:47:18 +0000 (19:47 +0300)] 
gh-108303: Move all certificates to `Lib/test/certdata/` (#109489)

2 years agogh-109451: Fix wrong format specifier in logging documentation (GH-109465)
AlberLC [Sat, 16 Sep 2023 09:06:04 +0000 (11:06 +0200)] 
gh-109451: Fix wrong format specifier in logging documentation (GH-109465)

2 years agogh-109414: Add some basic information about venvs in the introduction. (GH-109440)
Vinay Sajip [Sat, 16 Sep 2023 08:49:02 +0000 (09:49 +0100)] 
gh-109414: Add some basic information about venvs in the introduction. (GH-109440)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years agogh-109474: Update two Unix packaging URLs (#109307)
partev [Sat, 16 Sep 2023 07:46:09 +0000 (03:46 -0400)] 
gh-109474: Update two Unix packaging URLs  (#109307)

update packaging URLs

fix a broken URL for fedora RPM packaging guide and fix a URL redirect for Slackware packaging guide.

2 years agoGH-83417: Allow `venv` to add a `.gitignore` file to environments via a new `scm_igno...
Brett Cannon [Fri, 15 Sep 2023 22:38:08 +0000 (15:38 -0700)] 
GH-83417: Allow `venv` to add a `.gitignore` file to environments via a new `scm_ignore_file` parameter (GH-108125)

This feature is off by default via code but on by default via the CLI. The `.gitignore` file contains `*` which causes the entire directory to be ignored.

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-106213: Make Emscripten trampolines work with JSPI (GH-106219)
Hood Chatham [Fri, 15 Sep 2023 22:04:21 +0000 (15:04 -0700)] 
gh-106213: Make Emscripten trampolines work with JSPI (GH-106219)

There is a WIP proposal to enable webassembly stack switching which have been
implemented in v8:

https://github.com/WebAssembly/js-promise-integration

It is not possible to switch stacks that contain JS frames so the Emscripten JS
trampolines that allow calling functions with the wrong number of arguments
don't work in this case. However, the js-promise-integration proposal requires
the [type reflection for Wasm/JS API](https://github.com/WebAssembly/js-types)
proposal, which allows us to actually count the number of arguments a function
expects.

For better compatibility with stack switching, this PR checks if type reflection
is available, and if so we use a switch block to decide the appropriate
signature. If type reflection is unavailable, we should use the current EMJS
trampoline.

We cache the function argument counts since when I didn't cache them performance
was negatively affected.

Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: Brett Cannon <brett@python.org>
2 years agogh-109096: Deprecate `http.server.CGIHTTPRequestHandler` (#109387)
Gregory P. Smith [Fri, 15 Sep 2023 21:26:45 +0000 (14:26 -0700)] 
gh-109096: Deprecate `http.server.CGIHTTPRequestHandler` (#109387)

Deprecate `http.server.CGIHTTPRequestHandler`.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years agoGH-109373: Store metadata required for pystats comparison in the JSON (GH-109374)
Michael Droettboom [Fri, 15 Sep 2023 20:10:46 +0000 (16:10 -0400)] 
GH-109373: Store metadata required for pystats comparison in the JSON (GH-109374)

2 years agogh-109350: Fix outdated captured output in unittest.mock documentation (#109353)
Egil Martinsson [Fri, 15 Sep 2023 18:25:16 +0000 (20:25 +0200)] 
gh-109350: Fix outdated captured output in unittest.mock documentation (#109353)

2 years agogh-109413: Fix some trivial mypy nitpicks in libregrtest (#109454)
Alex Waygood [Fri, 15 Sep 2023 17:01:28 +0000 (18:01 +0100)] 
gh-109413: Fix some trivial mypy nitpicks in libregrtest (#109454)

2 years agogh-91960: Disable Cirrus CI for now (#109457)
Victor Stinner [Fri, 15 Sep 2023 16:41:25 +0000 (18:41 +0200)] 
gh-91960: Disable Cirrus CI for now (#109457)

Python is out of free credit and so all jobs are reported as failure.

Rename .cirrus.yml to .cirrus-DISABLED.yml to disable the job.

2 years agogh-109287: Desugar inst(X) to op(X); macro(X) = X (#109294)
Guido van Rossum [Fri, 15 Sep 2023 15:39:05 +0000 (08:39 -0700)] 
gh-109287: Desugar inst(X) to op(X); macro(X) = X (#109294)

This makes the internal representation in the code generator simpler: there's a list of ops, and a list of macros, and there's no special-casing needed for ops that aren't macros. (There's now special-casing for ops that are also macros, but that's simpler.)

2 years agoAdd missing `PyDoc_STR` calls (#109393)
Nikita Sobolev [Fri, 15 Sep 2023 13:10:48 +0000 (16:10 +0300)] 
Add missing `PyDoc_STR` calls (#109393)

In files:

* Modules/_ctypes/cfield.c
* Modules/_struct.c
* Objects/dictobject.c
* Objects/typevarobject.c
* Objects/unionobject.c

2 years agoFix date.__repr__() docstring (#109422)
Christopher Yeh [Fri, 15 Sep 2023 13:05:19 +0000 (06:05 -0700)] 
Fix date.__repr__() docstring (#109422)

2 years agoDocs: Superseded modules: list only module names (#109439)
Hugo van Kemenade [Fri, 15 Sep 2023 12:56:23 +0000 (06:56 -0600)] 
Docs: Superseded modules: list only module names (#109439)

2 years agogh-109395: Remove skipped macOS builds from Azure Pipelines (#109400)
Nikita Sobolev [Fri, 15 Sep 2023 08:55:09 +0000 (11:55 +0300)] 
gh-109395: Remove skipped macOS builds from Azure Pipelines (#109400)

2 years agogh-108303: Move `test_future` into its own test_future_stmt subdir (#109368)
Nikita Sobolev [Fri, 15 Sep 2023 07:52:24 +0000 (10:52 +0300)] 
gh-108303: Move `test_future` into its own test_future_stmt subdir (#109368)

2 years agogh-109395: Remove skipped coverage job from Azure Pipelines (#109412)
Hugo van Kemenade [Fri, 15 Sep 2023 05:27:47 +0000 (23:27 -0600)] 
gh-109395: Remove skipped coverage job from Azure Pipelines (#109412)

2 years agogh-109425: regrtest decodes worker stdout with backslashreplace (#109428)
Victor Stinner [Thu, 14 Sep 2023 23:37:37 +0000 (01:37 +0200)] 
gh-109425: regrtest decodes worker stdout with backslashreplace (#109428)

libregrtest now decodes stdout of test worker processes with the
"backslashreplace" error handler to log corrupted stdout, instead of
failing with an error and not logging the stdout.

2 years agogh-109375: Fix bug where pdb registers an alias without an associated command (#109376)
buermarc [Thu, 14 Sep 2023 21:31:30 +0000 (23:31 +0200)] 
gh-109375: Fix bug where pdb registers an alias without an associated command (#109376)

2 years agogh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (#109423)
Victor Stinner [Thu, 14 Sep 2023 21:24:11 +0000 (23:24 +0200)] 
gh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (#109423)

Use a longer key: FIPS mode requires at least of at least 112 bits.
The previous key was only 32 bits.

2 years agogh-109418: Fix hypothesis strategy for b2a_roundtrip test (#109419)
Nikita Sobolev [Thu, 14 Sep 2023 20:38:31 +0000 (23:38 +0300)] 
gh-109418: Fix hypothesis strategy for b2a_roundtrip test (#109419)

2 years agogh-109413: libregrtest: Add and improve type annotations (#109405)
Alex Waygood [Thu, 14 Sep 2023 18:33:18 +0000 (19:33 +0100)] 
gh-109413: libregrtest: Add and improve type annotations (#109405)

2 years agogh-101100: Fix sphinx warnings in `turtle.rst` (#109394)
Nikita Sobolev [Thu, 14 Sep 2023 18:24:18 +0000 (21:24 +0300)] 
gh-101100: Fix sphinx warnings in `turtle.rst` (#109394)

2 years agogh-109219: propagate free vars through type param scopes (#109377)
Carl Meyer [Thu, 14 Sep 2023 16:20:32 +0000 (10:20 -0600)] 
gh-109219: propagate free vars through type param scopes (#109377)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years agogh-105658: fix excess trace events for except block ending with a conditional block...
Irit Katriel [Thu, 14 Sep 2023 16:06:08 +0000 (17:06 +0100)] 
gh-105658: fix excess trace events for except block ending with a conditional block (#109384)

2 years agodump readable opcode names in flowgraph debug utility (#109392)
Carl Meyer [Thu, 14 Sep 2023 14:28:21 +0000 (08:28 -0600)] 
dump readable opcode names in flowgraph debug utility (#109392)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2 years agogh-109402: Fix regrtest findtests() (#109403)
Victor Stinner [Thu, 14 Sep 2023 13:15:42 +0000 (15:15 +0200)] 
gh-109402: Fix regrtest findtests() (#109403)

Check for the full module name in SPLITTESTDIRS, not the relative
module name.

2 years agogh-107298: Document PyMODINIT_FUNC macro (#109236)
Victor Stinner [Thu, 14 Sep 2023 12:56:43 +0000 (14:56 +0200)] 
gh-107298: Document PyMODINIT_FUNC macro (#109236)

Document PyMODINIT_FUNC macro.

Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are
not documented. These macros should only be used to define the Python
C API. They should not be used outside Python code base.

2 years agogh-107782: Use _testcapi to test non-representable signatures (GH-109325)
Serhiy Storchaka [Thu, 14 Sep 2023 06:12:17 +0000 (09:12 +0300)] 
gh-107782: Use _testcapi to test non-representable signatures (GH-109325)

Builtin functions and methods that have non-representable signatures today
will have representable signatures yesterday, and they will become unusable
for testing this feature.

So we need to add special functions and methods to the _testcapi module
that always have non-representable signatures.

2 years agoAdd missing PyDoc_STR to GenericAlias.__parameters__ (#108811)
James Hilton-Balfe [Thu, 14 Sep 2023 03:42:44 +0000 (04:42 +0100)] 
Add missing PyDoc_STR to GenericAlias.__parameters__ (#108811)

2 years agoFix invocation of wasm_build.py for node (GH-109383)
Sam Gross [Wed, 13 Sep 2023 22:28:08 +0000 (18:28 -0400)] 
Fix invocation of wasm_build.py for node (GH-109383)

2 years agoGH-104584: Don't call executors from JUMP_BACKWARD (GH-109347)
Brandt Bucher [Wed, 13 Sep 2023 17:26:50 +0000 (10:26 -0700)] 
GH-104584: Don't call executors from JUMP_BACKWARD (GH-109347)

2 years agoGH-105848: Replace KW_NAMES + CALL with LOAD_CONST + CALL_KW (GH-109300)
Brandt Bucher [Wed, 13 Sep 2023 17:25:45 +0000 (10:25 -0700)] 
GH-105848: Replace KW_NAMES + CALL with LOAD_CONST + CALL_KW (GH-109300)

2 years agogh-109341: Fix crash on compiling invalid AST including TypeAlias (#109349)
Jelle Zijlstra [Wed, 13 Sep 2023 16:00:39 +0000 (09:00 -0700)] 
gh-109341: Fix crash on compiling invalid AST including TypeAlias (#109349)

2 years agogh-109351: Fix crash when compiling AST with invalid NamedExpr (#109352)
Jelle Zijlstra [Wed, 13 Sep 2023 16:00:15 +0000 (09:00 -0700)] 
gh-109351: Fix crash when compiling AST with invalid NamedExpr (#109352)

2 years agogh-109156: Add tests for de-instrumenting instructions with instrumented lines (GH...
Tian Gao [Wed, 13 Sep 2023 08:47:35 +0000 (01:47 -0700)] 
gh-109156: Add tests for de-instrumenting instructions with instrumented lines (GH-109157)