Commit graph

116303 commits

Author SHA1 Message Date
Jérome Perrin
20f7cf2c7f
[3.11] gh-113358: Fix rendering tracebacks with exceptions with a broken __getattr__ (GH-113359) (#114118) 2024-01-19 20:35:57 +00:00
Nikita Sobolev
a4ad7a0ac5
[3.11] gh-108303: Move all doctest related files and tests to Lib/test/test_doctest/ (GH-112109) (#114313)
gh-108303: Move all doctest related files and tests to `Lib/test/test_doctest/` (GH-112109)
2024-01-19 16:12:48 +01:00
Miss Islington (bot)
ac4c6efc70
[3.11] gh-112092: clarify unstable ABI recompilation requirements (GH-112093) (#114261)
gh-112092: clarify unstable ABI recompilation requirements (GH-112093)

Use different versions in the examples for when extensions do and do not need to be recompiled to make the examples easier to understand.
(cherry picked from commit 68a7b78cd5)

Co-authored-by: DerSchinken <53398996+DerSchinken@users.noreply.github.com>
2024-01-18 21:28:34 +01:00
Miss Islington (bot)
4bc0c07051
[3.11] gh-110345: show Tcl/Tk patchlevel in tkinter._test() (GH-110350) (GH-114252)
(cherry picked from commit b8f29b1293)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2024-01-18 16:03:07 +00:00
Miss Islington (bot)
569182c4ad
[3.11] gh-113205: test_multiprocessing.test_terminate: Shorter sleep for threadpools (GH-114186) (GH-114223)
Threads can't be forced to terminate (without potentially corrupting too much
state), so the  expected behaviour of `ThreadPool.terminate` is to wait for
the currently executing tasks to finish.

Use shorter sleep time for threadpools, so if a task manages to start, the test
doesn't block for long.

(cherry picked from commit c1db960608)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-01-18 13:49:26 +01:00
Miss Islington (bot)
363dddba14
[3.11] gh-104522: Fix test_subprocess failure when build Python in the root home directory (GH-114236) (GH-114245)
EPERM is raised when setreuid() fails.
EACCES is set in execve() when the test user has not access to sys.executable.
(cherry picked from commit 311d1e2701)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-18 13:19:18 +01:00
Serhiy Storchaka
2c9872428e
[3.11] gh-104522: Fix OSError raised when run a subprocess (GH-114195) (GH-114243)
Only set filename to cwd if it was caused by failed chdir(cwd).

_fork_exec() now returns "noexec:chdir" for failed chdir(cwd).

(cherry picked from commit e2c097ebde)

Co-authored-by: Robert O'Shea <PurityLake@users.noreply.github.com>
2024-01-18 11:32:57 +00:00
Miss Islington (bot)
9887b0c396
[3.11] gh-114231: Fix indentation in enum.rst (GH-114232) (#114235)
Co-authored-by: Miyashita Yosuke <44266492+miyashiiii@users.noreply.github.com>
2024-01-18 09:29:44 +00:00
Miss Islington (bot)
f49a1ce6b2
[3.11] gh-96905: In IDLE code, stop redefining built-ins 'dict' and 'object' (GH-114227) (#114229)
Prefix 'dict' with 'o', 'g', or 'l' for 'object', 'global', or 'local'.
Suffix 'object' with '_'.
(cherry picked from commit 6f4b242a03)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-01-18 00:05:00 -05:00
Miss Islington (bot)
4ec2e2eeee
[3.11] gh-114211: Update EmailMessage doc about ordered keys (GH-114224) (#114226)
Ordered keys are no longer unlike 'real dict's.
(cherry picked from commit 8cda72037b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-01-17 21:56:03 -05:00
Miss Islington (bot)
2dca68935e
[3.11] gh-38807: Fix race condition in Lib/trace.py (GH-110143) (GH-114207)
Instead of checking if a directory does not exist and thereafter
creating it, directly call os.makedirs() with the exist_ok=True.
(cherry picked from commit 78fcde039a)

Co-authored-by: buermarc <44375277+buermarc@users.noreply.github.com>
2024-01-17 20:26:09 +00:00
Serhiy Storchaka
2b03259022
[3.11] gh-105102: Fix nested unions in structures when the system byteorder is the opposite (GH-105106) (GH-114205)
(cherry picked from commit 0b541f64c4)

Co-authored-by: Sheidan <37596668+Sh3idan@users.noreply.github.com>
2024-01-17 19:58:28 +00:00
Miss Islington (bot)
5dcb15da88
[3.11] Fix typo in tkinter.ttk.rst (GH-106157) (GH-114201)
(cherry picked from commit 7573c44c32)

Co-authored-by: Christophe Nanteuil <35002064+christopheNan@users.noreply.github.com>
2024-01-17 21:24:10 +02:00
Miss Islington (bot)
654c70a655
[3.11] gh-114070: fix token reference warnings in expressions.rst (GH-114169) (#114193)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-01-17 18:53:08 +02:00
Petr Viktorin
8e0c9213ac
[3.11] gh-113858: GH Actions: Make ccache smaller (GH-114082) (#114188)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-17 16:06:52 +00:00
Miss Islington (bot)
67424458d2
[3.11] gh-111777: Fix assertion errors on incorrectly still-tracked GC object destruction (GH-111778) (GH-111990)
In PyObject_GC_Del, in Py_DEBUG mode, when warning about GC objects that
were not properly untracked before starting destruction, take care to
untrack the object _before_ warning, to avoid triggering a GC run and
causing the problem the code tries to warn about. Also make sure to save and
restore any pending exceptions, which the warning would otherwise clobber or
trigger an assertion error on.
(cherry picked from commit ce6a533c4b)

Co-authored-by: T. Wouters <thomas@python.org>
2024-01-17 15:10:12 +01:00
Miss Islington (bot)
99a7bdc646
[3.11] gh-70835: Clarify error message for CSV file opened with wrong newline (GH-113786) (GH-113906)
Based on patch by SilentGhost.
(cherry picked from commit 568d220993)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-17 15:06:39 +01:00
Miss Islington (bot)
76d0c4b688
[3.11] gh-104282: Fix null pointer dereference in lzma._decode_filter_properties (GH-104283) (GH-114182)
(cherry picked from commit 0154405350)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
2024-01-17 13:30:29 +00:00
Miss Islington (bot)
bda62c0b22
[3.11] gh-102468: Document PyCFunction_New* and PyCMethod_New (GH-112557) (GH-114120)
gh-102468: Document `PyCFunction_New*` and `PyCMethod_New` (GH-112557)
(cherry picked from commit a482bc67ee)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-01-17 10:21:16 +01:00
Miss Islington (bot)
8cb1b797fb
[3.11] gh-72284: Revise lists in IDLE doc (GH-114174) (#114176)
Tkinter is a fact, not necessarily a feature.

Reorganize editor key bindings in a logical order
and remove those that do not work, at least on Windows.

Improve shell bindings list.
(cherry picked from commit 4a32275389)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-01-17 03:35:35 -05:00
Miss Islington (bot)
069cca7c2b
[3.11] gh-81479: For Help => IDLE Doc, stop double-spacing some lists. (GH-114168) (#114171)
This matches Firefox format.  Edge double-spaces non-simple
list but I think it looks worse.
(cherry picked from commit e07a400c31)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-01-17 01:35:35 -05:00
Miss Islington (bot)
644b4a1e87
[3.11] gh-112043: Align concurrent.futures.Executor.map docs with implementation (GH-114153) (#114165)
The first parameter is named 'fn', not 'func'.
(cherry picked from commit 8d26db45df)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-17 01:38:06 +00:00
Miss Islington (bot)
b21dd36495
[3.11] gh-88531 Fix dataclass __post_init__/__init__ interplay documentation (gh-107404) (#114163)
* Simplify __post_init__ example usage. It applies to all base classes, not just dataclasses.
(cherry picked from commit 05008c27b7)

Co-authored-by: Steffen Zeile <48187781+Kaniee@users.noreply.github.com>
2024-01-17 01:33:09 +00:00
Miss Islington (bot)
9351b5ddf1
[3.11] gh-94220: Align fnmatch docs with the implementation and amend markup (GH-114152) (#114156)
- Align the argument spec for fnmatch functions with the actual
  implementation.
- Update Sphinx markup to recent recommandations.
- Add link to 'iterable' glossary entry.

(cherry picked from commit 6e84f3b56f)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-16 23:42:57 +01:00
Miss Islington (bot)
21ab20b3a7
[3.11] gh-113659: Skip hidden .pth files (GH-113660) (GH-114144)
Skip .pth files with names starting with a dot or hidden file attribute.
(cherry picked from commit 74208ed0c4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-16 18:56:31 +00:00
Miss Islington (bot)
e7dcab355e
[3.11] Fix 'expresion' typo in IDLE doc (GH-114130) (#114140)
The substantive change is on line 577/593. Rest is header/footer stuff ignored when displaying.
(cherry picked from commit 7a24ecc953)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-01-16 18:31:25 +00:00
Steve Dower
fb5cec98e2
gh-114096: Restore privileges in _winapi.CreateJunction after creating the junction (GH-114089)
This avoids impact on later parts of the application which may be able to do things they otherwise shouldn't.
2024-01-16 17:37:17 +00:00
Erlend E. Aasland
2122e1ee83
[3.11] Docs: Improve multiprocessing.SharedMemory reference (#114093) (#114138)
(cherry picked from b1db6278cf)

Align the multiprocessing shared memory docs with Diatáxis's
recommendations for references.

- use a parameter list for the SharedMemory.__init__() argument spec
- use the imperative mode
- use versionadded, not versionchanged, for added parameters
- reflow touched lines according to SemBr
2024-01-16 17:18:34 +00:00
Miss Islington (bot)
ddc9e34c53
[3.11] gh-114107: test.pythoninfo logs Windows Developer Mode (GH-114121) (#114128)
gh-114107: test.pythoninfo logs Windows Developer Mode (GH-114121)

Also, don't skip the whole collect_windows() if ctypes is missing.

Log also ctypes.windll.shell32.IsUserAnAdmin().
(cherry picked from commit c77f552ec0)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-01-16 16:43:50 +00:00
Miss Islington (bot)
d42e54e9d6
[3.11] gh-114069: Revise Tutorial Methods paragraph (GH-114127) (#114132)
gh-114069: Revise Tutorial Methods paragraph (GH-114127)

Remove excess words in the first and third sentences.
(cherry picked from commit 31a2543c80)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-01-16 16:43:23 +00:00
Erlend E. Aasland
e5ae15f0fe
[3.11] Docs: Align multiprocessing.shared_memory docs with Sphinx recommendations (#114103) (#114114)
(cherry picked from commit af85274086)

- add :class: and :mod: markups where needed
- fix incorrect escaping of a star in ShareableList arg spec
- mark up parameters with stars: *val*
- mark up list of built-in types using list markup
- remove unneeded parentheses from :meth: markups
2024-01-16 13:08:01 +00:00
Miss Islington (bot)
0e92265875
[3.11] gh-114077: Fix OverflowError in socket.sendfile() when pass count >2GiB (GH-114079) (GH-114111)
(cherry picked from commit d4dfad2aa9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-16 13:53:26 +02:00
Barney Gale
f5cbed1114
[3.11] GH-101130: Document multiple arguments for PurePath.[is_]relative_to() (#114034)
3.11-only change as this is already covered in the 3.12+ deprecation
warning.
2024-01-16 01:37:55 +00:00
Miss Islington (bot)
76433f8c45
[3.11] gh-114070: correct the specification of `digit` in the float() docs (GH-114080) (#114095)
gh-114070: correct the specification of ``digit`` in the float() docs (GH-114080)
(cherry picked from commit 4f24b92aa0)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-01-15 22:26:40 +00:00
Hugo van Kemenade
3a181a10b1
[3.11] gh-101100: Fix Sphinx warnings in howto/urllib2.rst and library/http.client.rst (GH-114060) (#114064)
(cherry picked from commit c2808431b3)
2024-01-14 21:14:11 +00:00
Miss Islington (bot)
6fa6a61805
[3.11] gh-101225: Increase the socket backlog when creating a multiprocessing.connection.Listener (GH-113567) (#114019)
gh-101225: Increase the socket backlog when creating a multiprocessing.connection.Listener (GH-113567)

Increase the backlog for multiprocessing.connection.Listener` objects created
 by `multiprocessing.manager` and `multiprocessing.resource_sharer` to
 significantly reduce the risk of getting a connection refused error when creating
 a `multiprocessing.connection.Connection` to them.
(cherry picked from commit c7d59bd8cf)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-14 16:29:30 +01:00
Alois Klink
0d12a64eaf
[3.11] gh-95649: Document that asyncio contains uvloop code (GH-107536) (#114045)
Some of the asyncio SSL changes in GH-31275 [1] were taken from
v0.16.0 of the uvloop project [2]. In order to comply with the MIT
license, we need to just need to document the copyright information.

[1]: https://github.com/python/cpython/pull/31275
[2]: https://github.com/MagicStack/uvloop/tree/v0.16.0

(cherry picked from commit dce30c9cbc)
2024-01-14 02:14:51 +00:00
Mark Dickinson
41edd37160
[3.11] gh-114014: Update fractions.Fraction()'s rational parsing regex (GH-114015) (#114025)
Fix a bug in the regex used for parsing a string input to the `fractions.Fraction` constructor. That bug led to an inconsistent exception message being given for some inputs.

---------

Co-authored-by: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-13 13:22:31 -05:00
Miss Islington (bot)
25af45d9a4
[3.11] gh-114021: Pin various sphinxcontrib extensions to older versions (GH-114022) (#114029)
[3.12] gh-114021: Pin various sphinxcontrib extensions to older versions (GH-114022)
(cherry picked from commit 94b1d1fa38)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2024-01-13 17:44:58 +00:00
Miss Islington (bot)
d7a544ad3b
[3.11] gh-89159: Document missing TarInfo members (GH-91564) (#114007)
gh-89159: Document missing TarInfo members (GH-91564)
(cherry picked from commit 3aa4b839e4)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2024-01-12 23:26:03 +00:00
Miss Islington (bot)
cd8fd2292e
[3.11] datamodel: Fix a typo in `object.__init_subclass__` (GH-111599) (#114005)
datamodel: Fix a typo in ``object.__init_subclass__`` (GH-111599)
(cherry picked from commit a47353d587)

Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
2024-01-12 23:06:14 +00:00
Miss Islington (bot)
2d184b26df
[3.11] Link to the glossary for "magic methods" in `MagicMock` (GH-111292) (#114003)
Link to the glossary for "magic methods" in ``MagicMock`` (GH-111292)

The MagicMock documentation mentions magic methods several times without
actually pointing to the term in the glossary. This can be helpful for
people to fully understand what those magic methods are.
(cherry picked from commit e97da8677f)

Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
2024-01-12 23:01:09 +00:00
Hugo van Kemenade
4bd4367a97
[3.11] gh-101100: Fix Sphinx Lint warnings in Misc/ (GH-113946) (#114001) 2024-01-12 15:58:26 -07:00
Miss Islington (bot)
e276743682
[3.11] Tutorial: Clarify 'nonzero exit status' in the appendix (GH-112039) (#114000)
Tutorial: Clarify 'nonzero exit status' in the appendix (GH-112039)
(cherry picked from commit 32f3684b8f)

Co-authored-by: Andrew Zipperer <47086307+zipperer@users.noreply.github.com>
2024-01-12 22:48:32 +00:00
Miss Islington (bot)
f8dd29030d
[3.11] Docs: Amend codeobject.co_lines docs; end number is exclusive (GH-113970) (#113988)
The end number should be exclusive, not inclusive.
(cherry picked from commit e68806c712)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-01-12 15:10:33 +00:00
Miss Islington (bot)
64d8f39a12
[3.11] gh-113027: Fix test_variable_tzname in test_email (GH-113821) (GH-113832)
Determine the support of the Kyiv timezone by checking the result of
astimezone() which uses the system tz database and not the one
populated by zoneinfo.
(cherry picked from commit 931d7e052e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-12 11:59:23 +00:00
Miss Islington (bot)
96eff8c150
[3.11] gh-113903: Fix an IDLE configdialog test (GH-113973) (#113975)
test_configdialog.HighPageTest.test_highlight_target_text_mouse fails
if a line of the Highlight tab text sample is not visible. If so, bbox()
in click_char() returns None and the unpacking iteration fails.

This occurred on a Devuan Linux system. Fix by moving the
'see character' call inside click_char, just before the bbox call.

Also, reduce the click_char calls to just one per tag name and
replace the other nested function with a dict comprehension.
(cherry picked from commit c4992f4106)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-01-12 03:23:52 +00:00
Miss Islington (bot)
535b1dedb3
[3.11] GH-107678: Improve Unicode handling clarity in `library/re.rst` (GH-107679) (#113966)
GH-107678: Improve Unicode handling clarity in ``library/re.rst`` (GH-107679)
(cherry picked from commit c9b8a22f34)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-12 00:02:35 +00:00
Adam Turner
71288ed8b0
[3.11] GH-92584: Move installation schemes overview to sysconfig docs (GH-108018) (#110214)
* Add new installation path functions subsection

* Add content from install/index to sysconfig

* Fix table

* Update note about installers

* Clean up the list of schemes, remove references to Distutils.
(cherry picked from commit f16e81f368)
2024-01-11 23:48:10 +00:00
Steve Dower
186c021688
gh-81489: Use Unicode APIs for mmap tagname on Windows (GH-14133)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-11 23:04:36 +00:00