]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
18 months agoGH-118095: Handle `RETURN_GENERATOR` in tier 2 (GH-118180)
Mark Shannon [Thu, 25 Apr 2024 10:32:47 +0000 (11:32 +0100)] 
GH-118095: Handle `RETURN_GENERATOR` in tier 2 (GH-118180)

18 months agogh-102511: Speed up os.path.splitroot() with native helpers (GH-118089)
Nice Zombies [Thu, 25 Apr 2024 09:07:38 +0000 (11:07 +0200)] 
gh-102511: Speed up os.path.splitroot() with native helpers (GH-118089)

18 months agogh-118221: Always use the default row factory in sqlite3.iterdump() (#118223)
Erlend E. Aasland [Thu, 25 Apr 2024 08:11:45 +0000 (10:11 +0200)] 
gh-118221: Always use the default row factory in sqlite3.iterdump() (#118223)

sqlite3.iterdump() depends on the row factory returning resulting rows
as tuples; it will fail with custom row factories like for example a
dict factory.

With this commit, we explicitly reset the row factory of the cursor used
by iterdump(), so we always get predictable results. This does not
affect the row factory of the parent connection.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
18 months agogh-118207: Rename the COMMON_FIELDS macro in funcobject.h and undef it after use...
Itamar Oren [Thu, 25 Apr 2024 06:49:15 +0000 (23:49 -0700)] 
gh-118207: Rename the COMMON_FIELDS macro in funcobject.h and undef it after use (GH-118208)

18 months agogh-117968: Make the test for closed file more safe in the C API tests (GH-118230)
Serhiy Storchaka [Thu, 25 Apr 2024 05:00:42 +0000 (08:00 +0300)] 
gh-117968: Make the test for closed file more safe in the C API tests (GH-118230)

The behavior of fileno() after fclose() is undefined, but it is the only
practical way to check whether the file was closed.
Only test this on the known platforms (Linux, Windows, macOS), where we
already tested that it works.

18 months agogh-117786: Fix venv created from Windows Store install by restoring __PYVENV_LAUNCHER...
Steve Dower [Wed, 24 Apr 2024 22:00:55 +0000 (23:00 +0100)] 
gh-117786: Fix venv created from Windows Store install by restoring __PYVENV_LAUNCHER__ smuggling (GH-117814)

18 months agoGH-118246: Exclude test_pathlib and test_posixpath from emulated JIT CI (GH-118247)
Savannah Ostrowski [Wed, 24 Apr 2024 21:43:50 +0000 (14:43 -0700)] 
GH-118246: Exclude test_pathlib and test_posixpath from emulated JIT CI (GH-118247)

18 months agogh-108191: Add support of positional argument in SimpleNamespace constructor (GH...
Serhiy Storchaka [Wed, 24 Apr 2024 21:39:54 +0000 (00:39 +0300)] 
gh-108191: Add support of positional argument in SimpleNamespace constructor (GH-108195)

SimpleNamespace({'a': 1, 'b': 2}) and SimpleNamespace([('a', 1), ('b', 2)])
are now the same as SimpleNamespace(a=1, b=2).

18 months agogh-117953: Fix Refleaks Introduced by gh-118194 (gh-118250)
Eric Snow [Wed, 24 Apr 2024 21:23:45 +0000 (15:23 -0600)] 
gh-117953: Fix Refleaks Introduced by gh-118194 (gh-118250)

A couple of refleaks slipped through in gh-118194. This takes care of them.

(AKA _Py_ext_module_loader_info_init() does not steal references.)

18 months agogh-112730: Make the test suite resilient to color-activation environment variables...
Pablo Galindo Salgado [Wed, 24 Apr 2024 20:25:22 +0000 (21:25 +0100)] 
gh-112730: Make the test suite resilient to color-activation environment variables (#117672)

18 months agogh-85453: Make numeric literals consistent across datetime.rst (#118245)
edson duarte [Wed, 24 Apr 2024 20:19:54 +0000 (17:19 -0300)] 
gh-85453: Make numeric literals consistent across datetime.rst (#118245)

Remove code formatting from remaining numeric literals.

18 months agogh-85453: Adapt datetime.rst to devguide recommendations for code snippets and variab...
edson duarte [Wed, 24 Apr 2024 19:53:52 +0000 (16:53 -0300)] 
gh-85453: Adapt datetime.rst to devguide recommendations for code snippets and variables (#118068)

Also remove formatting from numeric literals.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
18 months agogh-117953: Add Internal struct _Py_ext_module_loader_info (gh-118194)
Eric Snow [Wed, 24 Apr 2024 17:42:01 +0000 (11:42 -0600)] 
gh-117953: Add Internal struct _Py_ext_module_loader_info (gh-118194)

This helps with a later change that splits up _PyImport_LoadDynamicModuleWithSpec().

18 months agogh-116988: Remove duplicates of `annotated_rhs` in the Grammar (#117004)
David Rubin [Wed, 24 Apr 2024 17:16:06 +0000 (10:16 -0700)] 
gh-116988: Remove duplicates of `annotated_rhs` in the Grammar (#117004)

18 months agogh-117953: Let update_global_state_for_extension() Caller Decide If Singlephase or...
Eric Snow [Wed, 24 Apr 2024 16:28:35 +0000 (10:28 -0600)] 
gh-117953: Let update_global_state_for_extension() Caller Decide If Singlephase or Not (gh-118193)

This change makes other upcoming changes simpler.

18 months agogh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791)
Eric Snow [Wed, 24 Apr 2024 16:18:24 +0000 (10:18 -0600)] 
gh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791)

See https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147/26.

18 months agogh-117953: Cleanups For fix_up_extension() in import.c (gh-118192)
Eric Snow [Wed, 24 Apr 2024 15:55:48 +0000 (09:55 -0600)] 
gh-117953: Cleanups For fix_up_extension() in import.c (gh-118192)

These are cleanups I've pulled out of gh-118116.  Mostly, this change moves code around to align with some future changes and to improve clarity a little.  There is one very small change in behavior: we now add the module to the per-interpreter caches after updating the global state, rather than before.

18 months agogh-118013: Use weakrefs for the cache key in `inspect._shadowed_dict` (#118202)
Alex Waygood [Wed, 24 Apr 2024 14:55:02 +0000 (15:55 +0100)] 
gh-118013: Use weakrefs for the cache key in `inspect._shadowed_dict` (#118202)

18 months agoGH-115419: Move setting the instruction pointer to error exit stubs (GH-118088)
Mark Shannon [Wed, 24 Apr 2024 13:41:30 +0000 (14:41 +0100)] 
GH-115419: Move setting the instruction pointer to error exit stubs (GH-118088)

18 months agoGH-118095: Convert DEOPT_IFs on likely side exits to EXIT_IFs (GH-118106)
Mark Shannon [Wed, 24 Apr 2024 13:37:55 +0000 (14:37 +0100)] 
GH-118095: Convert DEOPT_IFs on likely side exits to EXIT_IFs (GH-118106)

Covert DEOPT_IFs on likely side exits to EXIT_IFs

18 months agoGH-117536: GH-117894: fix athrow().throw(...) unawaited warning (GH-117851)
Thomas Grainger [Wed, 24 Apr 2024 12:20:19 +0000 (13:20 +0100)] 
GH-117536: GH-117894: fix athrow().throw(...) unawaited warning (GH-117851)

18 months agogh-117225: Add color to doctest output (#117583)
Hugo van Kemenade [Wed, 24 Apr 2024 11:27:40 +0000 (14:27 +0300)] 
gh-117225: Add color to doctest output (#117583)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
18 months agono-issue: devcontainer: update to Fedora 40 (gh-118161)
rindeal [Wed, 24 Apr 2024 11:13:35 +0000 (11:13 +0000)] 
no-issue: devcontainer: update to Fedora 40 (gh-118161)

18 months agogh-117901: Add option for compiler's codegen to save nested instruction sequences...
Irit Katriel [Wed, 24 Apr 2024 09:46:17 +0000 (10:46 +0100)] 
gh-117901: Add option for compiler's codegen to save nested instruction sequences for introspection (#118007)

18 months agogh-116023: Add `show_empty=False` to `ast.dump` (#116037)
Nikita Sobolev [Wed, 24 Apr 2024 08:02:38 +0000 (11:02 +0300)] 
gh-116023: Add `show_empty=False` to `ast.dump` (#116037)

Co-authored-by: Carl Meyer <carl@oddbird.net>
18 months agogh-118074: Immortal executors are not GC-able (#118182)
Guido van Rossum [Tue, 23 Apr 2024 20:38:23 +0000 (13:38 -0700)] 
gh-118074: Immortal executors are not GC-able (#118182)

Better version of gh-118117.
Just check for immortality instead of an address range check.

18 months agogh-118189: Revert accidentally added incl.tar (#118190)
Oleg Iarygin [Tue, 23 Apr 2024 17:38:33 +0000 (20:38 +0300)] 
gh-118189: Revert accidentally added incl.tar (#118190)

18 months agogh-117657: Quiet TSAN warnings about remaining non-atomic accesses of `tstate->state...
mpage [Tue, 23 Apr 2024 17:20:14 +0000 (10:20 -0700)] 
gh-117657: Quiet TSAN warnings about remaining non-atomic accesses of `tstate->state` (#118165)

Quiet TSAN warnings about remaining non-atomic accesses of `tstate->state`

18 months agoFix typo in py_compile.rst (GH-118102)
Animesh Kumar [Tue, 23 Apr 2024 17:12:49 +0000 (22:42 +0530)] 
Fix typo in py_compile.rst (GH-118102)

18 months agogh-117151: optimize BufferedWriter(), do not buffer writes that are the buffer size...
morotti [Tue, 23 Apr 2024 15:51:20 +0000 (16:51 +0100)] 
gh-117151: optimize BufferedWriter(), do not buffer writes that are the buffer size (GH-118037)

BufferedWriter() was buffering calls that are the exact same size as the buffer. it's a very common case to read/write in blocks of the exact buffer size.

it's pointless to copy a full buffer, it's costing extra memory copy and the full buffer will have to be written in the next call anyway.

Co-authored-by: rmorotti <romain.morotti@man.com>
18 months agogh-117953: Small Cleanup of Extensions-Related Machinery Code (gh-118167)
Eric Snow [Tue, 23 Apr 2024 14:25:50 +0000 (08:25 -0600)] 
gh-117953: Small Cleanup of Extensions-Related Machinery Code (gh-118167)

This is a collection of very basic cleanups I've pulled out of gh-118116.  It is mostly renaming variables and moving a couple bits of code in functionally equivalent ways.

18 months agogh-118168: Fix Unpack interaction with builtin aliases (#118169)
Jelle Zijlstra [Tue, 23 Apr 2024 13:40:26 +0000 (06:40 -0700)] 
gh-118168: Fix Unpack interaction with builtin aliases (#118169)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
18 months agogh-118140: Make the``test_concurrent_futures.test_init`` quiet. (GH-118141)
Kirill Podoprigora [Tue, 23 Apr 2024 12:36:06 +0000 (15:36 +0300)] 
gh-118140: Make the``test_concurrent_futures.test_init`` quiet. (GH-118141)

Add stream argument to unittest.TextTestRunner call

18 months agogh-118082: Improve `import` without names syntax error message (#118083)
Nikita Sobolev [Tue, 23 Apr 2024 12:00:52 +0000 (15:00 +0300)] 
gh-118082: Improve `import` without names syntax error message (#118083)

18 months agogh-68114: Fix handling for removed PyArg_ParseTuple 'w' formatters (GH-8204)
Joe Jevnik [Tue, 23 Apr 2024 11:15:15 +0000 (07:15 -0400)] 
gh-68114: Fix handling for removed PyArg_ParseTuple 'w' formatters (GH-8204)

Co-authored-by: Joe Jevnik <joe@quantopian.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
18 months agogh-116984: Install mimalloc headers (#116985)
Yichen Yan [Tue, 23 Apr 2024 07:56:00 +0000 (15:56 +0800)] 
gh-116984: Install mimalloc headers (#116985)

- Install mimalloc header only when enabled
- Rename WITH_MIMALLOC to INSTALL_MIMALLOC

18 months agogh-118039: Fix config.cache key on WASI (#118137)
Nice Zombies [Tue, 23 Apr 2024 07:46:28 +0000 (09:46 +0200)] 
gh-118039: Fix config.cache key on WASI (#118137)

18 months agogh-95754: Better error when script shadows a standard library or third party module...
Shantanu [Tue, 23 Apr 2024 01:24:21 +0000 (18:24 -0700)] 
gh-95754: Better error when script shadows a standard library or third party module (#113769)

18 months agogh-116741: Upgrade libexpat to 2.6.2 (#117296)
Seth Michael Larson [Tue, 23 Apr 2024 01:15:08 +0000 (18:15 -0700)] 
gh-116741: Upgrade libexpat to 2.6.2 (#117296)

Upgrade libexpat to 2.6.2

18 months agoGH-118074: Executors in the COLD_EXITS array are not GC'able (#118117)
Guido van Rossum [Mon, 22 Apr 2024 23:20:39 +0000 (16:20 -0700)] 
GH-118074: Executors in the COLD_EXITS array are not GC'able (#118117)

18 months agoSet proper permissions for `jit.yml` workflow (#118084)
Nikita Sobolev [Mon, 22 Apr 2024 21:31:01 +0000 (00:31 +0300)] 
Set proper permissions for `jit.yml` workflow (#118084)

18 months agogh-109118: Allow lambdas in annotation scopes in classes (#118019)
Jelle Zijlstra [Mon, 22 Apr 2024 19:50:26 +0000 (12:50 -0700)] 
gh-109118: Allow lambdas in annotation scopes in classes (#118019)

18 months agoRemove more remnants of deepfreeze (#118159)
Guido van Rossum [Mon, 22 Apr 2024 19:17:57 +0000 (12:17 -0700)] 
Remove more remnants of deepfreeze (#118159)

18 months agobpo-18108: Adding dir_fd and follow_symlinks keyword args to shutil.chown (GH-15811)
tahia [Mon, 22 Apr 2024 18:23:36 +0000 (14:23 -0400)] 
bpo-18108: Adding dir_fd and follow_symlinks keyword args to shutil.chown (GH-15811)

* Adding dir_fd and follow_symlinks keyword args to shutil.chown
* Extending test_shutil.TestShutil.test_chown to include new kwargs
* Updating shutil.chown documentation

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
18 months agogh-118030: Group definitions for `ParamSpecArgs` and `ParamSpecKwargs` in `typing...
Nice Zombies [Mon, 22 Apr 2024 14:57:46 +0000 (16:57 +0200)] 
gh-118030: Group definitions for `ParamSpecArgs` and `ParamSpecKwargs` in `typing.rst` (#118154)

18 months agogh-118148: Improve tests for shutil.make_archive() (GH-118149)
Serhiy Storchaka [Mon, 22 Apr 2024 13:27:47 +0000 (16:27 +0300)] 
gh-118148: Improve tests for shutil.make_archive() (GH-118149)

18 months agoGH-115480: Reduce guard strength for binary ops when type of one operand is known...
Mark Shannon [Mon, 22 Apr 2024 12:34:06 +0000 (13:34 +0100)] 
GH-115480: Reduce guard strength for binary ops when type of one operand is known already (GH-118050)

18 months agogh-115986 Improve pprint documentation accuracy (#117403)
Kerim Kabirov [Mon, 22 Apr 2024 10:28:21 +0000 (12:28 +0200)] 
gh-115986 Improve pprint documentation accuracy (#117403)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
18 months agogh-117995: Don't raise DeprecationWarnings for indexed nameless params (#118001)
Erlend E. Aasland [Mon, 22 Apr 2024 06:43:20 +0000 (08:43 +0200)] 
gh-117995: Don't raise DeprecationWarnings for indexed nameless params (#118001)

Filter out '?NNN' placeholders when looking for named params.

Co-authored-by: AN Long <aisk@users.noreply.github.com>
18 months agogh-112075: Make instance attributes stored in inline "dict" thread safe (#114742)
Dino Viehland [Mon, 22 Apr 2024 05:57:05 +0000 (22:57 -0700)] 
gh-112075: Make instance attributes stored in inline "dict" thread safe (#114742)

Make instance attributes stored in inline "dict" thread safe on free-threaded builds

18 months agoDocs: replace Harry Potter reference with Monty Python (#118130)
Clément Robert [Sun, 21 Apr 2024 18:03:46 +0000 (20:03 +0200)] 
Docs: replace Harry Potter reference with Monty Python (#118130)

18 months agogh-115961: Add name and mode attributes for compressed file-like objects (GH-116036)
Serhiy Storchaka [Sun, 21 Apr 2024 08:46:39 +0000 (11:46 +0300)] 
gh-115961: Add name and mode attributes for compressed file-like objects (GH-116036)

* Add name and mode attributes for compressed and archived file-like objects
  in modules bz2, lzma, tarfile and zipfile.
* Change the value of the mode attribute of GzipFile from integer (1 or 2)
  to string ('rb' or 'wb').
* Change the value of the mode attribute of ZipExtFile from 'r' to 'rb'.

18 months agogh-118121: Fix `test_doctest.test_look_in_unwrapped` (#118122)
Nikita Sobolev [Sun, 21 Apr 2024 07:08:32 +0000 (10:08 +0300)] 
gh-118121: Fix `test_doctest.test_look_in_unwrapped` (#118122)

18 months agogh-91629 Use conf.d configs and fish_add_path to set the PATH when installing for...
Andrew Cassidy [Sun, 21 Apr 2024 06:52:58 +0000 (23:52 -0700)] 
gh-91629 Use conf.d configs and fish_add_path to set the PATH when installing for the Fish shell. (GH-91630)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
18 months agogh-114099: Formalize Tier 3 status of iOS (GH-118020)
Russell Keith-Magee [Sun, 21 Apr 2024 03:04:08 +0000 (11:04 +0800)] 
gh-114099: Formalize Tier 3 status of iOS (GH-118020)

18 months ago``Objects/typeobject.c``: Fix typo (#118126)
Kirill Podoprigora [Sun, 21 Apr 2024 02:25:39 +0000 (05:25 +0300)] 
``Objects/typeobject.c``: Fix typo (#118126)

18 months agoClarifying nonlocal doc: SyntaxError is raised if nearest enclosing scope is global...
Quazi Irfan [Sun, 21 Apr 2024 01:42:51 +0000 (21:42 -0400)] 
Clarifying nonlocal doc: SyntaxError is raised if nearest enclosing scope is global (#114009)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
18 months agoGH-112855: Speed up `pathlib.PurePath` pickling (#112856)
Barney Gale [Sat, 20 Apr 2024 16:46:52 +0000 (17:46 +0100)] 
GH-112855: Speed up `pathlib.PurePath` pickling (#112856)

The second item in the tuple returned from `__reduce__()` is a tuple of arguments to supply to path constructor. Previously we returned the `parts` tuple here, which entailed joining, parsing and normalising the path object, and produced a compact pickle representation.

With this patch, we instead return a tuple of paths that were originally given to the path constructor. This makes pickling much faster (at the expense of compactness).

It's worth noting that, in the olden times, pathlib performed this parsing/normalization up-front in every case, and so using `parts` for pickling was almost free. Nowadays pathlib only parses/normalises paths when it's necessary or advantageous to do so (e.g. computing a path parent, or iterating over a directory, respectively).

18 months agoGH-115874: Fix segfault in FutureIter_dealloc (GH-117741)
Savannah Ostrowski [Fri, 19 Apr 2024 22:30:52 +0000 (15:30 -0700)] 
GH-115874: Fix segfault in FutureIter_dealloc (GH-117741)

18 months agogh-116818: Make `sys.settrace`, `sys.setprofile`, and monitoring thread-safe (#116775)
Dino Viehland [Fri, 19 Apr 2024 21:47:42 +0000 (14:47 -0700)] 
gh-116818: Make `sys.settrace`, `sys.setprofile`, and monitoring thread-safe (#116775)

Makes sys.settrace, sys.setprofile, and monitoring generally thread-safe.

Mostly uses a stop-the-world approach and synchronization around the code object's _co_instrumentation_version.  There may be a little bit of extra synchronization around the monitoring data that's required to be TSAN clean.

18 months ago[gh-117657] _Py_MergeZeroLocalRefcount isn't loading ob_ref_shared with strong enough...
Dino Viehland [Fri, 19 Apr 2024 21:21:01 +0000 (14:21 -0700)] 
[gh-117657] _Py_MergeZeroLocalRefcount isn't loading ob_ref_shared with strong enough semantics (#118111)

Use acquire for load of ob_ref_shared

18 months agoFix a typo in dictobject.c documentation (#117515)
Noah Kim [Fri, 19 Apr 2024 19:19:12 +0000 (15:19 -0400)] 
Fix a typo in dictobject.c documentation (#117515)

18 months agogh-114099: Modify preprocessor symbol usage to support older macOS SDKs (GH-118073)
Russell Keith-Magee [Fri, 19 Apr 2024 18:56:33 +0000 (02:56 +0800)] 
gh-114099: Modify preprocessor symbol usage to support older macOS SDKs (GH-118073)

Co-authored-by: Joshua Root jmr@macports.org
18 months agogh-118100: Improve links in `ast.rst` (#118101)
Nikita Sobolev [Fri, 19 Apr 2024 18:25:54 +0000 (21:25 +0300)] 
gh-118100: Improve links in `ast.rst` (#118101)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
18 months agogh-117657: use relaxed loads for checking dict keys immortality (#118067)
Dino Viehland [Fri, 19 Apr 2024 16:25:08 +0000 (09:25 -0700)] 
gh-117657: use relaxed loads for checking dict keys immortality (#118067)

Use relaxed load to check if dictkeys are immortal

18 months agogh-118079: Fix ``requires_singlephase_init`` helper (#118081)
Kirill Podoprigora [Fri, 19 Apr 2024 15:38:13 +0000 (18:38 +0300)] 
gh-118079: Fix ``requires_singlephase_init`` helper (#118081)

Before this PR tests decorated with a `requires_singlephase_init` helper
did not run because of an incorrect call to the `requires_gil_enabled`
helper.

18 months agogh-114053: Fix bad interaction of PEP-695, PEP-563 and ``get_type_hints`` (#118009)
Alex Waygood [Fri, 19 Apr 2024 13:03:44 +0000 (14:03 +0100)] 
gh-114053: Fix bad interaction of PEP-695, PEP-563 and ``get_type_hints`` (#118009)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
18 months agogh-116931: Add fileobj parameter check for Tarfile.addfile (GH-117988)
lyc8503 [Fri, 19 Apr 2024 11:41:51 +0000 (19:41 +0800)] 
gh-116931: Add fileobj parameter check for Tarfile.addfile (GH-117988)

Tarfile.addfile now throws an ValueError when the user passes
in a non-zero size tarinfo but does not provide a fileobj,
instead of writing an incomplete entry.

18 months agosetobject: remove out of date docstring info (GH-118048)
Rostyslav Lobov [Fri, 19 Apr 2024 11:33:13 +0000 (07:33 -0400)] 
setobject: remove out of date docstring info (GH-118048)

18 months agogh-88035: update doc-string of `epoch` in timemodule.c (GH-118076)
lit [Fri, 19 Apr 2024 11:28:46 +0000 (19:28 +0800)] 
gh-88035: update doc-string of `epoch` in timemodule.c (GH-118076)

Follow #88035, update doc-string of epoch in timemodule.c

The epoch is `January 1st, 1970 on all platforms`, according to
current documentation.

18 months agogh-115775: Add whatsnew entry about __static_attributes__ (GH-117909)
Irit Katriel [Fri, 19 Apr 2024 10:57:31 +0000 (11:57 +0100)] 
gh-115775: Add whatsnew entry about __static_attributes__ (GH-117909)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
18 months agogh-116935: Document that heap types need to support garbage collection (GH-118021)
Savannah Ostrowski [Fri, 19 Apr 2024 09:29:23 +0000 (02:29 -0700)] 
gh-116935: Document that heap types need to support garbage collection (GH-118021)

18 months agogh-117518: Clarify PyTuple_GetItem() borrowed reference in the doc (GH-117920)
Victor Stinner [Fri, 19 Apr 2024 08:41:37 +0000 (10:41 +0200)] 
gh-117518: Clarify PyTuple_GetItem() borrowed reference in the doc (GH-117920)

18 months agoGH-116202: Incorporate invalidation check into _START_EXECUTOR. (GH-118044)
Mark Shannon [Fri, 19 Apr 2024 08:26:42 +0000 (09:26 +0100)] 
GH-116202: Incorporate invalidation check into _START_EXECUTOR. (GH-118044)

18 months agoGH-115419: Improve list of escaping functions (GH-118054)
Mark Shannon [Fri, 19 Apr 2024 08:25:07 +0000 (09:25 +0100)] 
GH-115419: Improve list of escaping functions (GH-118054)

18 months agogh-64588: Clarify the difference between mu and xbar in statistics docs (#117333)
Mariusz Felisiak [Fri, 19 Apr 2024 05:36:24 +0000 (07:36 +0200)] 
gh-64588: Clarify the difference between mu and xbar in statistics docs (#117333)

Thanks Davin Potts for the clarification idea.

18 months agobuild(deps): bump hypothesis from 6.98.15 to 6.100.0 in /Tools (#117416)
dependabot[bot] [Fri, 19 Apr 2024 05:23:49 +0000 (22:23 -0700)] 
build(deps): bump hypothesis from 6.98.15 to 6.100.0 in /Tools (#117416)

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

---
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>
18 months agoDocs: Fix CVE link (#118077)
Jelle Zijlstra [Fri, 19 Apr 2024 04:31:53 +0000 (21:31 -0700)] 
Docs: Fix CVE link (#118077)

18 months agogh-117535: Change unknown filename of warnings from `sys` to `<sys>` (#118018)
Tian Gao [Fri, 19 Apr 2024 03:50:09 +0000 (20:50 -0700)] 
gh-117535: Change unknown filename of warnings from `sys` to `<sys>` (#118018)

18 months agoUse "Contributed by" in a couple of occurrences of 3.12 whatsnew (#118070)
Rafael Fontenelle [Fri, 19 Apr 2024 03:28:12 +0000 (00:28 -0300)] 
Use "Contributed by" in a couple of occurrences of 3.12 whatsnew (#118070)

18 months agogh-112069: Make PySet_GET_SIZE to be atomic safe. (gh-118053)
Donghee Na [Thu, 18 Apr 2024 21:40:28 +0000 (06:40 +0900)] 
gh-112069: Make PySet_GET_SIZE to be atomic safe. (gh-118053)

gh-112069: Make PySet_GET_SIZE to be atomic operation

18 months agogh-102402: Fix logging test_relativeCreated_has_higher_precision() leak (#117985)
Victor Stinner [Thu, 18 Apr 2024 17:01:55 +0000 (19:01 +0200)] 
gh-102402: Fix logging test_relativeCreated_has_higher_precision() leak (#117985)

Fix a reference leak in test_relativeCreated_has_higher_precision()
of test_logging: don't reimport the logging the logging module.

18 months agogh-117503: Fix test for posixpath.expanduser() when pw_dir ends with / (GH-118056)
Serhiy Storchaka [Thu, 18 Apr 2024 16:59:52 +0000 (19:59 +0300)] 
gh-117503: Fix test for posixpath.expanduser() when pw_dir ends with / (GH-118056)

18 months agogh-112069: Add _PySet_NextEntryRef to be thread-safe. (gh-117990)
Donghee Na [Thu, 18 Apr 2024 15:18:22 +0000 (00:18 +0900)] 
gh-112069:  Add _PySet_NextEntryRef to be thread-safe. (gh-117990)

18 months agoGH-118036: Fix a bug with CALL_STAT_INC (#117933)
Guido van Rossum [Thu, 18 Apr 2024 14:59:02 +0000 (07:59 -0700)] 
GH-118036: Fix a bug with CALL_STAT_INC (#117933)

We were under-counting calls in `_PyEvalFramePushAndInit`
because the `CALL_STAT_INC` macro was redefined to a no-op
for the Tier 2 interpreter. The fix is not to `#undef` it at all.
This results in ~37% more "Frames pushed" reported
under "Call stats".

18 months agogh-87969: Align docs and docstrings with implementation for ctypes' [w]string_at...
Shreyan Avigyan [Thu, 18 Apr 2024 14:57:37 +0000 (20:27 +0530)] 
gh-87969: Align docs and docstrings with implementation for ctypes' [w]string_at() (#25384)

The implementation uses 'ptr' for the name of the first parameter of
ctypes.string_at() and ctypes.wstring_at(). Align docs and docstrings
with the naming used in the implementation.

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
18 months agogh-117987: Restore several functions removed in Python 3.13 alpha 1 (GH-117993)
Victor Stinner [Thu, 18 Apr 2024 13:20:38 +0000 (15:20 +0200)] 
gh-117987: Restore several functions removed in Python 3.13 alpha 1 (GH-117993)

Restore these functions removed in Python 3.13 alpha 1:

* Py_SetPythonHome()
* Py_SetProgramName()
* PySys_SetArgvEx()
* PySys_SetArgv()

18 months agogh-116932: Remove redundant NEWS entry (#118040)
lyc8503 [Thu, 18 Apr 2024 12:22:18 +0000 (20:22 +0800)] 
gh-116932: Remove redundant NEWS entry (#118040)

18 months agoGH-115419: Tidy up tier 2 optimizer. Merge peephole pass into main pass (GH-117997)
Mark Shannon [Thu, 18 Apr 2024 10:09:30 +0000 (11:09 +0100)] 
GH-115419: Tidy up tier 2 optimizer. Merge peephole pass into main pass (GH-117997)

18 months agogh-90815: Document bundled mimalloc in What’s New In Python 3.13 (GH-117811)
Miro Hrončok [Thu, 18 Apr 2024 09:04:20 +0000 (11:04 +0200)] 
gh-90815: Document bundled mimalloc in What’s New In Python 3.13 (GH-117811)

18 months agofix formatting of literal in docstring of int.from_bytes and int.to_bytes (#117847)
Jens Hedegaard Nielsen [Thu, 18 Apr 2024 09:01:58 +0000 (11:01 +0200)] 
fix formatting of literal in docstring of int.from_bytes and int.to_bytes (#117847)

18 months agogh-116932: Add note on how to report python documentation theme bugs (GH-117989)
lyc8503 [Thu, 18 Apr 2024 08:45:25 +0000 (16:45 +0800)] 
gh-116932: Add note on how to report python documentation theme bugs (GH-117989)

18 months agoFix two typos in `typeobject.c` (#118024)
Nikita Sobolev [Thu, 18 Apr 2024 07:46:05 +0000 (10:46 +0300)] 
Fix two typos in `typeobject.c` (#118024)

18 months agogh-118023: Fix reference leak (#118025)
Kirill Podoprigora [Thu, 18 Apr 2024 07:32:32 +0000 (10:32 +0300)] 
gh-118023: Fix reference leak (#118025)

18 months agogh-117641: Improve the perfornance of posixpath.commonpath() (#117652)
Nice Zombies [Thu, 18 Apr 2024 07:26:34 +0000 (09:26 +0200)] 
gh-117641: Improve the perfornance of posixpath.commonpath() (#117652)

18 months agogh-117968: Add tests for the part of the PyRun family of the C API (GH-117982)
Serhiy Storchaka [Wed, 17 Apr 2024 20:45:35 +0000 (23:45 +0300)] 
gh-117968: Add tests for the part of the PyRun family of the C API (GH-117982)

Co-authored-by: NGRsoftlab <78017794+NGRsoftlab@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
18 months agogh-117613: Argument Clinic: disallow defining class parameter at module level (#117950)
neonene [Wed, 17 Apr 2024 20:43:29 +0000 (05:43 +0900)] 
gh-117613: Argument Clinic: disallow defining class parameter at module level (#117950)

18 months agogh-114539: Clarify implicit launching of shells by subprocess (GH-117996)
Steve Dower [Wed, 17 Apr 2024 18:32:47 +0000 (19:32 +0100)] 
gh-114539: Clarify implicit launching of shells by subprocess (GH-117996)

18 months agogh-94673: Fix compiler warning in typeobject.c (#117980)
Erlend E. Aasland [Wed, 17 Apr 2024 17:56:59 +0000 (19:56 +0200)] 
gh-94673: Fix compiler warning in typeobject.c (#117980)

18 months agogh-117657: Quiet erroneous TSAN reports of data races in `_PySeqLock` (#117955)
mpage [Wed, 17 Apr 2024 17:19:28 +0000 (10:19 -0700)] 
gh-117657: Quiet erroneous TSAN reports of data races in `_PySeqLock` (#117955)

Quiet erroneous TSAN reports of data races in `_PySeqLock`

TSAN reports a couple of data races between the compare/exchange in
`_PySeqLock_LockWrite` and the non-atomic loads in `_PySeqLock_{Abandon,Unlock}Write`.
This is another instance of TSAN incorrectly modeling failed compare/exchange
as a write instead of a load.