| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
* Fix bpo-30584
* Adding a comment mentionning the bpo and explaining what is the identifier
* Add Denis Osipov to Misc/ACKS
(cherry picked from commit 897bba75632dfce87c355e3cd4700468357715a7)
|
|
|
|
| |
(#1985)
|
|
|
|
|
|
|
|
| |
At the time when an abstract base class' __init_subclass__ runs,
ABCMeta.__new__ has not yet finished running, so in the presence of
__init_subclass__, inspect.isabstract() can no longer depend only on
TPFLAGS_IS_ABSTRACT.
(cherry picked from commit fcfe80ec2592fed8b3941c79056a8737abef7d3b)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-527) (GH-1282)
Many metaclasses in the standard library don't play nice with
__init_subclass__. This bug makes ABCMeta in particular with
__init_subclass__, which is an 80/20 solution for me personally.
AFAICT, a general solution to this problem requires updating all
metaclasses in the standard library to make sure they pass **kwargs to
type.__new__, whereas this PR only fixes ABCMeta. For context, see
https://bugs.python.org/issue29581.
* added a test combining ABCMeta and __init_subclass__
* Added NEWS item
(cherry picked from commit bd583ef9857d99f9145ad0bb2c4424cc0baa63fc)
* [3.6] bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (GH-527)
Many metaclasses in the standard library don't play nice with
__init_subclass__. This bug makes ABCMeta in particular with
__init_subclass__, which is an 80/20 solution for me personally.
AFAICT, a general solution to this problem requires updating all
metaclasses in the standard library to make sure they pass **kwargs to
type.__new__, whereas this PR only fixes ABCMeta. For context, see
https://bugs.python.org/issue29581.
* added a test combining ABCMeta and __init_subclass__
* Added NEWS item.
(cherry picked from commit bd583ef9857d99f9145ad0bb2c4424cc0baa63fc)
* **kwargs -> ``kwargs`` in attempts to fix the Travis build.
* Quote the **kwargs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
… (#1960)
* bpo-30557: faulthandler now correctly filters and displays exception codes on Windows (#1924)
* bpo-30557: faulthandler now correctly filters and displays exception codes on Windows
* Adds test for non-fatal exceptions.
* Adds bpo number to comment.
* bpo-30557: Fix test_faulthandler (#1969)
On Windows 8, 8.1 and 10 at least, the exit code is the exception
code (no bit is cleared).
|
|
|
|
|
|
|
| |
raised (GH-1920)
We get `ERROR_BAD_NETPATH` (53) on AppVeyor which is translated to
ENOENT (2).
(cherry picked from commit 7a99625e0d95cd88ed8842d8677b5beea1fde5ae)
|
|
|
|
| |
(#1676) (#1903)
|
|
|
| |
(cherry picked from commit 9616a82e7802241a4b74cf7ae38d43c37bf66e48)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exc (GH-1683) (#1815)
* 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 bc50f03db4f58c869b78e98468e374d7e61f1227)
|
|
|
| |
(cherry picked from commit 0cd7a3f)
|
| |
|
|
|
| |
(cherry picked from commit 8175547)
|
|
|
|
| |
Based on patches by Duane Griffin and Tim Mitchell.
(cherry picked from commit 753bca3934a7618a4fa96e107ad1c5c18633a683)
|
|
|
|
|
|
|
| |
(GH-1652) (#1673)
Based on patch by Eryk Sun.
(cherry picked from commit d896985bb2de49046f9b6879e906d1e4db255e23)
|
|
|
|
| |
Workaround for a regrtest bug.
(cherry picked from commit fcdd9b6b7e73427ce5aa63cf095312f603c4edce)
|
|
|
|
|
|
|
|
|
|
| |
test_is_alive_after_fork() now joins directly the thread to avoid the
following warning added by bpo-30357:
Warning -- threading_cleanup() failed to cleanup 0 threads
after 2 sec (count: 0, dangling: 21)
Use also a different exit code to catch generic exit code 1.
(cherry picked from commit f8d05b3a24e745ab4a974b891ac1389e2f11ce4d)
|
|
|
| |
(cherry picked from commit 1bd7d299bd2a91f8267f97a413568ab8fe7fdfbb)
|
|
|
|
| |
Under *spawn* and *forkserver* start methods, SimpleQueue.empty() could
raise AttributeError due to not setting _poll in __setstate__.
|
|
|
|
|
|
|
|
| |
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: Grzegorz Grzywacz <grzegorz.grzywacz@nazwa.pl>
(cherry picked from commit 79ef7f8e88a4972c4aecf95cfc5cd934f1861e08)
|
|
|
|
|
|
|
|
|
| |
(GH-1595) (#1604)
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 c7ac7280c321b3c1679fe5f657a6be0f86adf173)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* python-gdb.py supports method-wrapper
bpo-29367: python-gdb.py now supports also method-wrapper (wrapperobject)
objects.
(cherry picked from commit 611083331d534481ca7956a376e38fb0e9ef3854)
* Update and enhance python-gdb.py
bpo-29259: Detect PyCFunction is the current frame, not only in the
older frame.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when there are no more `await` or `yield (from)` before return in coroutine,
cancel was ignored.
example:
async def coro():
asyncio.Task.current_task().cancel()
return 42
...
res = await coro() # should raise CancelledError
(cherry picked from commit 991adca012f5e106c2d4040ce619c696ba6f9c46)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite sigwaitinfo() and sigtimedwait() unit tests for EINTR using
pthread_sigmask() to fix a race condition between the child and the
parent process.
Remove the pipe which was used as a weak workaround against the race
condition.
sigtimedwait() is now tested with a child process sending a signal
instead of testing the timeout feature which is more unstable
(especially regarding to clock resolution depending on the platform).
(cherry picked from commit 211a392cc15f9a7b1b8ce65d8f6c9f8237d1b77f)
|
|
|
|
|
|
|
|
|
| |
modifiers. (GH-1490) (#1525)
Now allowed several subsequential inline modifiers at the start of the
pattern (e.g. '(?i)(?s)...'). In verbose mode whitespaces and comments
now are allowed before and between inline modifiers (e.g.
'(?x) (?i) (?s)...')..
(cherry picked from commit 305ccbe27ea5ba82fd2d8c32ec739f980e524330)
|
|
|
| |
When decoding a 4-byte GB18030 sequence, the first and third byte cannot exceed 0xFE.
|
|
|
|
|
|
|
|
|
| |
ExpatParser.parse() of xml.sax.xmlreader now always closes the
source: close the file object or the urllib object if source is a
string (not an open file-like object). The change fixes a
ResourceWarning on parsing error.
Add test_parse_close_source() unit test.
(cherry picked from commit ef9c0e732fc50aefbdd7c5a80e04e14b31684e66)
|
|
|
|
|
| |
(GH-1316). (#1441)
(cherry picked from commit 5f161fd86dd5bb936a1a2a13391b13b7e59ec201)
|
|
|
|
|
|
| |
- Add NoReturn type
- Use WrapperDescriptorType (original PR by Jim Fasarakis-Hilliard)
- Minor bug-fixes
(cherry picked from commit f06e0218ef6007667f5d61184b85a81a0466d3ae)
|
|
|
|
|
|
|
|
|
| |
Buildbots don't run tests with -vv and so only log "xxx was modified
by test_xxx" which is not enough to debug such random issue. In many
cases, I'm unable to reproduce the warning and so unable to fix it.
Always logging the value before and value after should help to debug
such warning on buildbots.
(cherry picked from commit ec4b17239d899550be4ee6104b61751bb3c70382)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AsyncoreEchoServer of test_ssl now calls
asyncore.close_all(ignore_all=True) to ensure that
asyncore.socket_map is cleared once the test completes, even if
ConnectionHandler was not correctly unregistered.
Fix the following warning:
Warning -- asyncore.socket_map was modified by test_ssl
Before: {}
After: {6: <test.test_ssl.AsyncoreEchoServer.EchoServer.ConnectionHandler>}
(cherry picked from commit 1dae7450c68bad498e57800387b24cb103c461fa)
|
|
|
|
|
|
|
| |
Add setUpModule() and tearDownModule() functions to test_site to
save/restore sys.path at the module level to prevent warning if the
user site directory is created, since site.addsitedir() modifies
sys.path.
(cherry picked from commit b85c136903c6d2368162f7c4a58f258c9c69ead0)
|
|
|
|
|
|
|
|
|
|
|
| |
test.support. (GH-1341) (#1345)
They now work when delete replaced attribute or item inside the with
statement. The old value of the attribute or item (or None if it doesn't
exist) now will be assigned to the target of the "as" clause, if there is
one.
(cherry picked from commit d1a1def7bf221b04dcf3fc3a67aa19aa2f622f83)
|
|
|
|
|
|
|
|
|
| |
Disable faulthandler to run test_SEH() of test_ctypes to prevent the
following log with a traceback:
Windows fatal exception: access violation
Add support.disable_faulthandler() context manager.
(cherry picked from commit a36e939aeb3b5a2c56561eb24f0e339eee9f3f9d)
|
|
|
|
|
|
|
|
|
| |
QueueListenerTest of test_logging now closes the multiprocessing
Queue and joins its thread to prevent leaking dangling threads to
following tests.
Add also @support.reap_threads to detect earlier if a test leaks
threads (and try to "cleanup" these threads).
(cherry picked from commit 8ca2f2faefa8dba323a2e4c4b86efb633d7a53cf)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix/optimize test_asyncore.test_quick_connect() (#1188)
Don't use addCleanup() in test_quick_connect() because it keeps the
Thread object alive and so @reap_threads fails on its timeout of 1
second. "./python -m test -v test_asyncore -m test_quick_connect"
now takes 185 ms, instead of 11 seconds.
Other minor changes:
* Use "with sock:" to close the socket instead of
try/finally: sock.close()
* Use self.skipTest() in test_quick_connect() to remove one
indentation level and notice user that the test is specific to
AF_INET and AF_INET6
* bpo-30106: Fix tearDown() of test_asyncore (#1194)
Call asyncore.close_all() with ignore_all=True in the tearDown()
method of the test_asyncore base test case. It should prevent keeping
alive sockets in asyncore.socket_map if close() fails with an
unexpected error.
Revert also an unwanted change of my previous commit: remove name
parameter of Thread in test_quick_connect().
* bpo-30106: Fix test_asyncore.test_quick_connect() (#1234)
test_quick_connect() runs a thread up to 50 seconds, whereas the
socket is connected in 0.2 second and then the thread is expected to
end in less than 3 second. On Linux, the thread ends quickly because
select() seems to always return quickly. On FreeBSD, sometimes
select() fails with timeout and so the thread runs much longer than
expected.
Fix the thread timeout to fix a race condition in the test.
|
|
|
|
|
|
|
|
|
|
| |
On macOS, SuppressCrashReport now redirects /usr/bin/defaults command
stderr into a pipe to not pollute stderr. It fixes a
test_io.test_daemon_threads_shutdown_stderr_deadlock() failure when
the CrashReporter domain doesn't exists. Message logged into stderr:
2017-04-24 16:57:21.432 defaults[41046:2462851]
The domain/default pair of (com.apple.CrashReporter, DialogType) does not exist
(cherry picked from commit d819ad9832292d854e9710493ecdf959b69802e3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-30175: Skip client cert tests of test_imaplib
The IMAP server cyrus.andrew.cmu.edu doesn't accept our randomly
generated client x509 certificate anymore.
* bpo-30188: Catch EOFError in NetworkedNNTPTests
test_nntplib fails randomly with EOFError in
NetworkedNNTPTests.setUpClass(). Catch EOFError to skip tests in that
case.
(cherry picked from commit 5bccca58b9b2b3a925b16750bedbd907695ea8d7)
|
|
|
|
| |
On Windows, faulthandler.disable() now removes the exception handler
installed by faulthandler.enable().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test_io has two unit tests which trigger a deadlock:
* test_daemon_threads_shutdown_stdout_deadlock()
* test_daemon_threads_shutdown_stderr_deadlock()
These tests call Py_FatalError() if the expected bug is triggered
which calls abort(). Use test.support.SuppressCrashReport to prevent
the creation on a core dump, to fix the warning:
Warning -- files was modified by test_io
Before: []
After: ['python.core']
(cherry picked from commit 2a1aed04b0943636f605543522e16cca1dc23e70)
|
|
|
|
| |
Skip the file if it has bad encoding.
(cherry picked from commit 58f3c9dc8f5626abe09ac9738c34f6ba99ce2972)
|
|
|
|
| |
(#1168) (#1198)
|
|
|
|
|
| |
(GH-1110) (#1186)
(cherry picked from commit 66bffd1)
|
|
|
|
|
| |
module. (GH-1131). (#1184)
(cherry picked from commit a79f4c219531c05fc8f670c1e4bbf12c081935d3)
|
|
|
|
|
|
|
| |
(#1096) (#1180)
raised an error.
(cherry picked from commit bf623ae8843dc30b28c574bec8d29fc14be59d86)
|
|
|
|
|
|
|
| |
(#1041) (#1092)
multiple times. Writing to closed zip entry writer object now always produce
a ValueError.
(cherry picked from commit 4c0d9ea995da595e90e08813b89510de59907802)
|
|
|
|
| |
present (#1130) (#1150)
|
|
|
| |
(cherry picked from commit 685cdb9acc3fca04a9897d88b89771ddfd50e772)
|
|
|
|
|
| |
(GH-1089). (GH-1126)
(cherry picked from commit 22a594a0047d7706537ff2ac676cdc0f1dcb329c)
|