Needs backport to 3.7. In 3.6 the description is correct.
(cherry picked from commit b83d917faf)
Co-authored-by: Andriy Maletsky <andriy.maletsky@gmail.com>
Don't call _Py_FatalError_PrintExc() nor flush_std_files() if the
current thread doesn't hold the GIL, or if the current thread
has no Python state thread.
(cherry picked from commit 3a228ab17c)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
_io.IncrementalNewlineDecoder's initializer possibly assigns out-of-range
value to the bitwise struct field.
(cherry picked from commit b08746bfdf)
Co-authored-by: Xiang Zhang <angwerzx@126.com>
The root widget was accessed as a global variable in the Application's method.
(cherry picked from commit a80af77087)
Co-authored-by: Daniel Lovell <lovell.daniel92@gmail.com>
* Add _Py_GetForceASCII(): check if Python forces the usage of ASCII
in Py_DecodeLocale() and Py_EncodeLocale().
* initfsencoding() now uses ASCII if _Py_GetForceASCII() is true.
After commit d0f49d2f50, the output of the
test suite is always buffered as the test output needs to be included in
the JUnit file in same cases (as when a test fails). This has the
consequence that printing or using debuggers (like pdb) in the test
suite does not result in a good user experience anymore.
This commit modifies the test suite runner so it only captures the test
output when the JUnit file is requested to fix the regression so prints
and debuggers are usable again.
(cherry picked from commit 02277482ea)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Topics include opening, title and status bar, .py* extension, and running.
(cherry picked from commit ea9c8bd443)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Fix potential division by zero in BZ2_Malloc()
* Avoid division by zero in PyLzma_Malloc()
* Avoid division by zero and integer overflow in PyZlib_Malloc()
Reported by Svace static analyzer.
(cherry picked from commit 3d4fabb2a4)
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Add a paragraph in "Help and preferences", "Help sources" subsection.
(cherry picked from commit 18032632ab)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Fix a bug I introduced in GH-9864 by which coroutines are treated as synonymous of function coroutines.
Also, fix the same mistake (coroutines == function coroutines) already present in other parts of the reference.
I'm very sorry for the hassle.
(cherry picked from commit 95f68b10d5)
Co-authored-by: Andrés Delfino <adelfino@gmail.com>
We now use git and backporting instead of hg and forward merging.
(cherry picked from commit 2b555fc1f0)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
There is only one trivial change to idle.rst. Nearly all the changes to help.html are the elimination of chapter and section numbers on headers due to changes in the build system. help.py no longer requires header numbering.
(cherry picked from commit db40cb50eb)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Declare functions with EXTINLINE:
* mpd_del()
* mpd_uint_zero()
* mpd_qresize()
* mpd_qresize_zero()
* mpd_minalloc()
These functions are implemented with "inline" or "ALWAYS_INLINE", but
declared without inline which cause linker error on Visual Studio in
Debug mode when using /Ob1.
(cherry picked from commit 3b1cba3701)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Prior to this revision, after the shutdown of a `BaseServer`,
the server accepted a last single request
if it was sent between the server socket polling
and the polling timeout.
This can be problematic for instance for a server restart
for which you do not want to interrupt the service,
by not closing the listening socket during the restart.
One request failed because of this behavior.
Note that only one request failed,
following requests were not accepted, as expected.
(cherry picked from commit 10cb3760e8)
Co-authored-by: Denis Ledoux <be.ledoux.denis@gmail.com>
.o generated by clang in LTO mode actually are LLVM bitcode files, which
leads to a few errors during configure/build step:
- add lto flags to the BASECFLAGS instead of CFLAGS, as CFLAGS are used
to build autoconf test case, and some are not compatible with clang LTO
(they assume binary in the .o, not bitcode)
- force llvm-ar instead of ar, as ar is not aware of .o files generated
by clang -flto
(cherry picked from commit 5ad36f9b21)
Co-authored-by: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
The spec gets stored on modules with the __spec__ attribute, not spec.
(cherry picked from commit 78401f7156)
Co-authored-by: orlnub123 <orlnub123@gmail.com>
Replace str.format with f-strings in the code examples of asyncio-task documentation.
(cherry picked from commit 9f43fbbd9d)
Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
Fix the documentation of copy2, as it does not copy file ownership (user and
group), only mode, mtime, atime and flags.
The original text was confusing to developers as it suggested that this
command is the same as 'cp -p', but according to cp(1), '-p' copies file
ownership as well.
Clarify which metadata is copied by shutil.copystat in its docstring.
(cherry picked from commit 4f399be0e7)
References could leak, NULL could be dereferenced, and the Expat parser could
be double freed when some errors raised.
(cherry picked from commit 9f3ed3e213)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>