Victor Stinner
bde48fd811
bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721)
...
incr cannot be larger than INT_MAX: downcast to int explicitly.
2020-08-04 02:38:16 +02:00
Victor Stinner
701b63894f
bpo-38912: regrtest logs unraisable exception into sys.__stderr__ (GH-21718)
...
regrtest_unraisable_hook() temporarily replaces sys.stderr with
sys.__stderr__ to help to display errors when a test captures stderr.
2020-08-03 22:51:23 +02:00
Hai Shi
4660597b51
bpo-40275: Use new test.support helper submodules in tests (GH-21448)
2020-08-03 18:49:18 +02:00
Hai Shi
bb0424b122
bpo-40275: Use new test.support helper submodules in tests (GH-21451)
2020-08-03 18:47:42 +02:00
Hai Shi
a7f5d93bb6
bpo-40275: Use new test.support helper submodules in tests (GH-21449)
2020-08-03 18:41:24 +02:00
Guido van Rossum
488512bf49
A (very) slight speed improvement for iterating over bytes ( #21705 )
...
My mentee @xvxvxvxvxv noticed that iterating over array.array is
slightly faster than iterating over bytes. Looking at the source I
observed that arrayiter_next() calls `getitem(ao, it->index++)` wheras
striter_next() uses the idiom (paraphrased)
item = PyLong_FromLong(seq->ob_sval[it->it_index]);
if (item != NULL)
++it->it_next;
return item;
I'm not 100% sure but I think that the second version has fewer
opportunity for the CPU to overlap the `index++` operation with the
rest of the code (which in both cases involves a call). So here I am
optimistically incrementing the index -- if the PyLong_FromLong() call
fails, this will leave the iterator pointing at the next byte, but
honestly I doubt that anyone would seriously consider resuming use of
the iterator after that kind of failure (it would have to be a
MemoryError). And the author of arrayiter_next() made the same
consideration (or never ever gave it a thought :-).
With this, a loop like
for _ in b: pass
is now slightly *faster* than the same thing over an equivalent array,
rather than slightly *slower* (in both cases a few percent).
2020-08-03 09:04:13 -07:00
Ankit Chandawala
c36dbac588
bpo-41425: Make tkinter doc example runnable (GH-21706)
...
Co-authored-by: Ankit Chandawala <achandaw@amazon.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-03 00:03:48 -04:00
Nathan M
ecaf949cc4
bpo-41424: Remove extra words in Tkinter-Packer documentation (GH-21707)
2020-08-02 22:13:03 -04:00
Luciano Ramalho
ab72fdeb82
bpo-40979: refactored typing.rst; (mostly) same content, new sub-sections and ordering ( #21574 )
...
Also added PEP 585 deprecation notes.
2020-08-02 15:32:36 -07:00
Raymond Hettinger
6a613f90bf
random module: Convert a "while 1" to "while True (GH-21700)
2020-08-02 12:03:32 -07:00
Raymond Hettinger
5c3270939c
bpo-41421: Algebraic simplification for random.paretovariate() (GH-21695)
2020-08-01 01:18:26 -07:00
Karthikeyan Singaravelan
cadda52d97
bpo-40360: Handle PendingDeprecationWarning in test_lib2to3. (GH-21694)
2020-07-31 16:20:48 +05:30
Mark Shannon
6e8128f02e
bpo-41323: Perform 'peephole' optimizations directly on the CFG. (GH-21517)
...
* Move 'peephole' optimizations into compile.c and perform them directly on the CFG.
2020-07-30 10:03:00 +01:00
Sebastien Williams-Wynn
ba18c0b13b
bpo-41426 Fix grammar in curses.getmouse() documentation (GH-21677)
...
Automerge-Triggered-By: @brettcannon
2020-07-29 11:36:46 -07:00
Benjamin Peterson
a74eea238f
closes bpo-38156: Always handle interrupts in PyOS_StdioReadline. (GH-21569)
...
This consolidates the handling of my_fgets return values, so that interrupts are always handled, even if they come after EOF.
I believe PyOS_StdioReadline is still buggy in that I/O errors will not result in a proper Python exception being set. However, that is a separate issue.
2020-07-28 19:57:12 -05:00
Yonatan Goldschmidt
f6a16e8a82
Remove incorrect mention of method.__class__ in descriptor docs (GH-21665)
2020-07-28 16:56:26 -07:00
Xiang Zhang
34cd3e9f6a
Fix `List_Append` description, list is extracted at TOS1[-i] (GH-21465)
2020-07-29 00:51:33 +08:00
Steve Dower
37a06cbe5c
bpo-41412 and bpo-40948: Windows installer updates (GH-21656)
...
Prevent installation on Windows 8 and earlier.
Download UCRT on demand when required (non-updated Windows 8.1 only)
Add reference to py launcher to post-install message
2020-07-28 16:35:46 +01:00
Dmytro Litvinov
5e3826785d
bpo-41328: Replace mention of Hudson CI with Travis CI and AppVeyor (GH-21653)
2020-07-28 07:48:32 -07:00
Zackery Spytz
c82dda1e08
bpo-35328: Set VIRTUAL_ENV_PROMPT at venv activation (GH-21587)
...
Co-Authored-By: Baptiste Darthenay <baptiste.darthenay@gmail.com>
2020-07-28 09:41:57 +01:00
Pablo Galindo
1332226b32
Validate the AST produced by the parser in debug mode (GH-21643)
...
This will improve the debug experience if something fails in the produced AST. Previously, errors in the produced AST can be felt much later like in the garbage collector or the compiler, making debugging them much more difficult.
2020-07-27 23:46:59 +01:00
amaajemyfren
13efaec2e0
bpo-41045: Document debug feature of f-strings ('=') (GH-21509)
...
Co-Authored-By: Rishi <rishi93dev@gmail.com>
Automerge-Triggered-By: @gvanrossum
2020-07-27 15:31:02 -07:00
Lysandros Nikolaou
b3fbff7289
bpo-40939: Remove even more references to the old parser (GH-21642)
...
Automerge-Triggered-By: @lysnikolaou
2020-07-27 12:52:59 -07:00
Pablo Galindo
72cabb2aa6
bpo-40939: Use the new grammar for the grammar specification documentation (GH-19969)
...
(We censor the heck out of actions and some other stuff using a custom "highlighter".)
Co-authored-by: Guido van Rossum <guido@python.org>
2020-07-27 11:20:36 -07:00
Serhiy Storchaka
67987acd5d
bpo-41401: Fix test_fspath_support in test_io. (GH-21640)
...
The error is exposed on non-UTF-8 locales.
2020-07-27 20:58:35 +03:00
pxinwr
855e68855e
bpo-31904: Fix test_ftplib failures for VxWorks RTOS (GH-19447)
2020-07-27 15:17:47 +09:00
wasiher
5798f78777
bpo-41340: Removed fallback implementation for strdup (GH-21634)
2020-07-27 12:28:45 +09:00
Akuli
f1d40f941a
bpo-41384: Raise TclError in tkinter.OptionMenu (GH-21601)
...
... when an unknown option is passed. TypeError was being raised because a 2to3 fix was missing.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-07-26 21:48:17 -04:00
linchiwei123
52bf4706a3
Fix atexitmodule doc (GH-21456)
2020-07-26 20:33:00 -03:00
Guido van Rossum
508ed2d912
Delete remaining references to Grammar/Grammar from docs ( #21624 )
...
(Ironically, the file itself remains, see https://github.com/we-like-parsers/cpython/issues/135 .)
2020-07-26 08:27:52 -07:00
Serhiy Storchaka
b1a87300a0
bpo-41385: Fix test_executable_without_cwd on Windows (GH-21608)
2020-07-26 10:21:39 +03:00
Shankar Jha
f117cef25b
bpo-39868: Add documentation for Assignment Expressions (walrus, PEP 572) ( #18851 )
2020-07-25 16:33:48 -07:00
YoSTEALTH
0028c14073
bpo-41314: fixed annotations __future__ version (GH-21616)
...
PEP 563 was updated to change the release where `from __future__ import annotations` becomes the default (and only) behavior from 4.0 to 3.10. Update `__future__.py` and its docs to reflect this.
2020-07-25 14:42:49 -07:00
Gregory Schevchenko
daff39070e
bpo-38731: Add --quiet option to py_compile CLI (GH-17134)
2020-07-25 22:58:45 +03:00
Terry Jan Reedy
af08db7bac
bpo-37309: NEWS for #41373 (GH-21612)
2020-07-25 00:30:57 -04:00
Serhiy Storchaka
0dd463c8a4
bpo-41373: IDLE: Fix saving files loaded with no newlines or mixed newlines (GH-21597)
...
Fixes regression in 3.8.4 and 3.9.0b4.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-07-24 23:21:30 -04:00
Alex Grönholm
0dd98c2d00
bpo-41317: Remove reader on cancellation in asyncio.loop.sock_accept() ( #21595 )
2020-07-23 12:45:08 -07:00
Henry Schreiner
680254a8dc
bpo-41366: Fix clang warning for sign conversion (GH-21592)
2020-07-23 17:39:03 +09:00
Zackery Spytz
592527f3ee
bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)
...
Also one in news log.
2020-07-23 02:06:26 -04:00
Abhijeet Kasurde
bcd47837a9
bpo-41182 selector: use DefaultSelector based upon implementation (GH-21257)
...
On some platform such as VMware ESXi, DefaultSelector fails
to detect selector due to default value.
This fix adds a check and uses the correct selector depending upon
select implementation and actual call.
Fixes: [bpo-41182]()
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-07-22 20:13:37 -07:00
Andre Delfino
b9f6ac9d46
Stick with the phrase "default parameter value" (GH-21590)
2020-07-22 20:58:19 -03:00
Stefan Krah
9b9f158275
bpo-41369 Update to libmpdec-2.5.1: new features (GH-21593)
2020-07-22 21:54:42 +02:00
wyfo
653f420b53
bpo-41341: Recursive evaluation of ForwardRef in get_type_hints ( #21553 )
...
The issue raised by recursive evaluation is infinite recursion with
recursive types. In that case, only the first recursive ForwardRef is
evaluated.
2020-07-22 12:47:28 -07:00
Steve Dower
bf2f76ec09
bpo-41364: Reduce import overhead of uuid module (GH-21586)
2020-07-22 00:15:47 +01:00
Ammar Askar
5241e189e7
bpo-41283: Fix mismatched argument name for imghdr.what (GH-21501)
2020-07-20 21:22:01 -03:00
Steve Dower
84761c3cc4
bpo-40741: Update Windows build to include SQLite 3.32.3 (GH-21570)
2020-07-21 00:09:41 +01:00
Serhiy Storchaka
5a2bac7fe0
bpo-41342: Convert int.__round__ to Argument Clinic (GH-21549)
2020-07-20 15:57:37 +03:00
Serhiy Storchaka
12f433411b
bpo-41334: Convert constructors of str, bytes and bytearray to Argument Clinic (GH-21535)
2020-07-20 15:53:55 +03:00
Dong-hee Na
e123012d79
bpo-41343: Convert methods of complex to Argument Clinic (GH-21550)
2020-07-20 15:53:29 +03:00
Zackery Spytz
eca2549f5a
bpo-41336: Fix the error handling in zoneinfo_new_instance() (GH-21546)
...
Do not call PyObject_CallMethod() with a live exception (like
KeyboardInterrupt).
2020-07-20 15:51:26 +03:00