Commit graph

119566 commits

Author SHA1 Message Date
Miss Islington (bot)
220e31adea
[3.12] gh-122133: Authenticate socket connection for socket.socketpair() fallback (GH-122134) (GH-122425)
Authenticate socket connection for `socket.socketpair()` fallback when the platform does not have a native `socketpair` C API.  We authenticate in-process using `getsocketname` and `getpeername` (thanks to Nathaniel J Smith for that suggestion).

(cherry picked from commit 78df1043db)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-07-29 22:02:20 +00:00
Miss Islington (bot)
bad84975ff
[3.12] gh-122311: Fix a refleak in pickle (GH-122411) (GH-122416)
(cherry picked from commit 68840e91ac)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-29 19:10:46 +00:00
Serhiy Storchaka
e6878fc3c8
Revert "[3.12] gh-120713: Normalize year with century for datetime.strftime (GH-120820) (GH-121145)" (GH-122409)
This reverts commit 027902b56f.
2024-07-29 21:55:12 +03:00
Eric Snow
5bd2ea2b94
[3.12] gh-117482: Fix the Slot Wrapper Inheritance Tests (gh-122250)
The tests were only checking cases where the slot wrapper was present in the initial case.  They were missing when the slot wrapper was added in the additional initializations.  This fixes that.

