Commit Graph

98191 Commits

Author SHA1 Message Date
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
Ned Deily 8913311345 Version bump to 3.6.2rc2 2017-07-07 03:16:00 -04:00
Ned Deily bdabd76660 bpo-30797, bpo-30694: Avoid _GNU_SOURCE redefined warning in xmlparse.c (#2615)
(cherry picked from commit 05b72ede95)
2017-07-07 01:59:14 -04:00
Ned Deily 05b72ede95 bpo-30797, bpo-30694: Avoid _GNU_SOURCE redefined warning in xmlparse.c (#2615) 2017-07-07 01:31:43 -04:00
Serhiy Storchaka d1d65015fc [3.6] bpo-30745: Fix compiler warnings introduced in bpo-30730. (GH-2376) (#2378)
(cherry picked from commit 0ee32c1)
(cherry picked from commit 0e1f9e8d3e)
2017-07-06 23:51:12 -04:00
Serhiy Storchaka a9b16cff35 [3.6] bpo-30730: Prevent environment variables injection in subprocess on Windows. (GH-2325) (#2360)
Prevent passing other invalid environment variables and command arguments..
(cherry picked from commit d174d24a5d)
(cherry picked from commit e7135751b8)
2017-07-06 23:48:43 -04:00
Victor Stinner c794b643c9 bpo-30704, bpo-30604: Fix memleak in code_dealloc() (#2455) (#2456)
Free also co_extra->ce_extras, not only co_extra.
(cherry picked from commit 23e7944eba)
(cherry picked from commit 26daad4ee1)
2017-07-06 23:45:50 -04:00
Segev Finer b6012f982f [3.6] bpo-30726: Also fix pyexpat.vcxproj (GH-2375) (#2570)
(cherry picked from commit 7526cadd64)
(cherry picked from commit d02c8416fe)
2017-07-06 23:42:49 -04:00
Victor Stinner 5777e79ecb [3.6] bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348) (#2349)
* bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348)

bpo-30726, bpo-29591: libexpat 2.2.1 of Modules/expat/ now uses
a winconfig.h configuration file which already defines:

* XML_NS
* XML_DTD
* BYTEORDER=1234
* XML_CONTEXT_BYTES=1024
* HAVE_MEMMOVE

Remove these defines from PCbuild/_elementtree.vcxproj to prevent
compiler warnings.

Co-Authored-By: Jeremy Kloth <jeremy.kloth@gmail.com>
(cherry picked from commit c8fb58bd79)

* bpo-30726: Fix elementtree warnings on Windows due to expat upgrade (#2319)

* bpo-30726: Fix elementtree warnings on Windows

Caused by usage of `getenv` which should be safe. And a few integer
truncations which should also be ok.

* bpo-30726: Don't ignore libexpat warnings which haypo intends to fix upstream

(cherry picked from commit 87c6555073)
(cherry picked from commit d32a059531)
2017-07-06 23:41:35 -04:00
Victor Stinner ea1ab803dd bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) (#2313)
New file: Modules/expat/siphash.h.
(cherry picked from commit 5ff7132313)
(cherry picked from commit 4a66524006)
2017-07-06 23:37:10 -04:00
Victor Stinner b0fba8874a bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2289)
The current regex based splitting produces a wrong result. For example::

  http://abc#@def

Web browsers parse that URL as ``http://abc/#@def``, that is, the host
is ``abc``, the path is ``/``, and the fragment is ``#@def``.
(cherry picked from commit 90e01e50ef)
(cherry picked from commit 536c1f1246)
2017-07-06 23:27:01 -04:00
Steve Dower 00134f64d9 bpo-30687: Fixes build scripts to find msbuild.exe and stop relying on vcvarsall.bat (#2252) (#2280)
* Fixes build scripts to find msbuild.exe and stop relying on vcvarsall.bat
Also fixes bdist_wininst.vcxproj to use correct version in generated name.

(cherry picked from commit 06d6e3d0bb)
2017-07-06 23:19:09 -04:00
terryjreedy df0f993298 [3.6] bpo-30780: Fix error in idlelib.test_idle.test_configdialog (GH-2606) (#2613)
(cherry picked from commit 25a4206)
2017-07-06 23:16:31 -04:00
Joel Hillacre c60d2f5e86 bpo-30532: Fix whitespace folding in certain cases (#2591)
Leading whitespace was incorrectly dropped during folding of certain lines in the _header_value_parser's folding algorithm.  This makes the whitespace handling code consistent.
2017-07-06 17:28:22 -04:00
Segev Finer 5d2550cd2e [3.6] Fix case in .gitignore (GH-2607) (GH-2608)
(cherry picked from commit be5ebe5877)
2017-07-06 16:08:29 -05:00
terryjreedy d012648129 [3.6] Update idlelib/NEWS.txt with merges upto 2017 Jul 5. (GH-2595) (#2596)
(cherry picked from commit 1ccbad9c95)
2017-07-06 15:29:35 -04:00
Serhiy Storchaka 03b0e8374b [3.6] bpo-30814: Fixed a race condition when import a submodule from a package. (GH-2580). (#2598)
(cherry picked from commit b4baacee1a)
2017-07-06 08:38:24 +03:00
Yury Selivanov aaa4f99151 [3.6] bpo-30828: Fix out of bounds write in `asyncio.CFuture.remove_done_callback() (GH-2569) (#2590)
(cherry picked from commit 833a3b0d37)
2017-07-05 14:03:10 -04:00
Masayuki Yamamoto e3a0ff0d76 [3.6] bpo-30854: Fix compile error when --without-threads (GH-2581) (#2583)
* bpo-30854: Fix compile error when --without-threads

* bpo-30854: fix news
(cherry picked from commit 0c31163093)
2017-07-05 11:24:46 +02:00
terryjreedy 0884c40603 [3.6] NEWS for 30777 (GH-2576) (#2579)
(cherry picked from commit aaa917f)
2017-07-05 00:55:59 -04:00
terryjreedy 1278d29000 [3.6] bpo-21624: IDLE -- minor htest fixes (GH-2575) (#2578)
(cherry picked from commit 2000150)
2017-07-05 00:55:29 -04:00
terryjreedy e5bb112ba2 [3.6] bpo-30777: IDLE: configdialog - add docstrings and improve comments (GH-2440) (#2577)
Patch by Cheryl Sabella.
(cherry picked from commit 7eb5883)
2017-07-05 00:54:55 -04:00
Segev Finer d02c8416fe [3.6] bpo-30726: Also fix pyexpat.vcxproj (GH-2375) (#2570)
(cherry picked from commit 7526cadd64)
2017-07-04 20:38:47 +02:00
Victor Stinner 580cd5cd36 bpo-30319: socket.close() now ignores ECONNRESET (#2565) (#2566)
socket.close() was modified in Python 3.6 to raise OSError on
failure: see bpo-26685.
(cherry picked from commit 67e1478dba)
2017-07-04 16:46:10 +02:00
Berker Peksag 23e2c3d193 Remove outdated FOX from GUI FAQ (GH-2538)
FXpy doesn't have a Python 3 port and it only
supports Python 2.2 and older versions.

Reported by Alex Walters on docs@p.o.

(cherry picked from commit d3ed2877a7)
2017-07-04 09:27:35 +03:00
Serhiy Storchaka bebd2cfa5f [3.6] bpo-30441: Fix bug when modifying os.environ while iterating over it (GH-2409). (#2556)
(cherry picked from commit 8a8d28501f)
2017-07-04 07:55:32 +03:00
Victor Stinner 4132adb4b8 bpo-30764: Fix regrtest --fail-env-changed --forever (#2536) (#2539)
--forever now stops if a fail changes the environment.
(cherry picked from commit 5e87592fd1)
2017-07-03 12:50:36 +02:00
Nick Coghlan bfdc6fdc0e [3.6] bpo-30597: Show expected input in custom 'print' error message. (GH-2531)
(cherry picked from commit 3a7f03584a)
2017-07-03 17:49:50 +10:00
Kojo Idrissa 03af428242 [3.6] bpo-29933: Improve set_write_buffer_limits description (GH-2262) (GH-2532)
Improve the description of the high and low parameters for set_write_buffer_limits.
Also fixed a small grammatical issue.
(cherry picked from commit 5200a7c7f9)
2017-07-01 19:48:07 -07:00
Antoine Pitrou 3024c05290 [3.6] bpo-30703: Improve signal delivery (GH-2415) (#2527)
* [3.6] bpo-30703: Improve signal delivery (GH-2415)

* Improve signal delivery

Avoid using Py_AddPendingCall from signal handler, to avoid calling signal-unsafe functions.

* Remove unused function

* Improve comments

* Add stress test

* Adapt for --without-threads

* Add second stress test

* Add NEWS blurb

* Address comments @haypo.
(cherry picked from commit c08177a1cc)

* bpo-30796: Fix failures in signal delivery stress test (#2488)

* bpo-30796: Fix failures in signal delivery stress test

setitimer() can have a poor minimum resolution on some machines,
this would make the test reach its deadline (and a stray signal
could then kill a subsequent test).

* Make sure to clear the itimer after the test
2017-07-01 19:12:05 +02:00
Mariatta 48290c1c30 [3.6] Fix trivial typo in json module docstring (GH-2274) (#2430)
(cherry picked from commit 76c567ee27)
2017-06-30 21:15:18 -04:00
Victor Stinner a3ca94d050 [3.6] bpo-29512, bpo-30776: Backport regrtest enhancements from master to 3.6 (#2513)
* bpo-29512: Add test.bisect, bisect failing tests (#2452)

Add a new "python3 -m test.bisect" tool to bisect failing tests.

It can be used to find which test method(s) leak references, leak
files, etc.
(cherry picked from commit 84d9d14a1f)

* bpo-30776: regrtest: reduce memleak false positive (#2484)

Only report a leak if each run leaks at least one memory block.
(cherry picked from commit beeca6e1e5)
2017-06-30 17:31:16 +02:00
Victor Stinner 23caf8cfc6 bpo-30280: Cleanup threads in ayncio tests (#2501) (#2511)
* bpo-30280: asyncio now cleans up threads

asyncio base TestCase now uses threading_setup() and
threading_cleanup() of test.support to cleanup threads.

* asyncio: Fix TestBaseSelectorEventLoop cleanup

bpo-30280: TestBaseSelectorEventLoop of
test.test_asyncio.test_selector_events now correctly closes the event
loop: cleanup its executor to not leak threads.

Don't override the close() method of the event loop, only override
the_close_self_pipe() method.

(cherry picked from commit b903067462)
2017-06-30 17:20:33 +02:00
Victor Stinner 22d4e8fb99 bpo-30813: Fix unittest when hunting refleaks (#2502) (#2505)
bpo-11798, bpo-16662, bpo-16935, bpo-30813: Skip
test_discover_with_module_that_raises_SkipTest_on_import() and
test_discover_with_init_module_that_raises_SkipTest_on_import() of
test_unittest when hunting reference leaks using regrtest.
(cherry picked from commit e4f9a2d2be)
2017-06-30 13:12:20 +02:00
Victor Stinner d0aac5da59 bpo-30812: Fix test_warnings, restore _showwarnmsg (#2504) (#2507)
bpo-26568, bpo-30812: Fix test_showwarnmsg_missing(): restore the
attribute after removing it.
(cherry picked from commit 7eebeb8fb8)
2017-06-30 13:12:12 +02:00