Commit Graph

122182 Commits

Author SHA1 Message Date
Miss Islington (bot) f15fbe9991
gh-118507 : Refactor `nt._path_is*` to improve applicability for other cases (GH-118755)
(cherry picked from commit b64182550f)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-05-22 00:29:34 +00:00
Miss Islington (bot) f371565169
[3.13] gh-119102: Fix REPL for dumb terminal (GH-119332) (#119359)
The site module gets the __main__ module to get _pyrepl.__main__.
(cherry picked from commit de8f530841)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-05-22 00:14:44 +00:00
Miss Islington (bot) 05820164ce
[3.13] Docs: Add central references to free-threading-related options (GH-119017) (#119367)
Docs: Add central references to free-threading-related options (GH-119017)
(cherry picked from commit 9fa206aaec)

Co-authored-by: Brett Simmers <swtaarrs@users.noreply.github.com>
2024-05-21 23:16:59 +00:00
Miss Islington (bot) fef202f97b
[3.13] Fix typos in documentation (GH-119295) (#119337)
Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
2024-05-21 22:07:20 +00:00
Miss Islington (bot) 8860f83e4b
[3.13] gh-119035: Add Ctrl+← and Ctrl+→ word-skipping keybindings to new repl (GH-119248) (#119323)
add word-skipping ctrl keybindings to new repl
(cherry picked from commit 0398d93392)

Co-authored-by: Alastair Stanley <alastairstanley@ntlworld.com>
2024-05-21 17:16:06 -04:00
Miss Islington (bot) 256b791fd6
[3.13] gh-110383: Document `socket.makefile()` accepts combined modes (GH-119150) (#119324)
The supported mode values are 'r', 'w', and 'b', or a combination of those.
(cherry picked from commit 62a29be5bb)

Co-authored-by: Daniel Williams <dann0a@gmail.com>
2024-05-21 18:44:53 +00:00
Miss Islington (bot) 11ca1d9d53
[3.13] GH-110383: Improve Tutorial for Input Ouput (GH-119230) (GH-119326)
GH-110383: Improve Tutorial for Input Ouput (GH-119230)

(cherry picked from commit 9db2fd7eda)

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
2024-05-21 19:54:26 +02:00
Miss Islington (bot) d93c4f9b1c
[3.13] GH-119292: Add job to JIT CI to build and test with --disable-gil (GH-119314)
(cherry picked from commit c4722cd057)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-05-21 16:17:49 +00:00
Miss Islington (bot) dcb8030c53
[3.13] gh-119053: Implement the fast path for list.__getitem__ (gh-119112) (gh-119309)
gh-119053: Implement the fast path for list.__getitem__ (gh-119112)
(cherry picked from commit ab4263a82a)

Co-authored-by: Donghee Na <donghee.na@python.org>
2024-05-21 14:42:22 +00:00
Hugo van Kemenade 1929b7e2bf
[3.13] Docs: Ensure no warnings are found in the NEWS file before a given line number (GH-119221) (#119261) 2024-05-21 08:40:08 -06:00
Miss Islington (bot) f028451d95
[3.13] gh-119102: Fix REPL for dumb terminal (GH-119269) (#119308)
gh-119102: Fix REPL for dumb terminal (GH-119269)

Use CAN_USE_PYREPL of _pyrepl.__main__ in the site module to decide
if _pyrepl.write_history_file() can be used.
(cherry picked from commit 73f4a58d36)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-05-21 13:46:11 +00:00
Miss Islington (bot) 49ad4d077f
[3.13] Use `fail-fast: false` in `mypy.yml` (GH-119297) (#119304)
Use `fail-fast: false` in `mypy.yml` (GH-119297)

See docs about this setting: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actionsGH-jobsjob_idstrategyfail-fast
(cherry picked from commit b365332906)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-21 12:47:00 +00:00
Miss Islington (bot) db64dae745
[3.13] gh-74929: PEP 667 general docs update (gh-119291)
* expand on What's New entry for PEP 667 (including porting notes)
* define 'optimized scope' as a glossary term
* cover comprehensions and generator expressions in locals() docs
* review all mentions of "locals" in documentation (updating if needed)
* review all mentions of "f_locals" in documentation (updating if needed)

(cherry picked from commit e870c852c0)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-05-21 21:35:26 +10:00
Miss Islington (bot) f7303cd967
[3.13] gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175) (#119289)
gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175)

------

(cherry picked from commit 538ed5e481)

Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
2024-05-21 03:53:29 +00:00
Miss Islington (bot) 24b0e8ddb4
[3.13] gh-118912: Remove description of issue fixed in 3.5 from autospeccing guide (GH-119232) (#119284)
gh-118912: Remove description of issue fixed in 3.5 from autospeccing guide (GH-119232)

* Remove description of issue fixed in 3.5 from autospeccing guide

* Make autospeccing note text more succint and lint whitespace

* Add linting changes (missed in last commit)

---------

(cherry picked from commit 7e57640c7e)

Co-authored-by: Shauna <shaunagm@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-05-20 23:50:23 +00:00
Miss Islington (bot) d8fbe5b64a
[3.13] gh-108267 Fix another dataclasses docs typo (GH-119277) (#119279)
gh-108267 Fix another dataclasses docs typo (GH-119277)
(cherry picked from commit 423bbcbbc4)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-20 22:53:32 +00:00
Miss Islington (bot) 42a8d11752
[3.13] gh-119050: Add XML support to libregrtest refleak checker (GH-119148) (#119270)
gh-119050: Add XML support to libregrtest refleak checker (GH-119148)

regrtest test runner: Add XML support to the refleak checker
(-R option).

* run_unittest() now stores XML elements as string, rather than
  objects, in support.junit_xml_list.
* runtest_refleak() now saves/restores XML strings before/after
  checking for reference leaks. Save XML into a temporary file.
(cherry picked from commit 9257731f5d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-05-20 22:50:20 +00:00
Miss Islington (bot) 071d996e13
[3.13] gh-119253: use ImportError in _ios_support (GH-119254) (#119265)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-05-20 22:21:28 +00:00
Miss Islington (bot) 572b0b0809
[3.13] gh-119189: Add more tests for mixed Fraction arithmetic (GH-119236) (GH-119255)
(cherry picked from commit fe67af1963)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-20 21:00:20 +00:00
Miss Islington (bot) b4462aaed6
[3.13] gh-118760: Restore the default value of tkinter.wantobjects to 1 (GH-118784) (GH-119251)
It was set to 2 in 65f5e586a1 (GH-98592).
(cherry picked from commit e188527c34)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-20 20:28:42 +00:00
Miss Islington (bot) 906f6cb656
[3.13] Use correct markup in unittest.mock.reset_mock documentation (GH-119207) (GH-119250)
Use correct markup in unittest.mock.reset_mock documentation (GH-119207)
(cherry picked from commit 6b80a5b20f)

Co-authored-by: Tialo <65392801+Tialo@users.noreply.github.com>
2024-05-20 22:12:38 +02:00
Miss Islington (bot) 054f1af811
[3.13] gh-92081: Fix for email.generator.Generator with whitespace between encoded words. (GH-92281) (#119245)
* Fix for email.generator.Generator with whitespace between encoded words.

email.generator.Generator currently does not handle whitespace between
encoded words correctly when the encoded words span multiple lines.  The
current generator will create an encoded word for each line.  If the end
of the line happens to correspond with the end real word in the
plaintext, the generator will place an unencoded space at the start of
the subsequent lines to represent the whitespace between the plaintext
words.

A compliant decoder will strip all the whitespace from between two
encoded words which leads to missing spaces in the round-tripped
output.

The fix for this is to make sure that whitespace between two encoded
words ends up inside of one or the other of the encoded words.  This
fix places the space inside of the second encoded word.

A second problem happens with continuation lines.  A continuation line that
starts with whitespace and is followed by a non-encoded word is fine because
the newline between such continuation lines is defined as condensing to
a single space character.  When the continuation line starts with whitespace
followed by an encoded word, however, the RFCs specify that the word is run
together with the encoded word on the previous line.  This is because normal
words are filded on syntactic breaks by encoded words are not.

The solution to this is to add the whitespace to the start of the encoded word
on the continuation line.

Test cases are from GH-92081

* Rename a variable so it's not confused with the final variable.
(cherry picked from commit a6fdb31b67)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2024-05-20 20:01:56 +00:00
Miss Islington (bot) d8c562af55
[3.13] gh-112844: Update CPE references for external dependencies (GH-118521) (#119237)
Co-authored-by: Seth Michael Larson <seth@python.org>
2024-05-20 13:32:38 -06:00
Miss Islington (bot) fda3291643
[3.13] DOCS: Suggest always calling exec with a globals argument and no locals argument (GH-119235) (#119239)
DOCS: Suggest always calling exec with a globals argument and no locals argument (GH-119235)

Many users think they want a locals argument for various reasons but they do not
understand that it makes code be treated as a class definition. They do not want
their code treated as a class definition and get surprised. The reason not
to pass locals specifically is that the following code raises a `NameError`:

```py
exec("""
def f():
    print("hi")

f()

def g():
    f()
g()
""", {}, {})
```

The reason not to leave out globals is as follows:

```py
def t():
    exec("""
def f():
    print("hi")

f()

def g():
    f()
g()
    """)
```
(cherry picked from commit 7e1a130b8f)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2024-05-20 18:15:25 +00:00
Miss Islington (bot) a6b873fb54
[3.13] GH-119146: Don't run JIT CI on unrelated changes (GH-119226)
(cherry picked from commit 5307f44fb9)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-20 17:26:28 +00:00
Miss Islington (bot) e370b642ea
[3.13] gh-115119: Fall back to bundled libmpdec if system libmpdec is not found (GH-119196) (#119217)
(cherry picked from commit 642b25b9a8)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-05-20 16:10:21 +00:00
Miss Islington (bot) 8f3fc01c4c
[3.13] [docs] TypeVarTuple default is keyword-only (GH-119215) (#119224)
(cherry picked from commit e406b399f9)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2024-05-20 15:57:19 +00:00
Miss Islington (bot) a52ed7e6d9
[3.13] gh-119185: Fix typo in `_pyrepl.pager`: `tempfilepager` should be `tempfile_pager` (GH-118881) (#119211)
Fix typo in `_pyrepl.pager`: `tempfilepager` should be `tempfile_pager`

The name with no underscore doesn't exist.
(cherry picked from commit 05e1dce76d)

Co-authored-by: Thanos <111999343+Sachaa-Thanasius@users.noreply.github.com>
2024-05-20 15:10:40 +00:00
Miss Islington (bot) cbf064b096
[3.13] typing docs: Fix formatting issue (GH-119210) (#119212)
typing docs: Fix formatting issue (GH-119210)
(cherry picked from commit 72d07dd30b)

Co-authored-by: David Foster <david@dafoster.net>
2024-05-20 15:08:49 +00:00
Miss Islington (bot) 3a8ab99bf7
[3.13] gh-119121: Fix and test `async.staggered.staggered_race` (GH-119173) (#119206)
gh-119121: Fix and test `async.staggered.staggered_race` (GH-119173)
(cherry picked from commit 16b46ebd2b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-20 11:31:31 +00:00
Miss Islington (bot) 3b90807257
[3.13] IDLE: fix url in config.py comment (GH-119198) (#119199)
IDLE: fix url in config.py comment (GH-119198)
(cherry picked from commit 357f5a1f73)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-05-20 06:27:51 +00:00
Miss Islington (bot) 27b61c17a1
[3.13] GH-119113: Raise `TypeError` from `pathlib.PurePath.with_suffix(None)` (GH-119124) (#119183)
Restore behaviour from 3.12 when `path.with_suffix(None)` is called.
(cherry picked from commit 3c28510b98)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-05-19 16:27:12 +00:00
Miss Islington (bot) fdc50bac16
[3.13] GH-118447: Fix FreeBSD test failures. (GH-119170) (#119181)
GH-118447: Fix FreeBSD test failures. (GH-119170)

Apparently only macOS requires read permission to call `readlink()` on a
symlink.
(cherry picked from commit 4b76671728)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-05-19 16:22:51 +00:00
Miss Islington (bot) bc5e47ccb7
[3.13] marshal docs: Remove reference to "Sun" (GH-119161) (#119167)
Nobody has been using a Sun machine for a long time. When I saw
this sentence in a lightning talk just now, I thought it was talking
about sending Python code on a spacecraft.
(cherry picked from commit 697465ff88)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-19 02:33:04 +00:00
Miss Islington (bot) 7407267ce4
[3.13] GH-118447: Fix handling of unreadable symlinks in `os.path.realpath()` (GH-118489) (#119163)
(cherry picked from commit caf6064a1b)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-05-18 23:12:19 +00:00
Miss Islington (bot) 91296146d5
[3.13] gh-119050: Add type hints to libregrtest/results.py (GH-119144) (#119156)
gh-119050: Add type hints to libregrtest/results.py (GH-119144)

Sort also 'omitted' in TestResults.display_result().
(cherry picked from commit 30b4e9f9c4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-05-18 21:05:58 +00:00
Miss Islington (bot) ec88e9f686
[3.13] gh-119132: Update sys.version to identify free-threaded or not. (gh-119134) (#119153)
gh-119132: Update sys.version to identify free-threaded or not. (gh-119134)
(cherry picked from commit c141d43937)

Co-authored-by: Donghee Na <donghee.na@python.org>
2024-05-18 16:49:11 -04:00
Miss Islington (bot) 641e59db59
[3.13] docs: make mimalloc license text literal (GH-119046) (#119149)
docs: make mimalloc license text literal (GH-119046)
(cherry picked from commit 691429702f)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-05-18 16:40:07 +00:00
Miss Islington (bot) 9c2de86b5b
[3.13] gh-119132: Log sys._is_gil_enabled() in test.pythoninfo (GH-119140) (#119143)
gh-119132: Log sys._is_gil_enabled() in test.pythoninfo (GH-119140)
(cherry picked from commit 74072a3ffc)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-05-18 13:46:21 +00:00
Miss Islington (bot) 1bb3a9df1b
[3.13] gh-119078: Clarify venv tutorial (GH-119129) (GH-119142)
(cherry picked from commit 0f5e8bed63)
2024-05-18 13:06:23 +01:00
Miss Islington (bot) 374655fa83
[3.13] Minor improvements to the docs for itertools.tee() (gh-119135) (gh-119136) 2024-05-18 01:51:04 -05:00
Miss Islington (bot) ced71d39cf
[3.13] gh-119049: Fix incorrect display of warning which is constructed by C API (GH-119063) (GH-119106)
The source line was not displayed if the warnings module had not yet
been imported.
(cherry picked from commit 100c7ab00a)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-05-17 18:16:58 +03:00
Miss Islington (bot) ada4ad0e24
[3.13] Fix typos in documentation (GH-119092) (#119116)
Fix typos in documentation (GH-119092)
(cherry picked from commit 65de194dd8)

Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-17 10:57:20 +00:00
Miss Islington (bot) acffe20683
[3.13] GH-118943: Fix a race condition when generating jit_stencils.h (GH-119101)
(cherry picked from commit 4702b7b5bd)
2024-05-16 14:37:56 -04:00
Miss Islington (bot) 45fbca983c
[3.13] Explain how to install LLVM on Fedora (GH-119100)
(cherry picked from commit ab73bcdf73)
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-05-16 16:57:40 +00:00
Miss Islington (bot) c69fe804b6
[3.13] gh-108267: Fix object.__setattr__ regression in dataclasses docs (GH-119082) (#119097)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-05-16 13:56:42 +00:00
Miss Islington (bot) 8a4730e95e
[3.13] Add Tkinter tests for different events (GH-118778) (GH-119091)
(cherry picked from commit b6839942a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-16 13:17:19 +03:00
Miss Islington (bot) 1dc7fcd803
[3.13] gh-119064: Use os_helper.FakePath instead of pathlib.Path in tests (GH-119065) (GH-119087)
(cherry picked from commit 0152dc4ff5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-16 10:51:18 +03:00
Miss Islington (bot) bca7fb0e7a
[3.13] Use literal syntax in origin property (GH-119029) (#119083)
Use literal syntax in origin property (GH-119029)
(cherry picked from commit 66b73e9724)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-05-16 05:30:33 +00:00
Miss Islington (bot) 7c224dd4cc
[3.13] gh-119009: Add gettext target (GH-119006) (#119074)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-05-15 18:31:55 +00:00