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

21 months ago``Tools/cases_generator``: Fix typos and incorrect comments. (#114892)
Kirill Podoprigora [Sat, 3 Feb 2024 01:52:58 +0000 (04:52 +0300)] 
``Tools/cases_generator``: Fix typos and incorrect comments. (#114892)

21 months agogh-114875: Require getgrent for building the grp extension module (#114876)
Malcolm Smith [Fri, 2 Feb 2024 23:30:52 +0000 (23:30 +0000)] 
gh-114875: Require getgrent for building the grp extension module (#114876)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
21 months agogh-114913: Add newline to subprocess doc (#114941)
Terry Jan Reedy [Fri, 2 Feb 2024 23:14:32 +0000 (18:14 -0500)] 
gh-114913: Add newline to subprocess doc (#114941)

*creationflags* is a separate topic from *startupinfo*.
Start sentence with 'If given', like previous sentence.

21 months agogh-101599: argparse: simplify the option help string (GH-103372)
Jokimax [Fri, 2 Feb 2024 22:13:00 +0000 (00:13 +0200)] 
gh-101599: argparse: simplify the option help string (GH-103372)

If the option with argument has short and long names,
output argument only once, after the long name:

   -o, --option ARG    description

instead of

   -o ARG, --option ARG    description

21 months agoCorrect timedelta description (GH-101417)
John Belmonte [Fri, 2 Feb 2024 21:42:17 +0000 (06:42 +0900)] 
Correct timedelta description (GH-101417)

It only represents the difference between two datetime or
date objects, not between two time objects.

21 months agoFix indentation of "versionchanged" in datetime.rst (GH-114933)
Serhiy Storchaka [Fri, 2 Feb 2024 21:09:16 +0000 (23:09 +0200)] 
Fix indentation of "versionchanged" in datetime.rst (GH-114933)

21 months agoBump ruff to 0.2.0 (#114932)
Alex Waygood [Fri, 2 Feb 2024 21:04:15 +0000 (21:04 +0000)] 
Bump ruff to 0.2.0 (#114932)

21 months agoUpdate venv activate.bat to escape custom PROMPT variables on Windows (GH-114885)
GILGAMESH [Fri, 2 Feb 2024 18:59:53 +0000 (10:59 -0800)] 
Update venv activate.bat to escape custom PROMPT variables on Windows (GH-114885)

21 months agogh-114728: Fix documentation for comparison of objects in datetime module (GH-114749)
Serhiy Storchaka [Fri, 2 Feb 2024 18:53:24 +0000 (20:53 +0200)] 
gh-114728: Fix documentation for comparison of objects in datetime module (GH-114749)

21 months agoGH-69695: Update ``PyImport_ImportModule`` description (GH-103836)
patenaud [Fri, 2 Feb 2024 16:31:55 +0000 (11:31 -0500)] 
GH-69695: Update ``PyImport_ImportModule`` description (GH-103836)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
21 months agogh-114909: Add --first-weekday option to usage message (#114910)
Steven Ward [Fri, 2 Feb 2024 15:13:00 +0000 (10:13 -0500)] 
gh-114909: Add --first-weekday option to usage message (#114910)

21 months agogh-104530: Enable native Win32 condition variables by default (GH-104531)
Andrew Rogers [Fri, 2 Feb 2024 13:50:51 +0000 (13:50 +0000)] 
gh-104530: Enable native Win32 condition variables by default (GH-104531)

21 months agogh-103360: Add link in stdtypes.rst to escape sequences in lexical_analysis.rst ...
Justin Williams [Fri, 2 Feb 2024 13:32:46 +0000 (08:32 -0500)] 
gh-103360: Add link in stdtypes.rst to escape sequences in lexical_analysis.rst (GH-103638)

21 months agogh-114329: Add `PyList_GetItemRef` function (GH-114504)
Sam Gross [Fri, 2 Feb 2024 13:03:15 +0000 (08:03 -0500)] 
gh-114329: Add `PyList_GetItemRef` function (GH-114504)

The new `PyList_GetItemRef` is similar to `PyList_GetItem`, but returns
a strong reference instead of a borrowed reference. Additionally, if the
passed "list" object is not a list, the function sets a `TypeError`
instead of calling `PyErr_BadInternalCall()`.

21 months agoGH-113710: Add a "globals to constants" pass (GH-114592)
Mark Shannon [Fri, 2 Feb 2024 12:14:34 +0000 (12:14 +0000)] 
GH-113710: Add a "globals to constants" pass (GH-114592)

Converts specializations of `LOAD_GLOBAL` into constants during tier 2 optimization.

21 months agogh-107901: make compiler inline basic blocks with no line number and no fallthrough...
Irit Katriel [Fri, 2 Feb 2024 11:26:31 +0000 (11:26 +0000)] 
gh-107901: make compiler inline basic blocks with no line number and no fallthrough (#114750)

21 months agoGH-113655 Lower C recursion limit from 4000 to 3000 on Windows. (GH-114896)
Mark Shannon [Fri, 2 Feb 2024 10:41:28 +0000 (10:41 +0000)] 
GH-113655 Lower C recursion limit from 4000 to 3000 on Windows. (GH-114896)

21 months agogh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on non-X11 (GH-103821)
Christopher Chavez [Fri, 2 Feb 2024 10:38:43 +0000 (04:38 -0600)] 
gh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on non-X11 (GH-103821)

Also fix test_mousewheel: do not skip a check which was broken due to incorrect
delta on Aqua and XQuartz, and probably not because of `.update_idletasks()`.

21 months agoMove "format" param doc of shutil.make_archive() on its own paragraph (GH-103829)
Michal Kaptur [Fri, 2 Feb 2024 10:00:18 +0000 (11:00 +0100)] 
Move "format" param doc of shutil.make_archive() on its own paragraph (GH-103829)

21 months agoGH-114849: Set a 60-minute timeout for JIT CI jobs (GH-114850)
Nikita Sobolev [Fri, 2 Feb 2024 01:44:01 +0000 (04:44 +0300)] 
GH-114849: Set a 60-minute timeout for JIT CI jobs (GH-114850)

21 months agogh-111239: Update Windows build to use zlib 1.3.1 (GH-114877)
Zachary Ware [Thu, 1 Feb 2024 23:54:02 +0000 (17:54 -0600)] 
gh-111239: Update Windows build to use zlib 1.3.1 (GH-114877)

21 months agogh-111968: Use per-thread freelists for dict in free-threading (gh-114323)
Donghee Na [Thu, 1 Feb 2024 20:53:53 +0000 (05:53 +0900)] 
gh-111968: Use per-thread freelists for dict in free-threading (gh-114323)

21 months agogh-112529: Remove PyGC_Head from object pre-header in free-threaded build (#114564)
Sam Gross [Thu, 1 Feb 2024 20:29:19 +0000 (15:29 -0500)] 
gh-112529: Remove PyGC_Head from object pre-header in free-threaded build (#114564)

* gh-112529: Remove PyGC_Head from object pre-header in free-threaded build

This avoids allocating space for PyGC_Head in the free-threaded build.
The GC implementation for free-threaded CPython does not use the
PyGC_Head structure.

 * The trashcan mechanism uses the `ob_tid` field instead of `_gc_prev`
   in the free-threaded build.
 * The GDB libpython.py file now determines the offset of the managed
   dict field based on whether the running process is a free-threaded
   build. Those are identified by the `ob_ref_local` field in PyObject.
 * Fixes `_PySys_GetSizeOf()` which incorrectly incorrectly included the
   size of `PyGC_Head` in the size of static `PyTypeObject`.

21 months agogh-89891: Refer SharedMemory implementation as POSIX (GH-104678)
Oleg Iarygin [Thu, 1 Feb 2024 19:57:36 +0000 (22:57 +0300)] 
gh-89891: Refer SharedMemory implementation as POSIX (GH-104678)

It only uses POSIX API.

21 months agoGH-114806. Don't specialize calls to classes with metaclasses. (GH-114870)
Mark Shannon [Thu, 1 Feb 2024 19:39:32 +0000 (19:39 +0000)] 
GH-114806. Don't specialize calls to classes with metaclasses. (GH-114870)

21 months agoFix comment in pycore_runtime.h (GH-110540)
He Weidong [Thu, 1 Feb 2024 19:27:53 +0000 (03:27 +0800)] 
Fix comment in pycore_runtime.h (GH-110540)

21 months agogh-101100: Fix sphinx warnings in `howto/logging.rst` (#114846)
Nikita Sobolev [Thu, 1 Feb 2024 18:37:55 +0000 (21:37 +0300)] 
gh-101100: Fix sphinx warnings in `howto/logging.rst` (#114846)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
21 months agoCorrect description of inheriting from another class (#114660)
Skip Montanaro [Thu, 1 Feb 2024 18:07:16 +0000 (12:07 -0600)] 
Correct description of inheriting from another class (#114660)

"inherits <someclass>" grates to this reader. I think it should be "inherits from <someclass>".

21 months agogh-105031: Clarify datetime documentation for ISO8601 (GH-105049)
Nicholas Hollander [Thu, 1 Feb 2024 17:24:15 +0000 (12:24 -0500)] 
gh-105031: Clarify datetime documentation for ISO8601 (GH-105049)

21 months agoUpdate outdated info in ``Tools/cases_generator/README.md`` (#114844)
Kirill Podoprigora [Thu, 1 Feb 2024 16:56:24 +0000 (19:56 +0300)] 
Update outdated info in ``Tools/cases_generator/README.md`` (#114844)

21 months agoWrite about Tier 2 and JIT in "what's new 3.13" (#114826)
Guido van Rossum [Thu, 1 Feb 2024 16:54:44 +0000 (08:54 -0800)] 
Write about Tier 2 and JIT in "what's new 3.13" (#114826)

(This will soon be superseded by Ken Jin's much more detailed version.)

21 months agoRemove unused Py_XDECREF from _PyFrame_ClearExceptCode (GH-106158)
Anders Kaseorg [Thu, 1 Feb 2024 16:26:22 +0000 (11:26 -0500)] 
Remove unused Py_XDECREF from _PyFrame_ClearExceptCode (GH-106158)

frame->frame_obj was set to NULL a few lines earlier.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
21 months agogh-105089: Fix test_create_directory_with_write test failure in AIX (GH-105228)
Ayappan Perumal [Thu, 1 Feb 2024 11:52:54 +0000 (17:22 +0530)] 
gh-105089: Fix test_create_directory_with_write test failure in AIX (GH-105228)

21 months agogh-107461 ctypes: Add a testcase for nested `_as_parameter_` lookup (GH-107462)
Tomas R [Thu, 1 Feb 2024 11:49:01 +0000 (12:49 +0100)] 
gh-107461 ctypes: Add a testcase for nested `_as_parameter_` lookup (GH-107462)

21 months agobuild(deps-dev): bump types-psutil from 5.9.5.17 to 5.9.5.20240106 in /Tools (#114852)
dependabot[bot] [Thu, 1 Feb 2024 10:50:08 +0000 (10:50 +0000)] 
build(deps-dev): bump types-psutil from 5.9.5.17 to 5.9.5.20240106 in /Tools (#114852)

build(deps-dev): bump types-psutil in /Tools

Bumps [types-psutil](https://github.com/python/typeshed) from 5.9.5.17 to 5.9.5.20240106.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-psutil
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
21 months agobuild(deps): bump actions/cache from 3 to 4 (#114856)
dependabot[bot] [Thu, 1 Feb 2024 10:49:07 +0000 (12:49 +0200)] 
build(deps): bump actions/cache from 3 to 4 (#114856)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
21 months agobuild(deps): bump hypothesis from 6.92.2 to 6.97.4 in /Tools (#114851)
dependabot[bot] [Thu, 1 Feb 2024 10:42:35 +0000 (10:42 +0000)] 
build(deps): bump hypothesis from 6.92.2 to 6.97.4 in /Tools (#114851)

Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.92.2 to 6.97.4.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.92.2...hypothesis-python-6.97.4)

---
updated-dependencies:
- dependency-name: hypothesis
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
21 months agobuild(deps-dev): bump types-setuptools from 69.0.0.0 to 69.0.0.20240125 in /Tools...
dependabot[bot] [Thu, 1 Feb 2024 09:52:05 +0000 (09:52 +0000)] 
build(deps-dev): bump types-setuptools from 69.0.0.0 to 69.0.0.20240125 in /Tools (#114853)

build(deps-dev): bump types-setuptools in /Tools

Bumps [types-setuptools](https://github.com/python/typeshed) from 69.0.0.0 to 69.0.0.20240125.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-setuptools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
21 months agoFix typos in ElementTree documentation (GH-108848)
Christophe Nanteuil [Thu, 1 Feb 2024 09:34:04 +0000 (10:34 +0100)] 
Fix typos in ElementTree documentation (GH-108848)

PI objects instead of comment objects.

21 months agogh-114746: Avoid quadratic behavior in free-threaded GC (GH-114817)
Sam Gross [Thu, 1 Feb 2024 09:26:23 +0000 (04:26 -0500)] 
gh-114746: Avoid quadratic behavior in free-threaded GC (GH-114817)

The free-threaded build's GC implementation is non-generational, but was
scheduled as if it were collecting a young generation leading to
quadratic behavior. This increases the minimum threshold and scales it
to the number of live objects as we do for the old generation in the
default build.

Note that the scheduling is still not thread-safe without the GIL. Those
changes will come in later PRs.

A few tests, like "test_sneaky_frame_object" rely on prompt scheduling
of the GC. For now, to keep that test passing, we disable the scaled
threshold after calls like `gc.set_threshold(1, 0, 0)`.

21 months agogh-114364: Fix awkward wording about mmap.mmap.seekable (#114374)
technillogue [Thu, 1 Feb 2024 06:03:58 +0000 (01:03 -0500)] 
gh-114364: Fix awkward wording about mmap.mmap.seekable (#114374)

---------
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
21 months agogh-114648: Add IndexError exception to tutorial datastructures list.pop entry (#114681)
srinivasan [Thu, 1 Feb 2024 03:46:49 +0000 (09:16 +0530)] 
gh-114648: Add IndexError exception to tutorial datastructures list.pop entry (#114681)

Remove redundant explanation of optional argument.

21 months agogh-67230: Add versionadded notes for QUOTE_NOTNULL and QUOTE_STRINGS (#114816)
Skip Montanaro [Thu, 1 Feb 2024 03:11:16 +0000 (21:11 -0600)] 
gh-67230: Add versionadded notes for QUOTE_NOTNULL and QUOTE_STRINGS (#114816)

As @GPHemsley pointed out, #29469 omitted `versionadded` notes for the 2 new items.

21 months agogh-114811: Change '\*' to '*' in warnings.rst (#114819)
Pradyot Ranjan [Thu, 1 Feb 2024 01:48:39 +0000 (07:18 +0530)] 
gh-114811: Change  '\*' to '*' in warnings.rst (#114819)

Regression in 3.12.

21 months agoCI: Test on macOS M1 (#114766)
Hugo van Kemenade [Thu, 1 Feb 2024 01:35:48 +0000 (03:35 +0200)] 
CI: Test on macOS M1 (#114766)

Test on macOS M1

21 months agogh-111112: Avoid potential confusion in TCP server example. (#111113)
Aidan Holm [Thu, 1 Feb 2024 00:42:38 +0000 (08:42 +0800)] 
gh-111112: Avoid potential confusion in TCP server example. (#111113)

Improve misleading TCP server docs and example.

socket.recv(), as documented by the Python reference documentation,
returns at most `bufsize` bytes, and the underlying TCP protocol means
there is no guaranteed correspondence between what is sent by the client
and what is received by the server.

This conflation could mislead readers into thinking that TCP is
datagram-based or has similar semantics, which will likely appear to
work for simple cases, but introduce difficult to reproduce bugs.

21 months agogh-109534: fix reference leak when SSL handshake fails (#114074)
Jamie Phan [Thu, 1 Feb 2024 00:42:17 +0000 (07:42 +0700)] 
gh-109534: fix reference leak when SSL handshake fails (#114074)

21 months agogh-112087: Make PyList_{Append,Size,GetSlice} to be thread-safe (gh-114651)
Donghee Na [Wed, 31 Jan 2024 23:58:08 +0000 (08:58 +0900)] 
gh-112087: Make PyList_{Append,Size,GetSlice} to be thread-safe (gh-114651)

21 months agoAdd note to `sys.orig_argv` clarifying the difference from `sys.argv` (#114630)
Bradley Reynolds [Wed, 31 Jan 2024 21:33:28 +0000 (15:33 -0600)] 
Add note to `sys.orig_argv` clarifying the difference from `sys.argv` (#114630)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
21 months agogh-114788: Do not run JIT workflow on unrelated changes (#114789)
Nikita Sobolev [Wed, 31 Jan 2024 19:51:18 +0000 (22:51 +0300)] 
gh-114788: Do not run JIT workflow on unrelated changes (#114789)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
21 months agogh-113939: Frame clear, clear locals (#113940)
Albert Zeyer [Wed, 31 Jan 2024 19:14:44 +0000 (20:14 +0100)] 
gh-113939: Frame clear, clear locals (#113940)

21 months agogh-111741: Recognise image/webp as a standard format in the mimetypes module (GH...
Nachtalb [Wed, 31 Jan 2024 15:33:46 +0000 (16:33 +0100)] 
gh-111741: Recognise image/webp as a standard format in the mimetypes module (GH-111742)

Previously it was supported as a non-standard type.

21 months agogh-59013: Set breakpoint on the first executable line of function when using `break...
Tian Gao [Wed, 31 Jan 2024 13:03:05 +0000 (05:03 -0800)] 
gh-59013: Set breakpoint on the first executable line of function when using `break func` in pdb (#112470)

21 months agogh-114790: Do not execute `workflows/require-pr-label.yml` on forks (#114791)
Nikita Sobolev [Wed, 31 Jan 2024 11:32:27 +0000 (14:32 +0300)] 
gh-114790: Do not execute `workflows/require-pr-label.yml` on forks (#114791)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
21 months agoRemove Alex Waygood as an Argument Clinic CODEOWNER (#114796)
Alex Waygood [Wed, 31 Jan 2024 11:28:23 +0000 (11:28 +0000)] 
Remove Alex Waygood as an Argument Clinic CODEOWNER (#114796)