regrtest_unraisable_hook() temporarily replaces sys.stderr with
sys.__stderr__ to help to display errors when a test captures stderr.
(cherry picked from commit 701b63894f)
On Git 2.28, "git diff master..." (3 dots) no longer works when
"fetch --depth=1" is used, whereas it works on Git 2.26.
Replace "..." (3 dots) with ".." (2 dots) in the "git diff" command
computing the list of modified files between the base branch and the
PR branch.
(cherry picked from commit eaa551702d)
Co-authored-by: Victor Stinner <vstinner@python.org>
test_run method test_fatal_error failed when run twice, as with
python -m test -m test_fatal_error test_idle test_idle
because func.called was not reinitialized to 0.
This bug caused a failure on a refleak buildbot.
(cherry picked from commit 416f0b71ba)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-41194: Convert _ast extension to PEP 489 (GH-21293)
Convert the _ast extension module to PEP 489 "Multiphase
initialization". Replace the global _ast state with a module state.
(cherry picked from commit b1cc6ba73a)
* bpo-41204: Fix compiler warning in ast_type_init() (GH-21307)
(cherry picked from commit 1f76453173)
A message box pops up when an unexpected error stops the run process. Tell users it is likely a random glitch, but report it if not.
(cherry picked from commit f2e161c279)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Adds a link to the "Reading and Writing Files" page so users can
more easily discover how file handles are handled with the `with`
context manager vs without it.
(cherry picked from commit 705f145565)
Co-authored-by: Benjamin Kane <bbkane@users.noreply.github.com>
PyUnicodeEncodeError_Create has been deprecated with
`Py_DEPRECATED` macro. But it was not documented.
(cherry picked from commit 46e19b61d3)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
On Windows, fix asyncio recv_into() return value when the socket/pipe
is closed (BrokenPipeError): return 0 rather than an empty byte
string (b'').
(cherry picked from commit 602a971a2a)
Co-authored-by: Victor Stinner <vstinner@python.org>
incr cannot be larger than INT_MAX: downcast to int explicitly.
(cherry picked from commit bde48fd811)
Co-authored-by: Victor Stinner <vstinner@python.org>
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.
(cherry picked from commit a74eea238f)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
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
(cherry picked from commit 37a06cbe5c)
Co-authored-by: Steve Dower <steve.dower@python.org>
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..
(cherry picked from commit 1332226b32)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(We censor the heck out of actions and some other stuff using a custom "highlighter".)
(cherry picked from commit 72cabb2aa6)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
... 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>
(cherry picked from commit f1d40f941a)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
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>
(cherry picked from commit bcd47837a9)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
The issue raised by recursive evaluation is infinite recursion with
recursive types. In that case, only the first recursive ForwardRef is
evaluated.
(cherry picked from commit 653f420b53)
Co-authored-by: wyfo <joperez@hotmail.fr>