]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
23 months agogh-106905: avoid incorrect SystemError about recursion depth mismatch (#106906)
Markus Mohrhard [Mon, 13 Nov 2023 13:05:17 +0000 (21:05 +0800)] 
gh-106905: avoid incorrect SystemError about recursion depth mismatch (#106906)

* gh-106905: avoid incorrect SystemError about recursion depth mismatch

* Update Misc/NEWS.d/next/Core and Builtins/2023-07-20-11-41-16.gh-issue-106905.AyZpuB.rst

---------

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
23 months agogh-110944: Move pty helper to test.support and add basic pdb completion test (GH...
Tian Gao [Mon, 13 Nov 2023 10:23:06 +0000 (02:23 -0800)] 
gh-110944: Move pty helper to test.support and add basic pdb completion test (GH-111826)

23 months agogh-102837: more tests for the math module (GH-111930)
Sergey B Kirpichev [Mon, 13 Nov 2023 09:57:57 +0000 (12:57 +0300)] 
gh-102837: more tests for the math module (GH-111930)

Add tests to improve coverage:

* fsum: L1369, L1379, L1383, L1412
* trunc: L2081
* log: L2267
* dist: L2577, L2579
* hypot: L2632
* sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838
* pow: L2982
* prod: L3294, L3308, L3318-3330

// line numbers wrt to 9dc4fb8204

23 months agoDocs: Add `make htmllive` to rebuild and reload HTML files in your browser (#111900)
Hugo van Kemenade [Mon, 13 Nov 2023 08:06:49 +0000 (10:06 +0200)] 
Docs: Add `make htmllive` to rebuild and reload HTML files in your browser (#111900)

23 months agogh-111999: Add signatures and improve docstrings for builtins (GH-112000)
Serhiy Storchaka [Mon, 13 Nov 2023 07:13:49 +0000 (09:13 +0200)] 
gh-111999: Add signatures and improve docstrings for builtins (GH-112000)

23 months agogh-111928: make "memo" dict local to scan_once call (gh-112005)
AN Long [Mon, 13 Nov 2023 04:58:34 +0000 (12:58 +0800)] 
gh-111928: make "memo" dict local to scan_once call (gh-112005)

Co-authored-by: Sam Gross <colesbury@gmail.com>
23 months agogh-111944: Add assignment expression parentheses requirements (#111977)
Terry Jan Reedy [Mon, 13 Nov 2023 00:06:50 +0000 (19:06 -0500)] 
gh-111944: Add assignment expression parentheses requirements (#111977)

gh-111944: Clarify where assignment expressions require ()s

Augment the list of places where parentheses are
required around assignnment statements.  In particular,
'a := 0' and 'a = b := 1' are syntax errors.

23 months agoGH-111429: Speed up `pathlib.PurePath.[is_]relative_to()` (#111431)
Barney Gale [Sun, 12 Nov 2023 22:59:17 +0000 (22:59 +0000)] 
GH-111429: Speed up `pathlib.PurePath.[is_]relative_to()` (#111431)

23 months agogh-111969: refactor to make it easier to construct a dis.Instruction object (#111970)
Irit Katriel [Sun, 12 Nov 2023 14:06:02 +0000 (14:06 +0000)] 
gh-111969: refactor to make it easier to construct a dis.Instruction object (#111970)

23 months agogh-112001: Fix test_builtins_have_signatures in test_inspect (GH-112002)
Serhiy Storchaka [Sun, 12 Nov 2023 11:35:31 +0000 (13:35 +0200)] 
gh-112001: Fix test_builtins_have_signatures in test_inspect (GH-112002)

23 months agogh-111933: fix broken link to A.Neumaier article (gh-111937)
Sergey B Kirpichev [Sun, 12 Nov 2023 00:53:41 +0000 (03:53 +0300)] 
gh-111933: fix broken link to A.Neumaier article (gh-111937)

23 months agogh-111777: Fix assertion errors on incorrectly still-tracked GC object destruction...
T. Wouters [Sun, 12 Nov 2023 00:03:34 +0000 (01:03 +0100)] 
gh-111777: Fix assertion errors on incorrectly still-tracked GC object destruction (#111778)

In PyObject_GC_Del, in Py_DEBUG mode, when warning about GC objects that
were not properly untracked before starting destruction, take care to
untrack the object _before_ warning, to avoid triggering a GC run and
causing the problem the code tries to warn about. Also make sure to save and
restore any pending exceptions, which the warning would otherwise clobber or
trigger an assertion error on.

23 months agoFix undefined behaviour in datetime.time.fromisoformat() (#111982)
T. Wouters [Sat, 11 Nov 2023 23:56:27 +0000 (00:56 +0100)] 
Fix undefined behaviour in datetime.time.fromisoformat() (#111982)

Fix undefined behaviour in datetime.time.fromisoformat() when parsing a string without a timezone. 'tzoffset' is not assigned to by parse_isoformat_time if it returns 0, but time_fromisoformat then passes tzoffset to another function, which is undefined behaviour (even if the function in question does not use the value).

23 months agogh-90890: New methods to access mailbox.Maildir message info and flags (#103905)
Stephen Gildea [Sat, 11 Nov 2023 17:41:33 +0000 (09:41 -0800)] 
gh-90890: New methods to access mailbox.Maildir message info and flags (#103905)

New methods to access mailbox.Maildir message info and flags:
get_info, set_info, get_flags, set_flags, add_flag, remove_flag.

These methods speed up accessing a message's info and/or flags and are
useful when it is not necessary to access the message's contents,
as when iterating over a Maildir to find messages with specific flags.

---------

* Add more str type checking
* modernize to f-strings instead of %

Co-authored-by: Gregory P. Smith <greg@krypto.org>
23 months agogh-110481: fix 'unused function' warning for `is_shared_refcnt_dead`. (gh-111974)
Sam Gross [Fri, 10 Nov 2023 23:54:35 +0000 (18:54 -0500)] 
gh-110481: fix 'unused function' warning for `is_shared_refcnt_dead`. (gh-111974)

Fix 'unused function' warning for `is_shared_refcnt_dead`.

The `is_shared_refcnt_dead` function is only used if `Py_REF_DEBUG` is set.

23 months agogh-107431: Make `multiprocessing.managers.{DictProxy,ListProxy}` generic (#107433)
Nikita Sobolev [Fri, 10 Nov 2023 23:23:27 +0000 (02:23 +0300)] 
gh-107431: Make `multiprocessing.managers.{DictProxy,ListProxy}` generic (#107433)

Make `multiprocessing.managers.{DictProxy,ListProxy}` generic for type annotation use.  `ListProxy[str]` for example.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
23 months agoRemove dead code left after gh-110721 (#111905)
Serhiy Storchaka [Fri, 10 Nov 2023 22:30:01 +0000 (00:30 +0200)] 
Remove dead code left after gh-110721 (#111905)

23 months agogh-80731: Avoid executing code in except block in cmd (GH-111740)
Tian Gao [Fri, 10 Nov 2023 21:13:29 +0000 (13:13 -0800)] 
gh-80731: Avoid executing code in except block in cmd (GH-111740)

23 months agogh-111789: Simplify the sqlite code (GH-111829)
Serhiy Storchaka [Fri, 10 Nov 2023 20:49:24 +0000 (22:49 +0200)] 
gh-111789: Simplify the sqlite code (GH-111829)

Use new C API functions PyDict_GetItemRef() and
PyMapping_GetOptionalItemString().

23 months agoAdd private _PyUnicode_AsUTF8NoNUL() function (GH-111957)
Serhiy Storchaka [Fri, 10 Nov 2023 19:31:36 +0000 (21:31 +0200)] 
Add private _PyUnicode_AsUTF8NoNUL() function (GH-111957)

Like PyUnicode_AsUTF8(), but check for embedded null characters.

23 months agogh-110722: Make `-m test -T -j` use sys.monitoring (GH-111710)
Łukasz Langa [Fri, 10 Nov 2023 17:17:45 +0000 (18:17 +0100)] 
gh-110722: Make `-m test -T -j` use sys.monitoring (GH-111710)

Now all results from worker processes are aggregated and
displayed together as a summary at the end of a regrtest run.

The traditional trace is left in place for use with sequential
in-process test runs but now raises a warning that those
numbers are not precise.

`-T -j` requires `--with-pydebug` as it relies on `-Xpresite=`.

23 months agogh-111841: Fix os.putenv() and os.unsetenv() with embedded NUL on Windows (GH-111842)
Serhiy Storchaka [Fri, 10 Nov 2023 16:42:14 +0000 (18:42 +0200)] 
gh-111841: Fix os.putenv() and os.unsetenv() with embedded NUL on Windows (GH-111842)

23 months agoBump mypy to 1.7.0 (#111961)
Alex Waygood [Fri, 10 Nov 2023 16:00:50 +0000 (16:00 +0000)] 
Bump mypy to 1.7.0 (#111961)

23 months agogh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (#111910)
Zac Hatfield-Dodds [Fri, 10 Nov 2023 13:32:36 +0000 (08:32 -0500)] 
gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (#111910)

23 months agogh-111912: Run test_posix on Windows (GH-111913)
Serhiy Storchaka [Fri, 10 Nov 2023 13:29:15 +0000 (15:29 +0200)] 
gh-111912: Run test_posix on Windows (GH-111913)

23 months agogh-108303: Install `Lib/test/configdata` (#111899)
Nikita Sobolev [Fri, 10 Nov 2023 12:00:50 +0000 (15:00 +0300)] 
gh-108303: Install `Lib/test/configdata` (#111899)

23 months agogh-111356: io: Add missing documented objects to io.__all__ (#111370)
Nicolas Tessore [Fri, 10 Nov 2023 07:18:52 +0000 (07:18 +0000)] 
gh-111356: io: Add missing documented objects to io.__all__ (#111370)

Add DEFAULT_BUFFER_SIZE, text_encoding, and IncrementalNewlineDecoder.

23 months agogh-111569: Fix critical sections test on WebAssembly (GH-111897)
Sam Gross [Thu, 9 Nov 2023 23:37:11 +0000 (18:37 -0500)] 
gh-111569: Fix critical sections test on WebAssembly (GH-111897)

This adds a macro `Py_CAN_START_THREADS` that corresponds to the Python
function `test.support.threading_helper.can_start_thread()`. WASI and
some Emscripten builds do not have a working pthread implementation.

This macro is used to guard the critical sections C API tests that
require a working threads implementation.

2 years agogh-111881: Import _sha2 lazily in random (#111889)
Victor Stinner [Thu, 9 Nov 2023 22:10:21 +0000 (23:10 +0100)] 
gh-111881: Import _sha2 lazily in random (#111889)

The random module now imports the _sha2 module lazily in the
Random.seed() method for str, bytes and bytearray seeds. It also
imports lazily the warnings module in the _randbelow() method for
classes without getrandbits(). Lazy import makes Python startup
faster and reduces the number of imported modules at startup.

2 years agogh-81925: Implement native thread ids for kFreeBSD (#111761)
Samuel Thibault [Thu, 9 Nov 2023 20:02:30 +0000 (21:02 +0100)] 
gh-81925: Implement native thread ids for kFreeBSD (#111761)

---------

Co-authored-by: Antoine Pitrou <antoine@python.org>
2 years agoImprove error message for "float modulo by zero" (#111685)
Pavel Ovchinnikov [Thu, 9 Nov 2023 19:43:58 +0000 (22:43 +0300)] 
Improve error message for "float modulo by zero" (#111685)

2 years agogh-110875: Handle '.' properties in logging formatter configuration c… (GH-110943)
Vinay Sajip [Thu, 9 Nov 2023 18:55:22 +0000 (18:55 +0000)] 
gh-110875: Handle '.' properties in logging formatter configuration c… (GH-110943)

2 years agogh-111895: Convert definition list to bullet list for readability on mobile (#111898)
Hugo van Kemenade [Thu, 9 Nov 2023 18:50:27 +0000 (20:50 +0200)] 
gh-111895: Convert definition list to bullet list for readability on mobile (#111898)

Convert definition list to bullet list for readability on mobile

2 years agogh-111786: Optimize for space for _PyEval_EvalFrameDefault on MSVC for PGO (#111794)
Michael Droettboom [Thu, 9 Nov 2023 18:41:40 +0000 (13:41 -0500)] 
gh-111786: Optimize for space for _PyEval_EvalFrameDefault on MSVC for PGO (#111794)

In PGO mode, this function caused a compiler error in MSVC.
It turns out that optimizing for space only save the day, and is even faster.
However, without PGO, this is neither necessary nor slower.

2 years agogh-111881: Import doctest lazily in libregrtest (#111884)
Victor Stinner [Thu, 9 Nov 2023 15:00:10 +0000 (16:00 +0100)] 
gh-111881: Import doctest lazily in libregrtest (#111884)

In most cases, doctest is not needed. So don't always import it at
startup. The change reduces the number of modules already
imported when a test is run.

2 years agoAdd detail to comment on range of random.random() (gh-111868)
zipperer [Thu, 9 Nov 2023 14:58:04 +0000 (08:58 -0600)] 
Add detail to comment on range of random.random() (gh-111868)

---------

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2 years agogh-108303: Move more files to `Lib/test/test_module` (#111880)
Nikita Sobolev [Thu, 9 Nov 2023 14:42:34 +0000 (17:42 +0300)] 
gh-108303: Move more files to `Lib/test/test_module` (#111880)

2 years agogh-111881: Use lazy import in test.support (#111885)
Victor Stinner [Thu, 9 Nov 2023 14:38:13 +0000 (15:38 +0100)] 
gh-111881: Use lazy import in test.support (#111885)

* Import lazily getpass in test.support
* Only import ctypes on Windows in test.support.os_helper.

2 years agogh-108303: Move config parser data to `Lib/test/configparserdata/` (gh-111879)
Nikita Sobolev [Thu, 9 Nov 2023 13:52:32 +0000 (16:52 +0300)] 
gh-108303: Move config parser data to `Lib/test/configparserdata/` (gh-111879)

2 years agoGH-111843: Tier 2 exponential backoff (GH-111850)
Mark Shannon [Thu, 9 Nov 2023 13:49:51 +0000 (13:49 +0000)] 
GH-111843: Tier 2 exponential backoff (GH-111850)

2 years agoGH-109369: Exit tier 2 if executor is invalid (GH-111657)
Mark Shannon [Thu, 9 Nov 2023 11:19:51 +0000 (11:19 +0000)] 
GH-109369: Exit tier 2 if executor is invalid (GH-111657)

2 years agogh-111835: Add seekable method to mmap.mmap (gh-111852)
Donghee Na [Thu, 9 Nov 2023 11:13:35 +0000 (11:13 +0000)] 
gh-111835: Add seekable method to mmap.mmap (gh-111852)

2 years agogh-111354: remove comparisons with enum values, variable reuse, unused imports in...
Irit Katriel [Thu, 9 Nov 2023 10:27:20 +0000 (10:27 +0000)] 
gh-111354: remove comparisons with enum values, variable reuse, unused imports in genobject.c (#111708)

2 years agoGH-111804: Drop posix.fallocate() under WASI (GH-111869)
Brett Cannon [Thu, 9 Nov 2023 01:20:35 +0000 (17:20 -0800)] 
GH-111804: Drop posix.fallocate() under WASI (GH-111869)

Drop posix.fallocate() under WASI.

The underlying POSIX function, posix_fallocate(), was found to vary too
much between implementations to remain in WASI. As such, while it was
available in WASI preview1, it's been dropped in preview2.

2 years agogh-111569: Implement Python critical section API (gh-111571)
Sam Gross [Wed, 8 Nov 2023 22:39:29 +0000 (17:39 -0500)] 
gh-111569: Implement Python critical section API (gh-111571)

Critical sections are helpers to replace the global interpreter lock
with finer grained locking.  They provide similar guarantees to the GIL
and avoid the deadlock risk that plain locking involves.  Critical
sections are implicitly ended whenever the GIL would be released.  They
are resumed when the GIL would be acquired.  Nested critical sections
behave as if the sections were interleaved.

2 years agogh-110543: Fix CodeType.replace in presence of comprehensions (#110586)
Jelle Zijlstra [Wed, 8 Nov 2023 20:11:59 +0000 (12:11 -0800)] 
gh-110543: Fix CodeType.replace in presence of comprehensions (#110586)

2 years agoRemove redundant check in dbm.open() (GH-111844)
Serhiy Storchaka [Wed, 8 Nov 2023 17:42:41 +0000 (19:42 +0200)] 
Remove redundant check in dbm.open() (GH-111844)

PyUnicode_FSConverter() already checks for embedded null characters.

2 years agogh-111495: Add tests for PyList C API (#111562)
Kalyan [Wed, 8 Nov 2023 17:10:53 +0000 (22:40 +0530)] 
gh-111495: Add tests for PyList C API (#111562)

Signed-off-by: kalyanr <kalyan.ben10@live.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 years agogh-68166: Tkinter: Add tests and examples for element_create() (GH-111453)
Serhiy Storchaka [Wed, 8 Nov 2023 16:25:58 +0000 (18:25 +0200)] 
gh-68166: Tkinter: Add tests and examples for element_create() (GH-111453)

* Remove mention of "vsapi" element type from the documentation.
* Add tests for element_create() and other ttk.Style methods.
* Add examples for element_create() in the documentation.

2 years agogh-111246: Remove listening Unix socket on close (#111483)
Pierre Ossman (ThinLinc team) [Wed, 8 Nov 2023 16:10:10 +0000 (17:10 +0100)] 
gh-111246: Remove listening Unix socket on close (#111483)

Try to clean up the socket file we create so we don't add unused noise to the file system.

2 years agogh-111768: Add `wsgiref.util.is_hop_by_hop` to `__all__` (#111770)
Stefan [Wed, 8 Nov 2023 15:29:47 +0000 (16:29 +0100)] 
gh-111768: Add `wsgiref.util.is_hop_by_hop` to `__all__` (#111770)

2 years agosocket: Update generated AC code (#111853)
Jelle Zijlstra [Wed, 8 Nov 2023 15:03:29 +0000 (07:03 -0800)] 
socket: Update generated AC code (#111853)

2 years agoGlossary: Add "static type checker" (#111837)
Jelle Zijlstra [Wed, 8 Nov 2023 14:38:36 +0000 (06:38 -0800)] 
Glossary: Add "static type checker" (#111837)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-108303: Move more `typing` related files to `Lib/test/typinganndata` (#111825)
Nikita Sobolev [Wed, 8 Nov 2023 14:19:34 +0000 (17:19 +0300)] 
gh-108303: Move more `typing` related files to `Lib/test/typinganndata` (#111825)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-111662: Update socket module to use AC for optimizing performance (gh-111661)
Bogdan Romanyuk [Wed, 8 Nov 2023 14:03:52 +0000 (17:03 +0300)] 
gh-111662: Update socket module to use AC for optimizing performance (gh-111661)

2 years agoGH-111848: Tidy up tier 2 handling of FOR_ITER specialization by using DEOPT_IF inste...
Mark Shannon [Wed, 8 Nov 2023 13:31:55 +0000 (13:31 +0000)] 
GH-111848: Tidy up tier 2 handling of FOR_ITER specialization by using DEOPT_IF instead of jumps. (GH-111849)

2 years agogh-111089: Revert PyUnicode_AsUTF8() changes (#111833)
Victor Stinner [Tue, 7 Nov 2023 22:36:13 +0000 (23:36 +0100)] 
gh-111089: Revert PyUnicode_AsUTF8() changes (#111833)

* Revert "gh-111089: Use PyUnicode_AsUTF8() in Argument Clinic (#111585)"

This reverts commit d9b606b3d04fc56fb0bcc479d7d6c14562edb5e2.

* Revert "gh-111089: Use PyUnicode_AsUTF8() in getargs.c (#111620)"

This reverts commit cde1071b2a72e8261ca66053ef61431b7f3a81fd.

* Revert "gh-111089: PyUnicode_AsUTF8() now raises on embedded NUL (#111091)"

This reverts commit d731579bfb9a497cfb0076cb6b221058a20088fe.

* Revert "gh-111089: Add PyUnicode_AsUTF8() to the limited C API (#111121)"

This reverts commit d8f32be5b6a736dc2fc9dca3f1bf176c82fc9b44.

* Revert "gh-111089: Use PyUnicode_AsUTF8() in sqlite3 (#111122)"

This reverts commit 37e4e20eaa8f27ada926d49e5971fecf0477ad26.

2 years agogh-61199: Remove superfluous global statements from `base64._b32{en,de}code()*` ...
Romuald Brunet [Tue, 7 Nov 2023 22:32:44 +0000 (23:32 +0100)] 
gh-61199: Remove superfluous global statements from `base64._b32{en,de}code()*` (GH-111785)

Minor cleanup after commit 4ce6faa6c9591de6079347eccc9e61ae4e8d9e31

2 years agogh-111806: Fix `test_recursion` in `test_richcmp` on WASI builds (GH-111830)
Nikita Sobolev [Tue, 7 Nov 2023 21:37:29 +0000 (00:37 +0300)] 
gh-111806: Fix `test_recursion` in `test_richcmp` on WASI builds (GH-111830)

2 years agogh-111808: Fix recursion error on WASM in `test_typing` (GH-111819)
Nikita Sobolev [Tue, 7 Nov 2023 19:23:57 +0000 (22:23 +0300)] 
gh-111808: Fix recursion error on WASM in `test_typing` (GH-111819)

2 years agogh-81137: deprecate assignment of code object to a function of a mismatched type...
Irit Katriel [Tue, 7 Nov 2023 18:54:36 +0000 (18:54 +0000)] 
gh-81137: deprecate assignment of code object to a function of a mismatched type (#111823)

2 years agogh-111623: Add Support for Cross-interpreter tuples (gh-111628)
Anthony Shaw [Tue, 7 Nov 2023 17:58:29 +0000 (02:58 +0900)] 
gh-111623: Add Support for Cross-interpreter tuples (gh-111628)

2 years agogh-85098: Implement functional CLI of symtable (#109112)
Serhiy Storchaka [Tue, 7 Nov 2023 16:32:16 +0000 (18:32 +0200)] 
gh-85098: Implement functional CLI of symtable (#109112)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2 years agogh-106672: C API: Report indiscriminately ignored errors (GH-106674)
Serhiy Storchaka [Tue, 7 Nov 2023 13:58:04 +0000 (15:58 +0200)] 
gh-106672: C API: Report indiscriminately ignored errors (GH-106674)

Functions which indiscriminately ignore all errors now report them as
unraisable errors.

2 years agogh-111765: Move old PyFloat_* tests to Lib/test/test_capi/test_float.py (GH-111766)
Sergey B Kirpichev [Tue, 7 Nov 2023 11:40:58 +0000 (14:40 +0300)] 
gh-111765: Move old PyFloat_* tests to Lib/test/test_capi/test_float.py  (GH-111766)

2 years agoGH-111485: Allow arbitrary annotations on instructions and micro-ops. (GH-111697)
Mark Shannon [Tue, 7 Nov 2023 09:42:39 +0000 (09:42 +0000)] 
GH-111485: Allow arbitrary annotations on instructions and micro-ops. (GH-111697)

2 years agogh-79932: raise exception if frame.clear() is called on a suspended frame (#111792)
Irit Katriel [Tue, 7 Nov 2023 08:49:30 +0000 (08:49 +0000)] 
gh-79932: raise exception if frame.clear() is called on a suspended frame (#111792)

2 years agogh-110395: test: assert after the child dies. (#111816)
Gregory P. Smith [Tue, 7 Nov 2023 06:05:56 +0000 (22:05 -0800)] 
gh-110395: test: assert after the child dies. (#111816)

based on review from Victor Stinner.  I already made this edit in the 3.12 backport PR.

2 years agogh-111729: update generic syntax for `typing.Concatenate` sample code in `Doc/library...
方糖 [Tue, 7 Nov 2023 00:53:17 +0000 (08:53 +0800)] 
gh-111729: update generic syntax for `typing.Concatenate` sample code in `Doc/library/typing.rst` (#111734)

use new generic syntax

2 years agoGH-111485: Make BEFORE_WITH a uop (GH-111812)
Brandt Bucher [Tue, 7 Nov 2023 00:42:49 +0000 (16:42 -0800)] 
GH-111485: Make BEFORE_WITH a uop (GH-111812)

2 years agogh-76785: Move _Py_excinfo Functions Out of the Internal C-API (gh-111715)
Eric Snow [Mon, 6 Nov 2023 18:09:22 +0000 (11:09 -0700)] 
gh-76785: Move _Py_excinfo Functions Out of the Internal C-API (gh-111715)

I added _Py_excinfo to the internal API (and added its functions in Python/errors.c) in gh-111530 (9322ce9).  Since then I've had a nagging sense that I should have added the type and functions in its own PR.  While I do plan on using _Py_excinfo outside crossinterp.c very soon (see gh-111572/gh-111573), I'd still feel more comfortable if the _Py_excinfo stuff went in as its own PR.  Hence, here we are.

(FWIW, I may combine that with gh-111572, which I may, in turn, combine with gh-111573.  We'll see.)

2 years agogh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under Py_LIMITED_API (gh...
Eric Snow [Mon, 6 Nov 2023 16:34:57 +0000 (09:34 -0700)] 
gh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under Py_LIMITED_API (gh-111707)

This should have been done in gh-104148.

(A similar fix has already be done for that slot's value macros, and backported to 3.12.  See gh-110968.)

2 years agosimplify code to pop exception in frame_setlineno (#111702)
Irit Katriel [Mon, 6 Nov 2023 15:45:33 +0000 (15:45 +0000)] 
simplify code to pop exception in frame_setlineno (#111702)

2 years agogh-96954: Use skip_if_missing in test_makeunicodedata (GH-111764)
Dennis Sweeney [Mon, 6 Nov 2023 14:32:35 +0000 (09:32 -0500)] 
gh-96954: Use skip_if_missing in test_makeunicodedata (GH-111764)

skip_if_missing in test_makeunicodedata

2 years agoGH-111772: Specialize slot loads and stores for `_Py_T_OBJECT` (GH-111773)
Mark Shannon [Mon, 6 Nov 2023 13:55:04 +0000 (13:55 +0000)] 
GH-111772: Specialize slot loads and stores for `_Py_T_OBJECT` (GH-111773)

2 years agoGH-111646: Simplify optimizer, by compacting uops when making executor. (GH-111647)
Mark Shannon [Mon, 6 Nov 2023 11:28:52 +0000 (11:28 +0000)] 
GH-111646: Simplify optimizer, by compacting uops when making executor. (GH-111647)

2 years agogh-101180: Fix a bug where iso2022_jp_3 and iso2022_jp_2004 codecs read out of bounds...
Masayuki Moriyama [Mon, 6 Nov 2023 10:59:22 +0000 (19:59 +0900)] 
gh-101180: Fix a bug where iso2022_jp_3 and iso2022_jp_2004 codecs read out of bounds (gh-111695)

2 years agogh-109466: Add ipv6_mapped property to IPv4Address (#109467)
Charles Machalow [Sun, 5 Nov 2023 16:50:31 +0000 (08:50 -0800)] 
gh-109466: Add ipv6_mapped property to IPv4Address (#109467)

Adds the `IPv4Address.ipv6_mapped` property.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agogh-111495: Add tests for PyComplex C API (GH-111591)
Sergey B Kirpichev [Sun, 5 Nov 2023 07:42:42 +0000 (10:42 +0300)] 
gh-111495: Add tests for PyComplex C API (GH-111591)

2 years agogh-111495: Add tests for PyFloat C API (GH-111624)
Sergey B Kirpichev [Sun, 5 Nov 2023 07:20:12 +0000 (10:20 +0300)] 
gh-111495: Add tests for PyFloat C API (GH-111624)

2 years agogh-111747: DOC: fix moved link to Documentation Translations (#111748)
partev [Sun, 5 Nov 2023 04:23:01 +0000 (00:23 -0400)] 
gh-111747: DOC: fix moved link to Documentation Translations (#111748)

Update old link in bugs.rst to the table of doc translators and translation repositories at Github.

2 years agogh-111719: Add extra check for alias command (#111720)
Tian Gao [Sat, 4 Nov 2023 23:05:22 +0000 (16:05 -0700)] 
gh-111719: Add extra check for alias command (#111720)

2 years agogh-110395: invalidate open kqueues after fork (#110517)
Davide Rizzo [Sat, 4 Nov 2023 21:45:24 +0000 (22:45 +0100)] 
gh-110395: invalidate open kqueues after fork (#110517)

Invalidate open select.kqueue instances after fork as the fd will be invalid in the child.

2 years agogh-80675: Set `f_trace_lines = True` on all frames upon `pdb.set_trace()` (#110881)
Tian Gao [Sat, 4 Nov 2023 19:59:36 +0000 (12:59 -0700)] 
gh-80675: Set `f_trace_lines = True` on all frames upon `pdb.set_trace()` (#110881)

2 years agogh-96954: use a directed acyclic word graph for storing the unicodedata codepoint...
CF Bolz-Tereick [Sat, 4 Nov 2023 14:56:58 +0000 (15:56 +0100)] 
gh-96954: use a directed acyclic word graph for storing the unicodedata codepoint names (#97906)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2 years agoGH-110829: Ensure Thread.join() joins the OS thread (#110848)
Antoine Pitrou [Sat, 4 Nov 2023 13:59:24 +0000 (14:59 +0100)] 
GH-110829: Ensure Thread.join() joins the OS thread (#110848)

Joining a thread now ensures the underlying OS thread has exited. This is required for safer fork() in multi-threaded processes.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 years agogh-111666: Speed up `BaseExceptionGroup.{derive,split,subgroup}` (#111667)
Nikita Sobolev [Sat, 4 Nov 2023 09:59:46 +0000 (12:59 +0300)] 
gh-111666: Speed up `BaseExceptionGroup.{derive,split,subgroup}` (#111667)

2 years agogh-108303: Move `zip` and `tar` archives to `Lib/test/archivetestdata` (#111549)
Nikita Sobolev [Sat, 4 Nov 2023 09:57:53 +0000 (12:57 +0300)] 
gh-108303: Move `zip` and `tar` archives to `Lib/test/archivetestdata` (#111549)

2 years agogh-111159: Fix `SyntaxError` doctests for non-builtin exception classes (#111541)
Nikita Sobolev [Sat, 4 Nov 2023 09:54:10 +0000 (12:54 +0300)] 
gh-111159: Fix `SyntaxError` doctests for non-builtin exception classes (#111541)

2 years agogh-111495: Test C API functions with extreme sizes and indices (GH-111631)
Serhiy Storchaka [Sat, 4 Nov 2023 09:40:46 +0000 (11:40 +0200)] 
gh-111495: Test C API functions with extreme sizes and indices (GH-111631)

2 years agogh-111724: Fix doctest `ResourceWarning` in `howto/descriptor.rst` (#111725)
Nikita Sobolev [Sat, 4 Nov 2023 09:22:19 +0000 (12:22 +0300)] 
gh-111724: Fix doctest `ResourceWarning` in `howto/descriptor.rst` (#111725)

Close database connection explicitly in test cleanup.

2 years agogh-111644: Fix asyncio test_unhandled_exceptions() (#111713)
Victor Stinner [Sat, 4 Nov 2023 00:47:07 +0000 (01:47 +0100)] 
gh-111644: Fix asyncio test_unhandled_exceptions() (#111713)

Fix test_unhandled_exceptions() of test_asyncio.test_streams: break
explicitly a reference cycle.

Fix also StreamTests.tearDown(): the loop must not be closed
explicitly, but using set_event_loop() which takes care of shutting
down the executor with executor.shutdown(wait=True).
BaseEventLoop.close() calls executor.shutdown(wait=False).

2 years agogh-111644: Fix support threading_cleanup() (#111714)
Victor Stinner [Sat, 4 Nov 2023 00:18:42 +0000 (01:18 +0100)] 
gh-111644: Fix support threading_cleanup() (#111714)

Copy the list of dangling threads to make sure that the list of
"Dangling thread" is complete. Previously, the list was incomplete if
threads completed just before the list was displayed.

Changes:

* Rewrite the warning to make it easier to understand.
* Use support.sleeping_retry().
* threading_cleanup() no longer copies threading._dangling,
  but only counts the number of dangling thread.
* Remove support.gc_support() call.

2 years agogh-109649: Fix test_os.test_process_cpu_count_affinity() (#111689)
Victor Stinner [Fri, 3 Nov 2023 23:53:18 +0000 (00:53 +0100)] 
gh-109649: Fix test_os.test_process_cpu_count_affinity() (#111689)

When CPUs are isolated on Linux, os.process_cpu_count() is smaller
than os.cpu_count(). Fix the test for this case.

Example with "isolcpus=5,11 rcu_nocbs=5,11" options passed to a Linux
command line to isolated two logical CPUs:

$ ./python -c 'import os; print(os.process_cpu_count(), "/", os.cpu_count())'
10 / 12

2 years agoAdd a fuzz target for `_elementtree.XMLParser._parse_whole` (#111477)
Brad Larsen [Fri, 3 Nov 2023 21:01:56 +0000 (17:01 -0400)] 
Add a fuzz target for `_elementtree.XMLParser._parse_whole` (#111477)

* Add a fuzzer for `_elementtree.XMLParser._parse_whole`

2 years agogh-111684: Avoid a Compiler Warning (gh-111706)
Eric Snow [Fri, 3 Nov 2023 19:37:10 +0000 (13:37 -0600)] 
gh-111684: Avoid a Compiler Warning (gh-111706)

2 years agogh-111506: Implement Py_SET_REFCNT() as opaque function in limited C API (#111508)
Victor Stinner [Fri, 3 Nov 2023 17:18:57 +0000 (18:18 +0100)] 
gh-111506: Implement Py_SET_REFCNT() as opaque function in limited C API (#111508)

In the limited C API version 3.13, Py_SET_REFCNT() function is now
implemented as an opaque function call.

Add _Py_SetRefcnt() to the stable ABI.

2 years agogh-103615: Use local events for opcode tracing (GH-109472)
Tian Gao [Fri, 3 Nov 2023 16:39:50 +0000 (09:39 -0700)] 
gh-103615: Use local events for opcode tracing (GH-109472)

* Use local monitoring for opcode trace

* Remove f_opcode_trace_set

* Add test for setting f_trace_opcodes after settrace

2 years agogh-111652: Fix --enable-pystats build (GH-111653)
Michael Droettboom [Fri, 3 Nov 2023 15:21:16 +0000 (11:21 -0400)] 
gh-111652: Fix --enable-pystats build (GH-111653)

2 years agoCI: Make macOS Intel required to succeed (GH-110362)
Hugo van Kemenade [Fri, 3 Nov 2023 15:13:15 +0000 (17:13 +0200)] 
CI: Make macOS Intel required to succeed (GH-110362)