Commit Graph

98997 Commits

Author SHA1 Message Date
Miss Islington (bot) 376c272d68
bpo-11874: fix assertion failure in argparse metavar handling (GH-1826)
- bugfix and test for fragile metavar handling in argparse (see
  bpo-24089, bpo-14046, bpo-25058, bpo-11874)
- also fixes some incorrect tests that did not make 1-element tuples correctly
(cherry picked from commit 66f02aa32f)

Co-authored-by: wim glenn <wim.glenn@gmail.com>
2018-06-08 04:05:58 -07:00
Miss Islington (bot) a0accc0f8e
bpo-31215: Add version changed notes for OpenSSL 1.1.0 compatibility (GH-7346)
(cherry picked from commit 9ef1b0690b)

Co-authored-by: Mayank Singhal <17mayank.singhal@gmail.com>
2018-06-08 03:22:39 -07:00
Miss Islington (bot) 88437a9b31
Update idlelib/NEWS.txt to 2018 Jun 8 am. (GH-7517)
(cherry picked from commit b1f690294d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-07 23:50:15 -07:00
Miss Islington (bot) 1038669769
bpo-33768: IDLE: Clicking on code context line moves it to top of editor (GH-7411)
(cherry picked from commit 041272b657)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-06-07 22:50:58 -07:00
Yury Selivanov b0bb9a81f6
bpo-33786: Fix asynchronous generators to handle GeneratorExit in athrow() (GH-7467) (#7514) 2018-06-07 23:42:13 -04:00
Miss Islington (bot) 94b5fabe81
bpo-33791: Update README for macOS users (GH-7471)
(cherry picked from commit ee994d7443)

Co-authored-by: atg7000 <38963069+atg7000@users.noreply.github.com>
2018-06-07 19:52:49 -07:00
Yury Selivanov 8de73d5a69
bpo-33786: Fix asynchronous generators to handle GeneratorExit in athrow() (GH-7467) (GH-7507) 2018-06-07 21:32:43 -04:00
Miss Islington (bot) d071ab12c8
bpo-33642 and bpo-33679: Revise and condense blurbs (GH-7500)
(cherry picked from commit bed523ba03)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-07 16:34:12 -07:00
Berker Peksag 279564431e
[3.6] bpo-32392: Document env keyword argument of subprocess.run() (GH-7289)
(cherry picked from commit af1ec97a6d)

Conflicts:

	Doc/library/subprocess.rst
2018-06-07 22:22:35 +03:00
Victor Stinner 2c8d665ba8
[3.6] bpo-32676, test_asyncio: Fix warning in test_error_in_call_soon() (GH-7462) (GH-7483)
* bpo-32676, test_asyncio: Fix warning in test_error_in_call_soon() (GH-7462)

Fix "<CoroWrapper ...> was never yielded from" warning in
PyTask_PyFuture_Tests.test_error_in_call_soon() of
test_asyncio.test_tasks.

Close manually the coroutine on error.

(cherry picked from commit 9f04f0df6f)

* Hide a warning in test_asyncio test_cancel_handshake()

SslProtoHandshakeTests.test_cancel_handshake() of
test_asyncio.test_sslproto: hide a traceback about SSL handshake
failure.
2018-06-07 17:06:50 +02:00
Miss Islington (bot) 21f2553482
bpo-17909: Document that json.load can accept a binary IO (GH-7366)
(cherry picked from commit bb6366bd75)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2018-06-07 03:21:20 -07:00
Miss Islington (bot) 97fe1b493d
bpo-33773: Fix test.support.fd_count() on Linux/FreBSD (GH-7421)
Substract one because listdir() opens internally a file
descriptor to list the content of the /proc/self/fd/ directory.

Add test_support.test_fd_count().

Move also MAXFD code before msvcrt.CrtSetReportMode(), to make sure
that the report mode is always restored on failure.
(cherry picked from commit 492d6424a7)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-06 09:09:18 -07:00
Miss Islington (bot) 2bc1946fb0 bpo-33781: audioop: enhance rounding double as int (GH-7447) (GH-7451)
Move the floor() call into fbound() to call floor() on a double
rather than an int. The change should enhance the rounding.

Document also (int)double rounding mode.
(cherry picked from commit 45e4efba7f)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-06 17:18:27 +02:00
Miss Islington (bot) 08c03cca59
remove hg support from patchcheck (GH-7440)
(cherry picked from commit b8c0845fee)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-06-05 23:00:20 -07:00
INADA Naoki d59f97c832
bpo-5755: Move -Wstrict-prototypes to CFLAGS_NODIST (GH-7395)
(cherry picked from commit e336484847)
2018-06-06 14:18:14 +09:00
Miss Islington (bot) f74a1244eb
bpo-33751: Fix test_file. (GH-7378)
testModeStrings and testTruncateOnWindows were depended on
a file leaked in other tests.

Also improve cleaning up after tests.
(cherry picked from commit c2745d2d05)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-06-05 10:51:02 -07:00
Serhiy Storchaka b8baa33d93
[3.6] bpo-33753: Refactor creating temporary files in test_fileinput. (GH-7377). (GH-7431)
(cherry picked from commit 5f48e2644d)
2018-06-05 19:53:03 +03:00
Miss Islington (bot) 194a5c0722
bpo-33752: Fix a file leak in test_dbm. (GH-7376)
With addCleanup() f.close() was executed after tearDown().
(cherry picked from commit 6592d7fe11)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-06-05 06:47:42 -07:00
Miss Islington (bot) ae55d29fe0
bpo-33767: Fix improper use of SystemError by mmap.mmap objects (GH-7381)
Raise TypeError instead of SystemError for unsupported operations.
(cherry picked from commit e9e3976057)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-06-05 06:25:21 -07:00
Miss Islington (bot) 0da3f412bc
Enable the verbose build for extension modules with GNU make (GH-6659)
(cherry picked from commit 10f715d712)

Co-authored-by: Matthias Klose <doko42@users.noreply.github.com>
2018-06-04 10:37:04 -07:00
Miss Islington (bot) 889a1ef683
bpo-27902: Add compatibility note to Profile docs (GH-7295)
(cherry picked from commit f7745e1dcb)

Co-authored-by: Tobias Kunze <r@rixx.de>
2018-06-04 10:30:34 -07:00
Miss Islington (bot) a7de1483c2
bpo-33761: Fix a file leak in test_iterparse in test_xml_etree. (GH-7358)
(cherry picked from commit 13f51d9eec)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-06-04 10:22:18 -07:00
Miss Islington (bot) 6a43d5f4fb
bpo-33640, uuid.UUID doc: document endian of bytes parameter (GH-7263)
The bytes parameter uses big endian.
(cherry picked from commit b75ec08567)

Co-authored-by: Farhaan Bukhsh <farhaan.bukhsh@gmail.com>
2018-06-04 10:18:22 -07:00
Miss Islington (bot) 4251d2a354
bpo-31849: Fix warning in pyhash.c (GH-6799)
(cherry picked from commit a8eb58546b)

Co-authored-by: A. Jesse Jiryu Davis <jesse@emptysquare.net>
2018-06-04 10:14:26 -07:00
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
Ned Deily b8f2fb5200
bpo-33764: Appveyor fixes (GH-7364) (GH-7379)
* Prevent spurious message if taking a shortcut
* Fix YAML style
* Disable largefile tests
2018-06-04 00:47:37 -04: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) 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