Commit Graph

101646 Commits

Author SHA1 Message Date
Miss Islington (bot) 2cbd1bb1f3
Make GenericAlias_Type and Generic_Type static. (GH-8076)
(cherry picked from commit 97ae32c92e)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-03 23:08:57 -07:00
Miss Islington (bot) 123f2b4540
Don't export pending_threadfunc from _testcapi. (GH-8075)
(cherry picked from commit b4588c2fff)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-03 22:50:34 -07:00
Miss Islington (bot) 20ae4c6025 bpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918) (GH-8070)
PyErr_Print() will not return when the exception is a SystemExit, so
decref the __main__ module object in that case.
(cherry picked from commit d8cba5d16f)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-07-03 22:13:28 +02:00
Miss Islington (bot) 6699386231 bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042) (GH-8065)
(cherry picked from commit 831c29721d)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2018-07-03 15:37:16 +03:00
Miss Islington (bot) cee7b2261f
bpo-34019: Fix wrong arguments for Opera Browser (GH-8047)
The Opera Browser was using a outdated command line invocation that resulted in an incorrect URL being opened in the browser when requested using the webbrowser module.

* Correct the arguments passed to the Opera Browser when opening a new URL.
(cherry picked from commit 3cf1f154ed)

Co-authored-by: Bumsik Kim <k.bumsik@gmail.com>
2018-07-03 05:17:28 -07:00
Miss Islington (bot) 42b2f84a85
bpo-33735: Fix test_multiprocessing random failure (GH-8059)
When hunting memory leaks using -R 3:3, test_imap_unordered() of
test_multiprocessing leaks randomly a few memory blocks. It is a
false alarm: when testing using -R 3:20 for example, no leak is
detected.

Modify test_imap_unordered() to be closer to test_imap():

* Only test 10 numbers instead of 1000: it's a pool of 4 processes, so
  10 is enough to test at least one number per process
* Use chunksize=100 instead of chunksize=53 to mimick test_imap()
(cherry picked from commit 23401fb960)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-07-03 04:38:56 -07:00
Miss Islington (bot) 4d02ad856f
bpo-34006: Revert line length limit for Windows help docs (GH-8051)
The line-length limit is not needed because the pages appear in a separate app rather
 than on a browser tab.  It can also interact badly with the DPI setting.
(cherry picked from commit d824ca7f4d)

Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
2018-07-02 15:23:22 -07:00
Chris Cogdon 24d74bd837 bpo-33961: Adjusted dataclasses docs to correct exceptions raised. (GH-7917) 2018-07-02 06:21:50 -04:00
Miss Islington (bot) 6f49afc3d9 bpo-33978: Close existing handlers before logging (re-)configuration. (GH-8008) (GH-8044)
(cherry picked from commit 087570af6d)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
2018-07-02 10:35:09 +01:00
Miss Islington (bot) f9ae07441c Doc: Remove unused image file (GH-8027)
(cherry picked from commit fe524df37c)
2018-07-01 03:30:43 +09:00
Miss Islington (bot) dedb28efd8
bpo-25862: Fix several bugs in the _io module. (GH-8026)
They can be exposed when some C API calls fail due to lack of
memory.

* Failed Py_BuildValue() could cause an assertion error in the
  following TextIOWrapper.tell().
* input_chunk could be decrefed twice in TextIOWrapper.seek()
  after failed Py_BuildValue().
* initvalue could leak in StringIO.__getstate__() after failed
  PyDict_Copy().
