]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Mon, 6 Jan 2025 23:46:16 +0000 (00:46 +0100)]
[3.12] gh-108202: Document `calendar.Calendar` methods `getfirstweekday` and `setfirstweekday` (GH-127579) (#128565)
(cherry picked from commit
953b49e5468d02afaddadc2307f4763422078603 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Mon, 6 Jan 2025 21:20:55 +0000 (22:20 +0100)]
[3.12] gh-90241: Clarify documentation for PyUnicode_FSConverter and PyUnicode_FSDecoder (GH-128451) (GH-128543)
(cherry picked from commit
657d7b77e5c69967e9c0000b986fa4872d13958c )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Mon, 6 Jan 2025 10:57:26 +0000 (11:57 +0100)]
[3.12] gh-77214: Update outdated documentation for numeric PyArg_Parse formats (GH-128454) (GH-128539)
(cherry picked from commit
8d15058d61681e98579cf3fbd3c6fd13b3df6a72 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 6 Jan 2025 10:04:57 +0000 (11:04 +0100)]
[3.12] gh-114990: Add missing mixin methods in collections.abc's document (GH-114991) (#128536)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Miss Islington (bot) [Mon, 6 Jan 2025 08:59:24 +0000 (09:59 +0100)]
[3.12] gh-128519: Align the docstring of untokenize() to match the docs (GH-128521) (#128532)
(cherry picked from commit
aef52ca8b334ff90e8032da39f4d06e7b5130eb9 )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Miss Islington (bot) [Sun, 5 Jan 2025 22:05:48 +0000 (23:05 +0100)]
[3.12] Docs: fix `MessageDefect` references in email.policy docs (GH-128468) (#128527)
(cherry picked from commit
3b231be8f000ae59faa04d5a2f1af11beafee866 )
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Jason R. Coombs [Sun, 5 Jan 2025 21:53:55 +0000 (16:53 -0500)]
[3.12] gh-123085: Fix issue in inferred caller when resources package has no source (GH-123102) (#124021)
gh-123085: Fix issue in inferred caller when resources package has no source.
From importlib_resources 6.4.3 (python/importlib_resourcesGH-314).
(cherry picked from commit
a53812df126b99bca25187441a123c7785ee82a0 )
Miss Islington (bot) [Sun, 5 Jan 2025 13:58:02 +0000 (14:58 +0100)]
[3.12] gh-128504: Upgrade doctest to ubuntu-24.04 (GH-128506) (#128518)
gh-128504: Upgrade doctest to ubuntu-24.04 (GH-128506)
(cherry picked from commit
2228e92da31ca7344a163498f848973a1b356597 )
Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
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>
Miss Islington (bot) [Sun, 5 Jan 2025 09:23:04 +0000 (10:23 +0100)]
[3.12] gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455) (gh-128513)
gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455)
Add `BOLT_COMMON_FLAGS` with `-update-debug-sections`
(cherry picked from commit
b60044b838f3ea97395cd6f3adbd5330356fc273 )
Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
Miss Islington (bot) [Sat, 4 Jan 2025 22:55:24 +0000 (23:55 +0100)]
[3.12] gh-127553: Remove outdated TODO comment in _pydatetime (GH-127564) (#128501)
(cherry picked from commit
e8b6b39ff707378da654e15ccddde9c28cefdd30 )
Co-authored-by: Beomsoo Kim <beoms424@gmail.com>
Miss Islington (bot) [Sat, 4 Jan 2025 20:54:56 +0000 (21:54 +0100)]
[3.12] gh-127954: Document PyObject_DelItemString (GH-127986) (#128497)
(cherry picked from commit
8ade15343d5daec3bf79ff7c47f03726fb2bcadf )
Co-authored-by: RUANG (James Roy) <rruuaanng@outlook.com>
Miss Islington (bot) [Sat, 4 Jan 2025 19:04:13 +0000 (20:04 +0100)]
[3.12] Docs: amend json.dump() post gh-128482 (GH-128489) (#128494)
(cherry picked from commit
87ee76062a7eb9c0fa2b94e36cfed21d86ae90ac )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Miss Islington (bot) [Sat, 4 Jan 2025 17:45:19 +0000 (18:45 +0100)]
[3.12] gh-126719: Clarify math.fmod docs (GH-127741) (#128492)
(cherry picked from commit
f28d471fbe99f9eaac05d60ed40da47b0b56fe86 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Sat, 4 Jan 2025 15:50:55 +0000 (16:50 +0100)]
[3.12] Docs: mark up json.dump() using parameter list (GH-128482) (#128487)
(cherry picked from commit
a0088b40bb212dc132e147d04f9287cabd72d163 )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Zanie Blue [Sat, 4 Jan 2025 00:47:08 +0000 (18:47 -0600)]
[3.12] gh-128354: Consistently use LIBS over LDFLAGS in library build… (#128466)
(cherry picked from commit
b75ed951d4de8ba85349d80c8e7f097b3cd6052f )
Miss Islington (bot) [Fri, 3 Jan 2025 23:49:05 +0000 (00:49 +0100)]
[3.12] gh-128456: Use '-reorder-functions=cdsort' for BOLT builds (GH-128457) (#128462)
'hfsort+' is deprecated in favor of 'cdsort'.
(cherry picked from commit
4974bbdb290b61a2d8860de490fde1228c296753 )
Co-authored-by: Zanie Blue <contact@zanie.dev>
Miss Islington (bot) [Fri, 3 Jan 2025 19:21:08 +0000 (20:21 +0100)]
[3.12] gh-127903: Fix a crash on debug builds when calling `Objects/unicodeobject::_copy_characters` (GH-127876) (#128459)
gh-127903: Fix a crash on debug builds when calling `Objects/unicodeobject::_copy_characters`` (GH-127876)
(cherry picked from commit
46cb6340d7bad955edfc0a20f6a52dabc03b0932 )
Co-authored-by: Alexander Shadchin <shadchin@yandex-team.com>
Miss Islington (bot) [Fri, 3 Jan 2025 14:13:18 +0000 (15:13 +0100)]
[3.12] gh-125674: Doc: Fix type of newfunc first parameter (GH-125675) (#128448)
(cherry picked from commit
616468b87bc5bcf5a4db688637ef748e1243db8a )
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Fri, 3 Jan 2025 10:03:38 +0000 (11:03 +0100)]
[3.12] gh-108202: Document calendar.TextCalendar formatting helpers (GH-127608) (#128441)
Document the following TextCalendar methods:
- formatday()
- formatmonthname()
- formatweekday()
- formatweekheader()
(cherry picked from commit
bb73426cafb78691b249ffa50f1872ab6f899d4a )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Serhiy Storchaka [Thu, 2 Jan 2025 16:21:00 +0000 (18:21 +0200)]
[3.12] gh-128014: Fix passing default='' to the tkinter method wm_iconbitmap() (GH-128015) (GH-128420)
(cherry picked from commit
58e9f95c4aa970db32a94b9152b51ede22f823bd )
Co-authored-by: Zhikang Yan <2951256653@qq.com>
Miss Islington (bot) [Thu, 2 Jan 2025 14:41:25 +0000 (15:41 +0100)]
[3.12] Revert "Doc: Show object descriptions in the table of contents (GH-125757)" (GH-128406) (#128414)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Thu, 2 Jan 2025 11:54:43 +0000 (12:54 +0100)]
[3.12] gh-123925: Fix building curses on platforms without libncursesw (GH-128405) (GH-128408)
(cherry picked from commit
8d16919a06a55a50756bf083221a6f6cab43de50 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 2 Jan 2025 07:30:39 +0000 (08:30 +0100)]
[3.12] gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (GH-128379) (#128402)
gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (GH-128379)
(cherry picked from commit
60c65184695a3eab766b3bc26fc99f695deb998f )
Co-authored-by: abkmystery <36216019+abkmystery@users.noreply.github.com>
Miss Islington (bot) [Tue, 31 Dec 2024 21:31:21 +0000 (22:31 +0100)]
[3.12] Reword `about.rst` to not limit Sphinx (GH-128325) (#128383)
Reword `about.rst` to not limit Sphinx (GH-128325)
(cherry picked from commit
c5438fdf4706a70bdd19338edc000dacffff6837 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Tue, 31 Dec 2024 08:19:45 +0000 (09:19 +0100)]
[3.12] gh-88834: Unify the instance check for typing.Union and types.UnionType (GH-128363) (GH-128371)
Union now uses the instance checks against its parameters instead of
the subclass checks.
(cherry picked from commit
b2ac70a62ad1be8e037ce45ccf5f1b753ea5e64b )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 30 Dec 2024 21:14:27 +0000 (22:14 +0100)]
[3.12] gh-128342: Specify timeout unit in subprocess docstrings (GH-128343) (#128366)
gh-128342: Specify timeout unit in subprocess docstrings (GH-128343)
Specify timeout unit (seconds) in subprocess docstrings
(cherry picked from commit
dafe7a44630aa32bb411cceb45c7b7df725e3fe3 )
Co-authored-by: n-l-i <57808975+n-l-i@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Mon, 30 Dec 2024 17:42:49 +0000 (18:42 +0100)]
[3.12] gh-128321: Set LIBS instead of LDFLAGS when checking sqlite3 requirements (GH-128322) (#128355)
(cherry picked from commit
81376fef76a53fb79893bfa9c9db18d97c228fbe )
Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Miss Islington (bot) [Mon, 30 Dec 2024 17:40:31 +0000 (18:40 +0100)]
[3.12] gh-128317: Document `calendar.TextCalendar.formatweek` (GH-128353) (#128358)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Sun, 29 Dec 2024 19:02:59 +0000 (20:02 +0100)]
[3.12] gh-127586: multiprocessing.Pool does not properly restore blocked signals (try 2) (GH-128011) (#128299)
gh-127586: multiprocessing.Pool does not properly restore blocked signals (try 2) (GH-128011)
Correct pthread_sigmask in resource_tracker to restore old signals
Using SIG_UNBLOCK to remove blocked "ignored signals" may accidentally
cause side effects if the calling parent already had said signals
blocked to begin with and did not intend to unblock them when
creating a pool. Use SIG_SETMASK instead with the previous mask of
blocked signals to restore the original blocked set.
(cherry picked from commit
aeb9b65aa26444529e4adc7d6e5b0d3dd9889ec2 )
Co-authored-by: Stephen Hansen <stephen.paul.hansen@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Fri, 27 Dec 2024 14:15:40 +0000 (15:15 +0100)]
[3.12] Mention loop_factory argument in docstring for asyncio.run() (GH-128288) (#128292)
Mention loop_factory argument in docstring for asyncio.run() (GH-128288)
(cherry picked from commit
0b5f1fae573a2c658eb000433ad7b87e9c40c697 )
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Shantanu [Fri, 27 Dec 2024 01:25:07 +0000 (17:25 -0800)]
[3.12] gh-127537: Add __class_getitem__ to the python implementation of functools.partial (#127537) (#128282)
gh-127537: Add __class_getitem__ to the python implementation of functools.partial (#127537)
(cherry picked from commit
401bba6b58497ce59e7b45ad33e43ae8c67abcb9 )
Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
Serhiy Storchaka [Thu, 26 Dec 2024 10:38:48 +0000 (12:38 +0200)]
[3.12] gh-128198: Add missing error checks for usages of PyIter_Next() (GH-128199) (GH-128273)
(cherry picked from commit
5c814c83cdd3dc42bd9682106ffb7ade7ce6b5b3 )
Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
Miss Islington (bot) [Tue, 24 Dec 2024 20:51:06 +0000 (21:51 +0100)]
[3.12] gh-128227: Regenerate `Doc/requirements-oldest-sphinx.txt` (GH-128228) (#128230)
gh-128227: Regenerate `Doc/requirements-oldest-sphinx.txt` (GH-128228)
(cherry picked from commit
7985d460c731b2c48419a33fc1820f9512bb6f21 )
Co-authored-by: Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Tue, 24 Dec 2024 18:56:03 +0000 (19:56 +0100)]
[3.12] gh-126664: revert: Use `else` instead of `finally` in docs explaining "with" (GH-128169) (#128171)
gh-126664: revert: Use `else` instead of `finally` in docs explaining "with" (GH-128169)
Revert "gh-126664: Use `else` instead of `finally` in "The with statement" documentation. (GH-126665)"
This reverts commit
25257d61cfccc3b4189f96390a5c4db73fd5302c .
(cherry picked from commit
228f275737615cc9be713a8c3f9325b359bf8aec )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Tue, 24 Dec 2024 16:15:45 +0000 (17:15 +0100)]
[3.12] gh-127847: Fix position in the special-cased zipfile seek (GH-127856) (#128226)
gh-127847: Fix position in the special-cased zipfile seek (GH-127856)
---------
(cherry picked from commit
7ed6c5c6961d0849f163d4d449fb36bae312b6bc )
Co-authored-by: Dima Ryazanov <dima@bucket.xxx>
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: Jason R. Coombs <jaraco@jaraco.com>
Miss Islington (bot) [Tue, 24 Dec 2024 13:25:16 +0000 (14:25 +0100)]
gh-128217: Validate the normalized_environment variable instead of the similarly named function (GH-128220)
(cherry picked from commit
3ddd70ceaaf67b111ee4251817e150396d6d10a9 )
Co-authored-by: Sergey Muraviov <smurav@mail.ru>
Miss Islington (bot) [Fri, 20 Dec 2024 20:19:12 +0000 (21:19 +0100)]
[3.12] gh-128049: Fix type confusion bug with the return value of a custom ExceptionGroup split function (GH-128079) (#128140)
gh-128049: Fix type confusion bug with the return value of a custom ExceptionGroup split function (GH-128079)
(cherry picked from commit
3879ca0100942ae15a09ac22889cbe3e46d424eb )
Co-authored-by: Nico-Posada <102486290+Nico-Posada@users.noreply.github.com>
Miss Islington (bot) [Fri, 20 Dec 2024 13:39:26 +0000 (14:39 +0100)]
[3.12] gh-128116: Skip test_socket VSOCK testStream() on PermissionError (GH-128120) (#128124)
gh-128116: Skip test_socket VSOCK testStream() on PermissionError (GH-128120)
(cherry picked from commit
cbfe3023e46b544b80ea1a38a8c900c6fb881554 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Fri, 20 Dec 2024 13:07:04 +0000 (14:07 +0100)]
[3.12] gh-128069: brew link --overwrite tcl-tk@8 to prevent conflict with GitHub image's version (GH-128090) (#128125)
gh-128069: brew link --overwrite tcl-tk@8 to prevent conflict with GitHub image's version (GH-128090)
brew link --overwrite tcl-tk@8 to prevent conflict with GitHub image's version
(cherry picked from commit
46dc1ba9c6e8b95635fa27607d01d6108d8f677e )
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Thu, 19 Dec 2024 13:52:42 +0000 (14:52 +0100)]
[3.12] gh-126742: add NEWS entry for fix of localized error messages (GH-128025) (GH-128060)
(cherry picked from commit
2610bccfdf55bc6519808f8e1b5db2cfb03ae809 )
Miss Islington (bot) [Thu, 19 Dec 2024 12:55:54 +0000 (13:55 +0100)]
[3.12] gh-122706: fix docs for asyncio ssl sockets (GH-128092) (#128093)
gh-122706: fix docs for asyncio ssl sockets (GH-128092)
(cherry picked from commit
19c5134d57764d3db7b1cacec4f090c74849a5c1 )
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miss Islington (bot) [Wed, 18 Dec 2024 08:45:34 +0000 (09:45 +0100)]
[3.12] gh-126742: Avoid checking for library filename in test_ctypes (GH-128034) (#128057)
gh-126742: Avoid checking for library filename in test_ctypes (GH-128034)
Avoid checking for library filename in `dlerror()` error messages of test_ctypes.
(cherry picked from commit
335e24fb0a5805ac1ecdbc01e0331b38fc33849d )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Bénédikt Tran [Tue, 17 Dec 2024 12:53:16 +0000 (13:53 +0100)]
[3.12] gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages (GH-126746) (GH-128027)
- Add a helper to set an error from locale-encoded `char*`
- Use the helper for gdbm & dlerror messages
Co-authored-by: Victor Stinner <vstinner@python.org>
Bénédikt Tran [Tue, 17 Dec 2024 11:53:43 +0000 (12:53 +0100)]
[3.12] gh-126554: ctypes: Correctly handle NULL dlsym values (GH-126555) (GH-127764)
For dlsym(), a return value of NULL does not necessarily indicate
an error [1].
Therefore, to avoid using stale (or NULL) dlerror() values, we must:
1. clear the previous error state by calling dlerror()
2. call dlsym()
3. call dlerror()
If the return value of dlerror() is not NULL, an error occured.
In ctypes we choose to treat a NULL return value from dlsym()
as a "not found" error. This is the same as the fallback
message we use on Windows, Cygwin or when getting/formatting
the error reason fails.
[1]: https://man7.org/linux/man-pages/man3/dlsym.3.html
Signed-off-by: Georgios Alexopoulos <grgalex42@gmail.com>
Signed-off-by: Georgios Alexopoulos <grgalex@ba.uoa.gr>
Co-authored-by: George Alexopoulos <giorgosalexo0@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Mon, 16 Dec 2024 17:18:15 +0000 (18:18 +0100)]
[3.12] Fix typo in itertools docs (gh-127995) (gh-127997)
Victor Stinner [Mon, 16 Dec 2024 17:15:17 +0000 (18:15 +0100)]
[3.12] gh-127906: Skip limited C API test_cext tests if Py_TRACE_REFS (#127993)
gh-127906: Skip limited C API test_cext tests if Py_TRACE_REFS
Skip limited C API tests in test_cext and test_cppext if Python is
configured with --with-trace-refs (if the Py_TRACE_REFS macro is
defined).
Miss Islington (bot) [Mon, 16 Dec 2024 14:43:57 +0000 (15:43 +0100)]
[3.12] gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361) (GH-127905)
gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361)
From the ERR_raise manpage:
ERR_LIB_SYS
This "library code" indicates that a system error is
being reported. In this case, the reason code given
to `ERR_raise()` and `ERR_raise_data()` *must* be
`errno(3)`.
This PR only handles ERR_LIB_SYS for the high-lever error types
SSL_ERROR_SYSCALL and SSL_ERROR_SSL, i.e., not the ones where
OpenSSL indicates it has some more information about the issue.
(cherry picked from commit
f4b31edf2d9d72878dab1f66a36913b5bcc848ec )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Sat, 14 Dec 2024 13:37:00 +0000 (14:37 +0100)]
[3.12] gh-127852: add remark about ',' separator (GH-127854) (#127942)
Specify that it is valid for floats and ints with 'd' presentation and an error otherwise.
---------
(cherry picked from commit
e2325c9db0650fc06d909eb2b5930c0573f24f71 )
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Petr Viktorin [Fri, 13 Dec 2024 15:51:55 +0000 (16:51 +0100)]
[3.12] gh-126937: ctypes: add test for maximum size of a struct field (GH-126938) (GH-127825) (GH-127909)
This backports the *test* from GH-126938, with changed limit and exception class.
Co-authored-by: Melissa0x1f992 <70096546+Melissa0x1f992@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry-picked from
d51c1444e36e2cfdb33087f165819a7cd6774a9e )
Miss Islington (bot) [Fri, 13 Dec 2024 14:14:20 +0000 (15:14 +0100)]
[3.12] gh-127906: Test the limited C API in test_cppext (GH-127916) (#127920)
gh-127906: Test the limited C API in test_cppext (GH-127916)
(cherry picked from commit
d05a4e6a0d366b854a3103cae0c941811fd48c4c )
Co-authored-by: Victor Stinner <vstinner@python.org>
Victor Stinner [Fri, 13 Dec 2024 13:48:32 +0000 (14:48 +0100)]
[3.12] gh-127906: Backport test_cext from the main branch (#127912)
Victor Stinner [Fri, 13 Dec 2024 13:21:30 +0000 (14:21 +0100)]
[3.12] gh-127870: Detect recursive calls in ctypes _as_parameter_ handling (#127872) (#127918)
gh-127870: Detect recursive calls in ctypes _as_parameter_ handling (#127872)
(cherry picked from commit
6ff38fc4e2af8e795dc791be6ea596d2146d4119 )
Victor Stinner [Fri, 13 Dec 2024 12:51:06 +0000 (13:51 +0100)]
[3.12] gh-127906: Backport test_cppext changes from the main branch (#127915)
Victor Stinner [Fri, 13 Dec 2024 12:13:49 +0000 (13:13 +0100)]
[3.12] gh-127906: Declare timeval struct in pytime.h on Windows (#127908)
gh-127906: Declare timeval struct in pytime.h on Windows
Fix the following MSVC compiler warning:
include\cpython\pytime.h(192): warning C4115: 'timeval':
named type definition in parentheses
Miss Islington (bot) [Fri, 13 Dec 2024 11:58:47 +0000 (12:58 +0100)]
[3.12] gh-107249: Implement Py_UNUSED() for MSVC (GH-107250) (#127907)
gh-107249: Implement Py_UNUSED() for MSVC (GH-107250)
Fix warnings C4100 in Py_UNUSED() when Python is built with "cl /W4".
Example with this function included by Python.h:
static inline unsigned int
PyUnicode_IS_READY(PyObject* Py_UNUSED(op))
{ return 1; }
Without this change, building a C program with "cl /W4" which just
includes Python.h emits the warning:
Include\cpython/unicodeobject.h(199):
warning C4100: '_unused_op': unreferenced formal parameter
This change fix this warning.
(cherry picked from commit
6a43cce32b66e0f66992119dd82959069b6f324a )
Co-authored-by: Victor Stinner <vstinner@python.org>
Dmitry Shachnev [Fri, 13 Dec 2024 11:18:28 +0000 (14:18 +0300)]
[3.12] gh-127902: Make sure `extern "C"` is closed when using Py_LIMITED_API (#127904)
Fixes #127902.
Miss Islington (bot) [Fri, 13 Dec 2024 09:38:19 +0000 (10:38 +0100)]
[3.12] Document PyObject_SelfIter (GH-127861) (#127899)
Document PyObject_SelfIter (GH-127861)
(cherry picked from commit
58942a07df8811afba9c58dc16c1aab244ccf27a )
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Miss Islington (bot) [Fri, 13 Dec 2024 09:37:59 +0000 (10:37 +0100)]
[3.12] link to the correct output method in documentation (GH-127857) (#127901)
link to the correct output method in documentation (GH-127857)
(cherry picked from commit
11ff3286b7e821bf439bc7caa0fa712e3bc3846a )
Co-authored-by: Viktor Kálmán <kviktor@users.noreply.github.com>
Miss Islington (bot) [Thu, 12 Dec 2024 21:54:23 +0000 (22:54 +0100)]
[3.12] Fix typo in traceback docs (GH-127884) (#127891)
Co-authored-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com>
Miss Islington (bot) [Thu, 12 Dec 2024 20:45:20 +0000 (21:45 +0100)]
[3.12] Fix typos in `Lib/_pydecimal.py` (GH-127700) (#127888)
Fix typos in `Lib/_pydecimal.py` (GH-127700)
(cherry picked from commit
ed037d229f64db90aea00f397e9ce1b2f4a22d3f )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Thu, 12 Dec 2024 11:50:51 +0000 (12:50 +0100)]
[3.12] gh-127563: use `dk_log2_index_bytes=3` in empty dicts (GH-127568) (GH-127813)
This fixes a UBSan failure (unaligned zero-size memcpy) in `dictobject.c`.
(cherry picked from commit
9af96f440618304e7cc609c246e1f8c8b2d7a119 )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Wed, 11 Dec 2024 15:34:22 +0000 (16:34 +0100)]
[3.12] gh-123401: Fix http.cookies module to support obsolete RFC 850 date format (GH-123405) (#127829)
gh-123401: Fix http.cookies module to support obsolete RFC 850 date format (GH-123405)
(cherry picked from commit
359389ed51aecc107681e600b71852c0a97304e1 )
Co-authored-by: Nano <nanoapezlk@gmail.com>
Co-authored-by: Wulian <1055917385@qq.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Victor Stinner [Wed, 11 Dec 2024 13:08:23 +0000 (14:08 +0100)]
[3.12] Add `extern "C"` around `PyTraceMalloc_` functions. (#127772) (#127817)
Add `extern "C"` around `PyTraceMalloc_` functions. (#127772)
Pretty much everything else exported by Python.h has an extern "C"
annotation, yet this header appears to be missing one.
(cherry picked from commit
2cdeb61b57e638ae46a04386330a12abe9cddf2c )
Co-authored-by: Peter Hawkins <hawkinsp@cs.stanford.edu>
Miss Islington (bot) [Wed, 11 Dec 2024 11:21:07 +0000 (12:21 +0100)]
[3.12] GH-117195: Avoid assertion error in `object.__sizeof__` (GH-117220) (#127605)
GH-117195: Avoid assertion error in `object.__sizeof__` (GH-117220)
(cherry picked from commit
406ffb5293a8c9ca315bf63de1ee36a9b33f9aaf )
Co-authored-by: Mark Shannon <mark@hotpy.org>
Nice Zombies [Wed, 11 Dec 2024 09:09:34 +0000 (10:09 +0100)]
[3.12] gh-111609: `end_offset` is ignored in subclasses of SyntaxError (#127554)
* `end_offset` is ignored in subclasses of SyntaxError
* 📜🤖 Added by blurb_it.
* Add test
---------
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Hugo van Kemenade [Wed, 11 Dec 2024 06:58:37 +0000 (08:58 +0200)]
[3.12] Update the documentation howto index page and group docs into 3 logical sections (GH-119366) (#127811)
(cherry picked from commit
a26d27e7ee512cd822b7a7ba075171152779ffdd )
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Miss Islington (bot) [Tue, 10 Dec 2024 17:44:45 +0000 (18:44 +0100)]
[3.12] Docs: Fix indents in `xmlrpc.client.rst` (GH-127782) (#127800)
Docs: Fix indents in `xmlrpc.client.rst` (GH-127782)
(cherry picked from commit
035f512046337e64a018d11fdaa3b21758625291 )
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Hugo van Kemenade [Tue, 10 Dec 2024 14:57:27 +0000 (16:57 +0200)]
[3.12] Add zizmor to pre-commit and fix most findings (GH-127749) (#127788)
(cherry picked from commit
ae31df354d02e12bf656954c5c72380d96c1dc0e )
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Hugo van Kemenade [Tue, 10 Dec 2024 13:55:00 +0000 (15:55 +0200)]
[3.12] Add zizmor to pre-commit and fix most findings (GH-127749) (#127788)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Miss Islington (bot) [Tue, 10 Dec 2024 10:52:22 +0000 (11:52 +0100)]
[3.12] gh-101100: Fix sphinx warnings in `whatsnew/3.0.rst` (GH-127662) (#127784)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Tue, 10 Dec 2024 08:20:54 +0000 (09:20 +0100)]
[3.12] gh-127552: Remove comment questioning 4-digit restriction for ‘Y’ in datetime.strptime patterns (GH-127590) (#127649)
gh-127552: Remove comment questioning 4-digit restriction for ‘Y’ in datetime.strptime patterns (GH-127590)
The code has required 4 digits for the year since its inclusion in the stdlib in 2002 (over 22 years ago as of this commit).
(cherry picked from commit
51cfa569e379f84b3418db0971a71b1ef575a42b )
Co-authored-by: Beomsoo Kim <beoms424@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Tue, 10 Dec 2024 08:02:22 +0000 (09:02 +0100)]
[3.12] gh-126775: make linecache.checkcache threadsafe and GC re-entrency safe (GH-126776) (#127779)
gh-126775: make linecache.checkcache threadsafe and GC re-entrency safe (GH-126776)
(cherry picked from commit
2233c303e476496fc4c85a29a1429a7e4b1f707b )
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bartosz Sławecki <bartoszpiotrslawecki@gmail.com>
Miss Islington (bot) [Mon, 9 Dec 2024 12:42:37 +0000 (13:42 +0100)]
gh-127732: Add Windows Server 2025 detection to platform module (GH-127733)
(cherry picked from commit
5eb7fd4d0fc37b91058086181afebec41e66e5ad )
Co-authored-by: Wulian <1055917385@qq.com>
Miss Islington (bot) [Sun, 8 Dec 2024 20:16:03 +0000 (21:16 +0100)]
[3.12] gh-127734: improve signature of `urllib.request.HTTPPasswordMgrWithPriorAuth.__init__` (GH-127735) (#127745)
gh-127734: improve signature of `urllib.request.HTTPPasswordMgrWithPriorAuth.__init__` (GH-127735)
improve signature of urllib.request.HTTPPasswordMgrWithPriorAuth.__init__
(cherry picked from commit
a03efb533a58fd13fb0cc7f4a5c02c8406a407bd )
Co-authored-by: Stephen Morton <git@tungol.org>
Miss Islington (bot) [Sat, 7 Dec 2024 16:33:04 +0000 (17:33 +0100)]
[3.12] Give `poplib.POP3.rpop` a proper docstring (GH-127370) (#127722)
Give `poplib.POP3.rpop` a proper docstring (GH-127370)
Previously `poplib.POP3.rpop` had a "Not sure what this does" docstring, now it has been fixed.
(cherry picked from commit
27d0d2141319d82709eb09ba20065df3e1714fab )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Fri, 6 Dec 2024 14:19:52 +0000 (15:19 +0100)]
[3.12] gh-101100: amend references starting with `!~` in gh-127054 (GH-127684) (#127693)
gh-101100: amend references starting with `!~` in gh-127054 (GH-127684)
(cherry picked from commit
77a61c0465c27c1c4ba7cddf4638d9ed75259671 )
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Miss Islington (bot) [Fri, 6 Dec 2024 05:12:40 +0000 (06:12 +0100)]
[3.12] gh-127655: Ensure `_SelectorSocketTransport.writelines` pauses the protocol if needed (GH-127656) (#127664)
gh-127655: Ensure `_SelectorSocketTransport.writelines` pauses the protocol if needed (GH-127656)
Ensure `_SelectorSocketTransport.writelines` pauses the protocol if it reaches the high water mark as needed.
(cherry picked from commit
e991ac8f2037d78140e417cc9a9486223eb3e786 )
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miss Islington (bot) [Thu, 5 Dec 2024 21:01:23 +0000 (22:01 +0100)]
[3.12] [Docs] GDB howto: Fix block type of a cast example (GH-127621) (#127654)
[Docs] GDB howto: Fix block type of a cast example (GH-127621)
(cherry picked from commit
657d0e99aa8754372786120d6ec00c9d9970e775 )
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
Miss Islington (bot) [Thu, 5 Dec 2024 19:01:25 +0000 (20:01 +0100)]
[3.12] GH-126727: Fix test_era_nl_langinfo with Japanese ERAs on Solaris (GH-127327) (GH-127646)
(cherry picked from commit
d958d9f4a1b71c6d30960bf6c53c41046ea94590 )
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
Miss Islington (bot) [Thu, 5 Dec 2024 17:15:30 +0000 (18:15 +0100)]
[3.12] gh-122431: Disallow negative values in `readline.append_history_file` (GH-122469) (#127642)
gh-122431: Disallow negative values in `readline.append_history_file` (GH-122469)
(cherry picked from commit
208b0fb645c0e14b0826c0014e74a0b70c58c9d6 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Victor Stinner [Thu, 5 Dec 2024 09:59:53 +0000 (10:59 +0100)]
[3.12] gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (#127593) (#127631)
gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (#127593)
(cherry picked from commit
fcbe6ecdb6ed4dd93b2ee144f89a73af755e2634 )
Miss Islington (bot) [Wed, 4 Dec 2024 08:29:10 +0000 (09:29 +0100)]
[3.12] gh-127347: Document `traceback.print_list` (GH-127348) (#127570)
Add an documentation entry about `traceback.print_list`
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Thomas Wouters [Tue, 3 Dec 2024 21:35:54 +0000 (22:35 +0100)]
Post 3.12.8
Thomas Wouters [Tue, 3 Dec 2024 18:40:02 +0000 (19:40 +0100)]
Python 3.12.8
Miss Islington (bot) [Tue, 3 Dec 2024 17:26:25 +0000 (18:26 +0100)]
[3.12] gh-116510: Fix a Crash Due to Shared Immortal Interned Strings (gh-125205)
Fix a crash caused by immortal interned strings being shared between
sub-interpreters that use basic single-phase init. In that case, the string
can be used by an interpreter that outlives the interpreter that created and
interned it. For interpreters that share obmalloc state, also share the
interned dict with the main interpreter.
This is an un-revert of gh-124646 that then addresses the Py_TRACE_REFS
failures identified by gh-124785 (i.e. backporting gh-125709 too).
(cherry picked from commit
f2cb39947093feda3ff85b8dc820922cc5e5f954 , AKA gh-124865)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Miss Islington (bot) [Tue, 3 Dec 2024 14:12:59 +0000 (15:12 +0100)]
[3.12] gh-126876: Fix socket internal_select() for large timeout (GH-126968) (#127003)
gh-126876: Fix socket internal_select() for large timeout (GH-126968)
If the timeout is larger than INT_MAX, replace it with INT_MAX, in
the poll() code path.
Add an unit test.
(cherry picked from commit
b3687ad454c4ac54c8599a10f3ace8a13ca48915 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Tue, 3 Dec 2024 12:57:58 +0000 (13:57 +0100)]
[3.12] gh-127253: Note that Stable ABI is about ABI stability (GH-127254) (GH-127558)
(cherry picked from commit
35d37d6592d1be71ea76042165f6cbfa6c4c3a17 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Mon, 2 Dec 2024 20:03:44 +0000 (21:03 +0100)]
gh-119826: Improved fallback for ntpath.abspath() on Windows (GH-119938)
(cherry picked from commit
4b00aba42e4d9440d22e399ec2122fe8601bbe54 )
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Miss Islington (bot) [Mon, 2 Dec 2024 19:47:42 +0000 (20:47 +0100)]
[3.12] gh-113841: fix possible undefined division by 0 in _Py_c_pow() (GH-127211) (GH-127216) (GH-127530)
[3.13] gh-113841: fix possible undefined division by 0 in _Py_c_pow() (GH-127211) (GH-127216)
Note, that transformed expression is not an equivalent for original one (1/exp(-x) != exp(x) in general for floating-point numbers). Though, the difference seems to be ~1ULP for good libm implementations.
It's more interesting why division was used from beginning. Closest algorithm I've found (no error checks, of course;)) - it's Algorithm 190 from ACM: https://dl.acm.org/doi/10.1145/366663.366679. It uses subtraction in the exponent.
(cherry picked from commit
f7bb658124aba74be4c13f498bf46cfded710ef9 )
(cherry picked from commit
f41d8d89e79d634895868656f50a0e16e339f9d6 )
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Sergey B Kirpichev [Mon, 2 Dec 2024 14:19:59 +0000 (17:19 +0300)]
[3.12] gh-126618: fix repr(itertools.count(sys.maxsize)) (GH-127048) (#127510)
(cherry picked from commit
930ba0ce605eee9e3b992fa368b00a3f2b7dc4c1 )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Mon, 2 Dec 2024 14:18:53 +0000 (15:18 +0100)]
[3.12] gh-126699: allow AsyncIterator to be used as a base for Protocols (GH-126702) (#126761)
gh-126699: allow AsyncIterator to be used as a base for Protocols (GH-126702)
(cherry picked from commit
feb3e0b19cb03f06364a3f5e970f0861b8883d1c )
Co-authored-by: Stephen Morton <github@tungol.org>
Miss Islington (bot) [Mon, 2 Dec 2024 14:01:46 +0000 (15:01 +0100)]
[3.12] gh-101100: Fix Sphinx warnings about list methods (GH-127054) (#127512)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Miss Islington (bot) [Mon, 2 Dec 2024 13:57:51 +0000 (14:57 +0100)]
[3.12] add missing gc_collect() calls in sqlite3 tests (GH-127446) (#127501)
add missing gc_collect() calls in sqlite3 tests (GH-127446)
(cherry picked from commit
2a373da7700cf928e0a5ce3998d19351a3565df4 )
Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
Carol Willing [Mon, 2 Dec 2024 13:55:31 +0000 (05:55 -0800)]
[3.12] Docs: Miscellaneous corrections to simple statements in the language reference (GH-126720) (#126891)
* Replace: The :keyword:`global` -> The :keyword:`global` statement
Add :keyword: when it's needed
* Replace repeated links with duoble backticks
(cherry picked from commit
94a7a4e22fb8f567090514785c69e65298acca42 )
Co-authored-by: Beomsoo Kim <beoms424@gmail.com>
Miss Islington (bot) [Mon, 2 Dec 2024 13:52:49 +0000 (14:52 +0100)]
[3.12] gh-99880: document rounding mode for new-style formatting (GH-121481) (#126335)
The CPython uses _Py_dg_dtoa(), which does rounding to nearest with half
to even tie-breaking rule.
If that functions is unavailable, PyOS_double_to_string() fallbacks to
system snprintf(). Since CPython 3.12, build requirements include C11
compiler *and* support for IEEE 754 floating point numbers (Annex F).
This means that FE_TONEAREST macro is available and, per default,
printf-like functions should use same rounding mode as _Py_dg_dtoa().
(cherry picked from commit
7d7d56d8b1147a6b85e1c09d01b164df7c5c4942 )
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Bénédikt Tran [Mon, 2 Dec 2024 12:24:26 +0000 (13:24 +0100)]
[3.12] Fix Unicode encode_wstr_utf8() (#127420) (#127504)
Fix Unicode encode_wstr_utf8() (#127420)
Raise RuntimeError instead of RuntimeWarning.
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 2 Dec 2024 08:29:34 +0000 (09:29 +0100)]
[3.12] gh-127443: Fix some entries in `Doc/data/refcounts.dat` (GH-127451) (#127497)
gh-127443: Fix some entries in `Doc/data/refcounts.dat` (GH-127451)
Fix incorrect entries in `Doc/data/refcounts.dat`
(cherry picked from commit
1f8267b85dda655282922ba20df90d0ac6bea634 )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Sun, 1 Dec 2024 09:24:18 +0000 (10:24 +0100)]
[3.12] gh-127356: Fix prepend doctrees directory for gettext target (GH-127357) (#127471)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Yuki Kobayashi [Sun, 1 Dec 2024 08:51:46 +0000 (17:51 +0900)]
[3.12] Docs: Fix incorrect indents in `c-api/type.rst` (GH-127449) (#127461)
(cherry picked from commit
33ce8dcf791721fea563715f681dc1593a35b83b )
Miss Islington (bot) [Sun, 1 Dec 2024 07:50:33 +0000 (08:50 +0100)]
[3.12] Add the missing `f` on an f-string error message in multiprocessing. (GH-127462) (#127465)
Add the missing `f` on an f-string error message in multiprocessing. (GH-127462)
(cherry picked from commit
11c01092d5fa8f02c867a7f1f3c135ce63db4838 )
Co-authored-by: Gregory P. Smith <greg@krypto.org>