Commit Graph

101667 Commits

Author SHA1 Message Date
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
Miss Islington (bot) d2a9c2ee4b
Enable GUI tests in VSTS Linux builds via xvfb-run (GH-7890)
(cherry picked from commit 3f197f94d6)

Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
2018-06-24 08:39:31 -07:00
Miss Islington (bot) 56aaef0ddb
bpo-33451: Close pyc files before calling PyEval_EvalCode() (GH-7884)
Directly executed pyc files were being kept open longer than necessary.
(cherry picked from commit ea737751b1)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-06-23 20:31:21 -07:00
Miss Islington (bot) 6b7ed31cf9
bpo-33950: Remove IDLE htest spec for a deleted file. (GH-7881)
In configdialog, the custom tabbedpages widget was replaced
by ttk.notebook several months ago.
(cherry picked from commit 5ae70f66ff)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-23 14:52:45 -07:00
Miss Islington (bot) 070c91e465
bpo-33887: Add TOC to Design and History FAQ(GH-7766)
(cherry picked from commit 38cf49bf69)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-23 11:43:43 -07:00
Miss Islington (bot) bbef7abe92
bpo-33805: Improve error message of dataclasses.replace() (GH-7580)
(cherry picked from commit 3d70f7aef6)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2018-06-23 08:04:01 -07:00
Miss Islington (bot) efc6bf66a5
bpo-33916: Fix bz2 and lzma init when called twice (GH-7843)
bz2, lzma: When Decompressor.__init__() is called twice, free the old
lock to not leak memory.
(cherry picked from commit 9b7cf75721)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-23 01:53:03 -07:00
Miss Islington (bot) f47d8983fe
bpo-33877: Remove UNIX qualification for running complete programs (GH-7744)
The statement is true for Windows (and macOS) also.
(cherry picked from commit c9d43c702a)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-22 14:51:07 -07:00
Miss Islington (bot) e4db73058b
bpo-33885: Replace "hook function" with "callable" (GH-7765)
(cherry picked from commit c45cb47907)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-22 14:30:45 -07:00
Miss Islington (bot) 3747dd16d5
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-22 10:33:48 -07:00
Miss Islington (bot) 1bb9dd337e bpo-30345: Add -g to LDFLAGS for LTO (GH-7709) (GH-7824)
Add -g to LDFLAGS when compiling with LTO to get debug symbols.
(cherry picked from commit 06fe77a84b)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-22 09:10:20 +02:00
Miss Islington (bot) d554414d98
bpo-33905: Add test for idlelib.stackview.StackBrowser. (GH-7852)
Increases coverage by 44%.
(cherry picked from commit bcd3a1a18d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-21 19:48:45 -07:00
Miss Islington (bot) fee52e34ce Clarified the tempfile.tempdir documentation (GH-7829) (GH-7841)
(cherry picked from commit 940ae60856)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <srinivasreddy@users.noreply.github.com>
2018-06-21 04:03:29 -04:00
Miss Islington (bot) e1f0dceb26
bpo-33924: Change IDLE mainmenu.menudefs key 'windows' to 'window' (GH-7836)
Every other menudef key is the lowercase version of the
corresponding main menu entry (in this case, 'Window').
(cherry picked from commit 33c7420e7d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-20 21:35:47 -07:00
Miss Islington (bot) f9243a22da
bpo-33906: Rename idlelib.windows as window (GH-7833)
Match Window on the main menu and remove last plural module name.
Change imports, test, and attribute references to match new name.
(cherry picked from commit a361e89d5a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-20 18:45:36 -07:00
Miss Islington (bot) a717c5646b
bpo-33917: Fix and document idlelib/idle_test/template.py (GH-7830)
The revised file compiles, runs, and tests OK. idle_test/README.txt
explains how to use it to create new IDLE test files.
(cherry picked from commit 87a927325e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-20 14:27:43 -07:00
Miss Islington (bot) b0f352680e
bpo-33904: In IDLE's rstrip, rename class RstripExtension as Rstrip (GH-7811)
(cherry picked from commit 9bb92235f6)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <srinivasreddy@users.noreply.github.com>
2018-06-20 08:56:22 -07:00
Miss Islington (bot) 232add0241
bpo-33746: Fix test_unittest.testRegisterResult() in verbose mode (GH-7799)
Only make sure that the result is in unittest.signals._results, don't
check the full content of unittest.signals._results.

support._run_suite() uses TextTestRunner in verbose mode, but
TextTestRunner.run() calls registerResult(result) which made the test
fail with "odd object in result set".

Call also removeResult() to restore unittest.signals._results to
avoid test side effect.
(cherry picked from commit fd8fbce495)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-20 02:50:03 -07:00
Miss Islington (bot) ce52f5ee09
bpo-33907: Rename an IDLE module and classes. (GH-7810)
Fix-up class name duplication in PR GH-7807. Combined effect is that
module calltips and its class CallTips are now calltip and Calltip.
In module calltip_w class CallTip is now CalltipWindow.
(cherry picked from commit 9af1836664)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-19 23:40:14 -07:00
Miss Islington (bot) b89a376b3b
bpo-33907: Rename an IDLE module and class. (GH-7807)
Improve consistency and appearance. Module idlelib.calltips is now calltip.
Class idlelib.calltip_w.CallTip is now Calltip.
(cherry picked from commit 06e2029dfa)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-19 20:27:37 -07:00
Miss Islington (bot) cbaee6fe02
bpo-33855: Still more edits and minimal tests for IDLE (GH-7784)
Part 3 of 3, continuing PR GH-7689. This covers 14 idlelib modules and their tests,
rpc to zoomheight except for run (already done) and tooltip (being done separately).
(cherry picked from commit 4d92158f4c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-19 17:11:24 -07:00
Xiang Zhang 71ca738f4c
set terse to True when calling platform.platform in test.pythoninfo (GH-7797) 2018-06-20 01:32:49 +08:00
Victor Stinner 13c79c677f
bpo-33901: Fix test_dbm_gnu for gdbm 1.15 (GH-7798)
Fix test_dbm_gnu.test_reorganize() on macOS with gdbm 1.15: add a
larger value to make sure that the file size changes.
2018-06-19 18:19:23 +02:00
Miss Islington (bot) 2edcf0a3db
bpo-33365: print the header values beside the keys (GH-6611)
with debuglevel=1 only the header keys got printed. With
this change the header values get printed as well and the single
header entries get '\n' as a separator.
(cherry picked from commit 936f03e7fa)

Co-authored-by: Marco Strigl <mstrigl@suse.com>
2018-06-19 06:52:36 -07:00
Miss Islington (bot) 53d1e9fad3
bpo-33663: Convert content length to string before putting to header (GH-7754)
(cherry picked from commit b36b0a3765)

Co-authored-by: ValeriyaSinevich <valeriya.sinevich@phystech.edu>
2018-06-18 14:37:56 -07:00
Miss Islington (bot) 740f1cb20a
bpo-33855: More edits and new minimal tests for IDLE (GH-7761)
Part 2 of 3.  Continues PR GH-7689, changeset ee5ef30.
Edit and add tests for 18 modules, help_about to replace and run.
(cherry picked from commit ea3dc8029a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-18 02:10:38 -07:00
Miss Islington (bot) 5f165851b9
bpo-33892: Doc: Use gender neutral words (GH-7770)
(cherry picked from commit 5092439c2c)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-17 21:49:43 -07:00
Miss Islington (bot) 6bb7704451
bpo-33856: Add "help" to the welcome message of IDLE (GH-7755)
Make it the same as when one runs 'python'.
(cherry picked from commit 9d49f85064)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2018-06-16 14:37:55 -07:00
Miss Islington (bot) 633593372a
bpo-33861: Minor improvements of tests for os.path. (GH-7715)
* Test exists(), lexists(), isdir(), isfile(), islink(), ismount()
  with bytes paths.
* Remove unneeded silencing DeprecationWarning for ismount() with
  bytes path.
* Test common functions with unencodable and undecodable paths.
* Minor clean up and refactoring.
(cherry picked from commit 17a0088e26)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-06-16 03:57:50 -07:00
Miss Islington (bot) 416e488415
bpo-33859: Fix spelling mistakes in docs. (GH-7691)
(cherry picked from commit c151f7846d)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
2018-06-15 22:26:34 -07:00