(cherry picked from commit fdb5a50ef3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-06-30 11:25:37 -07:00
Miss Islington (bot) fd1c092bb9 bpo-32568: make select.epoll() and its docs consistent (GH-7840) (GH-8024)
* `flags` is indeed deprecated, but there is a validation on its value for
  backwards compatibility reasons.  This adds mention of this in the docs.
* The docs say that `sizehint` is deprecated and ignored, but it is still
  used when `epoll_create1()` is unavailable. This adds mention of this in
  the docs.
* `sizehint=-1` is acceptable again, and is replaced with `FD_SETSIZE-1`.
  This is needed to have a default value available at the Python level,
  since `FD_SETSIZE` is not exposed to Python. (see: bpo-31938)
* Reject `sizehint=0` since it is invalid to pass on to `epoll_create()`.

The relevant tests have also been updated.

(cherry picked from commit 0cdf5f4289)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-06-30 16:03:19 +03:00
Miss Islington (bot) 42ea522664
bpo-33974: Fix passing special characters to ttk widgets. (GH-7986)
Fix passing lists and tuples of strings containing special characters
'"', '\\', '{', '}' and '\n' as options to tkinter.ttk widgets.
(cherry picked from commit 5bb5bbfca8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-06-29 23:42:57 -07:00
Miss Islington (bot) c919252a28
Fix redundant declaration of _PyImport_AddModuleObject (GH-7992)
(cherry picked from commit f874bd1f06)

Co-authored-by: Jeremy Cline <jeremy@jcline.org>
2018-06-29 16:03:07 -07:00
Miss Islington (bot) eabebbb54c
bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918)
(cherry picked from commit 23db935bcf)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-06-29 03:34:34 -07:00
Miss Islington (bot) d0b442803a
Fix the indentation in the documentation of bin() and hash() (GH-7998)
(cherry picked from commit bda9c3eae3)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-29 03:16:26 -07:00
Miss Islington (bot) e2c5a753fa
bpo-14117: Make minor tweaks to turtledemo (GH-8002)
The 'wikipedia' example is now 'rosette', describing what it draws.
The 'penrose' print output is reduced.  The 'tree' '1024'
output is eliminated.
(cherry picked from commit 891a1f86d4)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-28 22:30:44 -07:00
Miss Islington (bot) 3ed4414121
bpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993)
(cherry picked from commit d904c238ca)

Co-authored-by: Yury Selivanov <yury@magic.io>
2018-06-28 19:16:48 -07:00
Miss Islington (bot) 9d92524c11 bpo-31546: Fix input hook integration (GH-7978)
(cherry picked from commit 9b9d58f0d8)

Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
2018-06-28 10:48:37 -07:00
Miss Islington (bot) 4c20d2bf5d
bpo-33985: Implement ContextVar.name attribute. (GH-7980)
(cherry picked from commit 41cb0baea9)

Co-authored-by: Yury Selivanov <yury@magic.io>
2018-06-28 10:39:54 -07:00
Miss Islington (bot) 48dc7527e3
bpo-32996: Enhancements to What's New based on feedback (GH-7988)
(cherry picked from commit 4d26c8a177)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
2018-06-28 09:14:52 -07:00
Ned Deily 0c5918f6f4 Fix NEWS entry for bpo-31647 2018-06-28 04:03:32 -04:00
Miss Islington (bot) 702d43cab6
bpo-33958: Doc: Remove unused variable in example (GH-7927)
(cherry picked from commit 62b6cea6b8)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <srinivasreddy@users.noreply.github.com>
2018-06-27 23:41:29 -07:00
Ned Deily 4f69a297a9 start 3.7.0+ 2018-06-27 18:29:26 -04:00
Ned Deily 933c4513c6 Python 3.7.0
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAlszAEkACgkQLTR+pqpl
 Qh3umg//a3eSst508H59PVuPoiQv4JeX4lvV2WMy//51qk47tlgdJp8OXcYM6Y11
 uCrQSTFVJaRu+/gBiPgT4yiXdCh/DsphLhqsgm1vSlzego+J+hkdREelUeWKhX/X
 Pyu2GbOwxtyOfaWjyRNEtT2/8XdCBjo4dw68p2JvlQ65X/duCHM3dp4PIL2u5CHH
 5/DeBrqLBWyYUwumyWFx4z5PrTN1EmO8yR6B9F0u518k1pgTqd7flRefHwyd2jzA
 S9F7JgUgyTiwO3FmjylIem9uLgOyWuldH+czsAqyEmodo7jb4ekxv+jVMiLStt2r
 Ct/yxx+rPNjhtJZtiWUd6gl6Z5Z9tLx7qc13RoryijFhiUD/G8gFx28wVMExzW05
 fkNKNHNhM0iN4L1FCZuyLxFri8BX9gdpmY6XEuKffzhiGjcwnf0kMn5p5pmWrQbX
 vXnvtOabXqr71jNDy4SbzI+CsTQcTSQYkVAZiPOwBjjt/cKhyUO6B5NHA8A3MYxK
 Uevqr6rUC2x7rrTCh9lroJ7Npg8q3R1e6rd57MVumQlnyl8LQR5jpNuwcQjcV7Go
 IsIZ3VYVUYRJh1a2dTI3Cu6Z3RbFVbLChWGVTQ3kxd9pZ8oRx8Ts49BteUxo5VcY
 XQnMxIOifWAFkc5Y/yT5IiS+IXtQm8xqkpwsg6kfP5dI8/dxMQo=
 =jOsP
 -----END PGP SIGNATURE-----

