This was possible before. GH-1560 introduced a regression after 3.6.2 got
released where only sequences were accepted now. This commit addresses this
problem.
(cherry picked from commit 574562c5dd)
Use prefixed macro names for the `authoraddress` function, add T2A to the font encoding in LaTeX sources to support Cyrillic characters in the PDF documentation, and replace the deprecated `font_size` config option with `pointsize`.
(cherry picked from commit da9b4cfb48)
* bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash
xml.etree: xmlparser_gc_clear() now sets self.parser to NULL to prevent a
crash in xmlparser_dealloc() if xmlparser_gc_clear() was called previously
by the garbage collector, because the parser was part of a reference cycle.
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit e727d41ffc)
Canceling timers prevents a warning message when test_idle completes.
(This is the minimum fix needed before upcoming releases.)
(cherry picked from commit a6bb313c70)
Provide additional examples of using format specifiers in f-strings
Added examples for using integer and date format specifiers.
(cherry picked from commit f361897069)
When apply ConfigDialog changes, call .reload on each class with non-key options.
Change ParenMatch so that updates affect current instances.
(cherry picked from commit 5777ecc438)
* bpo-31234: Join threads in tests (#3572)
Call thread.join() on threads to prevent the "dangling threads"
warning.
(cherry picked from commit 18e95b4176)
* bpo-31234: Join threads in test_hashlib (#3573)
* bpo-31234: Join threads in test_hashlib
Use thread.join() to wait until the parallel hash tasks complete
rather than using events. Calling thread.join() prevent "dangling
thread" warnings.
* test_hashlib: minor PEP 8 coding style fixes
(cherry picked from commit 8dcf22f442)
* bpo-31234: Join threads in test_threading (#3579)
Call thread.join() to prevent the "dangling thread" warning.
(cherry picked from commit b8c7be2c52)
* bpo-31234: Join threads in test_queue (#3586)
Call thread.join() to prevent the "dangling thread" warning.
(cherry picked from commit 167cbde50a)
* bpo-31234: Join timers in test_threading (#3598)
Call the .join() method of threading.Timer timers to prevent the
"threading_cleanup() failed to cleanup 1 threads" warning.
(cherry picked from commit da3e5cf961)
'Strip trailing whitespace' is not limited to spaces. Wording caters to beginners who
do know know the meaning of 'whitespace'. Multiline string literals are not skipped.
(cherry picked from commit ff70289)
* Avoid calling "PyObject_GetAttrString()" (and potentially executing user code) with a live exception set.
* Ignore only AttributeError on attribute lookups in ElementTree.XMLParser() and propagate all other exceptions.
(cherry picked from commit c8d8e15bfc)
This makes the default behavior (without specifying `globalns` manually) more
predictable for users, finds the right globalns automatically.
Implementation for classes assumes has a `__module__` attribute and that module
is present in `sys.modules`. It does this recursively for all bases in the
MRO. For modules, the implementation just uses their `__dict__` directly.
This is backwards compatible, will just raise fewer exceptions in naive user
code.
Originally implemented and reviewed at https://github.com/python/typing/pull/470.
(cherry picked from commit f350a268a7)
Some of the proxied methods use internal Logger state which isn't proxied,
causing failures if an adapter is applied to another adapter.
This commit fixes the issue, adds a new test for the use case.
(cherry picked from commit 1bbd482bcf)
The `blake2b` function does not take the `data` keyword argument.
The hex digest returned by sign was a string, whereas compare_digest expects bytes-like objects.
Typo fix: compare_digesty -> compare_digest
(cherry picked from commit 312ffead1e)
Cast Py_buffer.len (Py_ssize_t, signed) to size_t (unsigned) to
prevent the following warning:
Modules/_ssl.c:3089:21: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare].
(cherry picked from commit 5a61559fb0)
* bpo-31234: Fix dangling thread in test_ftp/poplib (#3540)
Explicitly clear the server attribute in test_ftplib and test_poplib
to prevent dangling thread.
(cherry picked from commit d403a29c00)
* bpo-31234: Fix dangling thread in test_ftplib (#3544)
Clear also self.server_thread attribute in TestTimeouts.tearDown().
(cherry picked from commit b157ce1e58)
ProcessPoolShutdownTest.test_del_shutdown() now closes the call queue
and joins its thread, to prevent leaking a dangling thread.
(cherry picked from commit 3bcf157c11)
* test_thread.test_forkinthread() now waits until the thread completes.
* Check the status in the test method, not in the thread function
* Don't ignore RuntimeError anymore: since the commit
346cbd351e (bpo-16500,
os.register_at_fork(), os.fork() cannot fail anymore with
RuntimeError.
* Replace 0.01 literal with a new POLL_SLEEP constant
* test_forkinthread(): test if os.fork() exists rather than testing
the platform.
(cherry picked from commit a15d155aad)
* bpo-30923: Disable warning that has been part of -Wextra since gcc-7.0. (#3142)
(cherry picked from commit d73a960c57)
* bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. (#3157)
(cherry picked from commit f432a3234f)
* bpo-31275: Small refactoring to silence a fall-through warning. (#3206)
(cherry picked from commit 138753c1b9)
* bpo-31250, test_asyncio: fix dangling threads (#3252)
* Explicitly call shutdown(wait=True) on executors to wait until all
threads complete to prevent side effects between tests.
* Fix test_loop_self_reading_exception(): don't mock loop.close().
Previously, the original close() method was called rather than the
mock, because how set_event_loop() registered loop.close().
(cherry picked from commit 16432beadb)
* bpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (#3264)
Call doCleanups() to close the loop after calling
executor.shutdown(wait=True): see TestCase.set_event_loop() of
asyncio.test_utils.
Replace also gc.collect() with support.gc_collect().
(cherry picked from commit e8a533fbc7)
IDLE calls tcl/tk update in the background in order to make live
interaction and experimentatin with tkinter applications much easier.
(cherry picked from commit 98758bc67f)
This undoes a853a8ba78 except for the pytime.c
parts. We want to continue to allow IEEE 754 doubles larger than FLT_MAX to be
rounded into finite floats. Tests were added to very this behavior.
(cherry picked from commit 2bb69a5b4e)