Commit Graph

98275 Commits

Author SHA1 Message Date
Terry Jan Reedy 548a6889f4 [3.6] Minor typo in curses.rst (GH-2763) (#2853)
I found a tiny typo in the curses how-to: changed 'Thy' to 'The' on line 68.
(cherry picked from commit d439d3e)
2017-07-24 18:54:53 -04:00
Victor Stinner bb33ccfc5a bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680) (#2844)
tearDown() now clears explicitly the self.server variable to make
sure that the thread is completely cleared when tearDownClass()
checks if all threads have been cleaned up.

Fix the following warning:

$ ./python -m test --fail-env-changed -m test.test_os.TestSendfile.test_keywords -R 3:1 test_os
(...)
Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2)
(...)
Tests result: ENV CHANGED
(cherry picked from commit d1cc037d14)
2017-07-24 17:40:50 +02:00
Terry Jan Reedy 1daeb25979 [3.6] bpo-30993: IDLE - Improve configdialog font page and tests. (GH-2831) (#2834)
In configdialog: Document causal pathways in create_font_tab docstring.  Simplify some attribute names. Move set_samples calls to var_changed_font (idea from Cheryl Sabella).  Move related functions to positions after the create widgets function.

In test_configdialog: Fix test_font_set so not order dependent.  Fix renamed test_indent_scale so it tests the widget.  Adjust tests for movement of set_samples call.  Add tests for load functions.  Put all font tests in one class and tab indent tests in another.  Except for two lines, these tests completely cover the related functions.
(cherry picked from commit 77e97ca)
2017-07-24 02:50:28 -04:00
Ned Deily f76d1a0819 Mac installer build now needs venv for docs build (#2828) (#2830)
(cherry picked from commit 4c7532e96d)
2017-07-23 17:10:40 -04:00
Terry Jan Reedy 5aa3bf041d [3.6] bpo-30993: IDLE - Improve configdialog font page and tests. (GH-2818) (#2826)
* Document causal event pathways in docstring.
* Simplify some attribute names.
* Rename test_bold_toggle_set_samples to make test_font_set fail.
* Fix test_font_set so not order dependent.
* Fix renamed test_indent_scale so it tests the widget.
(cherry picked from commit 07ba305)
2017-07-23 14:18:27 -04:00
Gregory P. Smith 8de48fe046 [3.6] Make test_shutil test_disk_usage not depend on the cwd fs (GH-2597) (#2820)
Make test_shutil test_disk_usage not depend on the current working directory's filesystem.
(cherry picked from commit 529746c905)
2017-07-22 23:00:39 -07:00
Terry Jan Reedy 04864b491e [3.6] bpo-30981: IDLE -- Add more configdialog font page tests. (GH-… (#2796)
Verify that clicking the bold checkbutton and calling its command, set_samples, changes the bold setting of both samples. Simplify some names in configdialog.
(cherry picked from commit d0969d6)
(Incorporates changes and fixes from PRs 2798,  7c5798e, and 2810, 616ecf1)

* Fix broken test with PR2798 and PR2810 changes.
2017-07-22 00:56:18 -04:00
Berker Peksag 64b9a15886 [3.6] bpo-29403: Fix mock's broken autospec behavior on method-bound builtin functions (GH-3)
Cython will, in the right circumstances, offer a MethodType instance
where im_func is a builtin function. Any instance of MethodType is
automatically assumed to be a Python-defined function (more
specifically, a function that has an inspectable signature), but
_set_signature was still conservative in its assumptions. As a result
_set_signature would return early with None instead of a mock since
the im_func had no inspectable signature. This causes problems
deeper inside mock, as _set_signature is assumed to _always_
return a mock, and nothing checked its return value.

In similar corner cases, autospec will simply not check the spec of the
function, so _set_signature is amended to now return early with the
original, not-wrapped mock object.

Patch by Aaron Gallagher.

(cherry picked from commit 856cbcc12f)
2017-07-22 01:31:04 +03:00
Victor Stinner bb323b261d bpo-30891: Fix again importlib _find_and_load() (#2665) (#2801)
Use sys.modules.get() in the "with _ModuleLockManager(name):" block
to protect the dictionary key with the module lock and use an atomic
get to prevent race condition.

Remove also _bootstrap._POPULATE since it was unused
(_bootstrap_external now has its own _POPULATE object), add a new
_SENTINEL object instead.
(cherry picked from commit e72b1359f8)
2017-07-21 13:28:55 +02:00
Nicholas df5837b5a9 [3.6] bpo-30964: Mention ensurepip in package installation docs (GH-2797)
Adds a new 'Pip not installed' section that covers
running `ensurepip` manually, and also references
the relevant section of the Python Packaging User
Guide.

(cherry picked from commit b3527bfefd)
2017-07-21 16:44:43 +10:00
Terry Jan Reedy ac5c1e2ea3 [3.6] bpo-28523: IDLE: Use 'color' instead of 'colour'. (GH-2787) (#2791)
(cherry picked from commit a54a8f1)
2017-07-21 01:29:09 -04:00
Trey Hunner ef4231adb7 bpo-30466: Add brief explanation of classes to tutorial (GH-1804) (GH-2700) 2017-07-20 20:10:54 -07:00
Victor Stinner 96ef06f397 bpo-30822: Exclude tzdata from regrtest --all (#2775) (#2777)
When running the test suite using --use=all / -u all, exclude tzdata
since it makes test_datetime too slow (15-20 min on some buildbots)
which then times out on some buildbots.

-u tzdata must now be enabled explicitly, -u tzdata or -u all,tzdata,
to run all test_datetime tests.

Fix also regrtest command line parser to allow passing -u
extralargefile to run test_zipfile64.

Travis CI: remove -tzdata. Replace -u all,-tzdata,-cpu with -u all,-cpu since tzdata is now excluded from -u all.
(cherry picked from commit 5b392bbaeb)
2017-07-20 17:08:48 +02:00
Mariatta 7f58994842 [3.6] Fix typo in Turtle Docs: yingyang -> yinyang (GH-2770) (GH-2778)
(cherry picked from commit fff2a21057)
2017-07-20 07:14:05 -07:00
Ned Deily e0d306f682 Update doc download files size estimates. (#2771) (#2772) 2017-07-20 04:19:22 -04:00
terryjreedy 65c24c8467 [3.6] bpo-30917: IDLE: Add config.IdleConf unittests (GH-2691) (#2753)
Patch by Louie Lu.
(cherry picked from commit f776eb0)
(includes diffs of  ed014f7 and 9f9192a)
* fix config reset from pr 2754

* Fix test_get_font (from pr 2769)
2017-07-20 01:23:00 -04:00
Ammar Askar ae4dca7701 [3.6] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net (GH-2755) 2017-07-20 03:21:09 +03:00
Steve Dower e99d3a52a5 [3.6] bpo-30450: Improved logic for obtaining dependencies (#2751)
Adds alternate download approach for nuget.exe
Fall back to git.exe if no Python is found. (#2739)
Also check whether git.exe is on PATH if it will be used.
Add support for HOST_PYTHON variable.
Clear internal environment variables used in find_python.bat
Use HOST_PYTHON as the actual Python if it is recent enough.
Adds HOST_PYTHON variable to AppVeyor configuration
2017-07-19 09:11:08 +02:00
Xiang Zhang 241c4a28d9 bpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747) (#2748)
(cherry picked from commit 4ed5ad79ec)
2017-07-19 00:50:52 +08:00
Ned Deily 8663c45491 Also bump README.rst 2017-07-17 00:59:03 -04:00
Ned Deily a61089f573 Bump to v3.6.2+ 2017-07-17 00:54:03 -04:00
Ned Deily 05217f2ead Version v3.6.2
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCgAGBQJZYFMFAAoJEC00fqaqZUIdh1kQAI+hHiO2A8SXiM6MCO1mGsT6
 U29CtF1sRAMILqMiA11Hud4gp9cE+yuWNmI3V/O+7LtMFXksB/3VN1pdIo3TV8YS
 PAvUTYl9/PGimc0+X55b8b0R3x3t1fmlzT+lgMFYQrtQMxUYbeCXtgBpL5EEe6m6
 6ODsBG/IKsu4Ki7KHiUZzFW8YW7Ice76iGwhOMypkSkwOk8aZNnc2qRDvKTbQGtX
 QIAAOcoJYTneTN0648YVKr+Jtxl0QY8Kzvoc3ywGDlDIgklwC6DLd284nYbg2sRw
 8W8DHcZyrknLEQRvfDHC9gn21Cfmd1E6jHMrit2rvRIqJGL50ibgZi109/wCJ/Vs
 Y9HkzgOvW43Y3tnAbkvv6+ZeUtGluon9Hz75B4GS1FhXkMUL/eTLmtHVjafKMr/0
 IBWZwcN+E+xiGGRmNJzXrpTXZ4PoKg1LPr1Q9Z6vVqQB45NUZxE0uqpt6NX5MdEj
 C1pyVUbagIj75sFoYCc+CjO9LkK7Ez9XVoQ9yjPxjXs73fxsD6BPpQD8w4+D1rDC
 mqKbsCIYls70c+MTUaibwYKbFI5x4OWwlA+Aw3sf5kDTFAXgu2qrT4nuEXXpXgAN
 Dw82Qm9WvxhwahnghQO3Y2wv9QhiH3h2puvydWYGVdBs6KmkRgfrHdMCLIj4cFSy
 /+BuraUHtCdR2S4q/R26
 =CWhL
 -----END PGP SIGNATURE-----

Merge tag 'v3.6.2' into 3.6

Version v3.6.2
2017-07-17 00:42:07 -04:00
Serhiy Storchaka a819e5e1e6 [3.6] bpo-30936: Fix a reference leak in json when fail to sort keys. (GH-2712). (#2727)
(cherry picked from commit 49f6449ef4)
2017-07-16 07:48:08 +03:00
Serhiy Storchaka 28343e3392 [3.6] bpo-30876: Relative import from unloaded package now reimports the package (GH-2639) (#2676)
instead of failing with SystemError.

Relative import from non-package now fails with ImportError rather than
SystemError.
(cherry picked from commit 8a9cd20edc)
2017-07-16 07:44:25 +03:00
terryjreedy 65de1f3672 [3.6] bpo-30934: Document coverage details for idlelib tests (GH-2711) (#2726)
* Add section to idlelib/idle-test/README.txt.
* Include check that branches are taken both ways.
* Exclude IDLE-specific code that does not run during unit tests.
(cherry picked from commit 95bebb7)
2017-07-16 00:39:59 -04:00
Ned Deily bbd0f423d2 bpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) (#2722)
(cherry picked from commit 50f58163a6)
2017-07-15 16:56:13 -04:00
Łukasz Rogalski ea9cbe0a5c Doc that 'sorted' args are keyword-only, fix 'reverse' default (#2709)
backport
2017-07-14 15:57:19 -04:00
terryjreedy 1aafd9c8bd [3.6] Update idlelib/NEWS.txt. (GH-2703) (#2704)
(cherry picked from commit 0d0a32f)
2017-07-14 00:29:05 -04:00
terryjreedy 9a09c667cf [3.6] bpo-30913: IDLE: Document tk vars, attributes, and methods for ConfigDialog (GH-2697) (#2702)
The will help writing dialog improvements and splitting the class into multiple classes.
Original patch by Cheryl Sabella.
(cherry picked from commit 36329a4)
2017-07-13 23:53:30 -04:00
terryjreedy 42abf7f973 [3.6] bpo-30870: IDLE: Add configdialog fontlist selection unittest (GH-2666) (#2701)
Initial patch by Louie Lu.
(cherry picked from commit 9b622fb)
2017-07-13 22:24:55 -04:00
Steve Dower d8e522f7cf bpo-30731: python.manifest fix (#2328) (#2699)
bpo-30731: python.manifest fix
2017-07-13 21:51:50 +02:00
Serhiy Storchaka 7d0a995820 [3.6] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690) (#2692)
encoder and decoder.
(cherry picked from commit d3aaa2f)
2017-07-13 11:40:25 +03:00
terryjreedy a9bf62cadf [3.6] bpo-30899: Add unittests, 100% coverage, for IDLE's two ConfigParser subclasses. (GH-2662) (#2685)
Patch by Louie Lu.
(cherry picked from commit 50c9435)
2017-07-12 14:42:37 -04:00
terryjreedy c0179483f1 [3.6] bpo-30779: IDLE: fix changes.delete_section calls in configdialog (GH-2667) (#2674)
Also improve test of config.ConfigChanges.delete_section.
Original patch by Cheryl Sabella.
(cherry picked from commit 6d13b22)
2017-07-11 19:50:10 -04:00
terryjreedy 675c1adfe5 [3.6] bpo-30881: IDLE: add docstrings to browser.py (GH-2638) (#2663)
Patch by Cheryl Sabella.
(cherry picked from commit ba35227)
2017-07-11 02:53:32 -04:00
terryjreedy 953e527763 [3.6] bpo-30870: IDLE -- fix logic error in eae2537. (GH-2660) (#2661)
(cherry picked from commit 5b62b35)
2017-07-11 02:16:41 -04:00
Serhiy Storchaka 82a9075600 [3.6] bpo-22207: Add checks for possible integer overflows in unicodeobject.c. (GH-2623) (#2658)
Based on patch by Victor Stinner.
(cherry picked from commit 64e461b)
2017-07-11 07:27:56 +03:00
Serhiy Storchaka ecfe4f678b [3.6] bpo-30879: os.listdir() and os.scandir() now emit bytes names when (GH-2634) (#2656)
called with bytes-like argument..
(cherry picked from commit 1180e5a518)
2017-07-11 07:16:11 +03:00
Victor Stinner fe6e686c27 bpo-30891: Fix importlib _find_and_load() race condition (#2646) (#2651)
* Rewrite importlib _get_module_lock(): it is now responsible to hold
  the imp lock directly.
* _find_and_load() now holds the module lock to check if name is in
  sys.modules to prevent a race condition
(cherry picked from commit 4f9a446f3f)
2017-07-10 23:16:27 +02:00
Victor Stinner 044e156426 bpo-30892: Fix _elementtree module initialization (#2647) (#2649)
Handle getattr(copy, 'deepcopy') error in _elementtree module
initialization.
(cherry picked from commit b136f11f3a)
2017-07-10 23:12:37 +02:00
terryjreedy 8e3f73e549 [3.6] bpo-30851: IDLE: Remove unused tk variables in configdialog. (GH-2626) (#2648)
One is a duplicate, one is set but cannot be altered by users.
Patch by Cheryl Sabella.
(cherry picked from commit aa8d0a2)
2017-07-10 15:11:45 -04:00
Victor Stinner 7f3d65d6e4 bpo-30886: Fix multiprocessing.Queue.join_thread() (#2642) (#2643)
multiprocessing.Queue.join_thread() now waits until the thread
completes, even if the thread was started by the same process which
created the queue.

Fix the following warning which occurs randomly when running
test_handle_called_with_mp_queue of test_logging.QueueListenerTest:

Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 0, dangling: 1)
(cherry picked from commit 3b69d911c5)
2017-07-10 13:43:20 +02:00
terryjreedy 7ab3342333 [3.6] bpo-30870: IDLE: Change sample font when select by key-up/down (GH-2617) (#2640)
Patch by Louie Lu.
(cherry picked from commit bb2bae8)
2017-07-09 19:26:32 -04:00
Nir Soffer 04f77d4677 [3.6] bpo-29854: Fix segfault in call_readline() (GH-728)
If history-length is set in .inputrc, and the history file is double the
history size (or more), history_get(N) returns NULL, and python
segfaults. Fix that by checking for NULL return value.

It seems that the root cause is incorrect handling of bigger history in
readline, but Python should not segfault even if readline returns
unexpected value.

This issue affects only GNU readline. When using libedit emulation
system history size option does not work.
2017-07-08 21:51:21 +03:00
Ned Deily 03e0df66b8 Update for post-3.6.2rc2 2017-07-08 00:49:40 -04:00
Ned Deily b79d58ec25 Tag v3.6.2rc2
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCgAGBQJZXzWqAAoJEC00fqaqZUIdf0gQAOLY12G46cUI3tfpR1Pa6DAy
 SjO4Yb1tIpXyU+z/7VPbFywtk7zmJpmDWKsCZpWf9eA7eE2LMXfv5UEuKqQ2YOch
 L6z91CuJpCKbYA7/Wss8/GIbcXlhlhoaeaRbyt6vA99JN7b2ecC+iIVQJMnEMgfg
 zNAlKrI7qK4u4PoVT+pLjKDHES+aqYr+1v+/TwC/hGB+uBIb4RCxIeQIQxUayhCO
 7mFVsjGcBHvFP0s7WzSz5RTz/MiLzZGHH7b6mi9tKS9nhl2u3wM1F4ptdcgxoii+
 p4hfYQOZZnEB0Rkb6GnbVnuoFKwUpE6M6Wdf7xYdt4GRag0+JDOs641wiVEZauMU
 X2dCDygesgsMM5KseVtEgGR05yeEee9nRum41fVlOs8ncUIvOyZ8ENJydsfgvWD6
 1cipZYtUcNPErH3Co9CB4ZRxd0zaV7VGnITYhM3RWlpHH2UkgyDMaAY98CclQwdR
 X/PUWPPrrY5dQW1EsjLi1v3p8UmVWGJgfZonxkWtj5wnSSFAPuHu5vWURQUf5KnI
 zN5poyAD7PTy3X6OU7lHEWD085kP30ciQ8g6joN8brW/wckch/dPJPP/loRJ7G8K
 zwXLrdJbn2FebeTGVHuXj8nmPftx3/INW+rri+3aEBu78T21ZK5AtgbtOIzlB4Mj
 NnRdVMwRQPP6ksrxnzb9
 =h+Lc
 -----END PGP SIGNATURE-----

Merge tag 'v3.6.2rc2' into 3.6

Tag v3.6.2rc2
2017-07-08 00:41:30 -04:00
Ned Deily 5fd33b5926 Version bump to 3.6.2final 2017-07-07 23:33:27 -04:00
terryjreedy 552f26680d [3.6] bpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (GH-2629) (#2631)
(cherry picked from commit 223c7e7)
2017-07-07 22:47:37 -04:00
terryjreedy 9d8abf31c4 [3.6] bpo-30779: News (GH-2627) (#2630)
(cherry picked from commit 24f2e19)
2017-07-07 22:26:53 -04:00
terryjreedy edc034221f [3.6] bpo-30779: IDLE -- Factor ConfigChanges class from configdialog, put in config; test. (GH-2612) (#2625)
* In config, put dump test code in a function; run it and unittest in 'if __name__ == '__main__'.
* Add class config.ConfigChanges based on changes_class_v4.py on bpo issue.
* Add class test_config.ChangesTest, partly based on configdialog_tests_v1.py on bpo issue.
* Revise configdialog to use ConfigChanges, mostly as specified in tracker msg297804.
* Revise test_configdialog to match configdialog changes.  All tests pass in both files.
* Remove configdialog functions unused or moved to ConfigChanges.
Cheryl Sabella contributed parts of the patch.
(cherry picked from commit 349abd9)
2017-07-07 16:37:39 -04:00