Commit graph

123532 commits

Author SHA1 Message Date
Nice Zombies
b64182550f
gh-118507 : Refactor nt._path_is* to improve applicability for other cases (GH-118755) 2024-05-21 21:36:36 +01:00
Victor Stinner
de8f530841
gh-119102: Fix REPL for dumb terminal (#119332)
The site module gets the __main__ module to get _pyrepl.__main__.
2024-05-21 20:33:52 +00:00
Lysandros Nikolaou
561ff1fa71
gh-111201: Remove readline dependency from the PyREPL (#119262) 2024-05-21 22:30:45 +02:00
Josh Cannon
e3ed574f6a
gh-90562: Mention slots pitfall in dataclass docs (#107391)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-05-21 19:37:32 +00:00
Serhiy Storchaka
10b1bd926a
gh-119189: Add yet more tests for mixed Fraction arithmetic (GH-119298) 2024-05-21 22:28:05 +03:00
Xie Yanbo
b7f45a9332
Fix typos in documentation (#119295) 2024-05-21 18:35:05 +00:00
Victor Stinner
f6da790122
gh-111389: Add PyHASH_MULTIPLIER constant (#119214) 2024-05-21 19:51:51 +02:00
Arnon Yaari
87939bd579
gh-117657: Fix itertools.count thread safety (#119268)
Fix itertools.count in free-threading mode
2024-05-21 10:16:34 -07:00
Irit Katriel
77ff28bb67
gh-109176: replace _PyFrame_OpAlreadyRan by an assertion that the frame is complete. (#119234) 2024-05-21 17:08:51 +00:00
Eugene Triguba
f49df4f486
gh-119306: Break up _pyrepl tests (#119307) 2024-05-21 18:44:09 +02:00
Yan Yanchii
e03dde5a24
gh-113978: Ignore warnings on text completion inside REPL (#113979) 2024-05-21 18:28:21 +02:00
Blaise Pabon
9db2fd7eda
GH-110383: Improve Tutorial for Input Ouput (#119230)
Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
2024-05-21 16:25:37 +00:00
Daniel Williams
62a29be5bb
gh-110383: Document socket.makefile() accepts combined modes (#119150)
The supported mode values are 'r', 'w', and 'b', or a combination of those.
2024-05-21 16:23:50 +00:00
Alastair Stanley
0398d93392
gh-119035: Add Ctrl+← and Ctrl+→ word-skipping keybindings to new repl (#119248)
add word-skipping ctrl keybindings to new repl
2024-05-21 18:17:41 +02:00
Savannah Ostrowski
c4722cd057
GH-119292: Add job to JIT CI to build and test with --disable-gil (GH-119293)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-05-21 11:00:52 -04:00
Donghee Na
ab4263a82a
gh-119053: Implement the fast path for list.__getitem__ (gh-119112) 2024-05-21 09:49:18 -04:00
Victor Stinner
73f4a58d36
gh-119102: Fix REPL for dumb terminal (#119269)
Use CAN_USE_PYREPL of _pyrepl.__main__ in the site module to decide
if _pyrepl.write_history_file() can be used.
2024-05-21 13:53:20 +01:00
Nikita Sobolev
b365332906
Use fail-fast: false in mypy.yml (#119297)
See docs about this setting: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast
2024-05-21 07:52:43 -04:00
Alyssa Coghlan
e870c852c0
gh-74929: PEP 667 general docs update (gh-119201)
* 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)
2024-05-21 03:32:15 +00:00
Wulian233
538ed5e481
gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (#119175)
------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-05-20 23:32:00 -04:00
Melanie Arbor
172690227e
gh-102136: Add -m to options that work with -i (GH-119271)
* GH-102136: Add -m to options that work with -i

* Linting
2024-05-20 19:38:33 -04:00
Alex Waygood
423bbcbbc4
gh-108267 Fix another dataclasses docs typo (#119277) 2024-05-20 22:34:57 +00:00
Lysandros Nikolaou
fe921931a3
gh-111201: Add tests for unix console class in pyrepl (#118653) 2024-05-20 23:57:32 +02:00
Victor Stinner
9257731f5d
gh-119050: Add XML support to libregrtest refleak checker (#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.
2024-05-20 17:05:39 -04:00
Shantanu
bf17986096
gh-119253: use ImportError in _ios_support (#119254) 2024-05-20 16:39:30 -04:00
Mark Jason Dominus (陶敏修)
8231a24454
gh-94808: Add test coverage for "starred kind" in _PyPegen_set_expr_context (GH-119222)
Add test coverage for "starred kind" in _PyPegen_set_expr_context
2024-05-20 20:29:17 +00:00
Shauna
7e57640c7e
gh-118912: Remove description of issue fixed in 3.5 from autospeccing guide (#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)

---------

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-05-20 20:10:53 +00:00
Pablo Galindo Salgado
a443e54281
gh-111201: Add more tests to test_pyrepl to cover key translation (#118705)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-05-20 22:04:52 +02:00
Serhiy Storchaka
fe67af1963
gh-119189: Add more tests for mixed Fraction arithmetic (GH-119236) 2024-05-20 22:34:48 +03:00
Hugo van Kemenade
034cf0c316
Docs: Ensure no warnings are found in the NEWS file before a given line number (#119221) 2024-05-20 13:31:38 -06:00
Serhiy Storchaka
e188527c34
gh-118760: Restore the default value of tkinter.wantobjects to 1 (GH-118784)
It was set to 2 in 65f5e586a1 (GH-98592).
2024-05-20 22:21:04 +03:00
Tialo
6b80a5b20f
Use correct markup in unittest.mock.reset_mock documentation (GH-119207) 2024-05-20 21:17:44 +02:00
Toshio Kuratomi
a6fdb31b67
gh-92081: Fix for email.generator.Generator with whitespace between encoded words. (#92281)
* 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 #92081

* Rename a variable so it's not confused with the final variable.
2024-05-20 19:10:47 +00:00
Daniel Hollas
c0d81b2566
gh-118877: Fix AssertionError crash in pyrepl (#118936) 2024-05-20 20:21:56 +02:00
Hood Chatham
7e1a130b8f
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()
    """)
```
2024-05-20 17:42:15 +00:00
Seth Michael Larson
1195c164da
gh-112844: Update CPE references for external dependencies (#118521) 2024-05-20 13:27:09 -04:00
Jeremy Hylton
19c11f244e
gh-119219: Remove two obsolete TODOs. (#119223)
Remove two obsolete TODOs.
2024-05-20 16:54:16 +00:00
Erlend E. Aasland
6f7dd0a426
Amend NEWS category for gh-119196 (#119218) 2024-05-20 15:32:05 +00:00
Sebastian Rittau
e406b399f9
[docs] TypeVarTuple default is keyword-only (#119215) 2024-05-20 15:31:45 +00:00
Erlend E. Aasland
642b25b9a8
gh-115119: Fall back to bundled libmpdec if system libmpdec is not found (#119196) 2024-05-20 10:58:08 -04:00
David Foster
72d07dd30b
typing docs: Fix formatting issue (#119210) 2024-05-20 14:32:51 +00:00
Thanos
05e1dce76d
gh-119185: Fix typo in _pyrepl.pager: tempfilepager should be tempfile_pager (#118881)
Fix typo in `_pyrepl.pager`: `tempfilepager` should be `tempfile_pager`

The name with no underscore doesn't exist.
2024-05-20 10:31:43 -04:00
Roy Hyunjin Han
bbb49888a7
gh-103134: Update multiprocessing.managers.ListProxy and DictProxy (GH-103133) 2024-05-20 14:28:36 +00:00
Erlend E. Aasland
1db4695644
gh-118928: Remove unneeded sqlite3 NEWS entry (#119208)
The regression in d8e0e0091 was never part of an official release.
2024-05-20 09:51:02 -04:00
Erlend E. Aasland
af359cee75
gh-118928: sqlite3: correctly bail if sequences of params are used with named placeholders (#119197) 2024-05-20 09:44:42 -04:00
Alex Waygood
0883fd22e6
Enable some stricter mypy settings on Lib/_pyrepl (#119077) 2024-05-20 08:52:32 -04:00
Nikita Sobolev
16b46ebd2b
gh-119121: Fix and test async.staggered.staggered_race (#119173) 2024-05-20 14:06:50 +03:00
Terry Jan Reedy
357f5a1f73
IDLE: fix url in config.py comment (#119198) 2024-05-20 06:04:50 +00:00
pulkin
0abf997e75
gh-119105: difflib: improve recursion for degenerate cases (#119131)
Code from https://github.com/pulkin, in PR
https://github.com/python/cpython/pull/119131

Greatly speeds `Differ` when there are many identically scoring pairs, by splitting the recursion near the inputs' midpoints instead of degenerating (as now) into just peeling off the first two lines.

Co-authored-by: Tim Peters <tim.peters@gmail.com>
2024-05-19 16:46:37 -05:00
Barney Gale
3c28510b98
GH-119113: Raise TypeError from pathlib.PurePath.with_suffix(None) (#119124)
Restore behaviour from 3.12 when `path.with_suffix(None)` is called.
2024-05-19 17:04:56 +01:00