| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
[3.6] bpo-31249: Fix ref cycle in ThreadPoolExecutor
|
|
|
|
|
|
| |
zipimport.zipimporter.get_data() (GH-3226) (#3243)
if pathname.replace('/', '\\') returns non-string.
(cherry picked from commit 631fdee6e61b4ba8ce800f827fecdd536bfb04f3)
|
|
|
| |
(cherry picked from commit ba7d7365215d791025d1efd25393c91404f2cfc8)
|
|
|
|
|
| |
(GH-3201) (#3209)
(cherry picked from commit a5b4ea15b61e3f3985f4f0748a18f8b888a63532)
|
|
|
|
| |
to parse non-args. (#3210)
|
|
|
|
|
| |
Subclasses such as IndentError and TabError should not have this message
applied.
|
|
|
|
|
|
| |
Use self.addCleanup(self.server.stop) to stop the HTTP server. Some
tests didn't stop the server like test_https().
Fix also the usage of support.threading_cleanup().
|
|
|
|
|
|
| |
fork_wait.py tests now joins threads, to not leak running threads in
the background.
(cherry picked from commit c99d41f9c0304fcf06550515c3db55f93a629e9e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-30871: Add test.pythoninfo (#3075)
* Add Lib/test/pythoninfo.py: script collecting various informations
about Python to help debugging test failures.
* regrtest: remove sys.hash_info and sys.flags from header.
* Travis CI, Appveyor: run pythoninfo before tests
(cherry picked from commit b907abc88589f7bea52c5afe172ececc6edcda70)
* bpo-30871: pythoninfo: add expat and _decimal (#3121)
* bpo-30871: pythoninfo: add expat and _decimal
* Remove _decimal.__version__
The string is hardcoded, not really interesting.
(cherry picked from commit f6ebd838f00b4c211c72d85ee49749e910cd3afe)
* bpo-30871: Add "make pythoninfo" (#3120)
(cherry picked from commit a3a01a2fceab2188b282ab9911f79c99a4c32273)
* bpo-30871: pythoninfo: more sys, os, time data (#3130)
* bpo-30871: pythoninfo: more sys, os, time data
PythonInfo now converts types other than intger to string by default.
* fix typo
(cherry picked from commit ad7eaed54382b346784e51a6f0122ce81e8842b5)
* bpo-31231: Fix pythoninfo in Travis config (#3134)
bpo-31231, bpo-30871: Replace "./python -m test.pythoninfo" with
"make pythoninfo", since macOS uses ./python.exe.
(cherry picked from commit 92b1f90143286385c0ff5be98d3721b90580a912)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-30121: Fix debug assert in subprocess on Windows (#1224)
* bpo-30121: Fix debug assert in subprocess on Windows
This is caused by closing HANDLEs using os.close which is for CRT file
descriptors and not for HANDLEs.
* bpo-30121: Suppress debug assertion in test_subprocess when ran directly
(cherry picked from commit 4d3851727fb82195e4995c6064b0b2d6cbc031c4)
* Add test_subprocess.test_nonexisting_with_pipes() (#3133)
bpo-30121: Test the Popen failure when Popen was created with pipes.
Create also NONEXISTING_CMD variable in test_subprocess.py.
(cherry picked from commit 9a83f651f31b47b3f6c8b210f7807b26e8c373a5)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bpo-30721 added a "Did you mean ...?" suggestion to rshift
TypeError messages that triggers when the LHS is a Python
C function called "print".
Since this custom error message is expected to be triggered
primarily by attempts to use Python 2 print redirection syntax
in Python 3, and is incredibly unlikely to be encountered
otherwise, it is also being backported to the next 3.6
maintenance release.
Initial patch by Sanyam Khurana.
|
|
|
|
|
| |
test_bare_raise_in_brand_new_thread() now explicitly breaks a
reference cycle to not leak a dangling thread.
(cherry picked from commit 3d284c081fc3042036adfe1bf2ce92c34d743b0b)
|
|
|
| |
(cherry picked from commit a7719e27b3cad0f2b86cb932a76cbe55c541b02e)
|
|
|
|
|
| |
Fix a warning about dangling processes in test_rapid_restart() of
_test_multiprocessing: join the process.
(cherry picked from commit 17657bb9458ff8f8804b7637d61686a68f4b9471)
|
|
|
|
|
|
|
|
|
|
|
| |
OpenSSL 1.1.0 to 1.1.0e aborted the handshake when server and client
could not agree on a protocol using ALPN. OpenSSL 1.1.0f changed that.
The most recent version now behaves like OpenSSL 1.0.2 again. The ALPN
callback can pretend to not been set.
See https://github.com/openssl/openssl/pull/3158 for more details
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit a5c1bab352671e043645163ca50c5211aa657acd)
|
|
|
|
|
| |
test_subprocess now also calls reap_children() in tearDown(), not
only on setUp().
(cherry picked from commit cc42c121eb5346f673247f95dac575aadb77d66c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current test_child_terminated_in_stopped_state() function test
creates a child process which calls ptrace(PTRACE_TRACEME, 0, 0) and
then crash (SIGSEGV). The problem is that calling os.waitpid() in the
parent process is not enough to close the process: the child process
remains alive and so the unit test leaks a child process in a
strange state. Closing the child process requires non-trivial code,
maybe platform specific.
Remove the functional test and replaces it with an unit test which
mocks os.waitpid() using a new _testcapi.W_STOPCODE() function to
test the WIFSTOPPED() path.
(cherry picked from commit 7b7c6dcfff6a35333988a3c74c895ed19dff2e09)
|
|
|
| |
(cherry picked from commit 5659a72f487579be76335c09c8ba8b2f1800adde)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-31160: Fix test_builtin for zombie process (#3043)
PtyTests.run_child() now calls os.waitpid() to read the exit status
of the child process to avoid creating zombie process and leaking
processes in the background.
(cherry picked from commit 4baca1b0f7325032598cd38e7ceffc79b616d255)
* bpo-31160: regrtest now reaps child processes (#3044)
Add a post_test_cleanup() function which currently only calls
support.reap_children().
(cherry picked from commit e3510d74aacc477c30f42f2b941d69689bbc478e)
* bpo-31160: test_builtin: don't check waitpid() status (#3050)
(cherry picked from commit 3ca9f50f96cfa5c1b7aa56639042531b57f07fbb)
* bpo-31160: test_tempfile: Fix reap_children() warning (#3056)
TestRandomNameSequence.test_process_awareness() now calls
os.waitpid() to avoid leaking a zombie process.
(cherry picked from commit 6c8c2943d996b59a48d331f61f22cbe72933910e)
|
|
|
|
| |
reaped warnings (#3041)
|
| |
|
|
|
| |
(cherry picked from commit c4c9866064f03646c686d7e08b00aeb203c35c19)
|
|
|
|
|
|
| |
(GH-2957) (#2991)
when other arguments are passed.
(cherry picked from commit 25e4f77)
|
|
|
|
|
|
| |
(GH-2790) (#2992)
Previously any exception was replaced with a KeyError exception.
(cherry picked from commit 5075416)
|
|
|
| |
(cherry picked from commit de34cbe9cdaaf7b85fed86f99c2fd071e1a7b1d2)
|
|
|
|
| |
Bug appears to be incomplete copy-paste-edit.
(cherry picked from commit ceb93f4)
|
|
|
|
|
|
| |
There is a bug in FreeBSD CURRENT with 64-bit dev_t. Skip the test if
dev_t is larger than 32-bit, until the bug is fixed in FreeBSD
CURRENT.
(cherry picked from commit 12953ffe12ac781332b384c36b25d12216b1db62)
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-31028: Fix test_pydoc when run directly
Fix get_pydoc_link() of test_pydoc to fix "./python
Lib/test/test_pydoc.py": get the absolute path to __file__ to prevent
relative directories.
* Use realpath() instead of abspath()
(cherry picked from commit fd46561167af6cd697191dd7ebb8c2fef5ad6493)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-30980: Fix close test to fail
test_close_twice was not considering the fact that file_wrapper is
duping the file descriptor. Closing the original descriptor left the
duped one open, hiding the fact that close protection is not effective.
* bpo-30980: Fix double close protection
Invalidated self.fd before closing, handling correctly the case when
os.close raises.
* bpo-30980: Fix fd leak introduced in the fixed test
|
|
|
|
| |
command (#1214) (#2886)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783)
Only C implementation was tested.
(cherry picked from commit 287c5594edc1ca08db64d1f4739cc36bfe75ae75)
* [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783)
Only C implementation was tested..
(cherry picked from commit 287c5594edc1ca08db64d1f4739cc36bfe75ae75)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-30845: reap_children() now logs warnings
* bpo-30845: Enhance test_concurrent_futures cleanup
In setUp() and tearDown() methods of test_concurrent_futures tests,
make sure that tests don't leak threads nor processes. Clear
explicitly the reference to the executor to make it that it's
destroyed (to prevent "dangling threads" warning).
(cherry picked from commit 3df9dec425b0254df1cdf41922fd8d6b08bf47e4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
3.6 (#2879)
* bpo-26762: Avoid daemon process in _test_multiprocessing (#2842)
test_level() of _test_multiprocessing._TestLogging now uses regular
processes rather than daemon processes to prevent zombi processes
(to not "leak" processes).
(cherry picked from commit 06634950c553f8df83330ed468c11483b857b7dc)
* test_multiprocessing: Fix dangling process/thread (#2850)
bpo-26762: Fix more dangling processes and threads in
test_multiprocessing:
* Queue: call close() followed by join_thread()
* Process: call join() or self.addCleanup(p.join)
(cherry picked from commit d7e64d9934d86aa6173229de5af5fe908662a33a)
* test_multiprocessing detects dangling per test case (#2841)
bpo-26762: test_multiprocessing now detects dangling processes and
threads per test case classes:
* setUpClass()/tearDownClass() of mixin classes now check if
multiprocessing.process._dangling or threading._dangling was
modified to detect "dangling" processses and threads.
* ManagerMixin.tearDownClass() now also emits a warning if it still
has more than one active child process after 5 seconds.
* tearDownModule() now checks for dangling processes and threads
before sleep 500 ms. And it now only sleeps if there is a least one
dangling process or thread.
(cherry picked from commit ffb49408f0780ae80a553208aa133bc5bb3ba129)
* bpo-26762: test_multiprocessing close more queues (#2855)
* Close explicitly queues to make sure that we don't leave dangling
threads
* test_queue_in_process(): remove unused queue
* test_access() joins also the process to fix a random warning
(cherry picked from commit b4c52966c810b5c5e088fceff403247f610b7d13)
* bpo-31019: Fix multiprocessing.Process.is_alive() (#2875)
multiprocessing.Process.is_alive() now removes the process from the
_children set if the process completed.
The change prevents leaking "dangling" processes.
(cherry picked from commit 2db64823c20538a6cfc6033661fab5711d2d4585)
|
|
|
|
|
|
|
|
|
|
| |
* bpo-31034: Reliable signal handler for test_asyncio
Don't rely on the current SIGHUP signal handler, make sure that it's
set to the "default" signal handler: SIG_DFL.
* Add comments
(cherry picked from commit 830080913c22a9834d310294b9f7653234dc6a59)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tearDown() now clears explicitly the self.server variable to make
sure that the thread is completely cleared when tearDownClass()
checks if all threads have been cleaned up.
Fix the following warning:
$ ./python -m test --fail-env-changed -m test.test_os.TestSendfile.test_keywords -R 3:1 test_os
(...)
Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2)
(...)
Tests result: ENV CHANGED
(cherry picked from commit d1cc037d1442cc35d1b194ec8e50901514360949)
|
|
|
|
|
|
| |
(#2820)
Make test_shutil test_disk_usage not depend on the current working directory's filesystem.
(cherry picked from commit 529746c90584069270cd122920270bd7be38bca3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When running the test suite using --use=all / -u all, exclude tzdata
since it makes test_datetime too slow (15-20 min on some buildbots)
which then times out on some buildbots.
-u tzdata must now be enabled explicitly, -u tzdata or -u all,tzdata,
to run all test_datetime tests.
Fix also regrtest command line parser to allow passing -u
extralargefile to run test_zipfile64.
Travis CI: remove -tzdata. Replace -u all,-tzdata,-cpu with -u all,-cpu since tzdata is now excluded from -u all.
(cherry picked from commit 5b392bbaeb9d9b1db961ecfc7315d8c8662c27f6)
|
|
|
|
| |
(GH-2755)
|
|
|
|
|
| |
(GH-2712). (#2727)
(cherry picked from commit 49f6449ef4b81537c19b82329caaf60596c516c2)
|
|
|
|
|
|
|
|
|
| |
package (GH-2639) (#2676)
instead of failing with SystemError.
Relative import from non-package now fails with ImportError rather than
SystemError.
(cherry picked from commit 8a9cd20edca7d01b68292036029ae3735ce65edd)
|
|
|
|
|
|
| |
(GH-2690) (#2692)
encoder and decoder.
(cherry picked from commit d3aaa2f)
|
|
|
|
|
|
| |
subclasses. (GH-2662) (#2685)
Patch by Louie Lu.
(cherry picked from commit 50c9435)
|
|
|
|
|
|
| |
(GH-2634) (#2656)
called with bytes-like argument..
(cherry picked from commit 1180e5a51871fa53ca6892e83fd2e69dc2600447)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If history-length is set in .inputrc, and the history file is double the
history size (or more), history_get(N) returns NULL, and python
segfaults. Fix that by checking for NULL return value.
It seems that the root cause is incorrect handling of bigger history in
readline, but Python should not segfault even if readline returns
unexpected value.
This issue affects only GNU readline. When using libedit emulation
system history size option does not work.
|
|
|
| |
Leading whitespace was incorrectly dropped during folding of certain lines in the _header_value_parser's folding algorithm. This makes the whitespace handling code consistent.
|
|
|
|
|
| |
package. (GH-2580). (#2598)
(cherry picked from commit b4baacee1adc06edbe30ac7574d17a8cd168e2e0)
|
|
|
|
|
| |
`asyncio.CFuture.remove_done_callback() (GH-2569) (#2590)
(cherry picked from commit 833a3b0d3707200daeaccdd218e8f18a190284aa)
|
|
|
|
|
| |
(GH-2409). (#2556)
(cherry picked from commit 8a8d28501fc8ce25926d168f1c657656c809fd4c)
|
|
|
|
| |
--forever now stops if a fail changes the environment.
(cherry picked from commit 5e87592fd12e0b7c41edc11d4885ed7298d5063b)
|
|
|
| |
(cherry picked from commit 3a7f03584ab75afbf5507970711c87042e423bb4)
|