Commit graph

118735 commits

Author SHA1 Message Date
Barney Gale
0ee681a665
[3.12] GH-78988: Document pathlib.Path.glob() exception propagation. (GH-114036) (#114154)
We propagate the `OSError` from the `is_dir()` call on the top-level
directory, and suppress all others.

(cherry picked from commit 7092b3f131)
2024-01-16 22:39:09 +00:00
Miss Islington (bot)
59da12613a
[3.12] gh-113659: Skip hidden .pth files (GH-113660) (GH-114143)
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:57:14 +00:00
Miss Islington (bot)
60f5f7513f
[3.12] Fix 'expresion' typo in IDLE doc (GH-114130) (#114139)
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:27:43 +00:00
Miss Islington (bot)
10f00294a0
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.
(cherry picked from commit de4ced54eb)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-01-16 17:39:59 +00:00
Erlend E. Aasland
91739149f0
[3.12] Docs: Improve multiprocessing.SharedMemory reference (#114093) (#114137)
(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:17:29 +00:00
Miss Islington (bot)
1d5bca65e2
[3.12] gh-114107: test.pythoninfo logs Windows Developer Mode (GH-114121) (#114129)
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:53:29 +00:00
Miss Islington (bot)
3eeab87feb
[3.12] gh-114069: Revise Tutorial Methods paragraph (GH-114127) (#114131)
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:20 +00:00
Petr Viktorin
74485c0323
[3.12] gh-113858: GH Actions: Make ccache smaller (GH-113859, GH-113945) (GH-114082)
This backports 3 PRs:

- https://github.com/python/cpython/pull/113859

  Only save ccache on pushes

- https://github.com/python/cpython/pull/113945

  Cut down ccache size

  - Only save the ccache in the main reusable builds, not on builds that
    don't use special build options:
      - Generated files check
    - OpenSSL tests
    - Hypothesis tests
  - Halve the max cache size, to 200M

- https://github.com/python/cpython/pull/114113

  Fixup for the above

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-16 16:28:27 +01:00
Erlend E. Aasland
4888db15fe
[3.12] Docs: Align multiprocessing.shared_memory docs with Sphinx recommendations (#114103) (#114112)
(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 12:56:07 +00:00
Miss Islington (bot)
045adb1ad8
[3.12] gh-114077: Fix OverflowError in socket.sendfile() when pass count >2GiB (GH-114079) (GH-114110)
(cherry picked from commit d4dfad2aa9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-16 13:53:02 +02:00
Raymond Hettinger
2b025793e1
[3.12] Update KDE recipe to match the standard use of the h parameter (gh-113958) (#114098) 2024-01-15 22:46:01 -06:00
Miss Islington (bot)
f6315edca1
[3.12] gh-114070: correct the specification of `digit` in the float() docs (GH-114080) (#114094)
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:25:51 +00:00
Miss Islington (bot)
41a94c9e7b
[3.12] gh-109862: Fix test_create_subprocess_with_pidfd when it was run separately (GH-113991) (GH-114072)
(cherry picked from commit f8a79109d0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-15 07:55:35 +00:00
Hugo van Kemenade
cc11c76da7
[3.12] gh-101100: Fix Sphinx warnings in howto/urllib2.rst and library/http.client.rst (GH-114060) (#114063)
(cherry picked from commit c2808431b3)
2024-01-14 21:14:08 +00:00
Miss Islington (bot)
2aea0e967a
[3.12] gh-101225: Increase the socket backlog when creating a multiprocessing.connection.Listener (GH-113567) (#114018)
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:15 +01:00
Alois Klink
fa7d8e97c2
[3.12] gh-95649: Document that asyncio contains uvloop code (GH-107536) (#114046)
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:15:06 +00:00
Miss Islington (bot)
e08179216b
[3.12] gh-114014: Update fractions.Fraction()'s rational parsing regex (GH-114015) (#114023)
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.

---------

(cherry picked from commit dd56b57483)

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: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-13 13:21:34 -05:00
Ronald Oussoren
94b1d1fa38
[3.12] gh-114021: Pin various sphinxcontrib extensions to older versions (#114022) 2024-01-13 17:39:02 +00:00
Miss Islington (bot)
1ea6658342
[3.12] gh-89159: Document missing TarInfo members (GH-91564) (#114006)
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:08 +00:00
Miss Islington (bot)
d577225104
[3.12] datamodel: Fix a typo in `object.__init_subclass__` (GH-111599) (#114004)
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:05:48 +00:00
Miss Islington (bot)
b9e15bef82
[3.12] Link to the glossary for "magic methods" in `MagicMock` (GH-111292) (#114002)
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:00:50 +00:00
Hugo van Kemenade
27f7f3712f
[3.12] gh-101100: Fix Sphinx Lint warnings in Misc/ (GH-113946) (#113998)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-12 15:58:16 -07:00
Miss Islington (bot)
68d1e30c94
[3.12] Tutorial: Clarify 'nonzero exit status' in the appendix (GH-112039) (#113999)
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:59 +00:00
Miss Islington (bot)
7b7cf75c02
gh-111877: Fixes stat() handling for inaccessible files on Windows (GH-113716)
(cherry picked from commit ed066481c7)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-01-12 15:53:27 +00:00
Miss Islington (bot)
eb22afb004
[3.12] Docs: Amend codeobject.co_lines docs; end number is exclusive (GH-113970) (#113987)
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:43 +00:00
Miss Islington (bot)
8046eb0cc8
[3.12] gh-113027: Fix test_variable_tzname in test_email (GH-113821) (GH-113831)
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 12:00:17 +00:00
Miss Islington (bot)
d63e4c49d3
[3.12] gh-113903: Fix an IDLE configdialog test (GH-113973) (#113974)
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:39:45 +00:00
Miss Islington (bot)
d50d074cd9
[3.12] Improve kde graph with better caption and number formatting (gh-113967) (gh-113968) 2024-01-11 18:49:10 -06:00
Miss Islington (bot)
bd9ea91e5f
[3.12] GH-107678: Improve Unicode handling clarity in `library/re.rst` (GH-107679) (#113965)
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:28 +00:00
Miss Islington (bot)
b902671d36
gh-81489: Use Unicode APIs for mmap tagname on Windows (GH-14133)
(cherry picked from commit b4d4aa9e8d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-11 23:13:02 +00:00
Miss Islington (bot)
5c238225f6
[3.12] gh-112419: Document removal of sys.meta_path's 'find_module' fallback (GH-112421) (#113934)
(cherry picked from commit ec23e90082)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-11 09:49:21 +00:00
Miss Islington (bot)
fa181fcf21
[3.12] gh-109858: Protect zipfile from "quoted-overlap" zipbomb (GH-110016) (GH-113912)
Raise BadZipFile when try to read an entry that overlaps with other entry or
central directory.
(cherry picked from commit 66363b9a7b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-11 11:24:29 +02:00
Miss Islington (bot)
3f607a0324
[3.12] gh-113896: Fix test_builtin.BuiltinTest.test___ne__() (GH-113897) (#113928)
gh-113896: Fix test_builtin.BuiltinTest.test___ne__() (GH-113897)

Fix DeprecationWarning in test___ne__().

(cherry picked from commit 9d33c23857)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-01-10 23:56:57 +00:00
Miss Islington (bot)
4050a150e9
gh-87868: Sort and remove duplicates in getenvironment() (GH-102731)
(cherry picked from commit c31be58da8)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-01-10 23:43:39 +00:00
Miss Islington (bot)
3fc45e6c4e
[3.12] gh-113625: Align object addresses in the Descriptor HowTo Guide (GH-113894) (#113922)
gh-113625: Align object addresses in the Descriptor HowTo Guide (GH-113894)
(cherry picked from commit 901a971e16)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2024-01-10 18:32:54 +01:00
Miss Islington (bot)
59a7b9495b
[3.12] gh-70835: Clarify error message for CSV file opened with wrong newline (GH-113786) (GH-113905)
Based on patch by SilentGhost.
(cherry picked from commit 568d220993)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-10 13:26:04 +00:00
Miss Islington (bot)
84677ff19c
[3.12] gh-113594: Fix UnicodeEncodeError in TokenList.fold() (GH-113730) (GH-113907)
It occurred when try to re-encode an unknown-8bit part combined with non-unknown-8bit part.
(cherry picked from commit e9d5b6ea2d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-10 13:21:50 +00:00
Miss Islington (bot)
082998c3af
[3.12] gh-113664: Improve style of Big O notation (GH-113695) (GH-113909)
Use cursive to make it looking like mathematic formulas.
(cherry picked from commit a8629816c6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-10 13:08:08 +00:00
Miss Islington (bot)
7530c612d1
[3.12] gh-113877: Fix Tkinter method winfo_pathname() on 64-bit Windows (GH-113900) (GH-113901)
winfo_id() converts the result of "winfo id" command to integer, but
"winfo pathname" command requires an argument to be a hexadecimal number
on Win64.
(cherry picked from commit 1b7e0024a1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-10 10:53:27 +00:00
Miss Islington (bot)
159e3db1f7
[3.12] GH-113661: unittest runner: Don't exit 5 if tests were skipped (GH-113856) (#113875)
GH-113661: unittest runner: Don't exit 5 if tests were skipped (GH-113856)

The intention of exiting 5 was to detect issues where the test suite
wasn't discovered at all. If we skipped tests, it was correctly
discovered.
(cherry picked from commit 3a9096c337)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
2024-01-09 13:34:38 -08:00
Miss Islington (bot)
85cf360d29
[3.12] gh-113781: Silence AttributeError in warning module during Python finalization (GH-113813) (GH-113873)
The tracemalloc module can already be cleared.
(cherry picked from commit 0297418cac)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-09 22:40:30 +02:00
Miss Islington (bot)
9a6b99ee8b
[3.12] Simplify binomial approximation example with random.binomialvariate() (gh-113871) (gh-113872) 2024-01-09 13:24:55 -06:00
Miss Islington (bot)
6b6f91ec88
[3.12] gh-113842: Add missing error check for PyIter_Next() in Python/symtable.c (GH-113843) (GH-113851)
(cherry picked from commit fda901a1ff)

Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
2024-01-09 11:00:07 +00:00
Hugo van Kemenade
7e894a4baf
[3.12] gh-101100: Fix Sphinx warnings for 2.6 port-specific deprecations (GH-113752) (#113846) 2024-01-09 11:58:55 +02:00
Miss Islington (bot)
cdd703d131
[3.12] gh-113692: skip a test if multiprocessing isn't available. (GH-113704) (GH-113844)
(cherry picked from commit 842b738129)
2024-01-09 08:13:41 +00:00
Miss Islington (bot)
cd87737a1d
[3.12] Docs: Link tokens in the format string grammars (GH-108184) (#113839)
Docs: Link tokens in the format string grammars (GH-108184)
(cherry picked from commit f3d5d4aa8f)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-01-09 02:54:07 +00:00
Miss Islington (bot)
0b31a50ecd
[3.12] Minor algebraic simplification for the totient() recipe (gh-113822) (gh-113823) 2024-01-08 19:22:42 +00:00
Miss Islington (bot)
7390dffce0
[3.12] gh-74678: Increase base64 test coverage (GH-21913) (GH-113811)
Ensure the character y is disallowed within an Ascii85 5-tuple.

(cherry picked from commit 802d4954f1)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Lee Cannon <leecannon@leecannon.xyz>
2024-01-08 11:20:36 +00:00
Miss Islington (bot)
ad2d5ec97e
[3.12] gh-80109: Fix io.TextIOWrapper dropping the internal buffer during write() (GH-22535) (GH-113808)
io.TextIOWrapper was dropping the internal decoding buffer
during read() and write() calls.
(cherry picked from commit 73c9326563)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2024-01-08 11:00:30 +00:00
Miss Islington (bot)
db6f297d44
[3.12] gh-112795: Allow / folder in a zipfile (GH-112932) (#113789)
gh-112795: Allow `/` folder in a zipfile (GH-112932)

Allow extraction (no-op) of a "/" folder in a zipfile, they are commonly added by some archive creation tools.

(cherry picked from commit 541c5dbb81)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-01-07 01:45:37 +00:00