]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
20 months agogh-115133: Fix tests for XMLPullParser with Expat 2.6.0 (GH-115164)
Serhiy Storchaka [Sun, 11 Feb 2024 10:08:39 +0000 (12:08 +0200)] 
gh-115133: Fix tests for XMLPullParser with Expat 2.6.0 (GH-115164)

Feeding the parser by too small chunks defers parsing to prevent
CVE-2023-52425. Future versions of Expat may be more reactive.

20 months agogh-114807: multiprocessing: don't raise ImportError if _multiprocessing is missing...
Hood Chatham [Sun, 11 Feb 2024 09:59:50 +0000 (01:59 -0800)] 
gh-114807: multiprocessing: don't raise ImportError if _multiprocessing is missing (#114808)

`_multiprocessing` is only used under the `if _winapi:` block, this moves the import to be within the `_winapi` ImportError handling try/except for equivalent treatment.

20 months agogh-101100: Fix dangling refs in bdb.rst (#114983)
Skip Montanaro [Sun, 11 Feb 2024 09:21:10 +0000 (03:21 -0600)] 
gh-101100: Fix dangling refs in bdb.rst (#114983)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
20 months agogh-115274: Fix direct invocation of `testmock/testpatch.py` (#115275)
Nikita Sobolev [Sun, 11 Feb 2024 08:51:25 +0000 (11:51 +0300)] 
gh-115274: Fix direct invocation of `testmock/testpatch.py` (#115275)

20 months agogh-115249: Fix `test_descr` with `-OO` mode (#115250)
Nikita Sobolev [Sun, 11 Feb 2024 08:00:44 +0000 (11:00 +0300)] 
gh-115249: Fix `test_descr` with `-OO` mode (#115250)

20 months agogh-115258: Temporarily disable test on Windows (#115269)
Sam Gross [Sun, 11 Feb 2024 03:14:25 +0000 (22:14 -0500)] 
gh-115258: Temporarily disable test on Windows (#115269)

The "test_shutdown_all_methods_in_many_threads" test times out on the Windows CI.
This skips the test on Windows until we figure out the root cause.

20 months agogh-101100: Fix sphinx warnings in `c-api/gcsupport.rst` (#114786)
Nikita Sobolev [Sat, 10 Feb 2024 22:59:23 +0000 (01:59 +0300)] 
gh-101100: Fix sphinx warnings in `c-api/gcsupport.rst` (#114786)

20 months agogh-115254: Fix `test_property` with `-00` mode (#115255)
Nikita Sobolev [Sat, 10 Feb 2024 21:51:05 +0000 (00:51 +0300)] 
gh-115254: Fix `test_property` with `-00` mode (#115255)

20 months agogh-114670: Fix `_testbuffer` module initialization (#114672)
Nikita Sobolev [Sat, 10 Feb 2024 21:48:28 +0000 (00:48 +0300)] 
gh-114670: Fix `_testbuffer` module initialization (#114672)

20 months agogh-115252: Fix `test_enum` with `-OO` mode (GH-115253)
Nikita Sobolev [Sat, 10 Feb 2024 18:34:22 +0000 (21:34 +0300)] 
gh-115252: Fix `test_enum` with `-OO` mode (GH-115253)

20 months agoGH-115060: Speed up `pathlib.Path.glob()` by removing redundant regex matching (...
Barney Gale [Sat, 10 Feb 2024 18:12:34 +0000 (18:12 +0000)] 
GH-115060: Speed up `pathlib.Path.glob()` by removing redundant regex matching (#115061)

When expanding and filtering paths for a `**` wildcard segment, build an `re.Pattern` object from the subsequent pattern parts, rather than the entire pattern, and match against the `os.DirEntry` object prior to instantiating a path object. Also skip compiling a pattern when expanding a `*` wildcard segment.

20 months agogh-114894: add array.array.clear() method (#114919)
Mike Zimin [Sat, 10 Feb 2024 15:59:46 +0000 (19:59 +0400)] 
gh-114894: add array.array.clear() method (#114919)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
20 months agogh-102840: Fix confused traceback when floordiv or mod operations happens between... 105789/head
Kirill Podoprigora [Sat, 10 Feb 2024 14:37:19 +0000 (17:37 +0300)] 
gh-102840: Fix confused traceback when floordiv or mod operations happens between Fraction and complex objects (GH-102842)

20 months agogh-115059: Remove debugging code in test_io (GH-115240)
Serhiy Storchaka [Sat, 10 Feb 2024 13:17:33 +0000 (15:17 +0200)] 
gh-115059: Remove debugging code in test_io (GH-115240)

20 months agogh-76763: Make chr() always raising ValueError for out-of-range values (GH-114882)
Serhiy Storchaka [Sat, 10 Feb 2024 10:21:35 +0000 (12:21 +0200)] 
gh-76763: Make chr() always raising ValueError for out-of-range values (GH-114882)

Previously it raised OverflowError for very large or very small values.

20 months agoGH-87804: Fix counter overflow in statvfs on macOS (#99570)
Ronald Oussoren [Sat, 10 Feb 2024 10:16:45 +0000 (11:16 +0100)] 
GH-87804: Fix counter overflow in statvfs on macOS (#99570)

On macOS the statvfs interface returns block counts as
32-bit integers, and that results in bad reporting for
larger disks.

Therefore reimplement statvfs in terms of statfs, which
does use 64-bit integers for block counts.

Tested using a sparse filesystem image of 100TB.

20 months agogh-114552: Update `__dir__` method docs: it allows returning an iterable (#114662)
Nikita Sobolev [Sat, 10 Feb 2024 08:34:23 +0000 (11:34 +0300)] 
gh-114552: Update `__dir__` method docs: it allows returning an iterable (#114662)

20 months agogh-96471: Add shutdown() method to queue.Queue (#104750)
Laurie O [Sat, 10 Feb 2024 04:58:30 +0000 (14:58 +1000)] 
gh-96471: Add shutdown() method to queue.Queue (#104750)

Co-authored-by: Duprat <yduprat@gmail.com>
20 months agogh-111968: Refactor _PyXXX_Fini to integrate with _PyObject_ClearFreeLists (gh-114899)
Donghee Na [Sat, 10 Feb 2024 00:57:04 +0000 (09:57 +0900)] 
gh-111968: Refactor _PyXXX_Fini to integrate with _PyObject_ClearFreeLists (gh-114899)

20 months agogh-115165: Fix `typing.Annotated` for immutable types (#115213)
dave-shawley [Fri, 9 Feb 2024 22:11:37 +0000 (17:11 -0500)] 
gh-115165: Fix `typing.Annotated` for immutable types (#115213)

The return value from an annotated callable can raise any exception from
__setattr__ for the `__orig_class__` property.

20 months agogh-110481: Implement inter-thread queue for biased reference counting (#114824)
Sam Gross [Fri, 9 Feb 2024 22:08:32 +0000 (17:08 -0500)] 
gh-110481: Implement inter-thread queue for biased reference counting (#114824)

Biased reference counting maintains two refcount fields in each object:
`ob_ref_local` and `ob_ref_shared`. The true refcount is the sum of these two
fields. In some cases, when refcounting operations are split across threads,
the ob_ref_shared field can be negative (although the total refcount must be
at least zero). In this case, the thread that decremented the refcount
requests that the owning thread give up ownership and merge the refcount
fields.

20 months agogh-112903: Handle non-types in _BaseGenericAlias.__mro_entries__() (#115191)
Carl Meyer [Fri, 9 Feb 2024 19:19:09 +0000 (12:19 -0700)] 
gh-112903: Handle non-types in _BaseGenericAlias.__mro_entries__() (#115191)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
20 months agoAdd Peter L to ACKS (GH-115222)
Peter Lazorchak [Fri, 9 Feb 2024 17:06:14 +0000 (09:06 -0800)] 
Add Peter L to ACKS (GH-115222)

20 months agogh-115142: Skip test_optimizer if _testinternalcapi module is not available (GH-115175)
Kirill Podoprigora [Fri, 9 Feb 2024 16:59:41 +0000 (19:59 +0300)] 
gh-115142: Skip test_optimizer if _testinternalcapi module is not available (GH-115175)

20 months agogh-115184: Fix refleak tracking issues in free-threaded build (#115188)
Sam Gross [Fri, 9 Feb 2024 14:23:12 +0000 (09:23 -0500)] 
gh-115184: Fix refleak tracking issues in free-threaded build (#115188)

Fixes a few issues related to refleak tracking in the free-threaded build:

- Count blocks in abandoned segments
- Call `_mi_page_free_collect` earlier during heap traversal in order to get an accurate count of blocks in use.
- Add missing refcount tracking in `_Py_DecRefSharedDebug` and `_Py_ExplicitMergeRefcount`.
- Pause threads in  `get_num_global_allocated_blocks` to ensure that traversing the mimalloc heaps is safe.

20 months agoDocs: correctly link to code objects (#115214)
Erlend E. Aasland [Fri, 9 Feb 2024 14:11:36 +0000 (15:11 +0100)] 
Docs: correctly link to code objects (#115214)

20 months agogh-115059: Flush the underlying write buffer in io.BufferedRandom.read1() (GH-115163)
Serhiy Storchaka [Fri, 9 Feb 2024 10:36:12 +0000 (12:36 +0200)] 
gh-115059: Flush the underlying write buffer in io.BufferedRandom.read1() (GH-115163)

20 months agoGH-113632: update configure.ac for WebAssembly support tiers (#115192)
Brett Cannon [Fri, 9 Feb 2024 08:21:49 +0000 (00:21 -0800)] 
GH-113632: update configure.ac for WebAssembly support tiers (#115192)

Move WASI to tier 2 and drop Emscripten.

20 months agogh-101100: Fix sphinx warnings in `library/enum.rst` (#114696)
Nikita Sobolev [Fri, 9 Feb 2024 06:40:28 +0000 (09:40 +0300)] 
gh-101100: Fix sphinx warnings in `library/enum.rst` (#114696)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
20 months agogh-115167: Exclude vcruntime140_threads.dll from Windows build output (GH-115176)
adang1345 [Thu, 8 Feb 2024 21:42:45 +0000 (16:42 -0500)] 
gh-115167: Exclude vcruntime140_threads.dll from Windows build output (GH-115176)

20 months agogh-112069: Adapt set/frozenset methods to Argument Clinic (#115112)
Tomas R [Thu, 8 Feb 2024 16:47:27 +0000 (17:47 +0100)] 
gh-112069: Adapt set/frozenset methods to Argument Clinic (#115112)

21 months agogh-107944: Improve error message for getargs with bad keyword arguments (#114792)
Shantanu [Thu, 8 Feb 2024 09:04:41 +0000 (01:04 -0800)] 
gh-107944: Improve error message for getargs with bad keyword arguments (#114792)

21 months agogh-115136: Fix possible NULL deref in getpath_joinpath() (GH-115137)
Artem Chernyshev [Thu, 8 Feb 2024 08:40:38 +0000 (11:40 +0300)] 
gh-115136: Fix possible NULL deref in getpath_joinpath() (GH-115137)

Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
21 months agogh-115146: Fix typo in pickletools.py documentation (GH-115148)
Justin Applegate [Thu, 8 Feb 2024 08:12:58 +0000 (01:12 -0700)] 
gh-115146: Fix typo in pickletools.py documentation (GH-115148)

21 months agoWhen the Py_CompileStringExFlags fuzzer encounters a SystemError, abort (#115147)
Alex Gaynor [Wed, 7 Feb 2024 22:21:33 +0000 (17:21 -0500)] 
When the Py_CompileStringExFlags fuzzer encounters a SystemError, abort (#115147)

This allows us to catch bugs beyond memory corruption and assertions.

21 months agogh-114828: parenthesize non-atomic macro definitions in pycore_symtable.h (#115143)
Carl Meyer [Wed, 7 Feb 2024 20:19:47 +0000 (15:19 -0500)] 
gh-114828: parenthesize non-atomic macro definitions in pycore_symtable.h (#115143)

21 months agogh-112066: Use `PyDict_SetDefaultRef` in place of `PyDict_SetDefault`. (#112211)
Sam Gross [Wed, 7 Feb 2024 18:43:18 +0000 (13:43 -0500)] 
gh-112066: Use `PyDict_SetDefaultRef` in place of `PyDict_SetDefault`. (#112211)

This changes a number of internal usages of `PyDict_SetDefault` to use `PyDict_SetDefaultRef`.

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
21 months agogh-114828: Fix __class__ in class-scope inlined comprehensions (#115139)
Carl Meyer [Wed, 7 Feb 2024 16:56:16 +0000 (11:56 -0500)] 
gh-114828: Fix __class__ in class-scope inlined comprehensions (#115139)

21 months agoGH-108362: Revert "GH-108362: Incremental GC implementation (GH-108038)" (#115132)
Mark Shannon [Wed, 7 Feb 2024 12:38:34 +0000 (12:38 +0000)] 
GH-108362: Revert "GH-108362: Incremental GC implementation (GH-108038)" (#115132)

Revert "GH-108362: Incremental GC implementation (GH-108038)"

This reverts commit 36518e69d74607e5f094ce55286188e4545a947d.

21 months agogh-101100: Fix Py_DEBUG dangling Sphinx references (#115003)
Skip Montanaro [Wed, 7 Feb 2024 10:48:42 +0000 (04:48 -0600)] 
gh-101100: Fix Py_DEBUG dangling Sphinx references (#115003)

21 months agogh-114505: Add missing header file dependencies (#114513)
Skip Montanaro [Wed, 7 Feb 2024 08:50:24 +0000 (02:50 -0600)] 
gh-114505: Add missing header file dependencies (#114513)

Also move PYTHON_HEADERS up and make _testembed.o depend on it.

21 months agogh-115114: Add missing slash to file URI prefix `file:/` (#115115)
Edgar Ramírez Mondragón [Wed, 7 Feb 2024 05:22:47 +0000 (23:22 -0600)] 
gh-115114: Add missing slash to file URI prefix `file:/` (#115115)

Add missing slash to file URI prefix `file:/`

21 months agogh-115106 docs: 'enum.Flag.__iter__()' did not exist prior to Python 3.11 (GH-115107)
Finite State Machine [Wed, 7 Feb 2024 01:28:01 +0000 (20:28 -0500)] 
gh-115106 docs: 'enum.Flag.__iter__()' did not exist prior to Python 3.11 (GH-115107)

change versionchanged to versionadded

21 months agogh-115009: Update Windows installer to use SQLite 3.45.1 (#115065)
Erlend E. Aasland [Tue, 6 Feb 2024 22:44:14 +0000 (23:44 +0100)] 
gh-115009: Update Windows installer to use SQLite 3.45.1 (#115065)

21 months agogh-112075: Add critical sections for most dict APIs (#114508)
Dino Viehland [Tue, 6 Feb 2024 22:03:43 +0000 (14:03 -0800)] 
gh-112075: Add critical sections for most dict APIs (#114508)

Starts adding thread safety to dict objects.

Use @critical_section for APIs which are exposed via argument clinic and don't directly correlate with a public C API which needs to acquire the lock
Use a _lock_held suffix for keeping changes to complicated functions simple and just wrapping them with a critical section
Acquire and release the lock in an existing function where it won't be overly disruptive to the existing logic

21 months agogh-115035: Mark ThreadHandles as non-joinable earlier after forking (#115042)
Sam Gross [Tue, 6 Feb 2024 19:45:04 +0000 (14:45 -0500)] 
gh-115035: Mark ThreadHandles as non-joinable earlier after forking (#115042)

This marks dead ThreadHandles as non-joinable earlier in
`PyOS_AfterFork_Child()` before we execute any Python code. The handles
are stored in a global linked list in `_PyRuntimeState` because `fork()`
affects the entire process.

21 months agogh-103224: Resolve paths properly in test_sysconfig (GH-103292)
Artem Mukhin [Tue, 6 Feb 2024 19:32:07 +0000 (20:32 +0100)] 
gh-103224: Resolve paths properly in test_sysconfig (GH-103292)

To pass tests when executed through a Python symlink.

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
21 months ago#gh-75705: Set unixfrom envelope in mailbox._mboxMMDF (GH-107117)
Matthieu Caneill [Tue, 6 Feb 2024 18:44:12 +0000 (19:44 +0100)] 
#gh-75705: Set unixfrom envelope in mailbox._mboxMMDF (GH-107117)

21 months agogh-112529: Stop the world around gc.get_referents (#114823)
Sam Gross [Tue, 6 Feb 2024 16:45:42 +0000 (11:45 -0500)] 
gh-112529: Stop the world around gc.get_referents (#114823)

We do not want to add locking in `tp_traverse` slot implementations.
Instead, stop the world when calling `gc.get_referents`. Note that the the
stop the world call is a no-op in the default build.

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
21 months agogh-112087: Make list_{count, index, contains} to be thread-safe. (gh-114916)
Donghee Na [Tue, 6 Feb 2024 16:41:18 +0000 (01:41 +0900)] 
gh-112087: Make list_{count, index, contains} to be thread-safe. (gh-114916)

21 months agogh-112066: Add `PyDict_SetDefaultRef` function. (#112123)
Sam Gross [Tue, 6 Feb 2024 16:36:23 +0000 (11:36 -0500)] 
gh-112066: Add `PyDict_SetDefaultRef` function. (#112123)

The `PyDict_SetDefaultRef` function is similar to `PyDict_SetDefault`,
but returns a strong reference through the optional `**result` pointer
instead of a borrowed reference.

Co-authored-by: Petr Viktorin <encukou@gmail.com>
21 months agogh-114756: Update FAQ section on removing the GIL (#114957)
da-woods [Tue, 6 Feb 2024 15:55:44 +0000 (15:55 +0000)] 
gh-114756: Update FAQ section on removing the GIL (#114957)

Update FAQ section on removing the GIL to reflect recent progress on PEP 703 and PEP 684.

Co-authored-by: AN Long <aisk@users.noreply.github.com>
21 months agogh-106233: Fix stacklevel in zoneinfo.InvalidTZPathWarning (GH-106234)
Nikita Sobolev [Tue, 6 Feb 2024 13:08:56 +0000 (16:08 +0300)] 
gh-106233: Fix stacklevel in zoneinfo.InvalidTZPathWarning (GH-106234)

21 months agogh-91602: Add iterdump() support for filtering database objects (#114501)
Mariusz Felisiak [Tue, 6 Feb 2024 11:34:56 +0000 (12:34 +0100)] 
gh-91602: Add iterdump() support for filtering database objects (#114501)

Add optional 'filter' parameter to iterdump() that allows a "LIKE"
pattern for filtering database objects to dump.

Co-authored-by: Erlend E. Aasland <erlend@python.org>
21 months agogh-112302: Change 'licenseConcluded' field to 'NOASSERTION' (#115038)
Seth Michael Larson [Tue, 6 Feb 2024 10:25:58 +0000 (04:25 -0600)] 
gh-112302: Change 'licenseConcluded' field to 'NOASSERTION' (#115038)

21 months agogh-115009: Update macOS installer to use SQLite 3.45.1 (#115066) 103246/head
Erlend E. Aasland [Tue, 6 Feb 2024 10:04:35 +0000 (11:04 +0100)] 
gh-115009: Update macOS installer to use SQLite 3.45.1 (#115066)

Co-authored-by: Ned Deily <nad@python.org>
21 months agoGH-106747: Make pathlib ABC globbing more consistent with `glob.glob()` (#115056)
Barney Gale [Tue, 6 Feb 2024 02:48:18 +0000 (02:48 +0000)] 
GH-106747: Make pathlib ABC globbing more consistent with `glob.glob()` (#115056)

When expanding `**` wildcards, ensure we add a trailing slash to the
topmost directory path. This matches `glob.glob()` behaviour:

    >>> glob.glob('dirA/**', recursive=True)
    ['dirA/', 'dirA/dirB', 'dirA/dirB/dirC']

This does not affect `pathlib.Path.glob()`, because trailing slashes aren't
supported in pathlib proper.

21 months agogh-109991: Update GitHub CI workflows to use OpenSSL 3.0.13. (#115050)
Ned Deily [Tue, 6 Feb 2024 02:10:11 +0000 (21:10 -0500)] 
gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.13. (#115050)

Also update multissltests to use 1.1.1w, 3.0.13, 3.1.5, and 3.2.1.

21 months agogh-109991: Update macOS installer to use OpenSSL 3.0.13. (GH-115052)
Ned Deily [Tue, 6 Feb 2024 01:59:25 +0000 (20:59 -0500)] 
gh-109991: Update macOS installer to use OpenSSL 3.0.13. (GH-115052)

21 months agogh-109991: Update Windows build to use OpenSSL 3.0.13 (#115043)
Zachary Ware [Mon, 5 Feb 2024 23:10:55 +0000 (17:10 -0600)] 
gh-109991: Update Windows build to use OpenSSL 3.0.13 (#115043)

21 months agogh-83648: Support deprecation of options, arguments and subcommands in argparse ...
Serhiy Storchaka [Mon, 5 Feb 2024 22:41:34 +0000 (00:41 +0200)] 
gh-83648: Support deprecation of options, arguments and subcommands in argparse (GH-114086)

21 months agogh-114944: Fix race between `_PyParkingLot_Park` and `_PyParkingLot_UnparkAll` when...
mpage [Mon, 5 Feb 2024 21:48:37 +0000 (13:48 -0800)] 
gh-114944: Fix race between `_PyParkingLot_Park` and `_PyParkingLot_UnparkAll` when handling interrupts (#114945)

Fix race between `_PyParkingLot_Park` and `_PyParkingLot_UnparkAll` when handling interrupts

There is a potential race when `_PyParkingLot_UnparkAll` is executing in
one thread and another thread is unblocked because of an interrupt in
`_PyParkingLot_Park`. Consider the following scenario:

1. Thread T0 is blocked[^1] in `_PyParkingLot_Park` on address `A`.
2. Thread T1 executes `_PyParkingLot_UnparkAll` on address `A`. It
   finds the `wait_entry` for `T0` and unlinks[^2] its list node.
3. Immediately after (2), T0 is woken up due to an interrupt. It
   then segfaults trying to unlink[^3] the node that was previously
   unlinked in (2).

To fix this we mark each waiter as unparking before releasing the bucket
lock. `_PyParkingLot_Park` will wait to handle the coming wakeup, and not
attempt to unlink the node, when this field is set. `_PyParkingLot_Unpark`
does this already, presumably to handle this case.

21 months agogh-82626: Emit a warning when bool is used as a file descriptor (GH-111275)
Serhiy Storchaka [Mon, 5 Feb 2024 20:51:11 +0000 (22:51 +0200)] 
gh-82626: Emit a warning when bool is used as a file descriptor (GH-111275)

21 months agogh-115015: Argument Clinic: fix generated code for METH_METHOD methods without params...
Erlend E. Aasland [Mon, 5 Feb 2024 20:49:17 +0000 (21:49 +0100)] 
gh-115015: Argument Clinic: fix generated code for METH_METHOD methods without params (#115016)

21 months agogh-109475: Fix support of explicit option value "--" in argparse (GH-114814)
Serhiy Storchaka [Mon, 5 Feb 2024 20:42:43 +0000 (22:42 +0200)] 
gh-109475: Fix support of explicit option value "--" in argparse (GH-114814)

For example "--option=--".

21 months agogh-114967: Fix "Built-in Exceptions" documentation ambiguous wording (#114968)
HarryLHW [Mon, 5 Feb 2024 20:22:57 +0000 (04:22 +0800)] 
gh-114967: Fix "Built-in Exceptions" documentation ambiguous wording (#114968)

Change the somewhat vague "listed below" to "listed in this chapter" in Doc/library/exceptions.rst.
The exceptions are listed in multiple sections after two intermediate sections.
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
21 months agogh-112075: Add gc shared bits (#114931)
Dino Viehland [Mon, 5 Feb 2024 18:35:59 +0000 (10:35 -0800)] 
gh-112075: Add gc shared bits (#114931)

Add GC shared flags for objects to the GC bit states in free-threaded builds

21 months agoGH-108362: Incremental GC implementation (GH-108038)
Mark Shannon [Mon, 5 Feb 2024 18:28:51 +0000 (18:28 +0000)] 
GH-108362: Incremental GC implementation (GH-108038)

21 months agogh-43457: Tkinter: fix design flaws in wm_attributes() (GH-111404)
Serhiy Storchaka [Mon, 5 Feb 2024 16:24:54 +0000 (18:24 +0200)] 
gh-43457: Tkinter: fix design flaws in wm_attributes() (GH-111404)

* When called with a single argument to get a value, it allow to omit
  the minus prefix.
* It can be called with keyword arguments to set attributes.
* w.wm_attributes(return_python_dict=True) returns a dict instead of
  a tuple (it will be the default in future).
* Setting wantobjects to 0 no longer affects the result.

21 months agoGH-113462: Limit the number of versions that a single class can use. (GH-114900)
Mark Shannon [Mon, 5 Feb 2024 16:20:54 +0000 (16:20 +0000)] 
GH-113462: Limit the number of versions that a single class can use. (GH-114900)

21 months agogh-115026: Argument Clinic: handle PyBuffer_FillInfo errors in generated code (#115027)
Nikita Sobolev [Mon, 5 Feb 2024 10:45:09 +0000 (13:45 +0300)] 
gh-115026: Argument Clinic: handle PyBuffer_FillInfo errors in generated code (#115027)

21 months agogh-115020: Remove a debugging print in test_frame (GH-115021)
Kirill Podoprigora [Mon, 5 Feb 2024 10:20:34 +0000 (13:20 +0300)] 
gh-115020: Remove a debugging print in test_frame (GH-115021)

21 months agoRemove bogus syntax error marker in csv doc (#115017)
Terry Jan Reedy [Mon, 5 Feb 2024 04:11:31 +0000 (23:11 -0500)] 
Remove bogus syntax error marker in csv doc (#115017)

21 months agogh-114628: Display csv.Error without context (#115005)
Terry Jan Reedy [Mon, 5 Feb 2024 01:57:54 +0000 (20:57 -0500)] 
gh-114628: Display csv.Error without context (#115005)

When cvs.Error is raised when TypeError is caught,
the TypeError display and 'During handling' note is just noise
with duplicate information.  Suppress with 'from None'.

21 months agogh-114099: Add test exclusions to support running the test suite on iOS (#114889)
Russell Keith-Magee [Mon, 5 Feb 2024 00:04:57 +0000 (08:04 +0800)] 
gh-114099: Add test exclusions to support running the test suite on iOS (#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.

21 months agogh-114392: Improve test_capi.test_structmembers (GH-114393)
Serhiy Storchaka [Sun, 4 Feb 2024 20:19:06 +0000 (22:19 +0200)] 
gh-114392: Improve test_capi.test_structmembers (GH-114393)

Test all integer member types with extreme values and values outside of
the valid range. Test support of integer-like objects. Test warnings for
wrapped out values.

21 months agogh-114685: PyBuffer_FillInfo() now raises on PyBUF_{READ,WRITE} (GH-114802)
Nikita Sobolev [Sun, 4 Feb 2024 19:16:43 +0000 (22:16 +0300)] 
gh-114685: PyBuffer_FillInfo() now raises on PyBUF_{READ,WRITE} (GH-114802)

21 months agogh-113803: Fix inaccurate documentation for shutil.move when dst is an existing direc...
Dai Wentao [Sun, 4 Feb 2024 18:42:58 +0000 (02:42 +0800)] 
gh-113803: Fix inaccurate documentation for shutil.move when dst is an existing directory (#113837)

* fix the usage of dst and destination in shutil.move doc
* update shutil.move doc

21 months agogh-114388: Fix an error in GH-114391 (GH-115000)
Serhiy Storchaka [Sun, 4 Feb 2024 17:06:22 +0000 (19:06 +0200)] 
gh-114388: Fix an error in GH-114391 (GH-115000)

21 months agogh-113951: Tkinter: "tag_unbind(tag, sequence, funcid)" now only unbinds "funcid...
Serhiy Storchaka [Sun, 4 Feb 2024 15:49:42 +0000 (17:49 +0200)] 
gh-113951: Tkinter: "tag_unbind(tag, sequence, funcid)" now only unbinds "funcid" (GH-113955)

Previously, "tag_unbind(tag, sequence, funcid)" methods of Text and
Canvas widgets destroyed the current binding for "sequence", leaving
"sequence" unbound, and deleted the "funcid" command.

Now they remove only "funcid" from the binding for "sequence", keeping
other commands, and delete the "funcid" command.
They leave "sequence" unbound only if "funcid" was the last bound command.

21 months agogh-114388: Fix warnings when assign an unsigned integer member (GH-114391)
Serhiy Storchaka [Sun, 4 Feb 2024 15:32:25 +0000 (17:32 +0200)] 
gh-114388: Fix warnings when assign an unsigned integer member (GH-114391)

* Fix a RuntimeWarning emitted when assign an integer-like value that
  is not an instance of int to an attribute that corresponds to a C
  struct member of type T_UINT and T_ULONG.
* Fix a double RuntimeWarning emitted when assign a negative integer value
  to an attribute that corresponds to a C struct member of type T_UINT.

21 months agogh-113280: Always close socket if SSLSocket creation failed (GH-114659)
Serhiy Storchaka [Sun, 4 Feb 2024 15:28:07 +0000 (17:28 +0200)] 
gh-113280: Always close socket if SSLSocket creation failed (GH-114659)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
21 months agogh-113267: Revert "gh-106584: Fix exit code for unittest in Python 3.12 (#106588...
Serhiy Storchaka [Sun, 4 Feb 2024 15:27:42 +0000 (17:27 +0200)] 
gh-113267: Revert "gh-106584: Fix exit code for unittest in Python 3.12 (#106588)" (GH-114470)

This reverts commit 8fc071345b50dd3de61ebeeaa287ccef21d061b2.

21 months agogh-69893: Add the close() method for xml.etree.ElementTree.iterparse() iterator ...
Serhiy Storchaka [Sun, 4 Feb 2024 15:25:21 +0000 (17:25 +0200)] 
gh-69893: Add the close() method for xml.etree.ElementTree.iterparse() iterator (GH-114534)

21 months agogh-83383: Always mark the dbm.dumb database as unmodified after open() and sync(...
Serhiy Storchaka [Sun, 4 Feb 2024 15:23:26 +0000 (17:23 +0200)] 
gh-83383: Always mark the dbm.dumb database as unmodified after open() and sync() (GH-114560)

The directory file for a newly created database is now created
immediately after opening instead of deferring this until synchronizing
or closing.

21 months agogh-114071: [Enum] update docs and code for tuples/subclasses (GH-114871)
Ethan Furman [Sun, 4 Feb 2024 15:22:55 +0000 (07:22 -0800)] 
gh-114071: [Enum] update docs and code for tuples/subclasses (GH-114871)

Update documentation with `__new__` and `__init__` entries.

Support use of `auto()` in tuple subclasses on member assignment lines.  Previously, auto() was only supported on the member definition line either solo or as part of a tuple:

    RED = auto()
    BLUE = auto(), 'azul'

However, since Python itself supports using tuple subclasses where tuples are expected, e.g.:

    from collections import namedtuple
    T = namedtuple('T', 'first second third')

    def test(one, two, three):
        print(one, two, three)

    test(*T(4, 5, 6))
    # 4 5 6

it made sense to also support tuple subclasses in enum definitions.

21 months agogh-101100: Fix dangling references in pickle.rst (#114972)
Skip Montanaro [Sun, 4 Feb 2024 14:24:24 +0000 (08:24 -0600)] 
gh-101100: Fix dangling references in pickle.rst (#114972)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
21 months agogh-101100: Fix Sphinx warnings from PEP 3108 stdlib re-organisation (#114327) 114981/head
Hugo van Kemenade [Sun, 4 Feb 2024 09:45:35 +0000 (11:45 +0200)] 
gh-101100: Fix Sphinx warnings from PEP 3108 stdlib re-organisation (#114327)

* Fix Sphinx warnings from PEP 3108 stdblib re-organisation

* Apply suggestions from code review

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Update Doc/whatsnew/2.2.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Apply suggestions from code review

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
21 months agoUpdate README.md (#114974)
Skip Montanaro [Sun, 4 Feb 2024 00:16:30 +0000 (18:16 -0600)] 
Update README.md (#114974)

Trivial edit

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
21 months agogh-114883: Fix Makefile dependency tree for non-jit builds (GH-114884)
Zachary Ware [Sat, 3 Feb 2024 23:16:03 +0000 (17:16 -0600)] 
gh-114883: Fix Makefile dependency tree for non-jit builds (GH-114884)

21 months agogh-114803: Mention that `@dataclass` should not be applied on enums (GH-114891)
Nikita Sobolev [Sat, 3 Feb 2024 21:55:38 +0000 (00:55 +0300)] 
gh-114803: Mention that `@dataclass` should not be applied on enums (GH-114891)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
21 months agogh-101100: Fix Sphinx reference warnings in the glossary (#114729)
Skip Montanaro [Sat, 3 Feb 2024 18:45:49 +0000 (12:45 -0600)] 
gh-101100: Fix Sphinx reference warnings in the glossary (#114729)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
21 months agogh-114965: Updated bundled pip to 24.0 (gh-114966)
Stéphane Bidoul [Sat, 3 Feb 2024 17:45:09 +0000 (18:45 +0100)] 
gh-114965: Updated bundled pip to 24.0 (gh-114966)

Updated bundled pip to 24.0

21 months agogh-114887 Reject only sockets of type SOCK_STREAM in create_datagram_endpoint() ...
Travis Howse [Sat, 3 Feb 2024 17:14:02 +0000 (03:14 +1000)] 
gh-114887 Reject only sockets of type SOCK_STREAM in create_datagram_endpoint() (#114893)

Also improve exception message.

Co-authored-by: Donghee Na <donghee.na92@gmail.com>
21 months agogh-112202: Ensure that condition.notify() succeeds even when racing with Task.cancel...
Kristján Valur Jónsson [Sat, 3 Feb 2024 16:19:37 +0000 (16:19 +0000)] 
gh-112202: Ensure that condition.notify() succeeds even when racing with Task.cancel() (#112201)

Also did a general cleanup of asyncio locks.py comments and docstrings.

21 months agogh-114959: tarfile: do not ignore errors when extract a directory on top of a file...
Serhiy Storchaka [Sat, 3 Feb 2024 16:18:46 +0000 (18:18 +0200)] 
gh-114959: tarfile: do not ignore errors when extract a directory on top of a file (GH-114960)

Also, add tests common to tarfile and zipfile.

21 months agogh-114955: Add clear to MutableSequence's mixin methods in document (gh-114956)
AN Long [Sat, 3 Feb 2024 15:33:58 +0000 (23:33 +0800)] 
gh-114955: Add clear to MutableSequence's mixin methods in document (gh-114956)

21 months agogh-111417: Remove unused code block in math.trunc() and round() (GH-111454)
Jason Zhang [Sat, 3 Feb 2024 15:11:10 +0000 (15:11 +0000)] 
gh-111417: Remove unused code block in math.trunc() and round() (GH-111454)

_PyObject_LookupSpecial() now ensures that the type is ready.

21 months agoUpdate LOGGING example taken from Django docs. (#114903)
Mariusz Felisiak [Sat, 3 Feb 2024 07:37:21 +0000 (08:37 +0100)] 
Update LOGGING example taken from Django docs. (#114903)

For example, Django no longer provides a custom NullHandler

https://github.com/django/django/commit/6c66a41c3dc697dc3bda4e31e8b05084d2ede915

* Remove require_debug_true.

21 months agoNormalize heading underline in multiprocessing.rst (#114923)
Skip Montanaro [Sat, 3 Feb 2024 01:56:00 +0000 (19:56 -0600)] 
Normalize heading underline in multiprocessing.rst (#114923)

This gets rid of the mildly confusing `>>>>>>>' underlines which look vaguely like `diff` punctuation.