Commit Graph

98957 Commits

Author SHA1 Message Date
Victor Stinner 1381bfe977
bpo-33540, socketserver: Add _block_on_close for tests (GH-7317)
* Add a private _block_on_close attribute to ForkingMixIn and
  ThreadingMixIn classes of socketserver.
* Use _block_on_close=True in test_socketserver and test_logging
2018-06-01 16:24:43 +02:00
Victor Stinner 5dbb48aaac
[3.6] bpo-31234: Add test.support.wait_threads_exit() (GH-3578) (GH-7315)
* bpo-31234: Add test.support.wait_threads_exit() (GH-3578)

Use _thread.count() to wait until threads exit. The new context
manager prevents the "dangling thread" warning.

(cherry picked from commit ff40ecda73)

* bpo-31234: Try to fix lock_tests warning (#3557)

Try to fix the "Warning -- threading_cleanup() failed to cleanup 1
threads" warning in test.lock_tests: wait a little bit longer to give
time to the threads to complete.

Warning seen on test_thread and test_importlib.

(cherry picked from commit 096ae3373a)
2018-06-01 15:51:02 +02:00
Victor Stinner 95681c7a7d
bpo-31479: Always reset the signal alarm in tests (GH-3588) (GH-7312)
* bpo-31479: Always reset the signal alarm in tests

Use "try: ... finally: signal.signal(0)" pattern to make sure that
tests don't "leak" a pending fatal signal alarm.

* Move two more alarm() calls into the try block

Fix also typo: replace signal.signal(0) with signal.alarm(0)

* Move another signal.alarm() into the try block

(cherry picked from commit 9abee722d4)
2018-06-01 15:23:10 +02:00
Victor Stinner 8f7bd307ce
test.bisect: Update from master, fix typos (#7311) 2018-06-01 14:32:36 +02:00
Victor Stinner 99ba73d118
bpo-31009: Move fd_count() to test.support (#7308)
* Move fd_count() from test.libregrtest.refleak to test.support
* Fix support.fd_count() on Windows: Call CrtSetReportMode() to not
  kill the process on invalid file descriptor if Python is compiled
  in debug mode.
2018-06-01 13:47:24 +02:00
Miss Islington (bot) 1d5198fd41 bpo-30654: Do not reset SIGINT handler to SIG_DFL in finisignal (GH-7146) (GH-7307)
(cherry picked from commit e905c84494)

Co-authored-by: pkerling <pkerling@casix.org>
2018-06-01 13:12:11 +02:00
Victor Stinner b9afe645c4
bpo-33692: Update pythoninfo from master (GH-7301)
* bpo-33717: pythoninfo: add CC --version (GH-7290)
2018-06-01 12:09:59 +02:00
T. Wouters 500a419a7a
[3.6] bpo-32591: fix abort in _PyErr_WarnUnawaitedCoroutine during shutdown (GH-5337) (#6536)
When an unawaited coroutine is collected very late in shutdown --
like, during the final GC at the end of PyImport_Cleanup -- then it
was triggering an interpreter abort, because we'd try to look up the
"warnings" module and not only was it missing (we were prepared for
that), but the entire module system was missing (which we were not
prepared for).

I've tried to fix this at the source, by making the utility function
get_warnings_attr robust against this in general. Note that it already
has the convention that it can return NULL without setting an error,
which is how it signals that the attribute it was asked to fetch is
missing, and that all callers already check for NULL returns.

There's a similar check for being late in shutdown at the top of
warn_explicit, which might be unnecessary after this fix, but I'm not
sure so I'm going to leave it..
(cherry picked from commit dba976b8a2)

Co-authored-by: Nathaniel J. Smith <njs@pobox.com>
2018-05-31 12:20:46 +02:00
Serhiy Storchaka 55d9e865cb
[3.6] bpo-33641: Convert RFC references into links. (GH-7103) (GH-7276)
85% of them are already links.
(cherry picked from commit 0a36ac1a09)
2018-05-31 09:11:07 +03:00
Miss Islington (bot) 0fe3be0392 bpo-33677: Fix signatures of tp_clear handlers for AST and deque. (GH-7196) (GH-7269)
(cherry picked from commit a5c42284e6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-05-31 09:10:28 +03:00
Victor Stinner c2870b699e
bpo-33532: Fix multiprocessing test_ignore() (GH-7262) (#7266)
Fix test_ignore() of multiprocessing tests like
test_multiprocessing_forkserver: use support.PIPE_MAX_SIZE to make
sure that send_bytes() blocks.

(cherry picked from commit 5d6c7ed5e3)
2018-05-31 07:35:03 +02:00
Miss Islington (bot) 7da7a01f99 3.6 what's new: fix a reference to PEP 528 (GH-7113) (#7257)
(cherry picked from commit 495e567a2b)

Co-authored-by: Dmitry Shachnev <mitya57@users.noreply.github.com>
2018-05-30 19:35:15 -04:00
Miss Islington (bot) 7301dd91e8
bpo-33696: Install python-docs-theme even if SPHINXBUILD is defined (GH-7242)
(cherry picked from commit 05f1c8902c)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-05-30 10:37:52 -07:00
Victor Stinner b729af3d9d
regrtest: repeat summary after re-run (GH-7159) (GH-7245)
Using -w, when failing tests are re-run in verbose mode, display
again the tests results at the end.

(cherry picked from commit c6c05d0e69)
2018-05-30 17:41:30 +02:00
Victor Stinner f7a19c28bd
bpo-33692: pythoninfo detect libedit on Python 3.6 (GH-7244)
Check which readline implementation is used based on the readline
docstring.
2018-05-30 16:49:07 +02:00
Miss Islington (bot) be325e6132 Improve ensurepip's --help (GH-4686) (GH-7239)
* Add a space to ensurepip's --altinstall option
* Add periods to the arguments of ensurepip that didn't have it

This makes --help for all optional arguments consistent and also makes it
consistent with pip --help.
(cherry picked from commit e9537ad6a1)

Co-authored-by: Wieland Hoffmann <mineo@users.noreply.github.com>
2018-05-30 13:56:19 +02:00
Yury Selivanov 3b263e65a8
bpo-32684: Fix gather to propagate cancel of itself with return_exceptions (GH-7224) 2018-05-29 19:20:01 -04:00
Miss Islington (bot) 51bf38f796
bpo-30935: update get_event_loop docs (GH-2731)
(cherry picked from commit e55de2d77f)

Co-authored-by: Mandeep Singh <daxlab@users.noreply.github.com>
2018-05-29 12:33:29 -07:00
Yury Selivanov 6aacc160a8
Fix ci for 3.6 / asyncio / test_stdin_broken_pipe (#7212) 2018-05-29 14:57:38 -04:00
Miss Islington (bot) 5e9e9db9d9 bpo-33197: Update a error message of invalid inspect.Parameters. (GH-6636) (#7205)
(cherry picked from commit a9cab433bb)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2018-05-29 11:59:27 -04:00
Yury Selivanov e151f83dea
bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines (GH-7180)
[3.6 backport of 989b9e0]
2018-05-29 00:55:27 -04:00
Victor Stinner 7593b8a507 bpo-33674: asyncio: Fix SSLProtocol race (GH-7175) (GH-7188)
Fix a race condition in SSLProtocol.connection_made() of
asyncio.sslproto: start immediately the handshake instead of using
call_soon(). Previously, data_received() could be called before the
handshake started, causing the handshake to hang or fail.

(cherry picked from commit be00a5583a)
2018-05-29 00:46:48 -04:00
Steve Dower 325320d5f5
bpo-32878: Adds documentation for st_ino on Windows (GH-5764) (GH-7190) 2018-05-28 19:27:11 -07:00
Miss Islington (bot) 08beaf7d60
bpo-33670: Expose Sphinx errorlevel (GH-7156)
(cherry picked from commit 8c1ad0c4f6)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-05-28 18:49:50 -07:00
Miss Islington (bot) a6d6bd70ac
bpo-33469: RuntimeError after closing loop that used run_in_executor (GH-7171)
(cherry picked from commit fdccfe09f0)

Co-authored-by: Yury Selivanov <yury@magic.io>
2018-05-28 18:32:17 -07:00
Miss Islington (bot) d8af830243
bpo-33673: Install python-docs-theme even if Sphinx is already installed (GH-7163)
(cherry picked from commit 3d3e66c2da)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-05-28 18:08:17 -07:00
Miss Islington (bot) 100db0b584
bro-33614: Override exit code in find_msbuild.bat (GH-7169)
(cherry picked from commit f9b364fe51)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-05-28 15:38:30 -07:00
Miss Islington (bot) 7e8819a589 bpo-31647: Fix write_eof() after close() for SelectorSocketTransport (GH-7149) (#7154)
Fixed bug where calling write_eof() on a _SelectorSocketTransport after
it's already closed raises AttributeError.
(cherry picked from commit 23f587e395)

Co-authored-by: twisteroid ambassador <twisteroidambassador@users.noreply.github.com>
2018-05-28 16:25:03 -04:00
Miss Islington (bot) c489a767af
bpo-33614: Ensures module definition files for the stable ABI on Windows are correctly regenerated. (GH-7165)
(cherry picked from commit e97ba4c690)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-05-28 13:16:07 -07:00
Miss Islington (bot) 6ec325d483
bpo-32374: Ignore Python-level exceptions in test_bad_traverse (GH-7145)
(cherry picked from commit 08c5aca9d1)

Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
2018-05-28 09:37:10 -07:00
Miss Islington (bot) ae27dee0f8
bpo-33655: Also ignore test_posix_fallocate failures on BSD platforms (GH-7134)
The failure may be due to the use oF ZFS, a case we already ignore
for Solaris-based systems where ZFS is frequently used.
(cherry picked from commit 09c4a7dee2)

Co-authored-by: Ned Deily <nad@python.org>
2018-05-26 14:57:59 -07:00
Andrés Delfino 717204ffcc [3.6] bpo-32769: A new take on annotations/type hinting glossary entries (GH-6829) (GH-7128)
* [3.6] bpo-32769: A new take on annotations/type hinting glossary entries (GH-6829).
(cherry picked from commit 6e33f810c9)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>

* Typo fix spotted by Guido
2018-05-26 10:41:12 -07:00
Miss Islington (bot) 9ba3be4718 bpo-33644: Fix signatures of tp_finalize handlers in testing code. (GH-7111) (GH-7125)
(cherry picked from commit 19de8b3dd7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-05-26 13:17:08 +03:00
Miss Islington (bot) ecd0bb2693
test.regrtest: flush stdout when display progress (GH-7105)
runtest_mp.py: call print() with flush=True.
(cherry picked from commit 4f0bc7f7ab)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-05-25 10:08:23 -07:00
Miss Islington (bot) 20b797dafa
bpo-33012: Add -Wno-cast-function-type for gcc 8. (GH-6757)
(cherry picked from commit ef91ddeae7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-05-25 04:02:54 -07:00
CtrlZvi 749afe81ec [3.6] bpo-26819: Prevent proactor double read on resume (GH-6921) (#7110)
The proactor event loop has a race condition when reading with
pausing/resuming. `resume_reading()` unconditionally schedules the read
function to read from the current future. If `resume_reading()` was
called before the previously scheduled done callback fires, this results
in two attempts to get the data from the most recent read and an
assertion failure. This commit tracks whether or not `resume_reading`
needs to reschedule the callback to restart the loop, preventing a
second attempt to read the data..
(cherry picked from commit 4151061855)

Co-authored-by: CtrlZvi <viz+github@flippedperspective.com>
2018-05-25 11:03:25 +03:00
Miss Islington (bot) 36f066a974
Document typing.NoReturn (GH-7107)
(cherry picked from commit 6e413f4327)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
2018-05-24 21:56:24 -07:00
Miss Islington (bot) fc0356d2a3
bpo-33629: Prevent coredump in test_importlib (GH-7090)
bpo-32374, bpo-33629: Use support.SuppressCrashReport() in
test_bad_traverse() of MultiPhaseExtensionModuleTests to prevent
leaking a core dump file.
(cherry picked from commit 483000e164)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-05-24 14:07:44 -07:00
Serhiy Storchaka f0e04b2ae2
[3.6] bpo-33622: Fix issues with handling errors in the GC. (GH-7078) (GH-7095)
* Fixed a leak when the GC fails to add an object with __del__ into
  the gc.garbage list.
* PyGC_Collect() can now be called when an exception is set and
  preserves it.
* Fixed an undefined behavior with comparing a dead pointer with NULL.
(cherry picked from commit 301e3cc8a5)
2018-05-24 16:05:38 +03:00
Miss Islington (bot) 935c81bbbc
bpo-33628: IDLE: Minor code cleanup of codecontext.py and its tests (GH-7085)
(cherry picked from commit 8506016f90)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-05-23 20:16:33 -07:00
Terry Jan Reedy 32adddb65e
[3.6] Improve comments in test_idle.py. (GH-7057) (GH-7060)
(cherry picked from commit 2a6d5da)
2018-05-22 14:34:18 -04:00
Miss Islington (bot) 2baee0aa77
bpo-30877: Fix clearing a cache in the the JSON decoder. (GH-7048)
(cherry picked from commit ae00fb1d4f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-05-22 06:26:43 -07:00
Serhiy Storchaka 93e9fb5664
[3.6] bpo-5945: Improve mappings and sequences C API docs. (GH-7029). (GH-7049)
(cherry picked from commit f5b1183610)
2018-05-22 14:54:14 +03:00
Serhiy Storchaka 1b48b9cfac
[3.6] Fix line breaks added after hyphens by blurb. (GH-7002) (GH-7051)
Also remove bullet asterisks from IDLE entries.
(cherry picked from commit aef639f626)
2018-05-22 14:53:37 +03:00
Miss Islington (bot) ab90ea2a9c
Fix lambda parameters being refered as arguments (GH-7037)
(cherry picked from commit 268cc7c3f8)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-05-22 01:07:35 -07:00
Miss Islington (bot) 0c1e7d8122
bpo-33583: Add note in PyObject_GC_Resize() doc (GH-7021)
(cherry picked from commit 1179f4b40f)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-05-21 19:18:41 -07:00
Serhiy Storchaka e9e2fd75cc
[3.6] bpo-33542: Ignore DUID in uuid.get_node on Windows. (GH-6922) (GH-7014)
uuid._ipconfig_getnode did not validate the maximum length of the value,
so long as the value had the same type of formatting as a MAC address.
This let it select DUIDs as MAC addresses. It now requires an exact
length match.
(cherry picked from commit c66c342cb4)

Co-authored-by: CtrlZvi <viz+github@flippedperspective.com>
2018-05-21 15:20:55 +03:00
Andrew Svetlov 7208bfb64b
[3.6] bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450) (#7025)
* bpo-33263 Fix FD leak in _SelectorSocketTransport. (GH-6450)

Under particular circumstances _SelectorSocketTransport can try to add a reader
even the transport is already being closed. This can lead to FD leak and
invalid stated of the following connections. Fixed the SelectorSocketTransport
to add the reader only if the trasport is still active..
(cherry picked from commit a84d0b361a)
2018-05-21 13:09:49 +03:00
Miss Islington (bot) 983e9653e0
bpo-33580: Make binary/text file glossary entries follow most common "see also" style. (GH-6991)
(cherry picked from commit 0c4be82890)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-05-20 08:57:42 -07:00
Miss Islington (bot) 82c9adb3f9
bpo-30940: Updating round() docs. (GH-6342)
(cherry picked from commit 900c48dba3)

Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
2018-05-20 08:29:45 -07:00