Commit Graph

101606 Commits

Author SHA1 Message Date
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
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
Miss Islington (bot) 380a2b09e8
bpo-33571: Improve the glossary description for '...' prompt (GH-6971)
Mention that it can be triggered by triple quotes and after specifying decorators.
(cherry picked from commit 6868003514)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-15 21:03:20 -07:00
Miss Islington (bot) 5a0bf74d4e
bpo-33836: Recommend keyword-only param for memoization in FAQ (GH-7687)
Update the the signature in the code example to make `_cache` a keyword-only parameter.
(cherry picked from commit 2707e41a5c)

Co-authored-by: Noah Haasis <haasis_noah@yahoo.de>
2018-06-15 20:46:30 -07:00
Miss Islington (bot) 18793e1f60 Improve the grammar in the glossary item for `list`
" ... access to elements is O(1)."

(cherry picked from commit 7469ff5017)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-15 20:00:36 -07:00
Miss Islington (bot) ba7970fd0a
Add missing va_end() calls in PC/launcher.c (GH-7690)
(cherry picked from commit 3a6d752e35)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-06-15 16:00:24 -07:00
Miss Islington (bot) 5085687645
bpo-33855: Minimally test all IDLE modules. (GH-7689)
Create a template for minimally testing a tkinter-using module by importing it and instantiating its class(es).  Add a test file for all non-startup IDLE modules.  Edit existing files and update coverage.  This is part 1 of 3, covering the 21 autocomplete to help modules and touching 33 idlelib files.
(cherry picked from commit ee5ef309c7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-15 15:38:35 -07:00
Miss Islington (bot) 046da16695
bpo-33824, bpo-32030: Fix pymain_read_conf() (GH-7712)
Fix "LC_ALL=C python3.7 -V": reset properly the command line parser
when the encoding changes after reading the Python configuration.

Fix pymain_read_conf(): use memset(0) to reset properly cmdline.
(cherry picked from commit 6c5a4b3156)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-15 15:26:29 -07:00
Victor Stinner ba67b4f7cb
Revert "bpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection -O0 (GH-6754)" (#7724)
This reverts commit 9b7c74ca32.
2018-06-15 23:37:33 +02:00
Miss Islington (bot) ce1bda774e bpo-33854: Add PEP 461 title to 'See also' note (GH-7688) (#7719)
(cherry picked from commit a9d0b34a5c)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-15 16:14:32 -04:00
Miss Islington (bot) c05c0e045c
bpo-33847: Add '@' operator entry to index (GH-7669)
(cherry picked from commit 695118600f)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-15 12:42:30 -07:00
Miss Islington (bot) 0113391e3f
bpo-33852: Remove misplaced parentheses around 'list'. (GH-7672)
'expresson list' refers to the grammar term 'expression_list' in the subscription production.
(cherry picked from commit 4fddd4e406)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-15 11:45:37 -07:00
Victor Stinner ca4cb8492c
[3.7] bpo-32962: Backport python-gdb.py and test_gdb.py from master (GH-7710)
* bpo-32962: python-gdb catchs ValueError on read_var() (GH-7692)

python-gdb now catchs ValueError on read_var(): when Python has no
debug symbols for example.

(cherry picked from commit 019d33b7a4)

* bpo-32962: python-gdb catchs UnicodeDecodeError (GH-7693)

python-gdb now catchs UnicodeDecodeError exceptions when calling
string().

(cherry picked from commit d22fc0bc7d)

* bpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection -O0 (GH-6754)

When Python is built with the intel control-flow protection flags,
-mcet -fcf-protection, gdb is not able to read the stack without
actually jumping inside the function. This means an extra
'next' command is required to make the $pc (program counter)
enter the function and make the stack of the function exposed to gdb.

(cherry picked from commit 9b7c74ca32)
2018-06-15 19:11:45 +02:00