Make sure that failure paths call CloseHandle outside of the function that failed
(cherry picked from commit b82bfac436)
Co-authored-by: Mark Becwar <mark@thebecwar.com>
Add one char to MsiSummaryInfoGetProperty() output
Based on the patch in bpo-1104 by Anthony Tuininga (atuining) and Mark McMahon (markm).
(cherry picked from commit 2de576e16d)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
This fixes the ctypes.test.test_structures.StructureTestCase test.
https://bugs.python.org/issue35847
(cherry picked from commit 742d768656)
Co-authored-by: Andreas Schwab <schwab@linux-m68k.org>
The previous wording could be read as saying that universal
newlines mode itself was deprecated, when it's only the 'U'
character in the mode field that should be avoided.
The update also moves the description of the 'U' mode character
out of the mode table, as the longer explanation was overly
intrusive as a table entry and overshadowed the actually useful
mode characters.
(cherry picked from commit 3171df3414)
Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
When the loop in the pymain_read_conf function in this same file
calls pymain_init_cmdline_argv() a 2nd time, the pymain->command
buffer of wchar_t is overriden and the previously allocated memory
is never freed.
(cherry picked from commit 35ca1820e1)
Co-authored-by: Lucas Cimon <lucas.cimon@gmail.com>
Fix sparse file tests of test_tarfile on ppc64le with the tmpfs
filesystem.
Fix the function testing if the filesystem supports sparse files:
create a file which contains data and "holes", instead of creating a
file which contains no data.
tmpfs effective block size is a page size (tmpfs lives in the page
cache). RHEL uses 64 KiB pages on aarch64, ppc64 and ppc64le, only
s390x and x86_64 use 4 KiB pages, whereas the test punch holes of
4 KiB.
test.pythoninfo: Add resource.getpagesize().
(cherry picked from commit b2385458ce)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
It previously deleted Window => Zoom Height by mistake.
(Zoom Height is now on the Options menu). On Mac, the settings
dialog is accessed via Preferences on the IDLE menu.
(cherry picked from commit 39ed289a35)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Make ssl tests less strict and also accept TLSv1 as system default. The
changes unbreaks test_min_max_version on Fedora 29.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 34de2d312b)
Co-authored-by: Christian Heimes <christian@python.org>
Tix was deprecated in 3.6 and the doc is wrong. New users should use ttk.
(cherry picked from commit cf27c06229)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Typo fix for method doc, I'm pretty sure coro is meant, because there's no consumer threads for thread-unsafe queue.
Most probably this piece of doc was copied from `queue.Queue`
There's not BPO bug for this, afaik.
(cherry picked from commit 97e12996f3)
Co-authored-by: Slam <3lnc.slam@gmail.com>
While the introduction of ModuleNotFoundError was fully backwards
compatible on the import API consumer side, folks providing alternative
implementations of `__import__` need to make an update to be
forward compatible with clients that start relying on the new subclass.
https://bugs.python.org/issue35486
(cherry picked from commit cee29b46a1)
Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
Fix a NULL pointer deref in ssl module. The cert parser did not handle CRL
distribution points with empty DP or URI correctly. A malicious or buggy
certificate can result into segfault.
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue35746
(cherry picked from commit a37f52436f)
Co-authored-by: Christian Heimes <christian@python.org>
asyncio.ProactorEventLoop now catchs and logs send errors when the
self-pipe is full: BaseProactorEventLoop._write_to_self() now catchs
and logs OSError exceptions, as done by
BaseSelectorEventLoop._write_to_self().
(cherry picked from commit c9f872b0bd)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
* IocpProactor: prevent modification if closed (GH-11494)
* _wait_for_handle(), _register() and _unregister() methods of
IocpProactor now raise an exception if closed
* Add "closed" to IocpProactor.__repr__()
* Simplify IocpProactor.close()
(cherry picked from commit 9b07681c09)
* bpo-34323: Enhance IocpProactor.close() log (GH-11555)
IocpProactor.close() now uses time to decide when to log: wait 1
second before the first log, then log every second. Log also the
number of seconds since close() was called.
(cherry picked from commit b1e45739d8)
* bpo-34323: Enhance IocpProactor.close() log again (GH-11563)
Add repr(self) to the log to display the number of pending overlapped
in the log.
(cherry picked from commit b91140fdb1)
Handle the case of an empty module name in PYTHONBREAKPOINT.
Fixes a regression introduced in bpo-34756.
(cherry picked from commit 3607ef43c4)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Previously, calling the strftime() method on a datetime object with a
trailing '%' in the format string would result in an exception. However,
this only occured when the datetime C module was being used; the python
implementation did not match this behavior. Datetime is now PEP-399
compliant, and will not throw an exception on a trailing '%'.
(cherry picked from commit 454b3d4ea2)
Co-authored-by: MichaelSaah <mike.saah@gmail.com>
IDLE's test_squeezer.SqueezerTest.test_reload, added for issue 35196,
failed on both Gentoo buildbots.
(cherry picked from commit 5bb146aaea)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
The new functionality of Squeezer.reload() is also tested, along with some general
re-working of the tests in test_squeezer.py.
(cherry picked from commit 39a33e9927)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>