Commit Graph

98966 Commits

Author SHA1 Message Date
Miss Islington (bot) db30390858
bpo-23495: Correct the documentation for writerows() of csv Writer objects (GH-6316)
`writerows()` takes an iterable.
(cherry picked from commit a801cf164b)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-06-02 08:37:28 -07:00
Miss Islington (bot) 218eacad2a
Fix typo in datamodel.rst (GH-6964)
This is a simple grammatical fix correcting "...object whose `__self__` attributes is ..." to "...object whose `__self__` attribute is ...".
(cherry picked from commit 00818c8ffd)

Co-authored-by: Zach Mitchell <zmitchell@users.noreply.github.com>
2018-06-02 07:53:54 -07: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
Miss Islington (bot) 1df877caad bpo-32519: Removed misleading sentence from EnvBuilder documentation. (GH-7296) (GH-7299)
(cherry picked from commit c0d341d49b)

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2018-06-01 18:56:47 +01:00
Miss Islington (bot) 461ad598d1 bpo-33400: Removed references to RFC3339 and ISO8601 from the logging documentation. (GH-7297) (GH-7303)
(cherry picked from commit 23cee80cfa)

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2018-06-01 18:55:10 +01: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
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