]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Hugo van Kemenade [Sat, 27 Jul 2024 11:42:51 +0000 (14:42 +0300)]
[3.12] gh-122085: Use include files for `whatsnew/3.14.rst` deprecations (GH-122242) (#122351)
Miss Islington (bot) [Sat, 27 Jul 2024 10:48:14 +0000 (12:48 +0200)]
[3.12] gh-122170: Handle ValueError raised by os.stat() in linecache (GH-122176) (GH-122349)
(cherry picked from commit
7a6d4ccf0ec16e09f0d8b21c5a0c591e5e3e45f7 )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sviatoslav Sydorenko (Святослав Сидоренко) [Sat, 27 Jul 2024 09:19:59 +0000 (11:19 +0200)]
[3.12] Move macOS matrix to the calling workflow (GH-121809) (#122330)
Miss Islington (bot) [Sat, 27 Jul 2024 07:06:40 +0000 (09:06 +0200)]
[3.12] gh-122332: Fix missing `NULL` check in `asyncio.Task.get_coro` (GH-122338) (#122345)
gh-122332: Fix missing `NULL` check in `asyncio.Task.get_coro` (GH-122338)
(cherry picked from commit
c08696286f52d286674f264eecf7b33a335a890b )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Fri, 26 Jul 2024 22:10:01 +0000 (00:10 +0200)]
[3.12] Document ``mimetypes.MimeTypes.add_type()`` (GH-122301) (#122329)
Document ``mimetypes.MimeTypes.add_type()`` (GH-122301)
(cherry picked from commit
d52726ccd456833ea9f09cabb4b8aef09755e472 )
Co-authored-by: Subrahmanya Gaonkar <148525245+negativenagesh@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Fri, 26 Jul 2024 15:09:52 +0000 (17:09 +0200)]
[3.12] gh-122311: Fix typo in the pickle error formatting code (GH-122312) (GH-122315)
(cherry picked from commit
7c2921844f9fa713f93152bf3a569812cee347a0 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 25 Jul 2024 12:15:22 +0000 (14:15 +0200)]
[3.12] gh-121913: Use str(exc) instead of exc.strerror in `asyncio.base_events` (GH-122269) (#122279)
gh-121913: Use str(exc) instead of exc.strerror in `asyncio.base_events` (GH-122269)
(cherry picked from commit
070f1e2e5b9b31ee3e7a1af2e30d7e3a66040b17 )
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Miss Islington (bot) [Thu, 25 Jul 2024 11:22:42 +0000 (13:22 +0200)]
[3.12] gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271) (GH-122276)
(cherry picked from commit
6c09b8de5c67406113e8d082e05c9587e35a852a )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 25 Jul 2024 10:44:25 +0000 (12:44 +0200)]
[3.12] gh-82951: Fix serializing by name in pickle protocols < 4 (GH-122149) (GH-122265)
Serializing objects with complex __qualname__ (such as unbound methods and
nested classes) by name no longer involves serializing parent objects by value
in pickle protocols < 4.
(cherry picked from commit
dc07f65a53baf60d9857186294d3d7ba92d5606d )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Serhiy Storchaka [Thu, 25 Jul 2024 07:18:57 +0000 (10:18 +0300)]
[3.12] gh-122191: Fix test_warnings failure if run with -Werror (GH-122222) (GH-122257)
__spec__.loader is now required in the module globals (see gh-86298).
(cherry picked from commit
9b4fe9b718f27352ba0c1cf1184f5b90d77d7df4 )
Eric Snow [Wed, 24 Jul 2024 19:07:32 +0000 (13:07 -0600)]
[3.12] gh-117482: Simplify the Fix For Builtin Types Slot Wrappers (gh-122241)
In gh-121602, I applied a fix to a builtin types initialization bug.
That fix made sense in the context of some broader future changes,
but introduced a little bit of extra complexity. For earlier versions
those future changes are not relevant; we can avoid the extra complexity.
Thus we can revert that earlier change and replace it with this one,
which is more focused and conceptually simpler. This is essentially
the implementation of an idea that @markshannon pointed out to me.
Note that this change would be much smaller if we didn't have to deal
with repr compatibility for builtin types that explicitly inherit tp slots
(see expect_manually_inherited()). The alternative is to stop
*explicitly* inheriting tp slots in static PyTypeObject values,
which is churn that we can do separately.
(cherry picked from commit
716c6771fcfd3be90bba9f888a579b36c02cdb13 , AKA gh-121932)
Hugo van Kemenade [Wed, 24 Jul 2024 16:41:57 +0000 (19:41 +0300)]
[3.12] gh-122085: Use include files for `whatsnew/3.12.rst` deprecations (GH-122093) (#122224)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Sviatoslav Sydorenko (Святослав Сидоренко) [Wed, 24 Jul 2024 13:46:52 +0000 (15:46 +0200)]
[3.12] Integrate `build_msi` into main CI workflow (GH-121778) (#122231)
(cherry picked from commit
af4329e7b1a25d58bb92f79480f5059c3683517b )
Miss Islington (bot) [Wed, 24 Jul 2024 06:34:05 +0000 (08:34 +0200)]
[3.12] GH-120754: Add more tests around seek + readall (GH-122103) (#122216)
GH-120754: Add more tests around seek + readall (GH-122103)
In the process of speeding up readall, A number of related tests
(ex. large file tests in test_zipfile) found problems with the
change I was making. This adds I/O tests to specifically test these
cases to help ensure they don't regress and hopefully make debugging
easier.
This is part of the improvements from
https://github.com/python/cpython/pull/121593GH-issuecomment-
2222261986
(cherry picked from commit
9eb734111be90399fb6ae2f717d736abb8e518cb )
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Miss Islington (bot) [Tue, 23 Jul 2024 22:44:43 +0000 (00:44 +0200)]
[3.12] gh-122029: Log call events in sys.setprofile when it's a method with c function (GH-122072) (GH-122206)
gh-122029: Log call events in sys.setprofile when it's a method with c function (GH-122072)
Log call events in sys.setprofile when it is a method with a C function.
(cherry picked from commit
e91ef13861e88c27aed51a24e58d1dcc855a01dc )
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Eric Snow [Tue, 23 Jul 2024 21:17:51 +0000 (15:17 -0600)]
[3.12] gh-117482: Expand Tests for Slot Wrappers of Inherited Slots of Static Builtin Types (gh-122197)
(cherry picked from commit
33d32faa580fb776cb660e9cc8aa7e45c6c68c08 , AKA gh-122192)
Miss Islington (bot) [Tue, 23 Jul 2024 13:14:50 +0000 (15:14 +0200)]
[3.12] Docs: Use cross-reference to `os.uname` in `sysconfig.get_platform` (GH-122083) (#122172)
Docs: Use cross-reference to `os.uname` in `sysconfig.get_platform` (GH-122083)
(cherry picked from commit
498cb6dff10f97fa3d348a4c0ad9374d14af3312 )
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Miss Islington (bot) [Tue, 23 Jul 2024 12:38:43 +0000 (14:38 +0200)]
[3.12] GH-121970: Remove ``escape4chm`` (GH-122065) (#122168)
GH-121970: Remove ``escape4chm`` (GH-122065)
(cherry picked from commit
53e9e7de6359845f118431c05e2f14a96e03b757 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Serhiy Storchaka [Tue, 23 Jul 2024 07:22:18 +0000 (10:22 +0300)]
[3.12] Refactor test_capi.test_long (GH-122113) (GH-122151)
Share common code for tests for PyLong_As*() functions.
(cherry picked from commit
69f2dc5c06e62b4a9eb4da8f0cd456cc09b998ed )
Co-authored-by: Victor Stinner <vstinner@python.org>
Sviatoslav Sydorenko (Святослав Сидоренко) [Mon, 22 Jul 2024 14:05:41 +0000 (16:05 +0200)]
[3.12] Merge Ubuntu test matrices in CI (GH-121813) (#122116)
Łukasz Langa [Mon, 22 Jul 2024 11:41:23 +0000 (13:41 +0200)]
[3.12] gh-121957: Emit audit events for python -i and python -m asyncio (GH-122117)
Sviatoslav Sydorenko (Святослав Сидоренко) [Mon, 22 Jul 2024 11:40:10 +0000 (13:40 +0200)]
[3.12] Generalize reusable Windows CI jobs (#121766) (#121776)
Jakub Kulík [Mon, 22 Jul 2024 07:45:17 +0000 (09:45 +0200)]
[3.12] gh-118124: fix assert related C++ checks on Solaris/Illumos (GH-121974) (#122109)
Fix check for static_assert() for C++ on some platforms..
(cherry picked from commit
e88bd96d0d6cf8218c4fca37e1d20399ae676a04 )
Russell Keith-Magee [Mon, 22 Jul 2024 01:39:48 +0000 (11:39 +1000)]
[3.12] Docs: spelling and grammar fixes (GH-122084) (#122107)
(cherry picked from commit
bc264eac3ad14dab748e33b3d714c2674872791f )
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Sun, 21 Jul 2024 06:24:56 +0000 (08:24 +0200)]
[3.12] Delete stale note about mp.Lock.acquire/SIGINT (GH-120929) (GH-122079)
Delete stale note about mp.Lock.acquire/SIGINT (GH-120929)
(cherry picked from commit
0dcbc8385322ff51f7fc3e586027d880275df4fa )
Co-authored-by: Andrey Mishchenko <mishchea@gmail.com>
Miss Islington (bot) [Sun, 21 Jul 2024 06:00:20 +0000 (08:00 +0200)]
[3.12] gh-121977: Add tips for handling unhashable data (GH-122075) (#122077)
gh-121977: Add tips for handling unhashable data (GH-122075)
(cherry picked from commit
ebc18abbf34ff248764bda1a02db7f1c783b71e3 )
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Pablo Galindo Salgado [Sat, 20 Jul 2024 23:03:10 +0000 (01:03 +0200)]
[3.12] gh-122026: Fix identification of mismatched parentheses inside f-strings (GH-122028) (#122062)
(cherry picked from commit
2009e25e26040dca32696e70f91f13665350e7fd )
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Miss Islington (bot) [Sat, 20 Jul 2024 19:54:57 +0000 (21:54 +0200)]
[3.12] Docs: Fix duplicate object description warnings (GH-122068) (#122070)
Docs: Fix duplicate object description warnings (GH-122068)
(cherry picked from commit
8db5f480072421bb065d346c3bbc5e88fc368587 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Pablo Galindo Salgado [Sat, 20 Jul 2024 17:05:01 +0000 (19:05 +0200)]
[3.12] gh-121130: Fix f-string format specifiers with debug expressions (GH-121150) (#122063)
Miss Islington (bot) [Sat, 20 Jul 2024 13:51:32 +0000 (15:51 +0200)]
[3.12] GH-121970: Modernise the patchlevel extension (GH-121995) (#122061)
GH-121970: Modernise the patchlevel extension (GH-121995)
(cherry picked from commit
b7ad711fcb37dd001e6bf8466c9503eef6d20331 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Fri, 19 Jul 2024 17:22:07 +0000 (19:22 +0200)]
[3.12] gh-120930: Remove extra blank occuring in wrapped encoded words in email headers (GH-121747) (GH-121964)
gh-120930: Remove extra blank occuring in wrapped encoded words in email headers (GH-121747)
(cherry picked from commit
cecaceea31f32f01b5617989e3dc8b2077f53f89 )
Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
Miss Islington (bot) [Fri, 19 Jul 2024 14:36:26 +0000 (16:36 +0200)]
[3.12] gh-59022: Added tests for `pkgutil.extend_path` (GH-121673) (GH-121950)
This adds tests for the documented behaviour of `pkgutil.extend_path`
regarding different argument types as well as for `*.pkg` files.
(cherry picked from commit
8f2532168b4630e413a42ccb5e458708808702ea )
Co-authored-by: Andreas Stocker <andreas@stocker.co.it>
Petr Viktorin [Fri, 19 Jul 2024 14:13:34 +0000 (16:13 +0200)]
[3.12] gh-121160: Note that readline libraries using different history formats. (GH-121327) (GH-122031)
This is not something we can do too much about, without help from the
underlying libraries.
(cherry picked from commit
709db44255eb5d73fc22a1341dd0253e71ddfda9 )
Adam Turner [Fri, 19 Jul 2024 12:48:50 +0000 (13:48 +0100)]
[3.12] GH-121970: Rewrite the C-API annotations extension (GH-121985) (#122025)
(cherry picked from commit
22c9d9c1fcc3bb6186524330b169eda6df450f1b )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Adam Turner [Fri, 19 Jul 2024 12:26:32 +0000 (13:26 +0100)]
[3.12] GH-121970: Use Ruff to check and format the docs tools (GH-122018) (#122024)
(cherry picked from commit
40855f3ab80ced9950c725b710f507c0e903b70a )
Co-authored-by: Alex Waygood <Alex.Waygood@gmail.com>
Miss Islington (bot) [Fri, 19 Jul 2024 12:02:42 +0000 (14:02 +0200)]
[3.12] GH-121970: Combine custom Pygments lexers into a package (GH-121976) (#122022)
GH-121970: Combine custom Pygments lexers into a package (GH-121976)
(cherry picked from commit
7431c3799efbd06ed03ee70b64420f45e83b3667 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Fri, 19 Jul 2024 11:50:51 +0000 (13:50 +0200)]
[3.12] gh-121657: Additional `yield from` error test using lambda (GH-121722) (GH-121962)
(cherry picked from commit
1056f2bc208bdfe562c79d2a5098723c50ae9c23 )
Co-authored-by: Gregor <36135323+gege-hoho@users.noreply.github.com>
Miss Islington (bot) [Fri, 19 Jul 2024 10:46:37 +0000 (12:46 +0200)]
[3.12] GH-121970: Make ``DeprecatedRemoved`` a subclass of ``VersionChange`` (GH-121971) (#122020)
GH-121970: Make ``DeprecatedRemoved`` a subclass of ``VersionChange`` (GH-121971)
(cherry picked from commit
898e90c3bef77174f22193b114483b9cd196921a )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Fri, 19 Jul 2024 09:23:47 +0000 (11:23 +0200)]
[3.12] GH-121970: Improve the glossary preview in HTML search (GH-121991) (#122016)
GH-121970: Improve the glossary preview in HTML search (GH-121991)
(cherry picked from commit
adf0b94d1cdd74340c8bc031f7464d0a33200f08 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Serhiy Storchaka [Fri, 19 Jul 2024 09:08:33 +0000 (12:08 +0300)]
[3.12] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122013)
(cherry picked from commit
1a0c7b9ba48a2dffb70bb0c7327abae1d3e87356 )
Miss Islington (bot) [Fri, 19 Jul 2024 08:05:47 +0000 (10:05 +0200)]
[3.12] Docs: Upgrade Sphinx to 7.4 (GH-121987) (#122011)
Docs: Upgrade Sphinx to 7.4 (GH-121987)
(cherry picked from commit
420d94312824825a18fa1fd9a36773626a54d97a )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Fri, 19 Jul 2024 08:03:54 +0000 (10:03 +0200)]
[3.12] gh-65453: Docs - clarify AttributeError behaviour on PropertyMock (GH-121666) (GH-121969)
Fixed at EuroPython 24 sprints.
(cherry picked from commit
94e6644584d9cb08a4edcd1027e288386184816b )
Co-authored-by: Vlastimil Zíma <ziima@users.noreply.github.com>
Miss Islington (bot) [Fri, 19 Jul 2024 07:44:03 +0000 (09:44 +0200)]
[3.12] GH-117928: Bump the minimum Sphinx version to 6.2.1 (GH-121986) (#121993)
GH-117928: Bump the minimum Sphinx version to 6.2.1 (GH-121986)
(cherry picked from commit
7dd52b63cef3ff60868dea510ef7a9adcc6611cc )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Fri, 19 Jul 2024 07:41:57 +0000 (09:41 +0200)]
[3.12] GH-121970: Use ``SphinxDirective`` instead of ``Directive`` (GH-121972) (#122009)
GH-121970: Use ``SphinxDirective`` instead of ``Directive`` (GH-121972)
(cherry picked from commit
ac39151a09fc9857e64d7b8f7eff926ec0ba6c0b )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Fri, 19 Jul 2024 07:36:09 +0000 (09:36 +0200)]
[3.12] Docs: Fix typo in description of ``INTRINSIC_ASYNC_GEN_WRAP`` (GH-122004) (#122007)
Docs: Fix typo in description of ``INTRINSIC_ASYNC_GEN_WRAP`` (GH-122004)
(cherry picked from commit
98e5bdef0ef59695371ec8a8486bb55ccf2b0638 )
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Miss Islington (bot) [Fri, 19 Jul 2024 04:05:08 +0000 (06:05 +0200)]
[3.12] gh-120289: Add external timer in traverse of _lsprof.Profiler (GH-121998) (#122001)
gh-120289: Add external timer in traverse of _lsprof.Profiler (GH-121998)
(cherry picked from commit
eaf094c09b5b1c33435c60ef49b1cec78c32573c )
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Miss Islington (bot) [Thu, 18 Jul 2024 23:37:49 +0000 (01:37 +0200)]
[3.12] gh-120289: Disallow disable() and clear() in external timer to prevent use-after-free (GH-120297) (#121989)
gh-120289: Disallow disable() and clear() in external timer to prevent use-after-free (GH-120297)
(cherry picked from commit
1ab17782832bb1b6baa915627aead3e3516a0894 )
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Miss Islington (bot) [Thu, 18 Jul 2024 13:27:01 +0000 (15:27 +0200)]
[3.12] gh-64308: Remove TestProgram from the unittest docs (GH-121675) (GH-121743)
gh-64308: Remove TestProgram from the unittest docs (GH-121675)
(cherry picked from commit
f6f4022a357f70f1c40945403065e81b6c2e4854 )
Co-authored-by: Jan Musílek <jan.musilek@nic.cz>
Miss Islington (bot) [Thu, 18 Jul 2024 10:12:40 +0000 (12:12 +0200)]
[3.12] gh-121874: Define audit-event open parameters consistently (GH-121883) (GH-121955)
Use same names for parameters to avoid triggering a race-condition in Sphinx
that causes non-deterministic output.
(cherry picked from commit
24cf867bed6035f33cd3b38d89d303b7522f12a6 )
Co-authored-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Miss Islington (bot) [Wed, 17 Jul 2024 22:32:29 +0000 (00:32 +0200)]
[3.12] gh-119698: fix a special case in `symtable.Class.get_methods` (GH-121802) (#121910)
(cherry picked from commit
6682d916780c1cb305e679a057ee6992b114118e )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Wed, 17 Jul 2024 14:03:54 +0000 (16:03 +0200)]
[3.12] gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz (GH-121876) (#121912)
gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz (GH-121876)
Problem occurred when attribute xyz could not be pickled.
Since this is not trivial to selectively fix, block all
attributes (other than 'width'). IDLE does not access them
and they are private implementation details.
(cherry picked from commit
58753f33e47fe48906883dc010771f68c13b7e52 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Serhiy Storchaka [Wed, 17 Jul 2024 07:58:25 +0000 (10:58 +0300)]
[3.12] gh-121153: Fix some errors with use of _PyLong_CompactValue() (GH-121154)
* The result has type Py_ssize_t, not intptr_t.
* Type cast between unsigned and signed integer types should be explicit.
* Downcasting should be explicit.
* Fix integer overflow check in sum().
(cherry picked from commit
1801545 )
sobolevn [Wed, 17 Jul 2024 07:30:18 +0000 (10:30 +0300)]
[3.12] gh-121834: Improve `complex` C-API docs (GH-121835) (#121897)
* [3.12] gh-121834: Improve `complex` C-API docs (GH-121835)
(cherry picked from commit
72dccd60735b597e99c007a7b69210763a746877 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Wed, 17 Jul 2024 07:16:25 +0000 (09:16 +0200)]
[3.12] gh-121842: Improve coverage of `PyBytes_FromStringAndSize` (GH-121843) (#121894)
gh-121842: Improve coverage of `PyBytes_FromStringAndSize` (GH-121843)
(cherry picked from commit
f6c7d8d79c4e17167af98f2e0cb4b1e55d7b5d3c )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Wed, 17 Jul 2024 06:27:55 +0000 (08:27 +0200)]
[3.12] gh-121453: Update the `Doc/templates/download.html` download files size estimates and support download `.texi` format. (GH-121454) (#121891)
Co-authored-by: Wulian233 <1055917385@qq.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Wed, 17 Jul 2024 06:19:09 +0000 (08:19 +0200)]
[3.12] gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (GH-121872) (#121887)
Co-authored-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Miss Islington (bot) [Tue, 16 Jul 2024 15:16:00 +0000 (17:16 +0200)]
[3.12] gh-121160: Add some tests for readline.set_history_length (GH-121326) (GH-121857)
(cherry picked from commit
263c7e611bb24715e513d457a3477a61fff15162 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Sviatoslav Sydorenko (Святослав Сидоренко) [Tue, 16 Jul 2024 14:15:05 +0000 (16:15 +0200)]
[3.12] Fix using `check_source` flags as bool (GH-121848) (#121855)
Miss Islington (bot) [Tue, 16 Jul 2024 08:51:50 +0000 (10:51 +0200)]
[3.12] gh-121791: Check for `NULL` in `MethodDescriptor2_new` in `_testcapi` (GH-121792) (#121840)
gh-121791: Check for `NULL` in `MethodDescriptor2_new` in `_testcapi` (GH-121792)
(cherry picked from commit
8b6d4755812d0b02e9f26beb9c9a7714e4c5ac28 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Tue, 16 Jul 2024 08:23:40 +0000 (10:23 +0200)]
[3.12] gh-85453: Fix 'timezone' vs. 'time zone' spelling issues in datetime.rst (GH-118449) (#121838)
(cherry picked from commit
1755df7b3bf5aaaba55fd7ec02a91d99305e362e )
Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
Miss Islington (bot) [Tue, 16 Jul 2024 07:44:05 +0000 (09:44 +0200)]
[3.12] gh-119189: Fix the power operator for Fraction (GH-119242) (GH-119835)
When using the ** operator or pow() with Fraction as the base
and an exponent that is not rational, a float, or a complex, the
fraction is no longer converted to a float.
(cherry picked from commit
b9965ef282d6662145d2e05b080c811132ce6fde )
Co-authored-by: Joshua Herman <30265+zitterbewegung@users.noreply.github.com>
Kirill Podoprigora [Mon, 15 Jul 2024 19:26:10 +0000 (22:26 +0300)]
[3.12] gh-121657: Display correct error message for yield from outsid… (GH-121769)
(cherry picked from commit
178e44de8f023be7a5dc400044ab61983b191f24 )
Co-authored-by: Gregor <36135323+gege-hoho@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Sun, 14 Jul 2024 11:46:18 +0000 (13:46 +0200)]
[3.12] Fix cache restoration for Hypothesis CI job (GH-121756) (#121760)
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk@sydorenko.org.ua>
Miss Islington (bot) [Sun, 14 Jul 2024 11:37:00 +0000 (13:37 +0200)]
[3.12] gh-121660: Fix `ga_getitem` by explicitly checking for `NULL` result (GH-121661) (#121762)
gh-121660: Fix `ga_getitem` by explicitly checking for `NULL` result (GH-121661)
(cherry picked from commit
bb802db8cfa35a88582be32fae05fe1cf8f237b1 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Sun, 14 Jul 2024 10:31:58 +0000 (12:31 +0200)]
[3.12] gh-121749: Fix discrepancy in docs for `PyModule_AddObjectRef` (GH-121750) (GH-121753)
(cherry picked from commit
26dfb2771236bfd96cdaa1081103f75141ecff47 )
Co-authored-by: Dominic H <dom@dominic.sk>
Miss Islington (bot) [Sun, 14 Jul 2024 10:25:09 +0000 (12:25 +0200)]
[3.12] gh-120012: clarify the behaviour of `multiprocessing.Queue.empty` on closed queues. (GH-120102) (#120470)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Sun, 14 Jul 2024 08:58:55 +0000 (10:58 +0200)]
[3.12] gh-121708: Improve test coverage for `unittest.util` (GH-121713) (GH-121737)
(cherry picked from commit
901ea411bf51f59f2a4b0b4fec6f60d29c76ca05 )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Miss Islington (bot) [Sat, 13 Jul 2024 20:13:52 +0000 (22:13 +0200)]
[3.12] gh-73159 Added clarifications in multiprocessing docs on that objects are pickled. (GH-121686) (#121728)
gh-73159 Added clarifications in multiprocessing docs on that objects are pickled. (GH-121686)
Added explicit comments about that objects are pickled when transmitted via multiprocessing queues and pipes.
(cherry picked from commit
b5805892d55e769335c11a994b586355720263ba )
Co-authored-by: Ulrik Södergren <ulrik@digitalfotografen.se>
Miss Islington (bot) [Sat, 13 Jul 2024 15:11:33 +0000 (17:11 +0200)]
[3.12] gh-120452: improve documentation about private name mangling (GH-120451) (#121716)
gh-120452: improve documentation about private name mangling (GH-120451)
(cherry picked from commit
f4d6e45c1e7161878b36ef9e876ca3e44b80a97d )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Sat, 13 Jul 2024 14:35:03 +0000 (16:35 +0200)]
[3.12] gh-120823: Fix doc for ftplib.FTP.retrbinary() (GH-121697) (GH-121706)
(cherry picked from commit
422855ad21f09b82c0bfa891dfb8fb48182c6d2b )
Co-authored-by: mirelagrigoras <47386964+mirelagrigoras@users.noreply.github.com>
Co-authored-by: Mirela Andreea GRIGORAS <magrigoras@bitdefender.com>
Miss Islington (bot) [Sat, 13 Jul 2024 13:20:00 +0000 (15:20 +0200)]
[3.12] gh-121671: Increase test coverage of `ast.get_docstring` (GH-121674) (GH-121690)
(cherry picked from commit
0a26aa5007cb32610366c31fbac846b5fe2f4f90 )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Miss Islington (bot) [Sat, 13 Jul 2024 13:07:30 +0000 (15:07 +0200)]
[3.12] gh-96765: Update ConfigParser.read() docs with multi-file read example (GH-121664) (GH-121688)
(cherry picked from commit
fc2178117538c161471711073887f34bcd464cc1 )
Co-authored-by: Timon Viola <44016238+timonviola@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Hugo van Kemenade [Sat, 13 Jul 2024 12:54:50 +0000 (14:54 +0200)]
[3.12] NEWS: Fix Sphinx warnings and increase threshold for new news nits (GH-121482) (#121514)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Sat, 13 Jul 2024 10:24:17 +0000 (12:24 +0200)]
[3.12] gh-99242 Ignore error when running regression tests under certain conditions. (GH-121663) (GH-121670)
gh-99242 Ignore error when running regression tests under certain conditions. (GH-121663)
(cherry picked from commit
0759cecd9d945dfbac2226febaba51f41195555c )
Co-authored-by: Bas Bloemsaat <bas@bloemsaat.com>
Co-authored-by: Kevin Diem <kg.diem@gmail.com>
Eric Snow [Thu, 11 Jul 2024 21:20:08 +0000 (15:20 -0600)]
[3.12] gh-117482: Fix Builtin Types Slot Wrappers (gh-121632)
When builtin static types are initialized for a subinterpreter, various "tp" slots have already been inherited (for the main interpreter). This was interfering with the logic in add_operators() (in Objects/typeobject.c), causing a wrapper to get created when it shouldn't. This change fixes that by preserving the original data from the static type struct and checking that.
(cherry picked from commit
5250a031332eb9499d5fc190d7287642e5a144b9 , AKA gh-121602)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
sobolevn [Thu, 11 Jul 2024 09:12:06 +0000 (12:12 +0300)]
[3.12] gh-121615: Improve `module.rst` C-API docs with better error descriptions (GH-121616) (#121619)
(cherry picked from commit
e6264b44dc7221c713b14dfa0f5929b33d362829 )
Miss Islington (bot) [Wed, 10 Jul 2024 14:54:45 +0000 (16:54 +0200)]
[3.12] gh-107851: Fix spurious failures in fcntl eintr tests (GH-121556) (#121586)
On heavily loaded machines, the subprocess may finish its sleep before
the parent process manages to synchronize with it via a failed lock.
This leads to errors like:
Exception: failed to sync child in 300.3 sec
Use pipes instead to mutually synchronize between parent and child.
(cherry picked from commit
af9f6de6ea930b607f948f2c91a87fe4ca9d64db )
Co-authored-by: Sam Gross <colesbury@gmail.com>
Miss Islington (bot) [Wed, 10 Jul 2024 11:03:22 +0000 (13:03 +0200)]
[3.12] gh-121567: Improve `slice` C-API docs by mentioning exceptions (GH-121568) (#121579)
gh-121567: Improve `slice` C-API docs by mentioning exceptions (GH-121568)
(cherry picked from commit
84a5597b08b7d53aced2fbd0048271ce762807a8 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Serhiy Storchaka [Wed, 10 Jul 2024 10:50:50 +0000 (13:50 +0300)]
[3.12] Improve zipimport tests (GH-121535) (GH-121570) (GH-121576)
(cherry picked from commit
35c9399078727aead06b2f2b3f70369898bc8992 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit
22a0bdbf9a63f92f45106c7dc4377e45e0278e60 )
Miss Islington (bot) [Wed, 10 Jul 2024 10:35:29 +0000 (12:35 +0200)]
[3.12] gh-121571: Do not use `EnvironmentError` in tests, use `OSError` instead (GH-121572) (#121575)
gh-121571: Do not use `EnvironmentError` in tests, use `OSError` instead (GH-121572)
(cherry picked from commit
e2822360da30853f092d8a50ad83e52f6ea2ced9 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Wed, 10 Jul 2024 08:06:41 +0000 (10:06 +0200)]
[3.12] GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428) (#121566)
GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428)
(cherry picked from commit
9585a1a2a251aaa15baf6579e13dd3be0cb05f1f )
Co-authored-by: satori1995 <132636720+satori1995@users.noreply.github.com>
Miss Islington (bot) [Tue, 9 Jul 2024 16:03:12 +0000 (18:03 +0200)]
[3.12] gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions (GH-121534) (#121540)
gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions (GH-121534)
(cherry picked from commit
649d5b6d7b04607dd17810ac73e8f16720c6dc78 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Tue, 9 Jul 2024 09:36:40 +0000 (11:36 +0200)]
[3.12] gh-121333: Clarify what is the default executor for asyncio.run_in_executor (GH-121335) (#121525)
gh-121333: Clarify what is the default executor for asyncio.run_in_executor (GH-121335)
(cherry picked from commit
facf9862da0cf9331550747197800d682cd371fb )
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Sam Gross [Mon, 8 Jul 2024 21:19:29 +0000 (17:19 -0400)]
[3.12] gh-121018: Fix typo in NEWS entry (GH-121510) (#121516)
(cherry picked from commit
218edaf0ffe6ef38349047f378649f93d280e23e )
Miss Islington (bot) [Mon, 8 Jul 2024 03:58:26 +0000 (05:58 +0200)]
[3.12] gh-121461: Fix os.path.normpath documentation indentation (GH-121466) (#121473)
gh-121461: Fix os.path.normpath documentation indentation (GH-121466)
(cherry picked from commit
bf74db731bf108e880348f2925160af61570dbf4 )
Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
Miss Islington (bot) [Sat, 6 Jul 2024 18:11:28 +0000 (20:11 +0200)]
[3.12] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-121437) (#121442)
Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-121437)
regen dependencies
(cherry picked from commit
53e12025cd7d7ee46ce10cc8f1b722c55716b892 )
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Miss Islington (bot) [Fri, 5 Jul 2024 20:23:00 +0000 (22:23 +0200)]
[3.12] Update example of str.split, bytes.split (GH-121287) (#121416)
Update example of str.split, bytes.split (GH-121287)
In `{str,bytes}.strip(chars)`, multiple characters are not treated as a
prefix/suffix, but as individual characters. This may make users confuse
whether `split` has similar behavior.
Users may incorrectly expect that
`'Good morning, John.'.split(', .') == ['Good', 'morning', 'John']`
Adding a bit of clarification in the doc.
(cherry picked from commit
892e3a1b708391cb43517a141f9b9712e047b8a4 )
Co-authored-by: Yuxin Wu <ppwwyyxxc@gmail.com>
Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
Miss Islington (bot) [Fri, 5 Jul 2024 06:59:06 +0000 (08:59 +0200)]
[3.12] gh-121390: tracemalloc: Fix tracebacks memory leak (GH-121391) (#121393)
gh-121390: tracemalloc: Fix tracebacks memory leak (GH-121391)
The tracemalloc_tracebacks hash table has traceback keys and NULL
values, but its destructors do not reflect this -- key_destroy_func is
NULL while value_destroy_func is raw_free. Swap these to free the
traceback keys instead.
(cherry picked from commit
db39bc42f90c151b298f97b780e62703adbf1221 )
Co-authored-by: Josh Brobst <jbrobst@proton.me>
Miss Islington (bot) [Thu, 4 Jul 2024 22:55:54 +0000 (00:55 +0200)]
[3.12] gh-90437: Fix __main__.py documentation wording (GH-116309) (GH-121386)
gh-90437: Fix __main__.py documentation wording (GH-116309)
(cherry picked from commit
cb688bab08559079d0ee9ffd841dd6eb11116181 )
Co-authored-by: Ali Tavallaie <tavallaie@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Miss Islington (bot) [Thu, 4 Jul 2024 18:00:08 +0000 (20:00 +0200)]
[3.12] gh-121084: Fix test_typing random leaks (GH-121360) (#121372)
gh-121084: Fix test_typing random leaks (GH-121360)
Clear typing ABC caches when running tests for refleaks (-R option):
call _abc_caches_clear() on typing abstract classes and their
subclasses.
(cherry picked from commit
5f660e8e2ca3acfb89ccbdd990f072149b6baa6a )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Thu, 4 Jul 2024 13:43:31 +0000 (15:43 +0200)]
[3.12] gh-121355: Fix incorrect word in simple_stmts.rst (GH-121356) (#121363)
(cherry picked from commit
715ec630dd78819ed79cad5ac28617daefe1e745 )
Co-authored-by: Jongbum Won <71166964+Wondaeng@users.noreply.github.com>
Miss Islington (bot) [Wed, 3 Jul 2024 21:09:00 +0000 (23:09 +0200)]
[3.12] gh-117983: Defer import of threading for lazy module loading (GH-120233) (GH-121350)
gh-117983: Defer import of threading for lazy module loading (GH-120233)
As noted in gh-117983, the import importlib.util can be triggered at
interpreter startup under some circumstances, so adding threading makes
it a potentially obligatory load.
Lazy loading is not used in the stdlib, so this removes an unnecessary
load for the majority of users and slightly increases the cost of the
first lazily loaded module.
An obligatory threading load breaks gevent, which monkeypatches the
stdlib. Although unsupported, there doesn't seem to be an offsetting
benefit to breaking their use case.
For reference, here are benchmarks for the current main branch:
```
❯ hyperfine -w 8 './python -c "import importlib.util"'
Benchmark 1: ./python -c "import importlib.util"
Time (mean ± σ): 9.7 ms ± 0.7 ms [User: 7.7 ms, System: 1.8 ms]
Range (min … max): 8.4 ms … 13.1 ms 313 runs
```
And with this patch:
```
❯ hyperfine -w 8 './python -c "import importlib.util"'
Benchmark 1: ./python -c "import importlib.util"
Time (mean ± σ): 8.4 ms ± 0.7 ms [User: 6.8 ms, System: 1.4 ms]
Range (min … max): 7.2 ms … 11.7 ms 352 runs
```
Compare to:
```
❯ hyperfine -w 8 './python -c pass'
Benchmark 1: ./python -c pass
Time (mean ± σ): 7.6 ms ± 0.6 ms [User: 5.9 ms, System: 1.6 ms]
Range (min … max): 6.7 ms … 11.3 ms 390 runs
```
This roughly halves the import time of importlib.util.
(cherry picked from commit
94f50f8ee6872007d46c385f7af253497273255a )
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Vinay Sajip [Wed, 3 Jul 2024 12:02:02 +0000 (13:02 +0100)]
[3.12] gh-121035: Update PNG image for logging flow diagram. (GH-121323) (GH-121325)
(cherry picked from commit
26d24eeb90d781e381b97d64b4dcb1ee4dd891fe )
Vinay Sajip [Wed, 3 Jul 2024 10:40:26 +0000 (11:40 +0100)]
[3.12] gh-121035: Further improve logging flow diagram with respect to dark/light modes. (GH-121265) (GH-121321)
(cherry picked from commit
089835469d5efbea4793cd611b43cb8387f2e7e5 )
Vinay Sajip [Wed, 3 Jul 2024 09:48:34 +0000 (10:48 +0100)]
[3.12] gh-121035: Improve logging flow diagram for dark/light modes. (GH-121254) (GH-121316)
(cherry picked from commit
bfe0e4d7696647a546110328510bdb98146ad2f2 )
Miss Islington (bot) [Wed, 3 Jul 2024 08:20:02 +0000 (10:20 +0200)]
[3.12] docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237) (#121310)
docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237)
(cherry picked from commit
4232976b02cb999335c6bfdec3315520b21954f2 )
Co-authored-by: da-woods <dw-git@d-woods.co.uk>
Miss Islington (bot) [Mon, 1 Jul 2024 20:37:19 +0000 (22:37 +0200)]
[3.12] gh-121196: Document `dict.fromkeys` params as pos-only (GH-121197) (#121243)
gh-121196: Document `dict.fromkeys` params as pos-only (GH-121197)
(cherry picked from commit
1dc9a4f6b20148fd4ef2eb2800a6c65224828181 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Mon, 1 Jul 2024 16:41:18 +0000 (18:41 +0200)]
[3.12] gh-114104: clarify asynchronous comprehension docs to match runtime behavior (GH-121175) (#121235)
gh-114104: clarify asynchronous comprehension docs to match runtime behavior (GH-121175)
(cherry picked from commit
91313afdb392d0d6105e9aaa57b5a50112b613e7 )
Co-authored-by: Danny Yang <yangdanny97@users.noreply.github.com>
Miss Islington (bot) [Mon, 1 Jul 2024 16:05:30 +0000 (18:05 +0200)]
[3.12] gh-121200: Fix test_expanduser_pwd2() of test_posixpath (GH-121228) (#121231)
gh-121200: Fix test_expanduser_pwd2() of test_posixpath (GH-121228)
Call getpwnam() to get pw_dir, since it can be different than
getpwall() pw_dir.
(cherry picked from commit
02cb5fdee391670d63b2fc0a92ca9b36a32ac95a )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 1 Jul 2024 10:02:34 +0000 (12:02 +0200)]
[3.12] gh-121200: Log pwd entry in test_expanduser_pwd2() (GH-121207) (#121214)
gh-121200: Log pwd entry in test_expanduser_pwd2() (GH-121207)
Use subTest() to log the pwd entry in test_expanduser_pwd2() of
test_posixpath to help debugging.
(cherry picked from commit
05a6f8da6042cc87da1cd3824c1375d12753e5a1 )
Co-authored-by: Victor Stinner <vstinner@python.org>