Merge 3.7.0 final changes
2018-06-27 18:23:18 -04:00
Miss Islington (bot) ecb1525e10
bpo-33715: Fix multiprocessing test_wait_result() (GH-7971)
Increase timeouts from 10 seconds to 1 minute.
(cherry picked from commit 492572715a)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-27 13:47:44 -07:00
Miss Islington (bot) 4b1d286ac0
bpo-33913: Fix test_multiprocessing_main_handling (GH-7972)
bpo-30339, bpo-33913:

* Increase timeout from 10 seconds to 1 minute in
  test_source_main_skipped_in_children source of
  test_multiprocessing_main_handling.
* Replace time.time() with time.monotonic().
* On timeout, include the duration in the error message.
(cherry picked from commit 64737e9ae2)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-27 13:41:39 -07:00
Miss Islington (bot) 34f2935dca
bpo-30356: Fix test_mymanager_context() of multiprocessing (GH-7968)
test_mymanager_context() now also accepts -SIGTERM as an expected
exitcode for the manager process. The process is killed with SIGTERM
if it takes longer than 1 second to stop.
(cherry picked from commit fbd7172325)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-27 09:38:37 -07:00
Victor Stinner 7b5856e7f0
Revert "bpo-33929: multiprocessing: fix handle leak on race condition (GH-7921)" (GH-7963)
This reverts commit 8b1ebcd7cb.
2018-06-27 15:17:34 +02:00
Miss Islington (bot) 8b1ebcd7cb
bpo-33929: multiprocessing: fix handle leak on race condition (GH-7921)
Fix a race condition in Popen of
multiprocessing.popen_spawn_win32. The child process now duplicates
the read end of pipe instead of "stealing" it.

Previously, the read end of pipe was "stolen" by the child process,
but it leaked a handle if the child process had been terminated
before it could steal the handle from the parent process.
(cherry picked from commit 2cc9d21fff)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-27 02:59:44 -07:00
Miss Islington (bot) 8eac0b8ed5
bpo-30317, test_multiprocessing: fix test_timeout() (GH-7957)
Tolerate a different of 50 ms, instead of just 30 ms, in
test_timeout() of multiprocessing tests. This change should fix such
test failure on Windows:

FAIL: test_timeout (test.test_multiprocessing_spawn.WithProcessesTestQueue)
Traceback (most recent call last):
  File "lib\test\_test_multiprocessing.py", line 753, in test_timeout
    self.assertGreaterEqual(delta, 0.170)
AssertionError: 0.16138982772827148 not greater than or equal to 0.17
(cherry picked from commit f15f66d275)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-27 02:22:43 -07:00
Miss Islington (bot) 0eaf7b975b bpo-24567: Random subnormal.diff (GH-7954) (GH-7955)
Handle subnormal weights for choices()
(cherry picked from commit ddf7171911)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2018-06-27 01:53:04 -07:00
Miss Islington (bot) ca97b64a65
bpo-33975: Avoid small type when running IDLE's htests. (GH-7944)
Import pyshell first in htest to call SetProcessDpiAwareness on Windows
before tkinter.Tk() is called for the htest. Apparently, 'root.destroy()'
undoes a previous 'root = Tk()'. Since IDLE unittests always destroy roots,
a unittest before an htest does not require anything more to work right.
Since part of the purpose of human-viewed tests is to determine that
widgets look right, it is important that they look the same for testing
as when running IDLE.
(cherry picked from commit 3c8043d8fa)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-26 21:37:51 -07:00
Miss Islington (bot) 79f70cee7b
use rich markup for PEP reference (GH-7939)
it's better to refer to PEP with `pep` role in reStructuredText. It also links to the PEP page.
(cherry picked from commit df748c20da)

