Changes in bpo- 31858 made the less informative 'context_use_ps1' redundant.
(cherry picked from commit 6bdc4dee01)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
Insertion in line order makes sorting keys by line order unneeded.
(cherry picked from commit 1a4d9ffa1a)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
bytesio_sizeof() must check if an error has occurred in _PySys_GetSizeOf().
(cherry picked from commit 36dcaab7fd)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Fixed QueueListener in order to avoid random deadlocks.
Unable to add regression tests atm due to time constraints, will add it in a bit.
Regarding implementation, although it's nested, it does not cause performance issues whatsoever, and does not call task_done() in case of an exception (which is the right thing to do IMHO).
https://bugs.python.org/issue36813
(cherry picked from commit 6b282e1887)
Co-authored-by: Bar Harel <bzvi7919@gmail.com>
msilib.Directory.start_component() was passing an extra argument to CAB.gen_id().
(cherry picked from commit c8d5bf6c3f)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
in addition to global-statement also mention nonlocal-statement
(in the paragraph describing access to variables which are non local to a function
(cherry picked from commit e1f95e77e0)
Co-authored-by: pbhd <p-bauer-schriesheim@t-online.de>
If the PyObject_MALLOC() call failed in PyType_FromSpecWithBases(),
PyObject_Free() would be called on a static string in type_dealloc().
(cherry picked from commit 0613c1e481)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Per ae58649, time.monotonic is always available, making the old note outdated.
(cherry picked from commit 293e9f86b8)
Co-authored-by: Brad <brad.solomon.1124@gmail.com>
Fix destructor _pyio.BytesIO and _pyio.TextIOWrapper: initialize
their _buffer attribute as soon as possible (in the class body),
because it's used by __del__() which calls close().
(cherry picked from commit a3568417c4)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Move doc entry to match menu and refactor zoom function.
A followup patch will include a blurb.
(cherry picked from commit df9b032f47)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* No type cache for types with specialized mro, invalidation is hard.
* FIX: Don't disable method cache custom types that do not implement mro().
* fixing implem.
* Avoid storing error flags, also decref.
* news entry
* Clear as soon as we're getting an error.
* FIX: Reference leak.
(cherry picked from commit 180dc1b0f4)
Co-authored-by: Julien Palard <julien@palard.fr>
https://bugs.python.org/issue28866
``_thread.interrupt_main()`` now avoids setting the Python error status if the ``SIGINT`` signal is ignored or not handled by Python.
(cherry picked from commit 608876b6b1)
Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
I've reported the issue on https://bugs.python.org/issue37008 and now I'm trying to bring a solution to this minor issue.
I think it could be trivially backported to 3.7 branch.
https://bugs.python.org/issue37008
(cherry picked from commit 394119afc6)
Co-authored-by: Damien Nadé <Anvil@users.noreply.github.com>
…nctions with asserts
The actual overflow can never happen because of the following:
* The size of a list can't be greater than PY_SSIZE_T_MAX / sizeof(PyObject*).
* The size of a pointer on all supported plaftorms is at least 4 bytes.
* ofs is positive and less than the list size at the beginning of each iteration.
https://bugs.python.org/issue35091
(cherry picked from commit 6bc5917903)
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Wrap the callback call within the `add_done_callback` function within concurrent.futures, in order to behave in an identical manner to callbacks added to a running future are triggered once it has completed.
(cherry picked from commit 2a3a2ece50)
Co-authored-by: Sam Martin <ABitMoreDepth@users.noreply.github.com>
CVE-2019-9948: Avoid file reading as disallowing the unnecessary URL
scheme in URLopener().open() and URLopener().retrieve()
of urllib.request.
Co-Authored-By: SH <push0ebp@gmail.com>
(cherry picked from commit 0c2b6a3943)
PyErr_WriteUnraisable() now displays the exception even if displaying
the traceback failed. Moreover, hold a strong reference to sys.stderr
while using it.
Document that an exception must be set when calling
PyErr_WriteUnraisable(), but don't add an assertion to check it at
runtime.
Cleanup: use longer names for variables and create
write_unraisable_exc_file() subfunction.