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

18 months agogh-117657: Fix data races in the method cache in free-threaded builds (#117954)
mpage [Wed, 17 Apr 2024 16:42:56 +0000 (09:42 -0700)] 
gh-117657: Fix data races in the method cache in free-threaded builds (#117954)

Fix data races in the method cache in free-threaded builds

These are technically data races, but I think they're benign (to
the extent that that is actually possible). We update cache entries
non-atomically but read them atomically from another thread, and there's
nothing that establishes a happens-before relationship between the
reads and writes that I can see.

18 months agogh-80361: Fix TypeError in email.Message.get_payload() (GH-117994)
Serhiy Storchaka [Wed, 17 Apr 2024 16:31:26 +0000 (19:31 +0300)] 
gh-80361: Fix TypeError in email.Message.get_payload() (GH-117994)

It was raised when the charset is rfc2231 encoded, e.g.:

   Content-Type: text/plain; charset*=ansi-x3.4-1968''utf-8

18 months agogh-117680: make _PyInstructionSequence a PyObject and use it in tests (#117629)
Irit Katriel [Wed, 17 Apr 2024 15:42:04 +0000 (16:42 +0100)] 
gh-117680: make _PyInstructionSequence a PyObject and use it in tests (#117629)

18 months agoDoc: Render version/language selector on Read the Docs (#116966)
Manuel Kaufmann [Wed, 17 Apr 2024 15:40:56 +0000 (17:40 +0200)] 
Doc: Render version/language selector on Read the Docs (#116966)

18 months agogh-117977: Amend version changed annotation for os.chmod, os.chown, and os.listdir...
Nice Zombies [Wed, 17 Apr 2024 14:59:02 +0000 (16:59 +0200)] 
gh-117977: Amend version changed annotation for os.chmod, os.chown, and os.listdir (#117978)

18 months agoGH-100242: bring functools.py partial implementation more in line with C code (GH...
CF Bolz-Tereick [Wed, 17 Apr 2024 13:34:46 +0000 (15:34 +0200)] 
GH-100242: bring functools.py partial implementation more in line with C code (GH-100244)

in partial.__new__, before checking for the existence of the attribute
'func', first check whether the argument is an instance of partial.

18 months agoTest: Get the smtp test server using os.getenv() (#117979)
Diego Russo [Wed, 17 Apr 2024 13:31:48 +0000 (14:31 +0100)] 
Test: Get the smtp test server using os.getenv() (#117979)

The smtp test server can be set via CPYTHON_TEST_SMTP_SERVER environment variable.
If not set, it uses the default value smtp.gmail.com
This is needed because the network I'm on filters access to
smtp.gmail.com resulting in a failing test.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
18 months agogh-117929: Restore removed PyEval_InitThreads() function (#117931)
Victor Stinner [Wed, 17 Apr 2024 13:01:28 +0000 (15:01 +0200)] 
gh-117929: Restore removed PyEval_InitThreads() function (#117931)

18 months agogh-117975: Ensure flush level is checked when configuring a logging MemoryHandler...
Vinay Sajip [Wed, 17 Apr 2024 12:55:18 +0000 (13:55 +0100)] 
gh-117975: Ensure flush level is checked when configuring a logging MemoryHandler. (GH-117976)

18 months agogh-115009: Update macOS installer to use SQLite 3.45.3 (#117443)
Mariusz Felisiak [Wed, 17 Apr 2024 11:59:38 +0000 (13:59 +0200)] 
gh-115009: Update macOS installer to use SQLite 3.45.3 (#117443)

18 months agobpo-40944: Fix IndexError when parse emails with truncated Message-ID, address, route...
Ivan Savin [Wed, 17 Apr 2024 10:14:22 +0000 (14:14 +0400)] 
bpo-40944: Fix IndexError when parse emails with truncated Message-ID, address, routes, etc (GH-20790)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
18 months agoGH-117760: Streamline the trashcan mechanism (GH-117763)
Mark Shannon [Wed, 17 Apr 2024 10:08:05 +0000 (11:08 +0100)] 
GH-117760: Streamline the trashcan mechanism (GH-117763)

18 months agogh-65824: Add "Help on ..." to the "less" prompt in pydoc (GH-116183)
Serhiy Storchaka [Wed, 17 Apr 2024 10:05:22 +0000 (13:05 +0300)] 
gh-65824: Add "Help on ..." to the "less" prompt in pydoc (GH-116183)

18 months agogh-73231: Update documentation for PyErr_SetFromWindowsErr() (GH-117226)
Serhiy Storchaka [Wed, 17 Apr 2024 10:03:26 +0000 (13:03 +0300)] 
gh-73231: Update documentation for PyErr_SetFromWindowsErr() (GH-117226)

18 months agogh-117313: Fix re-folding email messages containing non-standard line separators...
Serhiy Storchaka [Wed, 17 Apr 2024 10:00:25 +0000 (13:00 +0300)] 
gh-117313: Fix re-folding email messages containing non-standard line separators (GH-117369)

Only treat '\n', '\r' and '\r\n' as line separators in re-folding the email
messages.  Preserve control characters '\v', '\f', '\x1c', '\x1d' and '\x1e'
and Unicode line separators '\x85', '\u2028' and '\u2029' as is.

18 months agogh-117394: Speed up os.path.ismount() on Posix (GH-117447)
Serhiy Storchaka [Wed, 17 Apr 2024 09:58:19 +0000 (12:58 +0300)] 
gh-117394: Speed up os.path.ismount() on Posix (GH-117447)

It is now 2-3 times faster if the user has permissions.

18 months agogh-117503: Fix support of non-ASCII user names in posixpath.expanduser() (GH-117504)
Serhiy Storchaka [Wed, 17 Apr 2024 09:53:40 +0000 (12:53 +0300)] 
gh-117503: Fix support of non-ASCII user names in posixpath.expanduser() (GH-117504)

They are now supported in bytes paths as well as in string paths.

18 months agogh-117907: Fix test_inspect for the build with enabled tracing references (GH-117922)
Serhiy Storchaka [Wed, 17 Apr 2024 09:50:49 +0000 (12:50 +0300)] 
gh-117907: Fix test_inspect for the build with enabled tracing references (GH-117922)

18 months agogh-117879: Fix test_httpservers for the build with profiling (GH-117932)
Serhiy Storchaka [Wed, 17 Apr 2024 09:50:07 +0000 (12:50 +0300)] 
gh-117879: Fix test_httpservers for the build with profiling (GH-117932)

18 months agogh-117845: Detect libedit hook function signature in configure (#117870)
Joshua Root [Wed, 17 Apr 2024 09:26:10 +0000 (19:26 +1000)] 
gh-117845: Detect libedit hook function signature in configure (#117870)

Older libedit versions (like Apple's) use a different type signature
for rl_startup_hook and rl_pre_input_hook. Add a configure check to
determine which signature is accepted by introducing the
Py_RL_STARTUP_HOOK_TAKES_ARGS macro in pyconfig.h.

18 months agogh-86650: Fix IndexError when parse emails with invalid Message-ID (GH-117934)
Serhiy Storchaka [Wed, 17 Apr 2024 07:44:41 +0000 (10:44 +0300)] 
gh-86650: Fix IndexError when parse emails with invalid Message-ID (GH-117934)

In particularly, one-off addresses generated by Microsoft Outlook:
https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/one-off-addresses

Co-authored-by: fsc-eriker <72394365+fsc-eriker@users.noreply.github.com>
18 months agogh-75171: Fix parsing invalid email address headers starting or ending with a dot...
tsufeki [Wed, 17 Apr 2024 07:39:15 +0000 (09:39 +0200)] 
gh-75171: Fix parsing invalid email address headers starting or ending with a dot (GH-15600)

Co-authored-by: Tim Bell <timothybell@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
18 months agogh-117923: Catch ``test_webbrowser.test_parse_args_error`` stderr output (#117924)
Kirill Podoprigora [Wed, 17 Apr 2024 07:25:05 +0000 (10:25 +0300)] 
gh-117923: Catch ``test_webbrowser.test_parse_args_error`` stderr output (#117924)

18 months agogh-71966: Move the module docstring from _pydecimal to decimal (GH-117919)
Serhiy Storchaka [Wed, 17 Apr 2024 07:18:24 +0000 (10:18 +0300)] 
gh-71966: Move the module docstring from _pydecimal to decimal (GH-117919)

Now it is set even if the C implementation is used.

Also add a one-line synopsis.

18 months agogh-117945: Fix `os.path.ismount()` documentation (#117947)
Nice Zombies [Tue, 16 Apr 2024 22:55:53 +0000 (00:55 +0200)] 
gh-117945: Fix `os.path.ismount()` documentation (#117947)

18 months agolinecache: Fix docstring location (#117948)
Jelle Zijlstra [Tue, 16 Apr 2024 22:37:18 +0000 (15:37 -0700)] 
linecache: Fix docstring location (#117948)

gh-117501 put some code before the docstring, so now it is no longer
recognized as a docstring.

18 months agogh-112844: Fix xz CPE identifier (GH-117656)
Seth Michael Larson [Tue, 16 Apr 2024 22:11:43 +0000 (17:11 -0500)] 
gh-112844: Fix xz CPE identifier (GH-117656)

18 months agogh-115009: Update Windows installer to use SQLite 3.45.3 (GH-117445)
Mariusz Felisiak [Tue, 16 Apr 2024 22:10:05 +0000 (00:10 +0200)] 
gh-115009: Update Windows installer to use SQLite 3.45.3 (GH-117445)

18 months agogh-117645: Increase WASI stack size from 512 KiB to 8 MiB (#117674)
Victor Stinner [Tue, 16 Apr 2024 21:26:54 +0000 (23:26 +0200)] 
gh-117645: Increase WASI stack size from 512 KiB to 8 MiB (#117674)

Increase also the initial memory from 10 MiB to 20 MiB.

Reenable test_dynamic on WASI build.

18 months agogh-117755: Fix mimalloc for huge allocation on s390x (#117809)
Victor Stinner [Tue, 16 Apr 2024 20:34:12 +0000 (22:34 +0200)] 
gh-117755: Fix mimalloc for huge allocation on s390x (#117809)

Fix mimalloc allocator for huge memory allocation (around
8,589,934,592 GiB) on s390x.

Abort allocation early in mimalloc if the number of slices doesn't
fit into uint32_t, to prevent a integer overflow (cast 64-bit
size_t to uint32_t).

18 months agogh-117755: Remove tests on huge memory allocations (#117938)
Victor Stinner [Tue, 16 Apr 2024 20:05:12 +0000 (22:05 +0200)] 
gh-117755: Remove tests on huge memory allocations (#117938)

Remove unreliable tests on huge memory allocations:

* Remove test_maxcontext_exact_arith() of test_decimal.
  Stefan Krah, test author, agreed on removing the test:
  https://github.com/python/cpython/issues/114331#issuecomment-1925731273
* Remove test_constructor() tests of test_io.
  Sam Gross suggests remove them:
  https://github.com/python/cpython/pull/117809#pullrequestreview-2003889558

On Linux, depending how overcommit is configured, especially on Linux
s390x, a huge memory allocation (half or more of the full address
space) can succeed, but then the process will eat the full system
swap and make the system slower and slower until the whole system
becomes unusable.

Moreover, these tests had to be skipped when Python is built with
sanitizers.

18 months agogh-117376: Make code objects use deferred reference counting (#117823)
Sam Gross [Tue, 16 Apr 2024 16:42:53 +0000 (12:42 -0400)] 
gh-117376: Make code objects use deferred reference counting (#117823)

We want code objects to use deferred reference counting in the
free-threaded build. This requires them to be tracked by the GC, so we
set `Py_TPFLAGS_HAVE_GC` in the free-threaded build, but not the default
build.

18 months agogh-112069: Make setiter_iternext to be thread-safe (gh-117935)
Donghee Na [Tue, 16 Apr 2024 16:31:42 +0000 (01:31 +0900)] 
gh-112069: Make setiter_iternext to be thread-safe (gh-117935)

18 months agoDocs: Add classes to C API return value annotations (#117926)
Hugo van Kemenade [Tue, 16 Apr 2024 15:56:15 +0000 (18:56 +0300)] 
Docs: Add classes to C API return value annotations (#117926)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
18 months agogh-117683: Fix test_free_different_thread failures with GIL disabled (#117685)
Sam Gross [Tue, 16 Apr 2024 15:55:56 +0000 (11:55 -0400)] 
gh-117683: Fix test_free_different_thread failures with GIL disabled (#117685)

18 months agogh-115178: Add Counts of UOp Pairs to pystats (GH-115181)
Jeff Glass [Tue, 16 Apr 2024 13:27:18 +0000 (08:27 -0500)] 
gh-115178: Add Counts of UOp Pairs to pystats (GH-115181)

18 months agoGH-115776: Static object are immortal, so mark them as such. (GH-117673)
Mark Shannon [Tue, 16 Apr 2024 11:51:41 +0000 (12:51 +0100)] 
GH-115776: Static object are immortal, so mark them as such. (GH-117673)

18 months agogh-117691: Add an appropriate stacklevel for PEP-706 tarfile deprecation warnings...
Alex Waygood [Tue, 16 Apr 2024 11:36:00 +0000 (12:36 +0100)] 
gh-117691: Add an appropriate stacklevel for PEP-706 tarfile deprecation warnings (GH-117872)

18 months agogh-117613: Argument Clinic: ensure that 'defining_class' params are positional-only...
neonene [Tue, 16 Apr 2024 09:52:45 +0000 (18:52 +0900)] 
gh-117613: Argument Clinic: ensure that 'defining_class' params are positional-only (#117781)

18 months agogh-102402: Fix floating point math issue by using `time.time_ns()` in `logging.LogRec...
Douglas Thor [Tue, 16 Apr 2024 09:44:57 +0000 (02:44 -0700)] 
gh-102402: Fix floating point math issue by using `time.time_ns()` in `logging.LogRecord` (GH-102412)

18 months agogh-117797: Improve `test_descr.test_not_implemented` (#117798)
Nikita Sobolev [Tue, 16 Apr 2024 09:11:57 +0000 (12:11 +0300)] 
gh-117797: Improve `test_descr.test_not_implemented` (#117798)

18 months agogh-117613: Enhance test_clinic @defining_class tests (#117896)
Victor Stinner [Tue, 16 Apr 2024 07:32:51 +0000 (09:32 +0200)] 
gh-117613: Enhance test_clinic @defining_class tests (#117896)

18 months agogh-77102: site: try utf-8 and fallback to locale encoding when reading .pth file...
Inada Naoki [Tue, 16 Apr 2024 03:56:16 +0000 (12:56 +0900)] 
gh-77102: site: try utf-8 and fallback to locale encoding when reading .pth file (#117802)

18 months agogh-76785: Fix Windows Refleak in test_interpreters (gh-117913)
Eric Snow [Tue, 16 Apr 2024 02:16:37 +0000 (20:16 -0600)] 
gh-76785: Fix Windows Refleak in test_interpreters (gh-117913)

gh-117662 introduced some refleaks, or, rather, exposed some existing refleaks.  The leaks are coming when test.support.os_helper is imported in a "legacy" interpreter.  I've updated test.test_interpreters.utils to avoid importing os_helper, which fixes the leaks.  I'll address the root cause separately.

18 months agogh-117804: Document how to suppress PGO unprofiled source warnings (#117859)
Erlend E. Aasland [Mon, 15 Apr 2024 21:17:28 +0000 (23:17 +0200)] 
gh-117804: Document how to suppress PGO unprofiled source warnings (#117859)

18 months agoDocs: add link roles with Sphinx extlinks (#117850)
Hugo van Kemenade [Mon, 15 Apr 2024 18:22:00 +0000 (21:22 +0300)] 
Docs: add link roles with Sphinx extlinks (#117850)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
18 months agogh-109975: Copyedit "What's New in Python 3.13" (#117902)
Hugo van Kemenade [Mon, 15 Apr 2024 17:20:40 +0000 (20:20 +0300)] 
gh-109975: Copyedit "What's New in Python 3.13" (#117902)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
18 months agogh-117688: Fix deadlock in test_no_stale_references with GIL disabled (#117720)
Sam Gross [Mon, 15 Apr 2024 16:54:56 +0000 (12:54 -0400)] 
gh-117688: Fix deadlock in test_no_stale_references with GIL disabled (#117720)

Check `my_object_collected.wait()` in a loop to give the main thread a
chance to merge the reference count fields. Additionally, call
`my_object_collected.set()` in a background thread to avoid deadlocking
when the destructor is called asynchronously via the eval breaker
within the body of of `my_object_collected.wait()`.

18 months agoDocs: make the `whatsnew-typing-py312` anchor point to things that were new in the...
Alex Waygood [Mon, 15 Apr 2024 16:48:13 +0000 (17:48 +0100)] 
Docs: make the `whatsnew-typing-py312` anchor point to things that were new in the typing module (#117904)

18 months agogh-117657: Quiet more TSAN warnings due to incorrect modeling of compare/exchange...
mpage [Mon, 15 Apr 2024 16:17:55 +0000 (09:17 -0700)] 
gh-117657: Quiet more TSAN warnings due to incorrect modeling of compare/exchange (#117830)

18 months agogh-117657: Quiet TSAN warning about a data race between `start_the_world()` and ...
mpage [Mon, 15 Apr 2024 16:17:33 +0000 (09:17 -0700)] 
gh-117657: Quiet TSAN warning about a data race between `start_the_world()` and `tstate_try_attach()` (#117828)

TSAN erroneously reports a data race between the `_Py_atomic_compare_exchange_int`
on `tstate->state` in `tstate_try_attach()` and the non-atomic load of
`tstate->state` in `start_the_world`. The `_Py_atomic_compare_exchange_int` fails,
but TSAN erroneously treats it as a store.

18 months agogh-117657: Add TSAN suppressions for the free-threaded build (#117736)
mpage [Mon, 15 Apr 2024 16:08:25 +0000 (09:08 -0700)] 
gh-117657: Add TSAN suppressions for the free-threaded build (#117736)

Additionally, reduce the iterations for a few weakref tests that would
otherwise take a prohibitively long amount of time (> 1 hour) when TSAN
is enabled and the GIL is disabled.

18 months agogh-115532: Minor tweaks to kde() (gh-117897)
Raymond Hettinger [Mon, 15 Apr 2024 15:08:21 +0000 (10:08 -0500)] 
gh-115532: Minor tweaks to kde() (gh-117897)

18 months agogh-115664: Reorganize versionadded directives for -X options (GH-116304)
Serhiy Storchaka [Mon, 15 Apr 2024 15:01:17 +0000 (18:01 +0300)] 
gh-115664: Reorganize versionadded directives for -X options (GH-116304)

Add the versionadded directives just under the description of the
corresponding option.

18 months agogh-112278: Improve error handling in wmi module and tests (GH-117818)
Steve Dower [Mon, 15 Apr 2024 14:43:11 +0000 (15:43 +0100)] 
gh-112278: Improve error handling in wmi module and tests (GH-117818)

18 months agogh-90329: Add _winapi.GetLongPathName and GetShortPathName and use in venv to reduce...
Steve Dower [Mon, 15 Apr 2024 14:36:06 +0000 (15:36 +0100)] 
gh-90329: Add _winapi.GetLongPathName and GetShortPathName and use in venv to reduce warnings (GH-117817)

18 months agogh-117889: Fix PGO test in test_peg_generator (#117893)
Victor Stinner [Mon, 15 Apr 2024 13:59:34 +0000 (15:59 +0200)] 
gh-117889: Fix PGO test in test_peg_generator (#117893)

Reuse support.check_cflags_pgo() in test_peg_generator to check for
PGO build.

Log PGO_PROF_USE_FLAG in test.pythoninfo.

18 months agoGH-117750: When clearing object's dict, clear inline values but leave dict attached...
Mark Shannon [Mon, 15 Apr 2024 13:45:05 +0000 (14:45 +0100)] 
GH-117750: When clearing object's dict, clear inline values but leave dict attached (GH-117808)

18 months agoAdd 'The Python 2.3 Method Resolution Order' (#116435)
Hugo van Kemenade [Mon, 15 Apr 2024 10:01:15 +0000 (13:01 +0300)] 
Add 'The Python 2.3 Method Resolution Order' (#116435)

18 months agogh-117694: Improve tests for PyEval_EvalCodeEx() (GH-117695)
Serhiy Storchaka [Mon, 15 Apr 2024 09:44:54 +0000 (12:44 +0300)] 
gh-117694: Improve tests for PyEval_EvalCodeEx() (GH-117695)

18 months agogh-117755: Skip test_io.test_constructor() on s390x (#117801)
Victor Stinner [Mon, 15 Apr 2024 08:24:47 +0000 (10:24 +0200)] 
gh-117755: Skip test_io.test_constructor() on s390x (#117801)

The test allocates 9 223 372 036 854 775 807 bytes
(0x7fffffffffffffff) and mimalloc fails with a division by zero on
s390x.

18 months agogh-117826: Remove lookdict_index from delitemif_lock_held (gh-117869)
Donghee Na [Mon, 15 Apr 2024 05:26:59 +0000 (14:26 +0900)] 
gh-117826: Remove lookdict_index from delitemif_lock_held (gh-117869)

18 months agodocs: typo in 3.13 release notes (#117866)
Galen Rice [Sun, 14 Apr 2024 21:04:59 +0000 (17:04 -0400)] 
docs: typo in 3.13 release notes (#117866)

18 months agogh-117636: Remove redundant type check in `os.path.join()` (#117638)
Nice Zombies [Sun, 14 Apr 2024 21:04:14 +0000 (23:04 +0200)] 
gh-117636: Remove redundant type check in `os.path.join()` (#117638)

18 months agoDoc: mark up classes, attributes, parameters, and methods in dataclasses.rst (#117820)
Erlend E. Aasland [Sun, 14 Apr 2024 16:29:01 +0000 (18:29 +0200)] 
Doc: mark up classes, attributes, parameters, and methods in dataclasses.rst (#117820)