Co-authored-by: Behzad B. Mokhtari <35877268+perplexionist@users.noreply.github.com>
2018-06-26 21:17:14 -07:00
Ned Deily 1bf9cc5093 3.7.0 final 2018-06-26 23:07:35 -04:00
Ned Deily a61f6e72d0 Sync the importlib magic number in test_importlib for 3.7.0 2018-06-26 23:07:21 -04:00
Ned Deily 828351716e bpo-29514: Make magic number test work for candidates 2018-06-26 23:07:00 -04:00
Ned Deily d4dd7db845 Sync the importlib magic number in test_importlib for 3.7.0 2018-06-26 23:00:18 -04:00
Ned Deily 8511b448a5 bpo-29514: Make magic number test work for candidates 2018-06-26 22:53:14 -04:00
Miss Islington (bot) fb17b81fc9
bpo-33956: update vendored expat to 2.2.5 (GH-7925)
(cherry picked from commit 4e21100fa7)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-06-26 19:44:32 -07:00
Miss Islington (bot) b940921a67 bpo-33932: Calling Py_Initialize() twice does nothing (GH-7845)
Calling Py_Initialize() twice does nothing, instead of failing with a
fatal error: restore the Python 3.6 behaviour.
(cherry picked from commit 209abf7469)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-26 20:14:34 -04:00
Miss Islington (bot) 235d0fb93c bpo-33851: Fix ast.get_docstring() for a node that lacks a docstring. (GH-7682)
(cherry picked from commit 08f127a3ca)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-06-26 19:53:27 -04:00
Miss Islington (bot) 2d10166998 Fix nested list in 3.7 What's New (GH-7659) (GH-7660)
(cherry picked from commit 5a98209180)

Co-authored-by: Ned Deily <nad@python.org>
2018-06-26 19:52:17 -04:00
Victor Stinner d1f9481b7a
bpo-33873: Backport regrtest from master to 3.7 (GH-7935)
* bpo-33718: regrtest: use format_duration() to display failed tests (GH-7686)

* Enhance also format_duration(): work on integers and rounds towards
  +infinity (math.ceil).
* Write unit tests on format_duration()

(cherry picked from commit 4ffe9c2b25)

* bpo-33873: regrtest: Add warning on -R 1:3 (GH-7736)

regrtest: Add warning when using less than 3 warmup runs like -R 1:3.
(cherry picked from commit cac4fef886)

* bpo-33873: Fix bug in `runtest.py` and add checks for invalid `-R` parameters (GH-7735)

Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs.

Add check for invalid --huntrleaks/-R parameters.

(cherry picked from commit 58ed7307ea)
2018-06-26 23:47:35 +02:00
Miss Islington (bot) 829b7669f0
bpo-33957: Doc: Use better wording (GH-7912)
(cherry picked from commit 866c168a5f)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <srinivasreddy@users.noreply.github.com>
2018-06-26 01:47:10 -07:00
Miss Islington (bot) ee60e36fbf
bpo-33924: Add missed mac-specific 'windows' to 'window' changes (GH-7920)
These should have been included in PR 7836.
(cherry picked from commit 42397731d7)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2018-06-25 18:37:46 -07:00
Miss Islington (bot) 150cd3cb27 [3.7] bpo-33573: docs to suggest median() alternatives for non-numeric data (GH-7587) (GH-7906)
(cherry picked from commit fdd6e0bf18)
2018-06-25 14:18:54 +03:00
Miss Islington (bot) 80f1a908a8 bpo-33952: Fix typo in str.upper() documentation (GH-7898) (GH-7903)
(cherry picked from commit 4a6e746079)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-25 13:42:20 +03:00
Miss Islington (bot) 66d77d8af8 bpo-33943: Add references in the docs for logging.basicConfig (GH-7858) (GH-7900)
Adds references to info about file modes, `time.strftime()`, string formatting
syntaxes, and logging levels.

(cherry picked from commit a8ddf85a84)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-25 09:25:58 +03:00
Miss Islington (bot) b3bac968fe
bpo-33951: IDLE test_configdialog: call page.update in setUpClass (GH-7892)
This avoids a failure in at least one case when running only a single
test method rather than all tests in the module.

The issue came up when testing the following on Windows 10 Pro 64-bit:
HighPageTest.test_highlight_target_text_mouse
(cherry picked from commit 2af9f5d334)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-06-24 13:55:39 -07:00