Commit graph

117710 commits

Author SHA1 Message Date
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
Miss Islington (bot)
bd72fb19ef
[3.12] bpo-18319: gettext() can retrieve a message even if a plural form exists (GH-19869) (#107108)
(cherry picked from commit 54632528ee)

Co-authored-by: Gilles Bassière <gbassiere@gmail.com>
2023-07-23 14:29:08 +02:00
Miss Islington (bot)
af95a1da46
[3.12] gh-106186: Don't report MultipartInvariantViolationDefect for valid multipart emails when parsing header only (GH-107016) (#107111)
(cherry picked from commit c65592c4d6)

Co-authored-by: htsedebenham <31847376+htsedebenham@users.noreply.github.com>
2023-07-23 14:28:28 +02:00
Miss Islington (bot)
95a82dcbe7
[3.12] gh-107091: Fix the use of some C domain roles (GH-107092) (GH-107113)
(cherry picked from commit 08a228da05)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-23 14:50:21 +03:00
Moritz Neeb
074fcf15fa
[3.12] gh-106969: Indicate no modules were added in 3.10 & 3.12 (GH-106988) (#107094)
The "New Modules" section was left in place to ensure that the anchor
link for new modules will still exist:

/whatsnew/3.12.htmlGH-new-modules
/whatsnew/3.10.htmlGH-new-modules

This means that existing links to this section don't break.
(cherry picked from commit 6dbffaed17)

Co-authored-by: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com>
2023-07-23 12:26:05 +02:00
Daniele Procida
f7e13002ff
[3.12] gh-106996: Add the basics of a turtle graphics tutorial (GH-107072) (#107109) 2023-07-23 04:22:05 -06:00
Miss Islington (bot)
332db37835
[3.12] gh-101100: Fix some broken sphinx references (GH-107095) (#107103)
(cherry picked from commit f5147c0cfb)

Co-authored-by: wulmer <wulmer@users.noreply.github.com>
2023-07-23 12:00:31 +02:00
Miss Islington (bot)
a73d5c5e2e
[3.12] gh-106976: alphabetise bullets by module name task2-3 (GH-107005) (#107106)
Co-authored-by: littlebutt's workshop <luogan199686@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-23 09:44:39 +00:00
Miss Islington (bot)
63ae7edd35
[3.12] gh-54738: Add argparse i18n howto (GH-104562) (#107102)
(cherry picked from commit dcd7acb04a)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2023-07-23 11:36:10 +02:00
Sviatoslav Sydorenko
1703262c0a
[3.12] Convert doc.yml workflow to be reusable (GH-103914 + GH-105151) (#107042)
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

(cherry picked from commit 88d14da76f)
(cherry picked from commit eaa6702280)
2023-07-23 11:35:17 +02:00
Miss Islington (bot)
ac6b0fbdb8
[3.12] gh-75371: reformat Makefile.pre.in to accommodate for empty FRAMEWORKALTINSTALLLAST (GH-107035) (#107049)
gh-75371: reformat Makefile.pre.in to accommodate for empty FRAMEWORKALTINSTALLLAST (GH-107035)

in the case of an empty FRAMEWORKALTINSTALLLAST, this patch prevents leaving
an astray linebreak and two tabs in the resulting Makefile.

Before change:
```
.PHONY: commoninstall
commoninstall:  check-clean-src  \
		altbininstall libinstall inclinstall libainstall \
		sharedinstall altmaninstall \

```

After change (with empty FRAMEWORKALTINSTALLLAST):
```
.PHONY: commoninstall
commoninstall:  check-clean-src  \
		altbininstall libinstall inclinstall libainstall \
		sharedinstall altmaninstall
```
(cherry picked from commit 9c38206925)

Co-authored-by: Moritz Neeb <nt4u@kpvn.de>
2023-07-23 11:34:28 +02:00
Serhiy Storchaka
456cf8b097
[3.12] gh-106948: Add standard external names to nitpick_ignore (GH-106949) (#107060)
* [3.12] gh-106948: Add standard external names to nitpick_ignore (GH-106949)

It includes standard C types, macros and variables like "size_t",
"LONG_MAX" and "errno", and standard environment variables like "PATH".

(cherry picked from commit f8b7fe2f26)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

* Delete 2023-05-31-18-37-57.gh-issue-105156.R4El5V.rst
2023-07-23 11:24:51 +02:00
Miss Islington (bot)
98626c3c71
[3.12] gh-107017: removed mention that C does it the same way (GH-107020) (#107097)
Co-authored-by: Jakub Červinka <cervinka.jakub.1989@gmail.com>
2023-07-23 03:11:26 -06:00
Miss Islington (bot)
a80721b83d
[3.12] gh-71261: Add paragraph on shadowing submodules with star imports (GH-107004) (#107100)
Co-authored-by: wulmer <wulmer@users.noreply.github.com>
2023-07-23 09:01:24 +00:00
Miss Islington (bot)
52804b3801
[3.12] gh-102111: Add link to string escape sequences in re module (GH-106995) (#107096)
Co-authored-by: wulmer <wulmer@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-23 02:59:16 -06:00
Miss Islington (bot)
d87d67b9e6
[3.12] gh-106962: Detect mpicc in configure.ac (GH-106961) (#107081)
Don't let autoconf mistake MPI compilers for Intel compilers;
filter out the MPI case to prevent Intel specific options from being applied.
(cherry picked from commit 9a6b278769)

Co-authored-by: Lukas van de Wiel <30800501+LukasvdWiel@users.noreply.github.com>
2023-07-23 00:01:44 +00:00
Victor Stinner
0d4a76654f
[3.12] GH-103082: Rename PY_MONITORING_EVENTS to _PY_MONITORING_EVENTS (#107069) (#107075)
GH-103082: Rename PY_MONITORING_EVENTS to _PY_MONITORING_EVENTS (#107069)

Rename private C API constants:

* Rename PY_MONITORING_UNGROUPED_EVENTS to _PY_MONITORING_UNGROUPED_EVENTS
* Rename PY_MONITORING_EVENTS to _PY_MONITORING_EVENTS

(cherry picked from commit 0927a2b25c)
2023-07-22 22:20:38 +00:00
Miss Islington (bot)
bd907dcc50
gh-106847: Add -X warn_default_encoding in sys.flags Doc (GH-106854)
gh-106847: Add -X warn_default_encoding in sys.flags Doc (GH-106854)
(cherry picked from commit fd84ac0ee0)

Co-authored-by: qqwqqw689 <114795525+qqwqqw689@users.noreply.github.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-07-23 06:15:19 +09:00
Miss Islington (bot)
dd431d791f
[3.12] gh-107028: tiny textual changes in logging docs and docstrings (GH-107029) (GH-107065)
(cherry picked from commit 5e5a34ac3a)
2023-07-22 22:11:29 +01:00
Miss Islington (bot)
0fff068181
[3.12] gh-83006: Document behavior of shutil.disk_usage for non-mounted filesystems on Unix (GH-107031) (#107047)
(cherry picked from commit 6e5f2235f3)

Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
2023-07-22 20:25:03 +02:00
Miss Islington (bot)
3889d39471
[3.12] gh-107008: Document the curses module variables LINES and COLS (GH-107011) (GH-107057)
LINES and COLS referred in curses.update_lines_cols() documentations are
the module variables, not the environment variables.
(cherry picked from commit 26e08dfdd7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-22 21:12:58 +03:00
Miss Islington (bot)
844bdce712
[3.12] Fix Sphinx warnings in re module docs (GH-107044) (#107046)
Fix Sphinx warnings in `re` module docs (GH-107044)
(cherry picked from commit 149748ea4f)

Co-authored-by: wulmer <wulmer@users.noreply.github.com>
2023-07-22 16:54:02 +01:00
Miss Islington (bot)
c8a0296901
[3.12] gh-105090: Replace incorrect TLSv1.2 with TLSv1.3 (GH-105404) (#107040)
Co-authored-by: Jocelyn Castellano <admin@malwarefight.gq>
2023-07-22 14:30:28 +00:00
Sven Arends
beb5e4fba7
[3.12] Bump sphinx-lint to 0.6.8 (gh-106978) (#107023) 2023-07-22 13:41:38 +00:00
Miss Islington (bot)
b6ace7516b
[3.12] gh-106989: Remove tok report warnings (GH-106993) (#107013)
Co-authored-by: Menelaos Kotoglou <contact@menelaoskotoglou.com>
2023-07-22 13:01:36 +00:00
Miss Islington (bot)
e7757ab9e1
[3.12] Reformat code block to make it easier to read (GH-106965) (#107010)
(cherry picked from commit ed491d9f78)

Co-authored-by: Joe Kaufeld <opensource@joekaufeld.com>
2023-07-22 14:54:13 +02:00
Miss Islington (bot)
713590f9b2
[3.12] gh-106714: Fix test_capi to not write a coredump (GH-107007) (#107009)
gh-106714: Fix test_capi to not write a coredump (GH-107007)

test_capi: Fix test_no_FatalError_infinite_loop() to no longer write
a coredump, by using test.support.SuppressCrashReport.
(cherry picked from commit 4a1026d764)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-22 12:48:41 +00:00
Miss Islington (bot)
76fd98a675
[3.12] gh-106368: Increase coverage for Argument Clinic output directive (GH-106979) (#106994)
(cherry picked from commit ee5c01b473)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-22 12:48:35 +02:00
Miss Islington (bot)
67748f18c9
[3.12] gh-106970: Fix Argument Clinic 'destination <name> clear' command (GH-106972) (#106983)
Add test for the 'destination <name> clear' command,
and the 'destination' directive in general.

Fix two bugs in 'destination <name> clear' command:

1. The text attribute of the allocator is called 'text', not '_text'
2. Return after processing the 'clear' command,
   instead of proceeding directly to the fail().
(cherry picked from commit 3372bcba98)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-22 11:06:46 +02:00
Miss Islington (bot)
9cbde7c6ce
[3.12] gh-106973: Change non-integral to non-integer in "3.12 What's New" (GH-106984) (#106986)
Co-authored-by: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com>
2023-07-22 02:40:37 -06:00
Miss Islington (bot)
d0176ed911
[3.12] gh-105699: Fix an Interned Strings Crasher (gh-106930) (#106963)
gh-105699: Fix an Interned Strings Crasher (gh-106930)

A static (process-global) str object must only have its "interned" state cleared when no longer interned in any interpreters.  They are the only ones that can be shared by interpreters so we don't have to worry about any other str objects.

We trigger clearing the state with the main interpreter, since no other interpreters may exist at that point and _PyUnicode_ClearInterned() is only called during interpreter finalization.

We do not address here the fact that a string will only be interned in the first interpreter that interns it.  In any subsequent interpreters str.state.interned is already set so _PyUnicode_InternInPlace() will skip it.  That needs to be addressed separately from fixing the crasher.
(cherry picked from commit 87e7cb09e4)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-07-21 22:28:22 +02:00
Miss Islington (bot)
957f14d0de
[3.12] gh-105699: Fix a Crasher Related to a Deprecated Global Variable (gh-106923) (#106964)
gh-105699: Fix a Crasher Related to a Deprecated Global Variable (gh-106923)

There was a slight race in _Py_ClearFileSystemEncoding() (when called from _Py_SetFileSystemEncoding()), between freeing the value and setting the variable to NULL, which occasionally caused crashes when multiple isolated interpreters were used.  (Notably, I saw at least 10 different, seemingly unrelated spooky-action-at-a-distance, ways this crashed. Yay, free threading!)  We avoid the problem by only setting the global variables with the main interpreter (i.e. runtime init).
(cherry picked from commit 0ba07b2108)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-07-21 22:27:52 +02:00
Serhiy Storchaka
ffc7678f46
[3.12] gh-106892: Use roles :data: and :const: for referencing module variables (GH-106894) (GH-106954)
(cherry picked from commit d036db728e)
2023-07-21 14:51:00 +03:00