* bpo-30614: testInitNonExistentFile() of test_bz2 leaks references
Extract the code of BZ2File_dealloc and create a new BZ2File_clear()
function. Call BZ2File_clear() in BZ2File_dealloc().
Define BZ2File_clear() as tp_clear.
Move the lock initialization before the "self->file =
PyObject_CallFunction" in BZ2File_init() and check the lock is not
created twice.
Call BZ2File_clear() in BZ2File_init() after the init of the lock
Co-Authored-By: Victor Stinner <victor.stinner@gmail.com>
* Create bz2module.c
Fix after the review of Victor Stinner
On Windows, subprocess.Popen.communicate() now also ignore EINVAL
on stdin.write() if the child process is still running but closed the
pipe.
(cherry picked from commit d52aa31378)
Initially the macOS builds are allowed to fail until such time that they can be determined to be stable and not add an unacceptable amount of time to the overall Travis-passing process.
(cherry picked from commit 21c2dd7cf8)
The "iterable iterable" phrasing created confusion between the term
reference and the parameter name.
This simplifies the phrasing to just use the parameter name
without linking directly to the term definition..
(cherry picked from commit 08e2f355d0)
* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc
Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.
* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc
Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored..
(cherry picked from commit bc50f03db4)
Warnings emitted when compile a regular expression now always point
to the line in the user code. Previously they could point into inners
of the re module if emitted from inside of groups or conditionals.
(cherry picked from commit c7ac7280c3)
Running Python with the -3 option now warns about regular expression
syntax that is invalid or has different semantic in Python 3
or will change the behavior in future Python versions.
Running Python with the -3 option now emits deprecation warnings for
getchildren() and getiterator() methods of the Element class in the
xml.etree.cElementTree module and when pass the html argument to
xml.etree.ElementTree.XMLParser().
Fixed a deprecation warning about the doctype() method of the
xml.etree.ElementTree.XMLParser class. Now it is emitted only when
define the doctype() method in the subclass of XMLParser.
Fixed a bug in the test_bug_200708_close test method. An EchoTarget
instance was incorrectly passed to XMLParser() as the html argument and
silently ignored.
Tests no longer failed when use the -m option for running only selected
test methods. Checking warnings now is more specific, warnings are
expected only when use deprecated features.
Catch the Windows socket WSAEINVAL error (code 10022) in imaplib
on shutdown(SHUT_RDWR): An invalid operation was attempted
This error occurs sometimes on SSL connections.
(cherry picked from commit 83a2c28798)
* Use explicit numbering for footnotes referred by explicit number.
* Fix literal strings formatting in howto/urllib2.rst.
* Add `:noindex:` to duplicated definition of list.
* Update susp-ignored.csv for reference/expressions.rst.
(cherry picked from commit d97b7dc94b)
* bpo-30357 each test in test_thread waits until all spawn threads finish
* bpo-30357 each test in test_thread waits until all spawn threads finish
* bpo-30357: test_thread now uses threading_cleanup() (#1592)
test_thread: setUp() now uses support.threading_setup() and
support.threading_cleanup() to wait until threads complete to avoid
random side effects on following tests.
Co-Authored-By: Victor Stinner <victor.stinner@gmail.com>
* bpo-30357: test_thread now uses threading_cleanup() (#1592)
test_thread: setUp() now uses support.threading_setup() and
support.threading_cleanup() to wait until threads complete to avoid
random side effects on following tests.
Co-Authored-By: Victor Stinner <victor.stinner@gmail.com>
Also backport new functions temp_dir() and python_is_optimized().
temp_cwd() now accepts None as a name (means using tempfile.mkdtemp).
check_syntax_error() now accepts arguments lineno and offset.
Use more specific error messages in get_attribute().
Fix for bpo-6393: Python crashes on OSX when $LANG is set to some (but
not all) invalid values due to an invalid result from nl_langinfo
(cherry picked from commit 6d77e07196)