(cherry-picked from commit 490e0ad83a, AKA gh-122248)
2024-07-29 10:25:17 -06:00
Kirill Podoprigora
e29910447b
[3.12] gh-122292: Split up `Lib/test/test_ast.py` into a couple of … (#122395)
[3.12] gh-122292: Split up ``Lib/test/test_ast.py`` into a couple of files (GH-122293)
(cherry picked from commit 9187484dd9)
2024-07-29 16:17:38 +02:00
Miss Islington (bot)
a3076c734d
[3.12] gh-122311: Fix some error messages in pickle (GH-122386) (GH-122388)
(cherry picked from commit 3b034d26eb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-29 12:27:34 +03:00
Serhiy Storchaka
ecc97cb432
[3.12] gh-122311: Add more tests for pickle (GH-122376) (GH-122378)
(cherry picked from commit bc93923a2d)
2024-07-28 09:04:50 +00:00
Miss Islington (bot)
ccb4e3ba7e
[3.12] gh-122085: Create dedicated page for deprecations (GH-122352) (#122375)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-28 08:09:20 +00:00
Pablo Galindo Salgado
ca3486cb1e
[3.12] gh-122300: Preserve AST nodes for format specifiers with single elements (GH-122308) (#122363)
(cherry picked from commit db2d8b6db1)
2024-07-27 19:20:28 +00:00
Barney Gale
8205c16c7c
[3.12] GH-121462: pathlib docs: improve table of corresponding os/os.path functions (GH-121465) (#122360)
Re-order table of corresponding functions with the following priorities:

1. Pure functionality is at the top
2. `os.path` functions are shown before `os` functions
3. Similar functionality is kept together
4. Functionality follows docs order where possible

Add a few missed correspondences:

- `os.path.isjunction` and `Path.is_junction`
- `os.path.ismount` and `Path.is_mount`
- `os.lstat()` and `Path.lstat()`
- `os.lchmod()` and `Path.lchmod()`

Also add footnotes describing a few differences.

(cherry picked from commit cbac8a3888)
2024-07-27 17:13:20 +00:00
Miss Islington (bot)
0f83b8f306
[3.12] gh-122044: Don't error during gitignore filtering with no files (GH-122045) (#122354)
Co-authored-by: Seth Michael Larson <seth@python.org>
2024-07-27 14:27:34 +00:00
Hugo van Kemenade
fb2826a6b7
[3.12] gh-122085: Use include files for whatsnew/3.14.rst deprecations (GH-122242) (#122351) 2024-07-27 14:42:51 +03:00
Miss Islington (bot)
2e37d67db2
[3.12] gh-122170: Handle ValueError raised by os.stat() in linecache (GH-122176) (GH-122349)
(cherry picked from commit 7a6d4ccf0e)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-27 10:48:14 +00:00
Sviatoslav Sydorenko (Святослав Сидоренко)
a4449a1ada
[3.12] Move macOS matrix to the calling workflow (GH-121809) (#122330) 2024-07-27 12:19:59 +03:00
Miss Islington (bot)
102dc44a0a
[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 c08696286f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-07-27 12:36:40 +05:30
Miss Islington (bot)
d4ca183a38
[3.12] Document `mimetypes.MimeTypes.add_type()` (GH-122301) (#122329)
Document ``mimetypes.MimeTypes.add_type()`` (GH-122301)
(cherry picked from commit d52726ccd4)

Co-authored-by: Subrahmanya Gaonkar <148525245+negativenagesh@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-26 22:10:01 +00:00
Miss Islington (bot)
73531067f1
[3.12] gh-122311: Fix typo in the pickle error formatting code (GH-122312) (GH-122315)
(cherry picked from commit 7c2921844f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-26 15:09:52 +00:00
Miss Islington (bot)
0300e33b22
[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 070f1e2e5b)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2024-07-25 12:15:22 +00:00
Miss Islington (bot)
02c19f0338
[3.12] gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271) (GH-122276)
(cherry picked from commit 6c09b8de5c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-25 11:22:42 +00:00
Miss Islington (bot)
9d65ea14ce
[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 dc07f65a53)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-25 13:44:25 +03:00
Serhiy Storchaka
be5e229aa6
[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 9b4fe9b718)
2024-07-25 07:18:57 +00:00
Eric Snow
dd4c8aca61
[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 716c6771fc, AKA gh-121932)
2024-07-24 19:07:32 +00:00
Hugo van Kemenade
1a104e5112
[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>
2024-07-24 10:41:57 -06:00
Sviatoslav Sydorenko (Святослав Сидоренко)
f8ddebbd44
[3.12] Integrate build_msi into main CI workflow (GH-121778) (#122231)
(cherry picked from commit af4329e7b1)
2024-07-24 16:46:52 +03:00
Miss Islington (bot)
9dad694dc5
[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 9eb734111b)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2024-07-24 06:34:05 +00:00
Miss Islington (bot)
257c413cd1
[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 e91ef13861)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-07-23 22:44:43 +00:00
Eric Snow
d7c67e0aca
[3.12] gh-117482: Expand Tests for Slot Wrappers of Inherited Slots of Static Builtin Types (gh-122197)
(cherry picked from commit 33d32faa58, AKA gh-122192)
2024-07-23 21:17:51 +00:00
Miss Islington (bot)
cde9a26eb5
[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 498cb6dff1)

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
2024-07-23 13:14:50 +00:00
Miss Islington (bot)
647765395d
[3.12] GH-121970: Remove `escape4chm` (GH-122065) (#122168)
GH-121970: Remove ``escape4chm`` (GH-122065)
(cherry picked from commit 53e9e7de63)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-23 12:38:43 +00:00
Serhiy Storchaka
b24ca6ac0e
[3.12] Refactor test_capi.test_long (GH-122113) (GH-122151)
Share common code for tests for PyLong_As*() functions.
(cherry picked from commit 69f2dc5c06)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-07-23 07:22:18 +00:00
Sviatoslav Sydorenko (Святослав Сидоренко)
8d1f15712d
[3.12] Merge Ubuntu test matrices in CI (GH-121813) (#122116) 2024-07-22 08:05:41 -06:00
Łukasz Langa
c1e834dd78
[3.12] gh-121957: Emit audit events for python -i and python -m asyncio (GH-122117) 2024-07-22 13:41:23 +02:00
Sviatoslav Sydorenko (Святослав Сидоренко)
6e9b3f79fe
[3.12] Generalize reusable Windows CI jobs (#121766) (#121776) 2024-07-22 05:40:10 -06:00
Jakub Kulík
6586b171ea
[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 e88bd96d0d)
2024-07-22 07:45:17 +00:00
Russell Keith-Magee
71970d602f
[3.12] Docs: spelling and grammar fixes (GH-122084) (#122107)
(cherry picked from commit bc264eac3a)

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-21 18:39:48 -07:00
Miss Islington (bot)
9343c6d323
[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 0dcbc83853)

Co-authored-by: Andrey Mishchenko <mishchea@gmail.com>
2024-07-21 06:24:56 +00:00
Miss Islington (bot)
5f46a726ea
[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 ebc18abbf3)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2024-07-21 06:00:20 +00:00
Pablo Galindo Salgado
966eff9ce4
[3.12] gh-122026: Fix identification of mismatched parentheses inside f-strings (GH-122028) (#122062)
(cherry picked from commit 2009e25e26)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2024-07-20 23:03:10 +00:00
Miss Islington (bot)
0298da432d
[3.12] Docs: Fix duplicate object description warnings (GH-122068) (#122070)
Docs: Fix duplicate object description warnings (GH-122068)
(cherry picked from commit 8db5f48007)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-20 19:54:57 +00:00
Pablo Galindo Salgado
a9daa4fd04
[3.12] gh-121130: Fix f-string format specifiers with debug expressions (GH-121150) (#122063) 2024-07-20 19:05:01 +02:00
Miss Islington (bot)
ca531e4326
[3.12] GH-121970: Modernise the patchlevel extension (GH-121995) (#122061)
GH-121970: Modernise the patchlevel extension (GH-121995)
(cherry picked from commit b7ad711fcb)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-20 13:51:32 +00:00
Miss Islington (bot)
8bd47132d6
[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 cecaceea31)

Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
2024-07-19 19:22:07 +02:00
Miss Islington (bot)
3f72821f80
[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 8f2532168b)

Co-authored-by: Andreas Stocker <andreas@stocker.co.it>
2024-07-19 16:36:26 +02:00
Petr Viktorin
e80497c9cd
[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 709db44255)
2024-07-19 14:13:34 +00:00
Adam Turner
ff98d9021a
[3.12] GH-121970: Rewrite the C-API annotations extension (GH-121985) (#122025)
(cherry picked from commit 22c9d9c1fc)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-07-19 12:48:50 +00:00
Adam Turner
7c8b6f85c9
[3.12] GH-121970: Use Ruff to check and format the docs tools (GH-122018) (#122024)
(cherry picked from commit 40855f3ab8)

Co-authored-by: Alex Waygood <Alex.Waygood@gmail.com>
2024-07-19 12:26:32 +00:00
Miss Islington (bot)
2cd816e4e0
[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 7431c3799e)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-07-19 12:02:42 +00:00
Miss Islington (bot)
2e8dba3e1d
[3.12] gh-121657: Additional yield from error test using lambda (GH-121722) (GH-121962)
(cherry picked from commit 1056f2bc20)

Co-authored-by: Gregor <36135323+gege-hoho@users.noreply.github.com>
2024-07-19 13:50:51 +02:00
Miss Islington (bot)
88618d2910
[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 898e90c3be)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-19 10:46:37 +00:00
Miss Islington (bot)
2d4eccf70e
[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 adf0b94d1c)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-19 09:23:47 +00:00