Commit graph

117542 commits

Author SHA1 Message Date
Mark Shannon
3f167de440
[3.12] GH-106898: Add the exception as an argument to the PY_UNWIND event callback function. (GH-107347) (GH-107382) 2023-07-28 11:30:16 +01:00
Mark Shannon
0902afbae2
[3.12] GH-106895: Raise a ValueError when attempting to disable events that cannot be disabled. (GH-107337) (GH-107351) 2023-07-28 10:53:33 +01:00
Mark Shannon
3b1a4c1842
[3.12] GH-106897: Add RERAISE event to sys.monitoring. (GH-107291) (GH-107346)
* Ensures that exception handling events are balanced. Each [re]raise event has a matching unwind/handled event.
2023-07-28 09:48:35 +01:00
Serhiy Storchaka
4014869b4b
[3.12] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) (GH-107380)
(cherry picked from commit 983305268e)
2023-07-28 08:20:53 +00:00
Serhiy Storchaka
e6a4b10820
[3.12] gh-107298: Fix more Sphinx warnings in the C API doc (GH-107329) (GH-107376)
Declare the following functions as macros, since they are actually
macros. It avoids a warning on "TYPE" or "macro" argument.

* PyMem_New()
* PyMem_Resize()
* PyModule_AddIntMacro()
* PyModule_AddStringMacro()
* PyObject_GC_New()
* PyObject_GC_NewVar()
* PyObject_New()
* PyObject_NewVar()

Add C standard C types to nitpick_ignore in Doc/conf.py:

* int64_t
* uint64_t
* uintptr_t

No longer ignore non existing "__int" type in nitpick_ignore.

