Commit graph

118735 commits

Author SHA1 Message Date
Miss Islington (bot)
bc23ad4b99
[3.12] bpo-36796: Clean the error handling in _testcapimodule.c (GH-13085) (GH-113132)
(cherry picked from commit a723a13bf1)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2023-12-14 19:39:57 +00:00
Miss Islington (bot)
15114517dd
[3.12] gh-101100: Fix Sphinx nitpicks in library/collections.abc.rst (GH-113116) (#113136)
gh-101100: Fix Sphinx nitpicks in `library/collections.abc.rst` (GH-113116)
(cherry picked from commit 006355b2a9)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-14 19:32:30 +00:00
Miss Islington (bot)
6b295722aa
[3.12] Add recipe for totient() to demonstrate unique_justseen() and factor(). (gh-113131) (gh-113134) 2023-12-14 19:24:15 +00:00
Miss Islington (bot)
a157881dbc
[3.12] gh-113113: doc: use less ambiguously named variable (gh-113114) (gh-113122) 2023-12-14 16:25:07 +00:00
Miss Islington (bot)
c6c559a669
[3.12] gh-101100: Fix Sphinx nitpicks in library/traceback.rst (GH-113106) (#113111)
gh-101100: Fix Sphinx nitpicks in `library/traceback.rst` (GH-113106)
(cherry picked from commit d9e1b5794a)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-14 14:17:28 +00:00
Miss Islington (bot)
dc568dd226
[3.12] gh-101100: Fix Sphinx nitpicks in library/inspect.rst and reference/simple_stmts.rst (GH-113107) (#113109)
gh-101100: Fix Sphinx nitpicks in `library/inspect.rst` and `reference/simple_stmts.rst` (GH-113107)
(cherry picked from commit 4b3cb082da)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-14 13:37:47 +00:00
Serhiy Storchaka
59a22d3e50
[3.12] gh-112716: Fix SystemError when __builtins__ is not a dict (GH-112770) (GH-113103)
It was raised in two cases:
* in the import statement when looking up __import__
* in pickling some builtin type when looking up built-ins iter, getattr, etc.

(cherry picked from commit 1161c14e8c)
2023-12-14 12:54:25 +00:00
Miss Islington (bot)
913051d2a0
[3.12] gh-113090: Fix test.support.os_support.can_chmod() on Windows (GH-113091) (GH-113099)
(cherry picked from commit c6e953be12)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-14 14:00:40 +02:00
Miss Islington (bot)
9f5209f3c2
[3.12] gh-111049: Fix crash during garbage collection of the BytesIO buffer object (GH-111221) (GH-113096)
(cherry picked from commit bb36f72efc)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-14 10:28:57 +00:00
Miss Islington (bot)
916ef4fbee
[3.12] Fixing typo in DocTestRunner docs (GH-112326) (GH-113097)
(cherry picked from commit b3c21265fa)

Co-authored-by: Daniel Wysocki <dwysocki@users.noreply.github.com>
2023-12-14 10:15:28 +00:00
Miss Islington (bot)
0bd18997d3
[3.12] gh-113086: Add tests for os.chmod() and os.lchmod() (GH-113087) (GH-113088)
Also make test_copymode_symlink_to_symlink in test_shutil more strict.
(cherry picked from commit b4f2c89118)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-14 07:31:46 +00:00
Miss Islington (bot)
c34c9e3b9a
[3.12] gh-112867: fix for WITH_PYMALLOC_RADIX_TREE=0 (GH-112885) (#113068)
gh-112867: fix for WITH_PYMALLOC_RADIX_TREE=0 (GH-112885)

The _obmalloc_usage structure is only defined if the obmalloc radix tree
is enabled.
(cherry picked from commit 890ce430d9)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2023-12-13 13:06:43 -08:00
Miss Islington (bot)
338a5a5f0b
[3.12] bpo-40648: Test modes that file can get with chmod() on Windows (GH-20130) (GH-113070)
Order of tests matter second part makes testing file writable and
possible to remove again.
(cherry picked from commit f5c05e015c)

Co-authored-by: Pavol Babinčák‏ <scroolik@gmail.com>
2023-12-13 20:50:50 +00:00
Miss Islington (bot)
4d7c24b9a9
[3.12] gh-107959: clarify Unix-availability of os.lchmod() (GH-107960) (GH-113066)
gh-107959: clarify Unix-availability of `os.lchmod()` (GH-107960)

POSIX specifies that implementations are not required to support changing the
file mode of symbolic links, but may do so.
Consequently, `lchmod()` is not part of POSIX (but mentioned for implementations
which do support the above).

The current wording of the availability of `os.lchmod()` is rather vague and
improved to clearly tell which POSIX/Unix/BSD-like support the function in
general (those that support changing the file mode of symbolic links).
Further, some examples of major implementations are added.

Data for the BSDs taken from their online manpages.

(cherry picked from commit f14e3d59c9)

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Co-authored-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-12-13 20:01:39 +00:00
Miss Islington (bot)
d84aa5cd28
[3.12] Docs: Fix external link to devguide.python.org (GH-112899) (#113065)
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2023-12-13 19:48:43 +00:00
Miss Islington (bot)
34714f4ac9
[3.12] gh-101100: Improve docs on exception attributes (GH-113057) (#113061)
gh-101100: Improve docs on exception attributes (GH-113057)

(cherry picked from commit d05a180350)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-13 19:07:19 +00:00
Miss Islington (bot)
6601962530
[3.12] [pprint]: Add docstring about PrettyPrinter.underscore_numbers parameter (GH-112963) (#113053)
[pprint]: Add docstring about `PrettyPrinter.underscore_numbers` parameter (GH-112963)
(cherry picked from commit 2a3c37c273)

Co-authored-by: Sequew <88668176+KrySeyt@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2023-12-13 12:38:07 +00:00
Miss Islington (bot)
3bf2a4a382
[3.12] gh-101100: Fix Sphinx warning in references with asterisks (GH-113029) (#113043)
gh-101100: Fix Sphinx warning in references with asterisks (GH-113029)
(cherry picked from commit 3531ea441b)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-13 08:59:47 +00:00
Miss Islington (bot)
e328115254
[3.12] gh-101100: Further improve docs on function attributes (GH-113001) (#113030)
gh-101100: Further improve docs on function attributes (GH-113001)
(cherry picked from commit 81a15ea74e)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-12 20:28:10 +00:00
Miss Islington (bot)
b884d21f10
[3.12] gh-112983: Add the known magic value of 3495 for Python 3.11 bytecode (GH-112985) (#113023)
gh-112983: Add the known magic value of 3495 for Python 3.11 bytecode (GH-112985)

Add the known magic value of 3495 for Python 3.11 bytecode
(cherry picked from commit 616622cab7)

Co-authored-by: wim glenn <jump@wimglenn.com>
2023-12-12 18:24:28 +00:00
Miss Islington (bot)
e34458905b
[3.12] gh-112999: Replace the outdated "deprecated" directives with "versionchanged" (GH-113000) (GH-113019)
(cherry picked from commit fe9991bb67)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-12 17:20:51 +00:00
Miss Islington (bot)
1ee872b27b
[3.12] Update pre-commit to fix Sphinx Lint (GH-113015) (#113017)
Update pre-commit to fix Sphinx Lint (GH-113015)
(cherry picked from commit eafc2381a0)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-12 16:30:00 +00:00
Terry Jan Reedy
fd3b894725
[3.12] gh-83162: Rename re.error in idlelib (GH-101677) (#112987)
Backport idlelib part of #101677 with simple rename.
2023-12-12 10:53:58 -05:00
Hugo van Kemenade
54fcfbde30
[3.12] gh-101100: Improve documentation on function attributes (GH-112933) (#112974)
(cherry picked from commit 4c5b9c107a)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-12 10:10:27 +00:00
Terry Jan Reedy
7d24eb854e
[3.12] gh-112953: Rename idlelib/NEWS.txt to News3.txt and update (GH-112988) (#112990) 2023-12-12 01:01:56 -05:00
Miss Islington (bot)
ac8adf97c4
[3.12] gh-108303: Move double_const to test_import where it belongs (GH-112108) (#112976)
gh-108303: Move `double_const` to `test_import` where it belongs (GH-112108)
(cherry picked from commit 0738b9a338)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-12-11 19:00:45 +00:00
Miss Islington (bot)
663945e5a6
[3.12] gh-94606: Fix error when message with Unicode surrogate not surrogateescaped string (GH-94641) (GH-112971)
(cherry picked from commit 27a5fd8cb8)

Co-authored-by: Sidney Markowitz <sidney@sidney.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-11 16:48:06 +00:00
Miss Islington (bot)
ceabbeaca3
[3.12] gh-112898: warn about unsaved files when quitting IDLE on macOS (GH-112939) (#112960)
gh-112898: warn about unsaved files when quitting IDLE on macOS (GH-112939)

* gh-112898: warn about unsaved files when quitting IDLE on macOS

Implement the TK function ``::tk::mac::Quit`` on macOS to
ensure that IDLE asks about saving unsaved files when
quitting IDLE.

(cherry picked from commit 3251ba8f1a)


Co-authored-by: Christopher Chavez chrischavez@gmx.us

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2023-12-11 17:14:15 +01:00
Pablo Galindo Salgado
e4d2fb242a
[3.12] gh-112943: Correctly compute end offsets for multiline tokens in the tokenize module (GH-112949) (#112957)
(cherry picked from commit a135a6d2c6)
2023-12-11 12:48:19 +00:00
Miss Islington (bot)
f3933d4b98
[3.12] Fix SyntaxWarning in test_syntax.py (GH-112944) (GH-112955)
(cherry picked from commit 97cd45bfdb)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2023-12-11 12:13:01 +00:00
Miss Islington (bot)
78a5010a4e
[3.12] GH-101986: Support translation for Limited/Unstable API & Stable ABI (GH-107680) (#112940)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-10 19:23:14 +00:00
Miss Islington (bot)
68657e2b73
[3.12] gh-109980: Fix test_tarfile_vs_tar on macOS (GH-112905) (#112927)
gh-109980: Fix test_tarfile_vs_tar on macOS (GH-112905)

On recentish macOS versions the system tar
command includes system metadata (ACLs, extended attributes
and resource forks) in the tar archive, which
shutil.make_archive will not do. This can cause
spurious test failures.
(cherry picked from commit dd2ebdf89f)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2023-12-10 19:49:39 +01:00
Miss Islington (bot)
c108080626
Doc: c-api: fix order of PyMemberDef fields (GH-112879)
Doc: c-api: fix order of PyMemberDef fields (GH-112879)
(cherry picked from commit 42a86df3a3)
2023-12-10 17:50:05 +00:00
Miss Islington (bot)
02fbe89342
[3.12] gh-101100: Fix Sphinx warning in library/http.cookies.rst (GH-112908) (#112929)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Fix Sphinx warning in library/http.cookies.rst (GH-112908)
2023-12-10 12:59:25 +00:00
Miss Islington (bot)
81c2df0f8b
[3.12] Docs: Use 'f-strings' as header (GH-112888) (#112923)
Docs: Use 'f-strings' as header (GH-112888)
(cherry picked from commit 5bf7580d72)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-10 11:36:01 +02:00
Miss Islington (bot)
fd5d3aec2a
[3.12] IDLE: Tweak iomenu.IOBinding.maybesave (GH-112914) (#112917)
Add docstring, use f-string, simplify code.
(cherry picked from commit ca1bde8943)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-10 02:56:28 +00:00
Miss Islington (bot)
b23034de9d
[3.12] gh-101100: Improve documentation of TracebackType attributes (GH-112884) (#112911)
gh-101100: Improve documentation of `TracebackType` attributes (GH-112884)
(cherry picked from commit 96f64a2b1b)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-09 22:50:33 +00:00
Alex Waygood
ebcf7577a7
[3.12] gh-101100: Fix Sphinx nitpicks in library/tempfile.rst (#112886) (#112910)
(cherry-picked from commit 54410e6bd9)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-09 22:47:01 +00:00
Ronald Oussoren
65371511b9
[3.12] gh-110820: Disable test_signal.test_stress_modifying_handlers on macOS (GH-112834)
* gh-110820: Make sure processor specific defines are correct for Universal 2 build on macOS (#112828)

A number of processor specific defines are different for x86-64 and
arm64, and need to be adjusted in pymacconfig.h.

(cherry picked from commit 15a80b15af)
2023-12-09 15:53:16 +01:00
Serhiy Storchaka
7e82c626c4
[3.12] gh-79429: Ignore FileNotFoundError when remove a temporary directory in the multiprocessing finalizer (GH-112865) 2023-12-09 15:13:40 +02:00
Miss Islington (bot)
259a4af3d2
[3.12] gh-112758: Updated pathlib documentation for PurePath.match (GH-112814) (#112882)
gh-112758: Updated pathlib documentation for PurePath.match (GH-112814)
(cherry picked from commit ed8720ace4)

Co-authored-by: Taylor Packard <3.t.packard@gmail.com>
2023-12-08 18:26:46 +00:00
Alex Waygood
0260c38e80
[3.12] gh-101100: Fix Sphinx nits in library/contextlib.rst (#112870) (#112875)
(cherry-picked from commit e4c0876033)
2023-12-08 14:03:38 +00:00
Miss Islington (bot)
b39e90e4d1
[3.12] gh-101100: Improve documentation for attributes on instance methods (GH-112832) (#112872)
gh-101100: Improve documentation for attributes on instance methods (GH-112832)
(cherry picked from commit ed21d0c1f4)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-08 13:25:52 +00:00
Miss Islington (bot)
7ef3a1e64b
[3.12] gh-101100: Fix Sphinx nitpicks in library/shelve.rst (GH-112836) (#112868)
gh-101100: Fix Sphinx nitpicks in `library/shelve.rst` (GH-112836)
(cherry picked from commit 3cdcc2edf8)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-08 12:37:45 +00:00
Miss Islington (bot)
46f86f50be
[3.12] gh-110017: Disable test_signal.test_stress_modifying_handlers on macOS (GH-112834) (#112851)
gh-110017: Disable test_signal.test_stress_modifying_handlers on macOS (GH-112834)

Test test_stress_modifying_handlers in test_signal can crash
the interpreter due to a bug in macOS. Filed as FB13453490
with Apple.
(cherry picked from commit bf0beae6a0)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2023-12-08 10:07:34 +01:00
Thomas Wouters
8b58d12f6c Merge branch '3.12' of https://github.com/python/cpython into 3.12 2023-12-08 01:40:16 +01:00
Thomas Wouters
71cbc6a78f Post 3.12.1 2023-12-08 01:39:55 +01:00
Alex Waygood
fb02db75cb
[3.12] gh-101100: Silence Sphinx warnings when ntpath or posixpath are referenced (#112833) (#112857)
(cherry-picked from commit 2c3906bc4b)
2023-12-07 21:10:12 +00:00
Thomas Wouters
2305ca5144 Python 3.12.1 2023-12-07 21:46:47 +01:00
Eric Snow
c0fc88fa2f
[3.12] gh-112826: Fix the threading Module When _thread is Missing _is_main_interpreter() (#112850)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-07 20:15:20 +00:00