]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
13 months agogh-124858: fix happy eyeballs refcyles (#124859)
Thomas Grainger [Wed, 2 Oct 2024 23:32:31 +0000 (00:32 +0100)] 
gh-124858: fix happy eyeballs refcyles (#124859)

13 months agoGH-118093: Don't lose confidence when tracing through 100% biased branches (GH-124813)
Brandt Bucher [Wed, 2 Oct 2024 19:24:37 +0000 (12:24 -0700)] 
GH-118093: Don't lose confidence when tracing through 100% biased branches (GH-124813)

13 months agoGH-119726: Deduplicate AArch64 trampolines within a trace (GH-123872)
Diego Russo [Wed, 2 Oct 2024 19:07:20 +0000 (20:07 +0100)] 
GH-119726: Deduplicate AArch64 trampolines within a trace (GH-123872)

13 months agogh-111178: Fix function signatures in funcobject.c (#124908)
Victor Stinner [Wed, 2 Oct 2024 17:29:56 +0000 (19:29 +0200)] 
gh-111178: Fix function signatures in funcobject.c (#124908)

13 months agogh-120619: Optimize through `_Py_FRAME_GENERAL` (GH-124518)
Ken Jin [Wed, 2 Oct 2024 17:10:51 +0000 (01:10 +0800)] 
gh-120619: Optimize through `_Py_FRAME_GENERAL` (GH-124518)

* Optimize through _Py_FRAME_GENERAL

* refactor

13 months agogh-87135: Hang non-main threads that attempt to acquire the GIL during finalization...
Jeremy Maitin-Shepard [Wed, 2 Oct 2024 16:17:49 +0000 (09:17 -0700)] 
gh-87135: Hang non-main threads that attempt to acquire the GIL during finalization (GH-105805)

Instead of surprise crashes and memory corruption, we now hang threads that attempt to re-enter the Python interpreter after Python runtime finalization has started. These are typically daemon threads (our long standing mis-feature) but could also be threads spawned by extension modules that then try to call into Python. This marks the `PyThread_exit_thread` public C API as deprecated as there is no plausible safe way to accomplish that on any supported platform in the face of things like C++ code with finalizers anywhere on a thread's stack. Doing this was the least bad option.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
13 months agogh-111178: Fix function signatures in longobject.c (#124895)
Victor Stinner [Wed, 2 Oct 2024 15:41:19 +0000 (17:41 +0200)] 
gh-111178: Fix function signatures in longobject.c (#124895)

* Add _PyLong_CAST() macro.
* Move forward declarations to the top of longobject.c.
* Change long_add(), long_sub(), long_mul(), long_neg(),
  long_lshift(), long_abs() to take PyLongObject* and return
  PyLongObject*. Avoid CHECK_BINOP() test.
* Add long_add_method(), long_sub_method(), long_mul_method(),
  long_neg_method(), long_lshift_method(), and long_abs_method()
  which take PyObject* and return PyObject*. Implement CHECK_BINOP()
  test.
* Add long_lshift_int64() function.
* _PyLong_DivmodNear() calls long_lshift_int64(obj, 1) instead of
  long_lshift_obj(obj, one).

13 months agogh-111178: Fix function signatures in methodobject.c (#124902)
Victor Stinner [Wed, 2 Oct 2024 15:24:10 +0000 (17:24 +0200)] 
gh-111178: Fix function signatures in methodobject.c (#124902)

13 months agogh-111178: Fix function signatures in weakrefobject.c (#124903)
Victor Stinner [Wed, 2 Oct 2024 15:01:23 +0000 (17:01 +0200)] 
gh-111178: Fix function signatures in weakrefobject.c (#124903)

13 months agogh-124213: Fix incorrect context manager use in in_systemd_nspawn_sync_suppressed...
Michał Górny [Wed, 2 Oct 2024 14:31:42 +0000 (16:31 +0200)] 
gh-124213: Fix incorrect context manager use in in_systemd_nspawn_sync_suppressed() (#124892)

Fix the incorrect use of `os.open()` result as a context manager,
while it is actually a numeric file descriptor.

I have missed the problem, because in the original version the
`os.open()` call would always fail, and I failed to test the final
version in all possible scenarios properly.

13 months agogh-120378: Fix crash caused by integer overflow in `curses` (#124555)
Peter Bierma [Wed, 2 Oct 2024 14:31:23 +0000 (10:31 -0400)] 
gh-120378: Fix crash caused by integer overflow in `curses` (#124555)

This is actually an upstream problem in curses, and has been reported
to them already:
https://lists.gnu.org/archive/html/bug-ncurses/2024-09/msg00101.html

This is a nice workaround in the meantime to prevent the segfault.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
13 months agogh-111178: Fix function signatures in moduleobject.c (#124900)
Victor Stinner [Wed, 2 Oct 2024 14:31:04 +0000 (16:31 +0200)] 
gh-111178: Fix function signatures in moduleobject.c (#124900)

13 months agogh-111178: Fix function signatures in setobject.c (#124888)
Victor Stinner [Wed, 2 Oct 2024 14:03:23 +0000 (16:03 +0200)] 
gh-111178: Fix function signatures in setobject.c (#124888)

13 months agogh-111178: Fix locale_free() signature (#124896)
Victor Stinner [Wed, 2 Oct 2024 13:58:47 +0000 (15:58 +0200)] 
gh-111178: Fix locale_free() signature (#124896)

13 months agogh-85935: Improve tests for invalid arguments in test_argparse (GH-124891)
Serhiy Storchaka [Wed, 2 Oct 2024 13:28:05 +0000 (16:28 +0300)] 
gh-85935: Improve tests for invalid arguments in test_argparse (GH-124891)

Check also specific error messages.

13 months agogh-111178: Fix function signatures in tupleobject.c (#124804)
Victor Stinner [Wed, 2 Oct 2024 11:37:04 +0000 (13:37 +0200)] 
gh-111178: Fix function signatures in tupleobject.c (#124804)

13 months agogh-111178: Fix function signatures in bytesobject.c (#124806)
Victor Stinner [Wed, 2 Oct 2024 11:35:51 +0000 (13:35 +0200)] 
gh-111178: Fix function signatures in bytesobject.c (#124806)

13 months agogh-122864: Fix a ``test_funcattrs.test___builtins__`` when executing directly (#124845)
Mark Byrne [Wed, 2 Oct 2024 09:58:39 +0000 (11:58 +0200)] 
gh-122864: Fix a ``test_funcattrs.test___builtins__`` when executing directly (#124845)

Previously when executing ``test_functattrs.test___builtins__`` directly, it failed because the fact, that ``__builtins__`` is refers to the built-in module ``builtins`` while it's expects a ``__builtins__.__dict__``. But when this test is being run from another module, then ``__builtins__`` is refers to ``builtins.__dict__``. Now this part of the behaviour is covered.
---------

Co-authored-by: Victor Stinner <vstinner@python.org>
13 months agoGH-124820: Move `-mno-outline-atomics` flag to aarch64 Linux JIT builds only (#124821)
Savannah Ostrowski [Wed, 2 Oct 2024 09:40:59 +0000 (02:40 -0700)] 
GH-124820: Move `-mno-outline-atomics` flag to aarch64 Linux JIT builds only (#124821)

13 months agogh-58282: Fix support of tuple metavar for positional arguments in argparse (GH-124782)
Serhiy Storchaka [Wed, 2 Oct 2024 08:28:02 +0000 (11:28 +0300)] 
gh-58282: Fix support of tuple metavar for positional arguments in argparse (GH-124782)

Previously, formatting help output or error message for positional argument
with a tuple metavar raised exception.

Co-authored-by: Cyker Way <cykerway@gmail.com>
13 months agogh-124835: `tomllib.loads`: Raise TypeError not AttributeError. Improve message ...
Taneli Hukkinen [Wed, 2 Oct 2024 02:58:08 +0000 (05:58 +0300)] 
gh-124835: `tomllib.loads`: Raise TypeError not AttributeError. Improve message (#124587)

14 months agoMinor code beautifications in statistics.py (gh-124866)
Raymond Hettinger [Tue, 1 Oct 2024 20:55:36 +0000 (15:55 -0500)] 
Minor code beautifications in statistics.py (gh-124866)

14 months agogh-66436: Improved prog default value for argparse.ArgumentParser (GH-124799)
Serhiy Storchaka [Tue, 1 Oct 2024 19:51:40 +0000 (22:51 +0300)] 
gh-66436: Improved prog default value for argparse.ArgumentParser (GH-124799)

It can now have one of three forms:

* basename(argv0) -- for simple scripts
* python arv0 -- for directories, ZIP files, etc
* python -m module -- for imported modules

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
14 months agoHighlight `datetime.timedelta.seconds` vs `.total_seconds()` in docs. (GH-124811)
Gregory P. Smith [Tue, 1 Oct 2024 18:10:13 +0000 (11:10 -0700)] 
Highlight `datetime.timedelta.seconds` vs `.total_seconds()` in docs. (GH-124811)

Thanks to the reviewers for suggesting the use of a "caution" section instead of "warning" or "note".

14 months agogh-116750: Add clear_tool_id function to unregister events and callbacks (#124568)
Tian Gao [Tue, 1 Oct 2024 17:32:55 +0000 (10:32 -0700)] 
gh-116750: Add clear_tool_id function to unregister events and callbacks (#124568)

14 months agogh-124218: Refactor per-thread reference counting (#124844)
Sam Gross [Tue, 1 Oct 2024 17:05:42 +0000 (13:05 -0400)] 
gh-124218: Refactor per-thread reference counting (#124844)

Currently, we only use per-thread reference counting for heap type objects and
the naming reflects that. We will extend it to a few additional types in an
upcoming change to avoid scaling bottlenecks when creating nested functions.

Rename some of the files and functions in preparation for this change.

14 months agogh-124296: Remove private dictionary version tag (PEP 699) (#124472)
Sam Gross [Tue, 1 Oct 2024 16:39:56 +0000 (12:39 -0400)] 
gh-124296: Remove private dictionary version tag (PEP 699) (#124472)

14 months agogh-124842: Fix test.support.import_helper.make_legacy_pyc() (GH-124843)
Serhiy Storchaka [Tue, 1 Oct 2024 16:05:17 +0000 (19:05 +0300)] 
gh-124842: Fix test.support.import_helper.make_legacy_pyc() (GH-124843)

For source file "path/to/file.py" it created file with incorrect path
"/absolute/path/to/path/to/file.pyc" instead of "path/to/file.pyc".

14 months agogh-124487: Updated installer messages and internal docs regarding minimum Windows...
Wulian [Tue, 1 Oct 2024 14:44:18 +0000 (22:44 +0800)] 
gh-124487: Updated installer messages and internal docs regarding minimum Windows version (GH-124822)

14 months agogh-124594: Create and reuse the same context for the entire asyncio REPL session...
Bartosz Sławecki [Tue, 1 Oct 2024 14:17:22 +0000 (16:17 +0200)] 
gh-124594: Create and reuse the same context for the entire asyncio REPL session (#124595)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
14 months agogh-118974: Add `decorator` argument to `make_dataclass` (gh-122723)
Victorien [Tue, 1 Oct 2024 13:51:51 +0000 (15:51 +0200)] 
gh-118974: Add `decorator` argument to `make_dataclass` (gh-122723)

This is to allow the `dataclasses.make_dataclass` infrastructure to be used with another decorator that's compliant with `typing.dataclass_transform`. The new `decorator` argument to `dataclasses.make_dataclass` is `dataclasses.dataclass`, which used to be hard coded.

14 months agoDoc: Fix archive filenames for standard builds (#124826)
Adam Turner [Tue, 1 Oct 2024 09:43:55 +0000 (10:43 +0100)] 
Doc: Fix archive filenames for standard builds (#124826)

14 months agoGH-109975: Copyedit 3.13 What's New: Link to installing free-threaded binaries on...
Adam Turner [Tue, 1 Oct 2024 08:27:59 +0000 (09:27 +0100)] 
GH-109975: Copyedit 3.13 What's New: Link to installing free-threaded binaries on macOS (#124831)

14 months agoGH-109975: Copyedit 3.13 What's New: Note delayed expected release date for Python...
Adam Turner [Tue, 1 Oct 2024 07:18:59 +0000 (08:18 +0100)] 
GH-109975: Copyedit 3.13 What's New: Note delayed expected release date for Python 3.13.0 (GH-124827)

Note delayed expected release date of 3.13.0

14 months agogh-124309: Revert eager task factory fix to prevent breaking downstream (#124810)
Peter Bierma [Tue, 1 Oct 2024 01:37:27 +0000 (21:37 -0400)] 
gh-124309: Revert eager task factory fix to prevent breaking downstream (#124810)

* Revert "GH-124639: add back loop param to staggered_race (#124700)"

This reverts commit e0a41a5dd12cb6e9277b05abebac5c70be684dd7.

* Revert "gh-124309: Modernize the `staggered_race` implementation to support eager task factories (#124390)"

This reverts commit de929f353c413459834a2a37b2d9b0240673d874.

14 months agogh-124785: Revert "gh-116510: Fix crash due to shared immortal interned strings ...
T. Wouters [Mon, 30 Sep 2024 23:41:46 +0000 (16:41 -0700)] 
gh-124785: Revert "gh-116510: Fix crash due to shared immortal interned strings (gh-124646)" (gh-124807)

Revert "gh-116510: Fix crash due to shared immortal interned strings. (gh-124646)"

This reverts commit 98b2ed7e239c807f379cd2bf864f372d79064aac.

14 months agoMinor edit for code clarification in annotationlib. (#124805)
larryhastings [Mon, 30 Sep 2024 22:25:56 +0000 (15:25 -0700)] 
Minor edit for code clarification in annotationlib. (#124805)

14 months agogh-116810: fix memory leak in ssl module (GH-123249)
Jeffrey R. Van Voorst [Mon, 30 Sep 2024 19:43:50 +0000 (14:43 -0500)] 
gh-116810: fix memory leak in ssl module (GH-123249)

Resolve a memory leak introduced in CPython 3.10's :mod:`ssl` when the :attr:`ssl.SSLSocket.session` property was accessed. Speeds up read and write access to said property by no longer unnecessarily cloning session objects via serialization.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Antoine Pitrou <antoine@python.org>
14 months agogh-115142: Skip some test cases in ``Lib/test/test_compile`` if ``_testinternalcapi...
Kirill Podoprigora [Mon, 30 Sep 2024 19:13:23 +0000 (22:13 +0300)] 
gh-115142: Skip some test cases in ``Lib/test/test_compile`` if ``_testinternalcapi`` is not available (#124474)

* Skip some test cases if "_testinternalcapi" is not available and if the test suite is
   running on another implementation than CPython.

14 months agogh-124613, regrtest: Detect JIT in build info (#124793)
Victor Stinner [Mon, 30 Sep 2024 18:50:41 +0000 (20:50 +0200)] 
gh-124613, regrtest: Detect JIT in build info (#124793)

14 months agogh-124613: Don't run perf tests in JIT builds (#124792)
Pablo Galindo Salgado [Mon, 30 Sep 2024 17:57:00 +0000 (18:57 +0100)] 
gh-124613: Don't run perf tests in JIT builds (#124792)

* gh-124613: Don't run perf tests in JIT builds

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
* Apply suggestions from code review

Co-authored-by: Victor Stinner <vstinner@python.org>
---------

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
14 months agogh-124487: Require at least Windows 10 SDK and update install check (GH-124672)
Steve Dower [Mon, 30 Sep 2024 17:50:46 +0000 (18:50 +0100)] 
gh-124487: Require at least Windows 10 SDK and update install check (GH-124672)

14 months agogh-124642: Dictionaries aren't marking objects as weakref'd (#124643)
Dino Viehland [Mon, 30 Sep 2024 17:04:32 +0000 (10:04 -0700)] 
gh-124642: Dictionaries aren't marking objects as weakref'd (#124643)

Dictionaries aren't marking objects as weakref'd

14 months agoDoc: Run HTML and non-HTML daily builds separately (#124493)
Adam Turner [Mon, 30 Sep 2024 16:48:12 +0000 (17:48 +0100)] 
Doc: Run HTML and non-HTML daily builds separately (#124493)

14 months agogh-124722: Fix leak in `test_detach_materialized_dict_no_memory` (GH-124769)
sobolevn [Mon, 30 Sep 2024 01:47:45 +0000 (04:47 +0300)] 
gh-124722: Fix leak in `test_detach_materialized_dict_no_memory` (GH-124769)

14 months agogh-124400: Use the normal command path for breakpoint commands (#124401)
Tian Gao [Sun, 29 Sep 2024 23:46:16 +0000 (16:46 -0700)] 
gh-124400: Use the normal command path for breakpoint commands (#124401)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
14 months agogh-124720: Update "Using Python on a Mac" document (#124721)
Ned Deily [Sun, 29 Sep 2024 23:39:46 +0000 (17:39 -0600)] 
gh-124720: Update "Using Python on a Mac" document (#124721)

Update "Using Python on a Mac" section of the "Python Setup and Usage"
document and include information on installing free-threading support.

14 months agogh-111495: Add tests for `PyCodec_*` C API (#123343)
Bénédikt Tran [Sun, 29 Sep 2024 15:22:39 +0000 (17:22 +0200)] 
gh-111495: Add tests for `PyCodec_*` C API (#123343)

14 months agogh-123961: Add a global state to _curses (#124729)
Bénédikt Tran [Sun, 29 Sep 2024 15:17:20 +0000 (17:17 +0200)] 
gh-123961: Add a global state to _curses (#124729)

14 months agogh-123290: Fix decref in _curses update_lines_cols() (#124767)
Bénédikt Tran [Sun, 29 Sep 2024 15:02:43 +0000 (17:02 +0200)] 
gh-123290: Fix decref in _curses update_lines_cols() (#124767)

14 months agofunctools: Give up on lazy-importing types (#124736)
Jelle Zijlstra [Sun, 29 Sep 2024 13:31:06 +0000 (06:31 -0700)] 
functools: Give up on lazy-importing types (#124736)

PR #121089 added an eager import for types.MethodType, but
still left the existing hacks for lazily importing from types.

We could also create MethodType internally in functools.py (e.g.,
by using `type(Placeholder.__repr__)`, but it feels not worth it at
this point, so instead I unlazified all the usages of types in the
module.

14 months agoDocs: improve generic `typing.NamedTuple` example (#124739)
CBerJun [Sun, 29 Sep 2024 11:07:05 +0000 (07:07 -0400)] 
Docs: improve generic `typing.NamedTuple` example (#124739)

14 months agogh-58573: Fix conflicts between abbreviated long options in the parent parser and...
Serhiy Storchaka [Sun, 29 Sep 2024 09:01:03 +0000 (12:01 +0300)] 
gh-58573: Fix conflicts between abbreviated long options in the parent parser and subparsers in argparse (GH-124631)

Check for ambiguous options if the option is consumed, not when it is
parsed.

14 months agogh-116850: Fix argparse for namespaces with not directly writable dict (GH-124667)
Serhiy Storchaka [Sun, 29 Sep 2024 08:01:10 +0000 (11:01 +0300)] 
gh-116850: Fix argparse for namespaces with not directly writable dict (GH-124667)

It now always uses setattr() instead of setting the dict item to modify
the namespace. This allows to use a class as a namespace.

14 months agogh-61181: Fix support of choices with string value in argparse (GH-124578)
Serhiy Storchaka [Sun, 29 Sep 2024 07:57:21 +0000 (10:57 +0300)] 
gh-61181: Fix support of choices with string value in argparse (GH-124578)

Substrings of the specified string no longer considered valid values.

14 months agogh-53834: Fix support of arguments with choices in argparse (GH-124495)
Serhiy Storchaka [Sun, 29 Sep 2024 07:52:52 +0000 (10:52 +0300)] 
gh-53834: Fix support of arguments with choices in argparse (GH-124495)

Positional arguments with nargs equal to '?' or '*' no longer check
default against choices.
Optional arguments with nargs equal to '?' no longer check const
against choices.

14 months agogh-124345: Support abbreviated single-dash long options with = in argparse (GH-124428)
Serhiy Storchaka [Sun, 29 Sep 2024 07:52:07 +0000 (10:52 +0300)] 
gh-124345: Support abbreviated single-dash long options with = in argparse (GH-124428)

14 months agogh-80259: Fix conflict between type and default=SUPPRESS in argparse (GH-124519)
Serhiy Storchaka [Sun, 29 Sep 2024 07:47:06 +0000 (10:47 +0300)] 
gh-80259: Fix conflict between type and default=SUPPRESS in argparse (GH-124519)

type() no longer called for SUPPRESS.

This only affects positional arguments with nargs='?'.

14 months agogh-104860: Fix allow_abbrev=False for single-dash long options (GH-124340)
Serhiy Storchaka [Sun, 29 Sep 2024 07:44:34 +0000 (10:44 +0300)] 
gh-104860: Fix allow_abbrev=False for single-dash long options (GH-124340)

14 months agogh-123497: New limit for Python integers on 64-bit platforms (GH-123724)
Serhiy Storchaka [Sun, 29 Sep 2024 07:40:20 +0000 (10:40 +0300)] 
gh-123497: New limit for Python integers on 64-bit platforms (GH-123724)

Instead of be limited just by the size of addressable memory (2**63
bytes), Python integers are now also limited by the number of bits, so
the number of bit now always fit in a 64-bit integer.

Both limits are much larger than what might be available in practice,
so it doesn't affect users.

_PyLong_NumBits() and _PyLong_Frexp() are now always successful.

14 months agoGH-124639: add back loop param to staggered_race (#124700)
Kumar Aditya [Sun, 29 Sep 2024 03:12:46 +0000 (08:42 +0530)] 
GH-124639: add back loop param to staggered_race (#124700)

14 months agogh-124665: Add `_PyCodec_UnregisterError` and `_codecs._unregister_error` (#124677)
Bénédikt Tran [Sun, 29 Sep 2024 00:25:23 +0000 (02:25 +0200)] 
gh-124665: Add `_PyCodec_UnregisterError` and `_codecs._unregister_error` (#124677)

14 months agogh-124442: make `__static_attributes__` deterministic by sorting (#124492)
Kira [Sat, 28 Sep 2024 22:15:43 +0000 (01:15 +0300)] 
gh-124442: make `__static_attributes__` deterministic by sorting (#124492)

Signed-off-by: kp2pml30 <kp2pml30@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
14 months agogh-123339: Fix cases of inconsistency of __module__ and __firstlineno__ in classes...
Serhiy Storchaka [Sat, 28 Sep 2024 17:51:49 +0000 (20:51 +0300)] 
gh-123339: Fix cases of inconsistency of __module__ and __firstlineno__ in classes (GH-123613)

* Setting the __module__ attribute for a class now removes the
  __firstlineno__ item from the type's dict.
* The _collections_abc and _pydecimal modules now completely replace the
  collections.abc and decimal modules after importing them. This
  allows to get the source of classes and functions defined in these
  modules.
* inspect.findsource() now checks whether the first line number for a
  class is out of bound.

14 months agogh-124688: _decimal: Get module state from ctx for performance (#124691)
neonene [Sat, 28 Sep 2024 16:12:53 +0000 (01:12 +0900)] 
gh-124688: _decimal: Get module state from ctx for performance (#124691)

Get a module state from ctx objects for performance.

14 months agodocs: improve venv docs (#124540)
Jelle Zijlstra [Sat, 28 Sep 2024 12:50:09 +0000 (05:50 -0700)] 
docs: improve venv docs (#124540)

- Move "versionchanged" notes that apply to the whole class to the
  end of the class docs
- Remove or move notes next to the method list that apply to individual
  methods.
- Mark up parameters using the appropriate syntax
- Do not capitalize "boolean"
- Shorten some text

14 months agoDoc: Fix default ``latex_elements['papersize']`` (#124525)
Jean-François B. [Sat, 28 Sep 2024 10:30:28 +0000 (12:30 +0200)] 
Doc: Fix default ``latex_elements['papersize']`` (#124525)

https://www.sphinx-doc.org/en/master/latex.html#the-latex-elements-configuration-setting

It should be 'letterpaper' or 'a4paper' not 'letter' or 'a4'
(not to be confused with PAPER env variable).

14 months agoSorting techniques edits (#124701)
Raymond Hettinger [Sat, 28 Sep 2024 00:19:44 +0000 (17:19 -0700)] 
Sorting techniques edits (#124701)

14 months agogh-107954: Fix configuration type for the perf profiler (#124636)
Pablo Galindo Salgado [Fri, 27 Sep 2024 23:50:16 +0000 (16:50 -0700)] 
gh-107954: Fix configuration type for the perf profiler (#124636)

14 months agogh-124385: Document and soft-deprecate PyLong_AS_LONG (GH-124386)
Petr Viktorin [Fri, 27 Sep 2024 23:40:50 +0000 (01:40 +0200)] 
gh-124385: Document and soft-deprecate PyLong_AS_LONG (GH-124386)

14 months agogh-123299: Copy-edit the 3.14 What's New (#124670)
Jelle Zijlstra [Fri, 27 Sep 2024 22:25:33 +0000 (15:25 -0700)] 
gh-123299: Copy-edit the 3.14 What's New (#124670)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
14 months agogh-111178: fix some USAN failures - mismatched function pointers (GH-123004)
Bénédikt Tran [Fri, 27 Sep 2024 21:51:50 +0000 (23:51 +0200)] 
gh-111178: fix some USAN failures - mismatched function pointers (GH-123004)

14 months agoGH-124547: Clear instance dictionary if memory error occurs during object dealloc...
Mark Shannon [Fri, 27 Sep 2024 21:51:01 +0000 (14:51 -0700)] 
GH-124547: Clear instance dictionary if memory error occurs during object dealloc (GH-124627)

14 months agogh-90190: Add doc for using `singledispatch` with precise collection type hints ...
Matt Delengowski [Fri, 27 Sep 2024 21:10:29 +0000 (17:10 -0400)] 
gh-90190: Add doc for using `singledispatch` with precise collection type hints (#116544)

14 months agogh-81263: Add assignment expressions to `help` (#124641)
Emily Morehouse [Fri, 27 Sep 2024 20:59:26 +0000 (13:59 -0700)] 
gh-81263: Add assignment expressions to `help` (#124641)

* Add assignment expression (:=) to `help`

* Update index for Assignment Expressions to include pair of `assignment; expression`

14 months agogh-124457: Remove coverity from CPython repo (GH-124460)
Mariatta [Fri, 27 Sep 2024 20:42:32 +0000 (13:42 -0700)] 
gh-124457: Remove coverity from CPython repo (GH-124460)

Remove coverity from CPython repo.

14 months agogh-124520: What's New entry for ctypes metaclass __new__/__init__ change (GH-124546)
Petr Viktorin [Fri, 27 Sep 2024 20:13:53 +0000 (22:13 +0200)] 
gh-124520: What's New entry for ctypes metaclass __new__/__init__ change (GH-124546)

14 months agodoc: PyUnicode_AsUTF8String() fails if string contains surrogates (#124605)
Victor Stinner [Fri, 27 Sep 2024 20:13:29 +0000 (22:13 +0200)] 
doc: PyUnicode_AsUTF8String() fails if string contains surrogates (#124605)

14 months agoDrop code ownership for decimal (gh-124695)
Raymond Hettinger [Fri, 27 Sep 2024 19:33:16 +0000 (12:33 -0700)] 
Drop code ownership for decimal (gh-124695)

14 months agoFix typo in InternalDocs/string_interning.md (GH-124699)
Petr Viktorin [Fri, 27 Sep 2024 19:31:59 +0000 (21:31 +0200)] 
Fix typo in InternalDocs/string_interning.md (GH-124699)

14 months agogh-124609: Fix _Py_ThreadId for Windows builds using MinGW (#124663)
Tony Roberts [Fri, 27 Sep 2024 18:52:23 +0000 (19:52 +0100)] 
gh-124609: Fix _Py_ThreadId for Windows builds using MinGW (#124663)

14 months agoItertool docs: Minor clarifications, wording tweaks, spacing, and active voice. ...
Raymond Hettinger [Fri, 27 Sep 2024 18:43:46 +0000 (11:43 -0700)] 
Itertool docs: Minor clarifications, wording tweaks, spacing, and active voice. (gh-124690)

Minor clarifications, wording tweaks, spacing, and active voice.

14 months agogh-124682: Disable test that is prone to intermittent failure on iOS. (#124683)
Russell Keith-Magee [Fri, 27 Sep 2024 17:49:35 +0000 (10:49 -0700)] 
gh-124682: Disable test that is prone to intermittent failure on iOS. (#124683)

Disable test that is prone to intermittent failure on iOS.

14 months agogh-121277: Raise nice error on `next` as second argument to deprecated-removed (GH...
Petr Viktorin [Fri, 27 Sep 2024 17:38:40 +0000 (19:38 +0200)] 
gh-121277: Raise nice error on `next` as second argument to deprecated-removed (GH-124623)

14 months agoFixup indentation for docs on `ModuleSpec` attributes (#124681)
Alex Waygood [Fri, 27 Sep 2024 17:35:09 +0000 (10:35 -0700)] 
Fixup indentation for docs on `ModuleSpec` attributes (#124681)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
14 months agoImprove accuracy of kde() invcdf estimates (gh-124637)
Raymond Hettinger [Fri, 27 Sep 2024 16:56:37 +0000 (09:56 -0700)] 
Improve accuracy of kde() invcdf estimates (gh-124637)

14 months agoGH-118093: Fix off-by-one errors in tier-up thresholds (GH-124447)
Brandt Bucher [Fri, 27 Sep 2024 16:38:04 +0000 (09:38 -0700)] 
GH-118093: Fix off-by-one errors in tier-up thresholds (GH-124447)

14 months agogh-113878: Add `doc` parameter to `dataclasses.field` (gh-114051)
sobolevn [Fri, 27 Sep 2024 16:20:49 +0000 (19:20 +0300)] 
gh-113878: Add `doc` parameter to `dataclasses.field` (gh-114051)

If using `slots=True`, the `doc` parameter ends up in the `__slots__` dict. The `doc` parameter is also in the corresponding `Field` object.

14 months agogh-123017: Add Android to the list of platforms where `strftime` doesn't support...
Malcolm Smith [Fri, 27 Sep 2024 14:35:18 +0000 (15:35 +0100)] 
gh-123017: Add Android to the list of platforms where `strftime` doesn't support negative years (#124467)

Add Android to the list of platforms where `strftime` doesn't support negative years

14 months agogh-119180: No longer set `__annotations__` in `__main__` (#124634)
Jelle Zijlstra [Fri, 27 Sep 2024 12:49:43 +0000 (05:49 -0700)] 
gh-119180: No longer set `__annotations__` in `__main__` (#124634)

14 months agoGH-95079: document error behaviour for some unicode C APIs (#95080)
Max Bachmann [Fri, 27 Sep 2024 10:35:55 +0000 (12:35 +0200)] 
GH-95079: document error behaviour for some unicode C APIs (#95080)

14 months agoDocs: for for/else clarify that return or raise also skip the else (#124591)
Ned Batchelder [Fri, 27 Sep 2024 10:17:25 +0000 (06:17 -0400)] 
Docs: for for/else clarify that return or raise also skip the else (#124591)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
14 months agogh-124176: Add special support for dataclasses to `create_autospec` (#124429)
sobolevn [Fri, 27 Sep 2024 06:48:31 +0000 (09:48 +0300)] 
gh-124176: Add special support for dataclasses to `create_autospec` (#124429)

14 months agogh-86673: Harden `test_ttk.test_element_create_image` (#123335)
Erlend E. Aasland [Fri, 27 Sep 2024 06:21:15 +0000 (08:21 +0200)] 
gh-86673: Harden `test_ttk.test_element_create_image` (#123335)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
14 months agogenerate_global_objects.py: Fix name of macro in error message (#124464)
Jelle Zijlstra [Fri, 27 Sep 2024 04:37:21 +0000 (21:37 -0700)] 
generate_global_objects.py: Fix name of macro in error message (#124464)

_PyID does not exist but _Py_ID does.

14 months agogh-116510: Fix crash during sub-interpreter shutdown (gh-124645)
Neil Schemenauer [Fri, 27 Sep 2024 02:33:07 +0000 (19:33 -0700)] 
gh-116510: Fix crash during sub-interpreter shutdown (gh-124645)

Fix a bug that can cause a crash when sub-interpreters use "basic"
single-phase extension modules.  Shared objects could refer to PyGC_Head
nodes that had been freed as part of interpreter shutdown.

14 months agogh-116510: Fix crash due to shared immortal interned strings. (gh-124646)
Neil Schemenauer [Fri, 27 Sep 2024 02:16:51 +0000 (19:16 -0700)] 
gh-116510: Fix crash due to shared immortal interned strings. (gh-124646)

14 months agoGH-123516: Improve JIT memory consumption by invalidating cold executors (GH-124443)
Savannah Ostrowski [Fri, 27 Sep 2024 00:35:42 +0000 (17:35 -0700)] 
GH-123516: Improve JIT memory consumption by invalidating cold executors (GH-124443)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
14 months agoDocs: Update and proofread `library/venv.rst` (#124121)
Hugo van Kemenade [Thu, 26 Sep 2024 23:57:38 +0000 (16:57 -0700)] 
Docs: Update and proofread `library/venv.rst` (#124121)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
14 months agogh-84559: Change the multiprocessing start method default to `forkserver` (GH-101556)
Gregory P. Smith [Thu, 26 Sep 2024 23:57:19 +0000 (16:57 -0700)] 
gh-84559: Change the multiprocessing start method default to `forkserver` (GH-101556)

Change the default multiprocessing start method away from fork to forkserver or spawn on the remaining platforms where it was fork.  See the issue for context.  This makes the default far more thread safe (other than for people spawning threads at import time... - don't do that!).

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>