Update Doc/tools/.nitignore.
(cherry picked from commit 8d61a71f9c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-28 09:56:52 +03:00
Serhiy Storchaka
ef7422a1b9
[3.12] gh-107298: Fix Sphinx warnings in the C API doc (GH-107302) (GH-107375)
(cherry picked from commit 391e03fa05)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-28 06:40:16 +00:00
Miss Islington (bot)
4f72a9a2e0
[3.12] gh-106723: forward -Xfrozen_modules option to spawned process interpreters (GH-106724) (#107367)
gh-106723: forward -Xfrozen_modules option to spawned process interpreters (GH-106724)
(cherry picked from commit 3dcac78581)

Co-authored-by: Felipe A. Hernandez <ergoithz@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-07-28 06:24:29 +00:00
Miss Islington (bot)
17ce87ba7f
[3.12] gh-107298: Fix doc references to undocumented modules (GH-107300) (GH-107370)
Update also Doc/tools/.nitignore.
(cherry picked from commit 87b39028e5)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-28 06:17:49 +00:00
Miss Islington (bot)
2827ad2f31
[3.12] gh-106368: Argument clinic tests: improve failure message when tests in ClinicExternalTests fail (GH-107364) (#107365)
gh-106368: Argument clinic tests: improve failure message when tests in `ClinicExternalTests` fail (GH-107364)
(cherry picked from commit 76c26eaca4)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-28 00:39:51 +00:00
Miss Islington (bot)
abaf89d908
[3.12] gh-104621: Check for Incompatible Extensions in import_find_extension() (gh-107184) (gh-107360)
gh-104621: Check for Incompatible Extensions in import_find_extension() (gh-107184)

This fixes a bug where incompatible modules could still be imported if attempted multiple times.
(cherry picked from commit 75c974f535)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-07-27 21:51:34 +00:00
Miss Islington (bot)
5daf19d763
[3.12] gh-104432: Use memcpy() to avoid misaligned loads (GH-104433) (#107355)
gh-104432: Use `memcpy()` to avoid misaligned loads (GH-104433)

Fix potential unaligned memory access on C APIs involving returned sequences
of `char *` pointers within the :mod:`grp` and :mod:`socket` modules. These
were revealed using a ``-fsaniziter=alignment`` build on ARM macOS.
(cherry picked from commit f01e4cedba)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2023-07-27 13:52:39 -07:00
Miss Islington (bot)
c580527d92
[3.12] gh-105699: Disable the Interpreters Stress Tests (gh-107354) (gh-107357)
gh-105699: Disable the Interpreters Stress Tests (gh-107354)

The two tests are crashing periodically in CI and on buildbots.  I suspect the problem is in the _xxsubinterpreters module.
 Regardless, I'm disabling the tests temporarily, to reduce the noise as we approach 3.12rc1.  I'll be investigating the crashes separately.
(cherry picked from commit 4f67921ad2)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-07-27 20:09:05 +00:00
Miss Islington (bot)
57ef065eb3
[3.12] gh-101524: Only Use Public C-API in the _xxsubinterpreters Module (gh-105258) (gh-107303)
The _xxsubinterpreters module was meant to only use public API.  Some internal C-API usage snuck in over the last few years (e.g. gh-28969).  This fixes that.
(cherry picked from commit e6373c0d8b)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-07-27 13:15:47 -06:00
Miss Islington (bot)
0063ad8189
[3.12] Bump some docs dependencies to resolve a Dependabot security alert (GH-107341) (#107342)
Bump some docs dependencies to resolve a Dependabot security alert (GH-107341)
(cherry picked from commit f84d77b4e0)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-27 13:13:02 +01:00
Miss Islington (bot)
38c982d92e
[3.12] gh-106996: Rewrite turtle explanation (GH-107244) (#107335)
Co-authored-by: Daniele Procida <daniele@vurt.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-27 08:11:50 +00:00
Miss Islington (bot)
5f3e371e2d
[3.12] Docs: Argument Clinic: Restructure "Basic concepts and usage" (GH-106981) (#107325)
Split "Basic concepts and usage" into:

- Reference
  - Terminology
  - CLI reference

- Background
  - Basic concepts

(cherry picked from commit 2ad699002e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-07-27 09:07:55 +02:00
Miss Islington (bot)
36e96baa33
[3.12] gh-107298: Docs: add targets for some :c:member: and :c:macro: references (GH-107316) (GH-107332)
Add targets for PyStructSequence_Desc and PyStructSequence_Field members
and macros like Py_EQ.
Fix target for Py_RETURN_RICHCOMPARE.
(cherry picked from commit abec9a1b20)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-27 09:37:54 +03:00
Serhiy Storchaka
434e3b89a7
[3.12] gh-107091: Fix some uses of :attr: role (GH-107318) (GH-107330)
Fix also formatting of PyMethodDef members.
(cherry picked from commit d363eb5b02)
2023-07-27 09:24:18 +03:00
Miss Islington (bot)
6bbcd792f7
[3.12] Docs: Remove the numbered steps from the Argument Clinic tutorial (GH-107203) (#107317)
Instead, order the tutorial as one body of prose, making it easier to
align the tutorial according to Diátaxis principles.

(cherry picked from commit 592395577c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-26 21:03:35 +00:00
Miss Islington (bot)
4f6d7a5890
[3.12] gh-105002: [pathlib] Fix relative_to with walk_up=True using ".." (GH-107014) (#107315)
gh-105002: [pathlib] Fix relative_to with walk_up=True using ".." (GH-107014)

It makes sense to raise an Error because ".." can not
be resolved and the current working directory is unknown.
(cherry picked from commit e7e6e4b035)

Co-authored-by: János Kukovecz <kukoveczjanos@gmail.com>
2023-07-26 20:17:31 +00:00
Miss Islington (bot)
58af565c50
[3.12] Document that os.link() is not available on Emscripten (GH-104822) (GH-107308)
Document that `os.link()` is not available on Emscripten (GH-104822)
(cherry picked from commit 737d1da074)

Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2023-07-26 13:00:40 -07:00
Miss Islington (bot)
da2097dffb
[3.12] gh-107091: Fix some uses of :c:type: role (GH-107138) (GH-107312)
(cherry picked from commit 6d5b6e71c8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-26 19:37:39 +00:00
Miss Islington (bot)
9f5a5f0b33
[3.12] gh-107091: Fix some uses of :c:member: role (GH-107129) (GH-107310)
(cherry picked from commit af61cb9c78)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-26 22:30:46 +03:00
Miss Islington (bot)
0d2e1317bd
[3.12] gh-106948: Update documentation nitpick_ignore for c:identifer domain (GH-107295) (#107297)
gh-106948: Update documentation nitpick_ignore for c:identifer domain (GH-107295)

Update the nitpick_ignore of the documentation configuration to fix
Sphinx warnings about standard C types when declaring functions with
the "c:function" markups.

Copy standard C types declared in the "c:type" domain to the
"c:identifier" domain, since "c:function" markup looks for types in
the "c:identifier" domain.

(cherry picked from commit b1de3807b8)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-26 18:16:04 +02:00
Miss Islington (bot)
d2355426d6
[3.12] gh-106350: Tkinter: do not ignore return value of mp_init() (GH-106351) (GH-107258)
(cherry picked from commit b5ae7c4984)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2023-07-26 10:58:33 +03:00
Miss Islington (bot)
ef808517f4
[3.12] gh-106368: Increase Argument Clinic CLI test coverage (GH-107277) (#107282)
(cherry picked from commit 579100f6d7)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-26 07:13:22 +00:00
Miss Islington (bot)
3d15c8b84b
[3.12] gh-106185: Deduplicate CPythonTracebackErrorCaretTests in test_traceback (GH-106187) (GH-107268)
(cherry picked from commit 7c89f11892)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-07-25 21:23:33 +00:00
Miss Islington (bot)
0107731a06
[3.12] gh-106939: document ShareableList nul-strip quirk. (GH-107266) (#107269)
gh-106939: document ShareableList nul-strip quirk. (GH-107266)

* gh-106939: document ShareableList nul-strip quirk.
* Mention the `int` size constraint.
(cherry picked from commit 70dc009469)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-07-25 21:19:25 +00:00
Miss Islington (bot)
c3c8916dea
[3.12] gh-107226: PyModule_AddObjectRef() should only be in the limited API 3.10 (GH-107227) (GH-107260)
(cherry picked from commit 698b015135)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-25 23:01:18 +03:00
Miss Islington (bot)
11d86c5c33
[3.12] gh-62519: Make pgettext search plurals when translation is not found (GH-107118) (GH-107134)
(cherry picked from commit b3c34e55c0)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-07-25 21:48:59 +03:00
Ezio Melotti
313284aa42
[3.12] Remove superflous whitespaces in layout.html. (#107251)
Remove superflous whitespaces in layout.html.
2023-07-25 16:25:07 +00:00
Miss Islington (bot)
ca42d67208
[3.12] gh-105699: Add some stress tests for subinterpreter creation (GH-106966) (gh-107012)
gh-105699: Add some stress tests for subinterpreter creation (GH-106966)
(cherry picked from commit adda43dc0b)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-07-25 09:42:46 -06:00
Miss Islington (bot)
9c31d94050
[3.12] gh-105059: Fix MSCV compiler warning on PyObject union (GH-107239) (#107248)
gh-105059: Fix MSCV compiler warning on PyObject union (GH-107239)

Use pragma to ignore the MSCV compiler warning on the PyObject
nameless union.
(cherry picked from commit 1c8fe9bdb6)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-25 15:35:49 +00:00
Miss Islington (bot)
e788c0aeeb
[3.12] gh-107237: Fix test_udp_reconnection() of test_logging (GH-107238) (#107242)
gh-107237: Fix test_udp_reconnection() of test_logging (GH-107238)

test_logging: Fix test_udp_reconnection() by increasing the timeout
from 100 ms to 5 minutes (LONG_TIMEOUT).

Replace also blocking wait() with wait(LONG_TIMEOUT) in
test_output() to prevent the test to hang.
(cherry picked from commit ed08238327)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-25 13:43:11 +00:00
Miss Islington (bot)
0cf5f6a6db
[3.12] gh-105059: Use GCC/clang extension for PyObject union (GH-107232) (#107236)
gh-105059: Use GCC/clang extension for PyObject union (GH-107232)

Anonymous union is new in C11. To prevent compiler warning
when using -pedantic compiler option, use Clang and GCC
extension on C99 and older.
(cherry picked from commit 6261585d63)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-25 13:01:24 +00:00
Miss Islington (bot)
fab36fb63e
[3.12] gh-106996: Add a how-to section to the turtle documentation (GH-107153) (#107233)
Co-authored-by: Daniele Procida <daniele@vurt.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-25 12:20:30 +00:00
Miss Islington (bot)
2cdde10c5b
[3.12] gh-106774: Update bundled pip version to 23.2.1 (GH-106775) (gh-107222)
gh-106774: Update bundled pip version to 23.2.1 (GH-106775)
2023-07-25 11:32:45 +01:00
Carl Meyer
5fd028b677
[3.12] gh-106917: fix super classmethod calls to non-classmethods (GH-106977). (#107204)
(cherry picked from commit e5d5522612)
2023-07-24 21:13:17 +00:00
Miss Islington (bot)
3923639a77
[3.12] gh-102304: Rename _Py_IncRefTotal_DO_NOT_USE_THIS() (GH-107193) (#107199)
gh-102304: Rename _Py_IncRefTotal_DO_NOT_USE_THIS() (GH-107193)

* Rename _Py_IncRefTotal_DO_NOT_USE_THIS() to _Py_INCREF_IncRefTotal()
* Rename _Py_DecRefTotal_DO_NOT_USE_THIS() to _Py_DECREF_DecRefTotal()
* Remove temporary _Py_INC_REFTOTAL() and _Py_DEC_REFTOTAL() macros
(cherry picked from commit 8ebc9fc321)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-24 22:59:51 +02:00
Miss Islington (bot)
5bf7165e59
[3.12] gh-98608: Move PyInterpreterConfig to pylifecycle.h (GH-107191) (#107198)
gh-98608: Move PyInterpreterConfig to pylifecycle.h (GH-107191)

Move PyInterpreterConfig structure and associated macros from
initconfig.h to pylifecycle.h: it's not related to the Python
Initialization Configuration.
(cherry picked from commit e717b47ed8)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-24 20:13:07 +00:00
Miss Islington (bot)
f573a6a281
[3.12] GH-96803: Move PyUnstable_InterpreterFrame_GetCode() to Python.h (GH-107188) (#107195)
GH-96803: Move PyUnstable_InterpreterFrame_GetCode() to Python.h (GH-107188)

Declare the following 3 PyUnstable functions in
Include/cpython/pyframe.h rather than Include/cpython/frameobject.h,
so they are now provided by the standard "GH-include <Python.h>".
(cherry picked from commit 837fa5c0cd)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-24 19:54:42 +00:00
Miss Islington (bot)
69d4e8c090
[3.12] gh-106368: Increase Argument Clinic CLI test coverage (GH-107156) (#107189)
Instead of hacking into the Clinic class, use the Argument Clinic tool
to run the ClinicExternalTest test suite.

(cherry picked from commit 83a2837b32)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-07-24 19:19:36 +00:00
Miss Islington (bot)
beb5514826
[3.12] gh-107017: Change Chapter Strings to Texts in the Introduction chapter. (GH-107104) (#107167)
Co-authored-by: TommyUnreal <45427816+TommyUnreal@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-24 16:30:22 +00:00
Miss Islington (bot)
5ff4dfa0cb
[3.12] Docs: Add missing markup to Argument Clinic docs (GH-106876) (#107181)
(cherry picked from commit ff5f94b72c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-24 15:32:51 +00:00
Miss Islington (bot)
4fd576478c
[3.12] Fix PyVectorcall_Function doc versionadded (GH-107140) (#107173)
Fix PyVectorcall_Function doc versionadded (GH-107140)

The documentation implies that PyVectorcall_Function() was available in Python 3.8.
This is half-true - it was available under a different name. I think it's clearer to set
the "version added" to 3.9.
(cherry picked from commit 0a9b339363)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2023-07-24 13:06:16 +00:00
Miss Islington (bot)
03271069af
[3.12] Docs: Remove duplicate word in Argument Clinic howto heading (GH-107169) (#107171)
(cherry picked from commit ebe44a5155)

Co-authored-by: Hakan Celik <hakancelikdev@gmail.com>
2023-07-24 12:03:01 +00:00
Miss Islington (bot)
84c5676e91
[3.12] gh-105291: Add link to migration guide for distutils (GH-107130) (#107160)
Co-authored-by: cLupus <cLupus@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-07-23 15:00:51 -07:00
Miss Islington (bot)
40a337fbaa
[3.12] gh-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls (GH-107062) (#107154)
(cherry picked from commit b447e19e72)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-23 23:13:23 +02:00
Miss Islington (bot)
e02ddb33ce
[3.12] gh-107017: Analolgy to Pascal and C replaced. (GH-107025) (#107124)
(cherry picked from commit e59da0c4f2)

Co-authored-by: TommyUnreal <45427816+TommyUnreal@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-07-23 13:59:50 +00:00
Sviatoslav Sydorenko
18c68ec816
[3.12] Introduce a gate/check GHA job (GH-97533) (#107114)
(cherry picked from commit e7cd557)
2023-07-23 14:58:20 +02:00