Commit Graph

41801 Commits

Author SHA1 Message Date
Miss Islington (bot) ffe29dbcd9
bpo-33763: IDLE: Replace label widget with text widget in code context (GH-7367)
(cherry picked from commit b609e687a0)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-06-04 09:22:10 -07:00
Miss Islington (bot) db22229687
bpo-33664: Scroll IDLE editor text by lines (GH-7351)
Previously, the mouse wheel and scrollbar slider moved text by a fixed
number of pixels, resulting in partial lines at the top of the editor
box. The change also applies to the shell and grep output windows,
but not to read-only text views.
(cherry picked from commit d49dbd9acc)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-06-04 09:13:43 -07:00
Serhiy Storchaka 2e601c54d9 [3.6] bpo-33759: Fix test.test_xmlrpc.ServerProxyTestCase. (GH-7362) (GH-7375)
It depended on a global variable set by other tests..
(cherry picked from commit 7cfd8c6a1b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-06-03 23:36:15 -04:00
Miss Islington (bot) d18b13d36a bpo-33760: Fix file leaks in test_io. (GH-7361) (GH-7372)
(cherry picked from commit e36837cb71)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-06-03 23:31:51 -04:00
Miss Islington (bot) 7f1bcda9bc bpo-33750: Reset thread-local context precision in test_round(). (GH-7355) (#7356)
(cherry picked from commit e95dfc5006)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
2018-06-03 19:30:12 +02:00
Miss Islington (bot) da7f8ce21a bpo-33744: Fix test_uu. (GH-7350) (GH-7353)
Separate tests leaked files or were depended on files leaked in other tests.
(cherry picked from commit 027f95c736)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-06-03 18:22:54 +03:00
Miss Islington (bot) dd851d6019
bpo-33679: IDLE: Re-enable color configuration for code context (GH-7199)
The difference from before is that the settings are now on the
Highlights tab instead of the Extensions tab and only change one theme
at a time instead of all themes. The default for light themes is black
on light gray, as before. The default for the IDLE Dark theme is white
on dark gray, which better fits the dark theme.

When one starts IDLE from a console and loads a custom theme without
definitions for 'context', one will see a warning message on the console.
To stop the warning, go to Options => Configure IDLE => Highlights,
select the custom theme if not selected already, select 'Code Context',
and select foreground and background colors.
(cherry picked from commit de6516264e)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-06-01 19:55:57 -07:00
Miss Islington (bot) a42fe3c67c
bpo-33642: IDLE: Use variable number of lines in CodeContext. (GH-7106)
Instead of displaying a fixed number of lines, some blank, Code Context
now displays the variable number of actual context lines.  When there
are no context lines, it shows a single blank line to indicate that the
feature is turned on.

The Code Context configuration option is changed from 'numlines'
(default 3) to 'maxlines' (default 15) to avoid possible interference
between user settings for the old and new versions of Code Context.
(cherry picked from commit 29996a1c4e)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-06-01 17:08:03 -07:00
Victor Stinner 64e538bc70
bpo-33532: Fix test_multiprocessing_forkserver.test_ignore() (GH-7322)
Use also support.SOCK_MAX_SIZE, not only support.PIPE_MAX_SIZE, to
get the size for a blocking send into a multiprocessing pipe.

Replace also test.support with support.
2018-06-01 19:39:56 +02:00
Victor Stinner 137e80346f
bpo-33718: Update regrtest from master (GH-7325)
* Add support.environment_altered: unused yet
* VSTS: don't run tests with --fail-env-changed
2018-06-01 19:39:37 +02:00
Victor Stinner f3297433e3
bpo-31238: pydoc ServerThread.stop() now joins itself (GH-3151) (GH-7324)
ServerThread.stop() now joins itself to wait until
DocServer.serve_until_quit() completes and then explicitly sets
its docserver attribute to None to break a reference cycle.

(cherry picked from commit 4cab2cd0c0)
2018-06-01 19:39:16 +02:00
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
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
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
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
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
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) 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) 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
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
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) 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
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 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
Serhiy Storchaka 49418f6df7
[3.6] bpo-33584: Fix several minor bugs in asyncio. (GH-7003) (#7006)
* repr() was called for a borrowed link.
* str() was used instead of repr() in formatting one error message.
(cherry picked from commit 6655354afc)
2018-05-20 17:33:55 +03:00
Terry Jan Reedy 09a5c077bd
[3.6] bpo-30928: Update idlelib/NEWS.txt. (GH-6995) (GH-6997)
(cherry picked from commit 6b0d09b)
2018-05-19 23:50:21 -04:00
Miss Islington (bot) 83aedc4d9a
bpo-32831: IDLE: Add docstrings and tests for codecontext (GH-5638)
(cherry picked from commit 654038d896)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-05-19 13:17:18 -07:00
Miss Islington (bot) c6a5cc8f24
bpo-33556: Remove reference to thread module from docstring (GH-6963)
(cherry picked from commit 5634331a76)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
2018-05-18 12:32:12 -07:00
Miss Islington (bot) eb4590e4d9
bpo-33564: Add async to IDLE's code context block openers. (GH-6960)
(cherry picked from commit d89ca94847)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-05-17 18:25:25 -07:00
Steve Dower 0d8f83f59c
bpo-33522: Enable CI builds on Visual Studio Team Services (GH-6865) (GH-6925) 2018-05-17 09:46:00 -04:00
Miss Islington (bot) 5e8c526804 bpo-32384: Skip test when _testcapi isn't available (GH-4940)
(cherry picked from commit 4cc3eb48e1)

Co-authored-by: Isaiah Peng <isaiah@users.noreply.github.com>
2018-05-16 12:17:25 +03:00
Terry Jan Reedy 8fa36b6be4
bpo-30928: update idlelib/NEWS.txt for 3.6. (#6888) 2018-05-16 02:39:13 -04:00
Miss Islington (bot) 47793dec38
bpo-30928: Update idlelib/NEWS.txt to 2018-05-14. (GH-6873)
(cherry picked from commit 038b21f2ca)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-05-15 18:14:51 -07:00
Terry Jan Reedy 1b0d65fa10
[3.6] bpo-29706: IDLE now colors async and await as keywords in 3.6. (#6879)
They become full keywords in 3.7.
2018-05-15 20:10:46 -04:00
Miss Islington (bot) 7c59a33491
bpo-29706: Test that IDLE colors async/await as keywords. (GH-6846)
Added to the eye-verified htest, not to the unittests.
Also remove some stray leftover comments.
(cherry picked from commit 389a48ede9)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-05-15 13:48:14 -07:00
Miss Islington (bot) c50e5b1f1f bpo-31947: remove None default for names param in Enum._create_ GH-4288 (GH-6485)
(cherry picked from commit b8e21f1289)

Co-authored-by: anentropic <ego@anentropic.com>
2018-05-15 08:19:50 -07:00