]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years agogh-111062 CI: Update skip lists for resuable workflows (#111521)
Hugo van Kemenade [Tue, 31 Oct 2023 05:49:15 +0000 (07:49 +0200)] 
gh-111062 CI: Update skip lists for resuable workflows (#111521)

CI: Update skip lists

2 years agogh-111277: In summarize_stats.py, don't fail fast on invalid ratios (#111278)
Michael Droettboom [Tue, 31 Oct 2023 00:10:07 +0000 (20:10 -0400)] 
gh-111277: In summarize_stats.py, don't fail fast on invalid ratios (#111278)

2 years agogh-109329: Count tier2 opcode misses (#110561)
Michael Droettboom [Tue, 31 Oct 2023 00:02:45 +0000 (20:02 -0400)] 
gh-109329: Count tier2 opcode misses (#110561)

This keeps a separate 'miss' counter for each micro-opcode, incremented whenever a guard uop takes a deoptimization side exit.

2 years agogh-76785: Move the Cross-Interpreter Code to Its Own File (gh-111502)
Eric Snow [Mon, 30 Oct 2023 22:53:10 +0000 (16:53 -0600)] 
gh-76785: Move the Cross-Interpreter Code to Its Own File (gh-111502)

This is partly to clear this stuff out of pystate.c, but also in preparation for moving some code out of _xxsubinterpretersmodule.c.  This change also moves this stuff to the internal API (new: Include/internal/pycore_crossinterp.h).  @vstinner did this previously and I undid it.  Now I'm re-doing it. :/

2 years agogh-110697: Use CLOCK_RES in test_os.TimerfdTests (#111529)
Victor Stinner [Mon, 30 Oct 2023 22:47:59 +0000 (23:47 +0100)] 
gh-110697: Use CLOCK_RES in test_os.TimerfdTests (#111529)

More TimerfdTests tests tolerate a difference of 1 ms in measured
elapsed time.

2 years agogh-90815: Fix mimalloc atomic.h on Windows arm64 (#111527)
Victor Stinner [Mon, 30 Oct 2023 22:33:49 +0000 (23:33 +0100)] 
gh-90815: Fix mimalloc atomic.h on Windows arm64 (#111527)

mi_atomic_load_explicit() casts 'p' argument to drop the 'const'
qualifier on Windows arm64 platform. Fix the compiler warning:

    'function': different 'const' qualifiers
    (compiling source file ..\Objects\mimalloc\options.c)

2 years agogh-90815: Fix mimalloc build on WASI (#111524)
Victor Stinner [Mon, 30 Oct 2023 22:10:22 +0000 (23:10 +0100)] 
gh-90815: Fix mimalloc build on WASI (#111524)

Include <unistd.h> to get sbrk() function.

2 years agogh-90815: Fix _PyMem_MimallocEnabled() compiler warning (#111522)
Victor Stinner [Mon, 30 Oct 2023 22:05:49 +0000 (23:05 +0100)] 
gh-90815: Fix _PyMem_MimallocEnabled() compiler warning (#111522)

Don't declare _PyMem_MimallocEnabled() if WITH_PYMALLOC macro is not
defined (./configure --without-pymalloc).

Fix also a typo in _PyInterpreterState_FinalizeAllocatedBlocks().

2 years agoRemove myself from typing CODEOWNERS (#111523)
Ken Jin [Mon, 30 Oct 2023 21:08:26 +0000 (05:08 +0800)] 
Remove myself from typing CODEOWNERS (#111523)

2 years agogh-111181: Fix enum doctests (GH-111180)
Nikita Sobolev [Mon, 30 Oct 2023 19:56:29 +0000 (22:56 +0300)] 
gh-111181: Fix enum doctests (GH-111180)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2 years agogh-111366: Correctly show custom syntax error messages in the codeop module functions...
Pablo Galindo Salgado [Mon, 30 Oct 2023 19:24:21 +0000 (19:24 +0000)] 
gh-111366: Correctly show custom syntax error messages in the codeop module functions (#111384)

2 years agogh-111284: Make multiprocessing tests with threads faster and more reliable (GH-111285)
Serhiy Storchaka [Mon, 30 Oct 2023 17:18:36 +0000 (19:18 +0200)] 
gh-111284: Make multiprocessing tests with threads faster and more reliable (GH-111285)

2 years agogh-110481: Fix _Py_ThreadId for non-free-threaded mode (gh-111503)
Donghee Na [Mon, 30 Oct 2023 17:16:18 +0000 (02:16 +0900)] 
gh-110481: Fix _Py_ThreadId for non-free-threaded mode (gh-111503)

2 years agogh-108082: C API: Add tests for PyErr_WriteUnraisable() (GH-111455)
Serhiy Storchaka [Mon, 30 Oct 2023 17:01:03 +0000 (19:01 +0200)] 
gh-108082: C API: Add tests for PyErr_WriteUnraisable() (GH-111455)

Also document the behavior when called with NULL.

2 years agogh-109515: When generating deep frozen modules on Windows, use a list file instead...
Riccardo Ghetta [Mon, 30 Oct 2023 16:14:26 +0000 (17:14 +0100)] 
gh-109515: When generating deep frozen modules on Windows, use a list file instead of arguments (GH-109516)

2 years agogh-110481: Implement biased reference counting (gh-110764)
Sam Gross [Mon, 30 Oct 2023 16:06:09 +0000 (12:06 -0400)] 
gh-110481: Implement biased reference counting (gh-110764)

2 years agogh-90815: Add mimalloc memory allocator (#109914)
Dino Viehland [Mon, 30 Oct 2023 15:43:11 +0000 (08:43 -0700)] 
gh-90815: Add mimalloc memory allocator (#109914)

* Add mimalloc v2.12

Modified src/alloc.c to remove include of alloc-override.c and not
compile new handler.

Did not include the following files:

 - include/mimalloc-new-delete.h
 - include/mimalloc-override.h
 - src/alloc-override-osx.c
 - src/alloc-override.c
 - src/static.c
 - src/region.c

mimalloc is thread safe and shares a single heap across all runtimes,
therefore finalization and getting global allocated blocks across all
runtimes is different.

* mimalloc: minimal changes for use in Python:

 - remove debug spam for freeing large allocations
 - use same bytes (0xDD) for freed allocations in CPython and mimalloc
   This is important for the test_capi debug memory tests

* Don't export mimalloc symbol in libpython.
* Enable mimalloc as Python allocator option.
* Add mimalloc MIT license.
* Log mimalloc in Lib/test/pythoninfo.py.
* Document new mimalloc support.
* Use macro defs for exports as done in:
  https://github.com/python/cpython/pull/31164/

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 years agogh-111062: Reusable Windows build that supports free-threaded mode as the conditional...
Donghee Na [Mon, 30 Oct 2023 15:30:40 +0000 (00:30 +0900)] 
gh-111062: Reusable Windows build that supports free-threaded mode as the conditional CI (#111493)

* gh-111062 Set up free-threaded CI for windows

Co-authored-by: Donghee Na <donghee.na@python.org>
* Apply suggestions from code review

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update

* Update names

* Add files

* Update

* Revert "Update"

This reverts commit 4f17e1af0dbce3b7959b93b41baaf040dee790cc.

* fix

---------

Co-authored-by: juanjose.tenorio <juanjose2611@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agogh-111062: Update name of reusable workflows for Ubuntu / macOS (gh-111494)
Donghee Na [Mon, 30 Oct 2023 15:15:22 +0000 (00:15 +0900)] 
gh-111062: Update name of reusable workflows for Ubuntu / macOS (gh-111494)

gh-111062 Update name of reusable workflows for linux / macOS

2 years agogh-111062: Reusable ubuntu build that supports free-threaded mode as the conditional...
NCLI [Mon, 30 Oct 2023 14:28:16 +0000 (23:28 +0900)] 
gh-111062: Reusable ubuntu build that supports free-threaded mode as the conditional CI (#111452)

Co-authored-by: Donghee Na <donghee.na92@gmail.com>
2 years agogh-106168: Check allocated instead of size index bounds in PyList_SET_ITEM() (#111480)
scoder [Mon, 30 Oct 2023 11:24:21 +0000 (12:24 +0100)] 
gh-106168: Check allocated instead of size index bounds in PyList_SET_ITEM() (#111480)

Check the index bound assertions in PyList_SET_ITEM() against [0:allocated] instead of [0:size] to re-allow valid use cases that assign within the allocated area.

2 years agoGH-111339: Fix initialization and finalization of static optimizer types (GH-111430)
Savannah Ostrowski [Sun, 29 Oct 2023 20:53:25 +0000 (13:53 -0700)] 
GH-111339: Fix initialization and finalization of static optimizer types (GH-111430)

2 years agogh-111165: Remove documentation for moved functions (GH-111467)
Serhiy Storchaka [Sun, 29 Oct 2023 19:34:22 +0000 (21:34 +0200)] 
gh-111165: Remove documentation for moved functions (GH-111467)

2 years agogh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst` (GH-111222)
Nikita Sobolev [Sun, 29 Oct 2023 19:31:01 +0000 (22:31 +0300)] 
gh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst` (GH-111222)

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

* Update Doc/library/socket.rst

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update asyncio-eventloop.rst

* Update socket.rst

---------

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agogh-111347: Remove wrong assertion in test_sendfile (#111377)
zcxsythenew [Sun, 29 Oct 2023 15:22:15 +0000 (23:22 +0800)] 
gh-111347: Remove wrong assertion in test_sendfile (#111377)

Windows is different.

2 years agogh-111062: Build both default and free-threaded on macOS (gh-111449)
Dima Tisnek [Sun, 29 Oct 2023 07:20:11 +0000 (16:20 +0900)] 
gh-111062: Build both default and free-threaded on macOS (gh-111449)

2 years agogh-94808: Add coverage test for number check (gh-111445)
Evan Kohilas [Sun, 29 Oct 2023 07:00:19 +0000 (09:00 +0200)] 
gh-94808: Add coverage test for number check (gh-111445)

2 years agogh-111062: Separate macOS build into a reusable workflow (gh-111444)
Dima Tisnek [Sun, 29 Oct 2023 06:12:16 +0000 (15:12 +0900)] 
gh-111062: Separate macOS build into a reusable workflow (gh-111444)

2 years agogh-66425: Remove the unreachable code to set `REMOTE_HOST` header (gh-111441)
c-bata [Sun, 29 Oct 2023 04:56:15 +0000 (13:56 +0900)] 
gh-66425: Remove the unreachable code to set `REMOTE_HOST` header (gh-111441)

2 years agogh-111426: Remove `test_cmd.test_coverage` (#111427)
Nikita Sobolev [Sat, 28 Oct 2023 23:01:53 +0000 (02:01 +0300)] 
gh-111426: Remove `test_cmd.test_coverage` (#111427)

2 years agoGH-110109: Move tests for `pathlib.Path.walk()` into main test classes. (#110655)
Barney Gale [Sat, 28 Oct 2023 21:26:36 +0000 (22:26 +0100)] 
GH-110109: Move tests for `pathlib.Path.walk()` into main test classes. (#110655)

2 years agogh-79033: Try to fix asyncio.Server.wait_closed() again (GH-111336)
Guido van Rossum [Sat, 28 Oct 2023 18:04:29 +0000 (11:04 -0700)] 
gh-79033: Try to fix asyncio.Server.wait_closed() again (GH-111336)

* Try to fix asyncio.Server.wait_closed() again

I identified the condition that `wait_closed()` is intended
to wait for: the server is closed *and* there are no more
active connections.

When this condition first becomes true, `_wakeup()` is called
(either from `close()` or from `_detach()`) and it sets `_waiters`
to `None`. So we just check for `self._waiters is None`; if it's
not `None`, we know we have to wait, and do so.

A problem was that the new test introduced in 3.12 explicitly
tested that `wait_closed()` returns immediately when the server
is *not* closed but there are currently no active connections.
This was a mistake (probably a misunderstanding of the intended
semantics). I've fixed the test, and added a separate test that
checks exactly for this scenario.

I also fixed an oddity where in `_wakeup()` the result of the
waiter was set to the waiter itself. This result is not used
anywhere and I changed this to `None`, to avoid a GC cycle.

* Update Lib/asyncio/base_events.py

---------

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2 years agoCI: Include Python version in cache.config key (#111410)
Hugo van Kemenade [Sat, 28 Oct 2023 07:23:47 +0000 (10:23 +0300)] 
CI: Include Python version in cache.config key (#111410)

* Include Python version in cache.config key, after Python setup

* Remove EOL 3.7 from branch triggers

2 years agogh-111342: fix typo in math.sumprod (GH-111416)
Sergey B Kirpichev [Sat, 28 Oct 2023 04:52:04 +0000 (07:52 +0300)] 
gh-111342: fix typo in math.sumprod (GH-111416)

2 years agogh-110205: Fix asyncio ThreadedChildWatcher._join_threads() (#110884)
Guido van Rossum [Fri, 27 Oct 2023 22:44:12 +0000 (15:44 -0700)] 
gh-110205: Fix asyncio ThreadedChildWatcher._join_threads() (#110884)

- `ThreadedChildWatcher.close()` is now *officially* a no-op; `_join_threads()` never did anything.
- Threads created by that class are now named `asyncio-waitpid-NNN`.
- `test.test_asyncio.utils.TestCase.close_loop()` now waits for the child watcher's threads, but not forever; if a thread hangs, it raises `RuntimeError`.

2 years agogh-59013: Make line number of function breakpoint more precise (#110582)
Tian Gao [Fri, 27 Oct 2023 21:01:31 +0000 (14:01 -0700)] 
gh-59013: Make line number of function breakpoint more precise (#110582)

2 years agogh-108765: Include explicitly <unistd.h> in signalmodule.c (#111402)
Victor Stinner [Fri, 27 Oct 2023 20:56:12 +0000 (22:56 +0200)] 
gh-108765: Include explicitly <unistd.h> in signalmodule.c (#111402)

unistd.h is needed by alarm() and pause() functions.

2 years agogh-111406: Fix broken link to bpython's site (#111407)
Zack Cerza [Fri, 27 Oct 2023 18:36:22 +0000 (12:36 -0600)] 
gh-111406: Fix broken link to bpython's site (#111407)

2 years agoFix typos in import system docs (#111396)
Jonathan Berthias [Fri, 27 Oct 2023 13:20:55 +0000 (15:20 +0200)] 
Fix typos in import system docs (#111396)

2 years agogh-111386: Fix `uint32_t` cast in `generated_cases.c.h` (#111387)
Nikita Sobolev [Fri, 27 Oct 2023 11:37:59 +0000 (14:37 +0300)] 
gh-111386: Fix `uint32_t` cast in `generated_cases.c.h` (#111387)

2 years agogh-111388: Add `show_group` parameter to `traceback.format_exception_only` (#111390)
Nikita Sobolev [Fri, 27 Oct 2023 10:11:26 +0000 (13:11 +0300)] 
gh-111388: Add `show_group` parameter to `traceback.format_exception_only` (#111390)

2 years agogh-111276: Clarify docs and comments about the role of LC_CTYPE (#111319)
Łukasz Langa [Fri, 27 Oct 2023 09:43:01 +0000 (11:43 +0200)] 
gh-111276: Clarify docs and comments about the role of LC_CTYPE (#111319)

Fix locale.LC_CTYPE documentation to no longer mention string.lower() et al. Those functions were removed in Python 3.0:
https://docs.python.org/2/library/string.html#deprecated-string-functions

Also, fix a comment in logging about locale-specific behavior of `str.lower()`.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agono-issue: Remove unused variable in getpath.py (gh-111372)
Satish Pokala [Fri, 27 Oct 2023 06:25:22 +0000 (11:55 +0530)] 
no-issue: Remove unused variable in getpath.py (gh-111372)

2 years agogh-89519: Remove classmethod descriptor chaining, deprecated since 3.11 (gh-110163)
Raymond Hettinger [Fri, 27 Oct 2023 05:24:56 +0000 (00:24 -0500)] 
gh-89519: Remove classmethod descriptor chaining, deprecated since 3.11 (gh-110163)

2 years agogh-111343: Fix `itertools` docs: `start` arg is optional for `count` (gh-111344)
Nikita Sobolev [Fri, 27 Oct 2023 04:30:13 +0000 (07:30 +0300)] 
gh-111343: Fix `itertools` docs: `start` arg is optional for `count` (gh-111344)

2 years agogh-109587: Allow "precompiled" perf-trampolines to largely mitigate the cost of enabl...
gsallam [Fri, 27 Oct 2023 03:57:29 +0000 (20:57 -0700)] 
gh-109587: Allow "precompiled" perf-trampolines to largely mitigate the cost of enabling perf-trampolines (#109666)

2 years agogh-111380: Show SyntaxWarnings only once when parsing if invalid syntax is encouinter...
Pablo Galindo Salgado [Fri, 27 Oct 2023 03:19:34 +0000 (12:19 +0900)] 
gh-111380: Show SyntaxWarnings only once when parsing if invalid syntax is encouintered (#111381)

2 years agoGH-94438: Fix RuntimeWarning for jump tests in test_sys_settrace (GH-111341)
Tian Gao [Thu, 26 Oct 2023 18:47:51 +0000 (11:47 -0700)] 
GH-94438: Fix RuntimeWarning for jump tests in test_sys_settrace (GH-111341)

2 years agoGH-111293: Fix DirEntry.inode dropping higher bits on Windows (GH-111294)
zcxsythenew [Thu, 26 Oct 2023 16:37:52 +0000 (00:37 +0800)] 
GH-111293: Fix DirEntry.inode dropping higher bits on Windows (GH-111294)

2 years agogh-111354: define names for RESUME oparg values (#111365)
Irit Katriel [Thu, 26 Oct 2023 15:30:18 +0000 (16:30 +0100)] 
gh-111354: define names for RESUME oparg values (#111365)

2 years agogh-111259: Optimize recursive wildcards in pathlib (GH-111303)
Serhiy Storchaka [Thu, 26 Oct 2023 15:07:06 +0000 (18:07 +0300)] 
gh-111259: Optimize recursive wildcards in pathlib (GH-111303)

Regular expression pattern `(?s:.)` is much faster than `[\s\S]`.

2 years agogh-109094: replace frame->prev_instr by frame->instr_ptr (#109095)
Irit Katriel [Thu, 26 Oct 2023 13:43:10 +0000 (14:43 +0100)] 
gh-109094: replace frame->prev_instr by frame->instr_ptr (#109095)

2 years agoOutput more details in the re tracing (GH-111357)
Serhiy Storchaka [Thu, 26 Oct 2023 13:42:42 +0000 (16:42 +0300)] 
Output more details in the re tracing (GH-111357)

2 years agogh-111348: Fix direct invocation of `test_doctest`; remove `test_doctest.test_coverag...
Nikita Sobolev [Thu, 26 Oct 2023 12:45:39 +0000 (15:45 +0300)] 
gh-111348: Fix direct invocation of `test_doctest`; remove `test_doctest.test_coverage` (#111349)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2 years agoGH-111213: Fix a few broken stats (GH-111216)
Mark Shannon [Thu, 26 Oct 2023 10:33:12 +0000 (11:33 +0100)] 
GH-111213: Fix a few broken stats (GH-111216)

2 years agoGH-111339: Change `valid` property of executors to `is_valid()` method (GH-111350)
Mark Shannon [Thu, 26 Oct 2023 10:31:51 +0000 (11:31 +0100)] 
GH-111339: Change `valid` property of executors to `is_valid()` method (GH-111350)

2 years agobpo-43950: handle wide unicode characters in tracebacks (#28150)
Batuhan Taskaya [Thu, 26 Oct 2023 07:05:29 +0000 (00:05 -0700)] 
bpo-43950: handle wide unicode characters in tracebacks (#28150)

2 years agogh-67224: Show source lines in tracebacks when using the -c option when running Pytho...
Pablo Galindo Salgado [Thu, 26 Oct 2023 06:17:28 +0000 (15:17 +0900)] 
gh-67224: Show source lines in tracebacks when using the -c option when running Python (#111200)

2 years agoDocs: Add `restart_events()` and positional arg semantics for `sys.monitoring` (...
Tian Gao [Wed, 25 Oct 2023 18:03:32 +0000 (11:03 -0700)] 
Docs: Add `restart_events()` and positional arg semantics for `sys.monitoring` (#111291)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-110679: Improved markup in enum.rst (GH-110747)
Khalil Mouawad [Wed, 25 Oct 2023 17:32:09 +0000 (20:32 +0300)] 
gh-110679: Improved markup in enum.rst (GH-110747)

2 years agogh-100762: Fix optimization in gen_close (#111069)
Irit Katriel [Wed, 25 Oct 2023 15:22:34 +0000 (16:22 +0100)] 
gh-100762: Fix optimization in gen_close  (#111069)

2 years agogh-111165: Add missed "support." prefix for "verbose" (GH-111327)
Serhiy Storchaka [Wed, 25 Oct 2023 14:50:25 +0000 (17:50 +0300)] 
gh-111165: Add missed "support." prefix for "verbose" (GH-111327)

2 years agogh-108590: Improve sqlite3 docs on encoding issues and how to handle those (#108699)
Erlend E. Aasland [Wed, 25 Oct 2023 13:58:00 +0000 (15:58 +0200)] 
gh-108590: Improve sqlite3 docs on encoding issues and how to handle those (#108699)

Add a guide for how to handle non-UTF-8 text encodings.
Link to that guide from the 'text_factory' docs.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Corvin <corvin@corvin.dev>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agogh-111187: Postpone removal version for locale.getdefaultlocale() to 3.15 (#111188)
Hugo van Kemenade [Wed, 25 Oct 2023 13:47:41 +0000 (16:47 +0300)] 
gh-111187: Postpone removal version for locale.getdefaultlocale() to 3.15 (#111188)

2 years agogh-111230: Fix errors checking in _ssl module init (#111232)
Nikita Sobolev [Wed, 25 Oct 2023 13:42:18 +0000 (16:42 +0300)] 
gh-111230: Fix errors checking in _ssl module init (#111232)

Introduce ADD_INT_CONST macro wrapper for PyModule_AddIntConstant()

2 years agogh-111174: Fix crash in getbuffer() called repeatedly for empty BytesIO (GH-111210)
Serhiy Storchaka [Wed, 25 Oct 2023 10:50:16 +0000 (13:50 +0300)] 
gh-111174: Fix crash in getbuffer() called repeatedly for empty BytesIO (GH-111210)

2 years agogh-111165: Move test running code from test.support to libregrtest (GH-111166)
Serhiy Storchaka [Wed, 25 Oct 2023 09:41:21 +0000 (12:41 +0300)] 
gh-111165: Move test running code from test.support to libregrtest (GH-111166)

Remove no longer used functions run_unittest() and run_doctest() from
the test.support module.

2 years agogh-106320: Re-add some PyLong/PyDict C-API functions (GH-#111162)
scoder [Wed, 25 Oct 2023 09:33:48 +0000 (11:33 +0200)] 
gh-106320: Re-add some PyLong/PyDict C-API functions (GH-#111162)

* gh-106320: Re-add _PyLong_FromByteArray(), _PyLong_AsByteArray() and _PyLong_GCD() to the public header files since they are used by third-party packages and there is no efficient replacement.

See https://github.com/python/cpython/issues/111140
See https://github.com/python/cpython/issues/111139

* gh-111262: Re-add _PyDict_Pop() to have a C-API until a new public one is designed.

2 years agogh-111065: Add more tests for the C API with the PySys_ prefix (GH-111067)
Serhiy Storchaka [Wed, 25 Oct 2023 08:33:12 +0000 (11:33 +0300)] 
gh-111065: Add more tests for the C API with the PySys_ prefix (GH-111067)

* Move existing tests for PySys_GetObject() and PySys_SetObject() into
  specialized files.
* Add test for PySys_GetXOptions() using _testcapi.
* Add tests for PySys_FormatStdout(), PySys_FormatStderr(),
  PySys_WriteStdout() and PySys_WriteStderr() using ctypes.

2 years agoBump test deps: `ruff` and `mypy` (#111288)
Artyom Romanov [Wed, 25 Oct 2023 08:05:37 +0000 (13:05 +0500)] 
Bump test deps: `ruff` and `mypy` (#111288)

2 years agogh-111295: Fix error checking in time extension module init (#111296)
Nikita Sobolev [Wed, 25 Oct 2023 07:19:40 +0000 (10:19 +0300)] 
gh-111295: Fix error checking in time extension module init (#111296)

Introduce ADD_INT macro wrapper for PyModule_AddIntConstant()

2 years agogh-111233: Fix error checking in select extension module init (#111234)
Nikita Sobolev [Wed, 25 Oct 2023 07:18:21 +0000 (10:18 +0300)] 
gh-111233: Fix error checking in select extension module init (#111234)

Introduce ADD_INT macro wrapper for PyModule_AddIntConstant()

2 years agogh-111253: Fix error checking in _socket module init (#111254)
Nikita Sobolev [Wed, 25 Oct 2023 07:11:04 +0000 (10:11 +0300)] 
gh-111253: Fix error checking in _socket module init (#111254)

2 years agogh-111251: Fix error checking in _blake2 module init (#111252)
Nikita Sobolev [Wed, 25 Oct 2023 06:32:46 +0000 (09:32 +0300)] 
gh-111251: Fix error checking in _blake2 module init (#111252)

Introduce ADD_INT_CONST macro wrapper for PyModule_AddIntConstant()

2 years agogh-57129: Add test for inspect.getsource in the REPL (#111197)
Pablo Galindo Salgado [Wed, 25 Oct 2023 06:15:41 +0000 (15:15 +0900)] 
gh-57129: Add test for inspect.getsource in the REPL (#111197)

2 years agoFix first parameter name in `tool` functions from `sys.monitoring` (#111286)
Pavel Karateev [Tue, 24 Oct 2023 21:19:54 +0000 (23:19 +0200)] 
Fix first parameter name in `tool` functions from `sys.monitoring` (#111286)

2 years agogh-102956: Fix returning of empty byte strings after seek in zipfile … (#103565)
Jokimax [Tue, 24 Oct 2023 21:15:42 +0000 (00:15 +0300)] 
gh-102956: Fix returning of empty byte strings after seek in zipfile … (#103565)

gh-102956: Fix returning of empty byte strings after seek in zipfile module. This was a regression in 3.12.0 due to a performance enhancement.

2 years agoGH-109214: _SET_IP before _PUSH_FRAME (but not _POP_FRAME) (GH-111001)
Brandt Bucher [Tue, 24 Oct 2023 20:27:42 +0000 (13:27 -0700)] 
GH-109214: _SET_IP before _PUSH_FRAME (but not _POP_FRAME) (GH-111001)

2 years agoGH-111182: Update EnumType.__contains__ docs (GH-111184)
InSync [Tue, 24 Oct 2023 17:30:13 +0000 (00:30 +0700)] 
GH-111182: Update EnumType.__contains__ docs (GH-111184)

2 years agogh-109017: Use non alternate name for Kyiv (GH-109251)
Jochen Sprickerhof [Tue, 24 Oct 2023 17:11:51 +0000 (19:11 +0200)] 
gh-109017: Use non alternate name for Kyiv (GH-109251)

tzdata provides Kiev as an alternative to Kyiv:
https://sources.debian.org/src/tzdata/2023c-10/backward/?hl=314#L314

But Debian moved it to the tzdata-legacy package breaking the test:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050530

This patch switches to the name provided by tzdata.

Also check that the new name is actually available.

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)