]> granicus.if.org Git - python/log
python
7 years agobpo-30764: Fix regrtest --fail-env-changed --forever (#2536) (#2539)
Victor Stinner [Mon, 3 Jul 2017 10:50:36 +0000 (12:50 +0200)]
bpo-30764: Fix regrtest --fail-env-changed --forever (#2536) (#2539)

--forever now stops if a fail changes the environment.
(cherry picked from commit 5e87592fd12e0b7c41edc11d4885ed7298d5063b)

7 years ago[3.6] bpo-30597: Show expected input in custom 'print' error message. (GH-2531)
Nick Coghlan [Mon, 3 Jul 2017 07:49:50 +0000 (17:49 +1000)]
[3.6] bpo-30597: Show expected input in custom 'print' error message. (GH-2531)

(cherry picked from commit 3a7f03584ab75afbf5507970711c87042e423bb4)

7 years ago[3.6] bpo-29933: Improve set_write_buffer_limits description (GH-2262) (GH-2532)
Kojo Idrissa [Sun, 2 Jul 2017 02:48:07 +0000 (11:48 +0900)]
[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 5200a7c7f9ea65a96330c5f276f4acc6ec70854e)

7 years ago[3.6] bpo-30703: Improve signal delivery (GH-2415) (#2527)
Antoine Pitrou [Sat, 1 Jul 2017 17:12:05 +0000 (19:12 +0200)]
[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 c08177a1ccad2ed0d50898c2731b518c631aed14)

* 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

7 years ago[3.6] Fix trivial typo in json module docstring (GH-2274) (#2430)
Mariatta [Sat, 1 Jul 2017 01:15:18 +0000 (18:15 -0700)]
[3.6] Fix trivial typo in json module docstring (GH-2274) (#2430)

(cherry picked from commit 76c567ee27342d76f631a35c8291b715b2a61f3e)

7 years ago[3.6] bpo-29512, bpo-30776: Backport regrtest enhancements from master to 3.6 (#2513)
Victor Stinner [Fri, 30 Jun 2017 15:31:16 +0000 (17:31 +0200)]
[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 84d9d14a1fa395fbd21262ba195490be25a7b3bc)

* 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 beeca6e1e5fd01531b1db7059498b13d07dca525)

7 years agobpo-30280: Cleanup threads in ayncio tests (#2501) (#2511)
Victor Stinner [Fri, 30 Jun 2017 15:20:33 +0000 (17:20 +0200)]
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 b9030674624c181d6e9047cdb14ad65bb6c84c66)

7 years agobpo-30813: Fix unittest when hunting refleaks (#2502) (#2505)
Victor Stinner [Fri, 30 Jun 2017 11:12:20 +0000 (13:12 +0200)]
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 e4f9a2d2be42d5a2cdd624f8ed7cdf5028c5fbc3)

7 years agobpo-30812: Fix test_warnings, restore _showwarnmsg (#2504) (#2507)
Victor Stinner [Fri, 30 Jun 2017 11:12:12 +0000 (13:12 +0200)]
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 7eebeb8fb84e2a9cb73903a08c59cf1d3b32cee0)

7 years ago[3.6] bpo-30807: signal.setitimer() may disable the timer by mistake (GH-2493) (...
Antoine Pitrou [Fri, 30 Jun 2017 08:54:24 +0000 (10:54 +0200)]
[3.6] bpo-30807: signal.setitimer() may disable the timer by mistake (GH-2493) (#2497)

* bpo-30807: signal.setitimer() may disable the timer by mistake

* Add NEWS blurb
(cherry picked from commit 729780a810bbcb12b245a1b652302a601fc9f6fd)

7 years ago[3.6] bpo-30495: IDLE: improve textview with docstrings, PEP8 names, more tests....
terryjreedy [Thu, 29 Jun 2017 23:15:18 +0000 (19:15 -0400)]
[3.6] bpo-30495: IDLE: improve textview with docstrings, PEP8 names, more tests. (GH-2283) (#2496)

Split TextViewer class into ViewWindow, ViewFrame, and TextFrame classes so that instances
of the latter two can be placed with other widgets within a multiframe window.
Patch by Cheryl Sabella.
(cherry picked from commit 42bc8be)

7 years ago_winconsoleio: Fix memory leak (#2485)
Victor Stinner [Thu, 29 Jun 2017 08:53:34 +0000 (10:53 +0200)]
_winconsoleio: Fix memory leak (#2485)

Fix memory leak when _winconsoleio tries to open a non-console file:
free the name buffer.

7 years agobpo-30602: Fix refleak in os.spawnv() (#2212) (#2486)
Victor Stinner [Thu, 29 Jun 2017 08:53:22 +0000 (10:53 +0200)]
bpo-30602: Fix refleak in os.spawnv() (#2212) (#2486)

When os.spawnv() fails while handling arguments, free correctly
argvlist: pass lastarg+1 rather than lastarg to free_string_array()
to also free the first item.
(cherry picked from commit 8acb4cf2b3436652568d7a70228b166316181466)

7 years ago[3.6] Clear potential ref cycle between Process and Process target (GH-2470) (#2471)
Antoine Pitrou [Wed, 28 Jun 2017 11:08:20 +0000 (13:08 +0200)]
[3.6] Clear potential ref cycle between Process and Process target (GH-2470) (#2471)

* Clear potential ref cycle between Process and Process target

Besides Process.join() not being called, this was an indirect cause of bpo-30775.
The threading module already does this.

* Add issue reference.
(cherry picked from commit 79d37ae979a65ada0b2ac820279ccc3b1cd41ba6)

7 years ago[3.6] bpo-30775: Fix refleaks in test_multiprocessing (GH-2467) (#2468)
Antoine Pitrou [Wed, 28 Jun 2017 09:49:38 +0000 (11:49 +0200)]
[3.6] bpo-30775: Fix refleaks in test_multiprocessing (GH-2467) (#2468)

Forgetting to call Process.join() can keep some resources alive.
(cherry picked from commit a79f8faccf5e26f55e8b9496ad49d2071b5e299c)

7 years ago[3.6] bpo-13617: Reject embedded null characters in wchar* strings. (GH-2302) (#2462)
Serhiy Storchaka [Wed, 28 Jun 2017 06:27:35 +0000 (09:27 +0300)]
[3.6] bpo-13617: Reject embedded null characters in wchar* strings. (GH-2302) (#2462)

Based on patch by Victor Stinner.

Add private C API function _PyUnicode_AsUnicode() which is similar to
PyUnicode_AsUnicode(), but checks for null characters..
(cherry picked from commit f7eae0adfcd4c50034281b2c69f461b43b68db84)

7 years ago[3.6] bpo-24813: IDLE tagline is Integrated Development and Learning Environment...
terryjreedy [Wed, 28 Jun 2017 03:02:38 +0000 (23:02 -0400)]
[3.6] bpo-24813: IDLE  tagline is Integrated Development and Learning Environment (GH-2451) (#2461)

Patch by Mark Roseman
(cherry picked from commit 592eda1)

7 years ago[3.6] bpo-30723: IDLE -- Enhance parenmatch; add style, flash, and help (GH-2306...
terryjreedy [Wed, 28 Jun 2017 03:02:19 +0000 (23:02 -0400)]
[3.6] bpo-30723: IDLE -- Enhance parenmatch; add style, flash, and help (GH-2306) (#2460)

* Add 'parens' style to highlight both opener and closer.
* Make 'default' style, which is not default, a synonym for 'opener'.
* Make time-delay work the same with all styles.
* Add help for config dialog extensions tab, including parenmatch.
* Add new tests.
Original patch by Charles Wohlganger.
(cherry picked from commit fae2c35)

7 years agoClarification to the `break` statement (GH-2453) (#GH-2457)
regexaurus [Wed, 28 Jun 2017 02:38:22 +0000 (22:38 -0400)]
Clarification to the `break` statement (GH-2453) (#GH-2457)

Clarify that the break statement breaks out of the innermost enclosing for or while loop.
(cherry picked from commit 36fc896740319d2c03aa2054a90a999c162517ef)

7 years agobpo-30704, bpo-30604: Fix memleak in code_dealloc() (#2455) (#2456)
Victor Stinner [Wed, 28 Jun 2017 00:28:51 +0000 (02:28 +0200)]
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 23e7944eba1968bb8432fdc4cc96d4fdd2c1a230)

7 years ago[3.6] bpo-30708: Check for null characters in PyUnicode_AsWideCharString(). (GH-2285...
Serhiy Storchaka [Tue, 27 Jun 2017 18:08:58 +0000 (21:08 +0300)]
[3.6] bpo-30708: Check for null characters in PyUnicode_AsWideCharString(). (GH-2285) (#2443)

Raise a ValueError if the second argument is NULL and the wchar_t\*
string contains null characters..
(cherry picked from commit e613e6add5f07ff6aad5802924596b631b707d2a)

7 years ago[3.6] bpo-30523, bpo-30764, bpo-30776: Sync regrtest from master (#2441)
Victor Stinner [Tue, 27 Jun 2017 14:04:15 +0000 (16:04 +0200)]
[3.6] bpo-30523, bpo-30764, bpo-30776: Sync regrtest from master (#2441)

* bpo-30523: regrtest --list-cases --match (#2401)

* regrtest --list-cases now supports --match and --match-file options.
  Example: ./python -m test --list-cases -m FileTests test_os
* --list-cases now also sets support.verbose to False to prevent
  messages to stdout when loading test modules.
* Add support._match_test() private function.
(cherry picked from commit ace56d583664f855d89d1219ece7c21c2fddcf30)

* bpo-30764: regrtest: add --fail-env-changed option (#2402)

* bpo-30764: regrtest: change exit code on failure

* Exit code 2 if failed tests ("bad")
* Exit code 3 if interrupted

* bpo-30764: regrtest: add --fail-env-changed option

If the option is set, mark a test as failed if it alters the
environment, for example if it creates a file without removing it.

(cherry picked from commit 63f54c68936d648c70ca411661e4208329edcf26)

* bpo-30776: reduce regrtest -R false positives (#2422)

* Change the regrtest --huntrleaks checker to decide if a test file
  leaks or not. Require that each run leaks at least 1 reference.
* Warmup runs are now completely ignored: ignored in the checker test
  and not used anymore to compute the sum.
* Add an unit test for a reference leak.

Example of reference differences previously considered a failure
(leak) and now considered as success (success, no leak):

    [3, 0, 0]
    [0, 1, 0]
    [8, -8, 1]
(cherry picked from commit 48b5c422ffb03affb00c184b9a99e5537be92732)

7 years ago[3.6] bpo-30674: IDLE: add docstrings to grep.py (GH-2213) (#2434)
terryjreedy [Tue, 27 Jun 2017 07:01:58 +0000 (03:01 -0400)]
[3.6] bpo-30674: IDLE: add docstrings to grep.py (GH-2213) (#2434)

Patch by Cheryl Sabella
(cherry picked from commit 65474b9)

7 years ago[3.6] bpo-21519: IDLE basic custom key entry better detects duplicates. (GH-2428...
terryjreedy [Tue, 27 Jun 2017 05:58:18 +0000 (01:58 -0400)]
[3.6] bpo-21519: IDLE basic custom key entry better detects duplicates. (GH-2428) (#2433)

Original patch by Saimadhav Heblikar.
(cherry picked from commit 44913e5)

7 years ago[3.6] bpo-29910: IDLE no longer deletes a character after commenting out a region...
terryjreedy [Tue, 27 Jun 2017 05:53:40 +0000 (01:53 -0400)]
[3.6] bpo-29910: IDLE no longer deletes a character after commenting out a region (GH-825) (#2429)

This happened because shortcut has a class binding and 'break' was not returned.
Fix other potential conflicts between IDLE and default key bindings.

* Add news item

* Update NEWS
(cherry picked from commit 213ce12)

7 years ago[3.6] bpo-30769: Fix reference leak introduced in 77703942c59 (GH-2416) (#2425)
Emily Morehouse [Tue, 27 Jun 2017 04:59:25 +0000 (22:59 -0600)]
[3.6] bpo-30769: Fix reference leak introduced in 77703942c59 (GH-2416) (#2425)

New error condition paths were introduced, which did not decrement
`key2` and `val2` objects.  Therefore, decrement references before
jumping to the error label.

Signed-off-by: Eric N. Vander Weele <ericvw@gmail.com>
(cherry picked from commit a7874c73c0c729bbec2fd4b077bd0eec276cfff4)

7 years ago[3.6] bpo-24813: IDLE: Add build bitness to About Idle title (GH-2380) (#2426)
terryjreedy [Tue, 27 Jun 2017 03:09:45 +0000 (23:09 -0400)]
[3.6] bpo-24813: IDLE: Add build bitness to About Idle title (GH-2380) (#2426)

Patch by Cheryl Sabella.
(cherry picked from commit 9a02ae3)

7 years ago[3.6] bpo-30728: IDLE: Refactor configdialog to PEP8 names (GH-2307) (#2421)
terryjreedy [Tue, 27 Jun 2017 00:48:39 +0000 (20:48 -0400)]
[3.6] bpo-30728: IDLE: Refactor configdialog to PEP8 names (GH-2307) (#2421)

Also, change '*' in the tkinter import to an explicit list of names.
Patch by Cheryl Sabella.
(cherry picked from commit bac7d33)

7 years agobpo-30764: test_subprocess uses SuppressCrashReport (#2405) (#2410)
Victor Stinner [Mon, 26 Jun 2017 22:00:33 +0000 (00:00 +0200)]
bpo-30764: test_subprocess uses SuppressCrashReport (#2405) (#2410)

bpo-30764, bpo-29335: test_child_terminated_in_stopped_state() of
test_subprocess now uses support.SuppressCrashReport() to prevent the
creation of a core dump on FreeBSD.
(cherry picked from commit cdee3f14f7f4c995e7eedb0bf6a67e260c739f7d)

7 years ago[3.6] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH...
Antoine Pitrou [Mon, 26 Jun 2017 19:57:28 +0000 (21:57 +0200)]
[3.6] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH-2403) (#2418)

* bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to lock

This is especially important if PyThread_acquire_lock() is called reentrantly
(for example from a signal handler).

* Update 2017-06-26-14-29-50.bpo-30765.Q5iBmf.rst

* Avoid core logic when taking the mutex failed
(cherry picked from commit f84ac420c2af98339678744953869cad3c253281)

7 years ago[3.6] bpo-6739: IDLE: Check for valid keybinding in config_keys (GH-2377) (#2397)
terryjreedy [Mon, 26 Jun 2017 05:21:02 +0000 (01:21 -0400)]
[3.6] bpo-6739: IDLE: Check for valid keybinding in config_keys (GH-2377) (#2397)

Verify user-entered key sequences by trying to bind them with tk.
Add tests for all 3 validation functions.
Original patch by G Polo.  Tests added by Cheryl Sabella.
(cherry picked from commit 8c78aa7)

7 years ago[3.6] bpo-30746: Prohibited the '=' character in environment variable names (GH-2382...
Serhiy Storchaka [Sun, 25 Jun 2017 06:49:15 +0000 (09:49 +0300)]
[3.6] bpo-30746: Prohibited the '=' character in environment variable names (GH-2382) (#2391)

in `os.putenv()` and `os.spawn*()`..
(cherry picked from commit 77703942c5997dff00c48f10df1b29b11645624c)

7 years ago[3.6] Check the whitespace of pull requests on Travis (GH-2367) (GH-2386)
Brett Cannon [Sun, 25 Jun 2017 00:59:49 +0000 (17:59 -0700)]
[3.6] Check the whitespace of pull requests on Travis (GH-2367) (GH-2386)

(cherry picked from commit 70cb1875bb5343e31d7268f4b2d231a5fecdf989)

7 years ago[3.6] bpo-30616: Functional API of enum allows to create empty enums. (#2304) (#2324)
Dong-hee Na [Sat, 24 Jun 2017 16:12:20 +0000 (01:12 +0900)]
[3.6] bpo-30616: Functional API of enum allows to create empty enums. (#2304) (#2324)

7 years ago[3.6] bpo-30745: Fix compiler warnings introduced in bpo-30730. (GH-2376) (#2378)
Serhiy Storchaka [Sat, 24 Jun 2017 13:28:26 +0000 (16:28 +0300)]
[3.6] bpo-30745: Fix compiler warnings introduced in bpo-30730. (GH-2376) (#2378)

(cherry picked from commit 0ee32c1)

7 years ago[3.6] Fix a typo in a comment in coroutines.py (GH-2267) (GH-2370)
Mariatta [Sat, 24 Jun 2017 05:44:57 +0000 (22:44 -0700)]
[3.6] Fix a typo in a comment in coroutines.py (GH-2267) (GH-2370)

defiend -> defined
(cherry picked from commit cab469245d7635447c5e04fa6ed860b067dfc26b)

7 years ago[3.6] bpo-24813: IDLE: Add default title to help_about (GH-2366) (#2369)
terryjreedy [Sat, 24 Jun 2017 00:19:46 +0000 (20:19 -0400)]
[3.6] bpo-24813: IDLE: Add default title to help_about (GH-2366) (#2369)

Patch by Cheryl Sabella.
(cherry picked from commit 18ede06)

7 years ago[3.6] bpo-30645: don't append to an inner loop path in imp.load_package() (GH-2268...
Brett Cannon [Fri, 23 Jun 2017 18:23:36 +0000 (11:23 -0700)]
[3.6] bpo-30645: don't append to an inner loop path in imp.load_package() (GH-2268) (#2364)

Bug didn't manifest itself when importing a module with source as .py files are always the first on the search path. The issue only showed up in bytecode-only packages where the calculated file path would be ``__init__.py/__init__.pyc``.

Patch by Alexandru Ardelean.

(cherry picked from commit c38e32a10061a7c6d54e7e53ffabf7af7998f045)

7 years ago[3.6] bpo-30730: Prevent environment variables injection in subprocess on Windows...
Serhiy Storchaka [Fri, 23 Jun 2017 17:17:38 +0000 (20:17 +0300)]
[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 d174d24a5d37d1516b885dc7c82f71ecd5930700)

7 years ago[3.6] bpo-24813: IDLE: Add icon to help_about (GH-2335) (#2359)
terryjreedy [Fri, 23 Jun 2017 16:59:59 +0000 (12:59 -0400)]
[3.6] bpo-24813: IDLE: Add icon to help_about (GH-2335) (#2359)

Patch by Cheryl Sabella
(cherry picked from commit d352d68)

7 years agobpo-30604: Skip CoExtra tests if ctypes is missing (#2356) (#2358)
Victor Stinner [Fri, 23 Jun 2017 13:24:28 +0000 (15:24 +0200)]
bpo-30604: Skip CoExtra tests if ctypes is missing (#2356) (#2358)

(cherry picked from commit a4b091e135ccf345cfafdd8477aef897c5214f82)

7 years ago[3.6] bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348) (#2349)
Victor Stinner [Fri, 23 Jun 2017 13:21:33 +0000 (15:21 +0200)]
[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 c8fb58bd7917151e63398587a7fc2126db7c26de)

* 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 87c65550730a8f85ce339ba197bce4fb7e836619)

7 years agobpo-30602: Fix lastarg in os.spawnve() (#2287) (#2357)
Victor Stinner [Fri, 23 Jun 2017 13:21:24 +0000 (15:21 +0200)]
bpo-30602: Fix lastarg in os.spawnve() (#2287) (#2357)

Fix a regression introduced by myself in the commit
526b22657cb18fe79118c2ea68511aca09430c2c.
(cherry picked from commit c8d6ab2e25ff212702d387e516e258b1d8c52910)

7 years ago[3.6] bpo-30727: Fix a race condition in test_threading. (GH-2334) (#2351)
Serhiy Storchaka [Fri, 23 Jun 2017 10:52:06 +0000 (13:52 +0300)]
[3.6] bpo-30727: Fix a race condition in test_threading. (GH-2334) (#2351)

(cherry picked from commit 32cb968)

7 years agofix some reference to Unicode 8 that should be to Unicode 9 (#2346)
Benjamin Peterson [Fri, 23 Jun 2017 06:11:52 +0000 (23:11 -0700)]
fix some reference to Unicode 8 that should be to Unicode 9 (#2346)

7 years ago[3.6] bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) (GH-2342)
Mariatta [Fri, 23 Jun 2017 04:24:43 +0000 (21:24 -0700)]
[3.6] bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) (GH-2342)

(cherry picked from commit b066edfb1b268e90ea11f45dd1827f46d7ceec88)

7 years ago[3.6] bpo-30619: Clarify typing.Union documentation (GH-2326) (GH-2337)
Mariatta [Fri, 23 Jun 2017 01:52:57 +0000 (18:52 -0700)]
[3.6] bpo-30619: Clarify typing.Union documentation (GH-2326) (GH-2337)

When a class and its subclass are present, the latter is skipped.
(cherry picked from commit 6580c19bbbe7bc9bc0884699afd69184f523b32e)

7 years agoAdd "Misc/NEWS.d" directory tree for "blurb". GH-2329
larryhastings [Fri, 23 Jun 2017 00:38:47 +0000 (17:38 -0700)]
Add "Misc/NEWS.d" directory tree for "blurb". GH-2329

CPython workflow is changing!  We're going to start using "blurb"
to manage Misc/NEWS entries:
    https://github.com/python/core-workflow
(This will be a big win for release managers, honest.)

This checkin simply populates the "Misc/NEWS.d" subdirectory tree
so that people can start putting their news entries in there.
No other changes (yet).

7 years ago[3.6] Fix typo in idlelib.config_key.py (GH-2322) (#2323)
terryjreedy [Thu, 22 Jun 2017 02:46:07 +0000 (22:46 -0400)]
[3.6] Fix typo in idlelib.config_key.py (GH-2322) (#2323)

(cherry picked from commit a0e911b)

7 years ago[3.6] Fix trivial typo in idlelib/config.py (GH-2309) (#2321)
terryjreedy [Thu, 22 Jun 2017 01:43:47 +0000 (21:43 -0400)]
[3.6] Fix trivial typo in idlelib/config.py (GH-2309) (#2321)

Comceptually -> Conceptually
(cherry picked from commit f3e8209)

7 years agobpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) (#2313)
Victor Stinner [Wed, 21 Jun 2017 14:05:11 +0000 (16:05 +0200)]
bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) (#2313)

New file: Modules/expat/siphash.h.
(cherry picked from commit 5ff7132313eb651107b179d20218dfe5d4e47f13)

7 years ago[3.6] bpo-29755: Fixed the lgettext() family of functions in the gettext module....
Serhiy Storchaka [Tue, 20 Jun 2017 15:06:35 +0000 (18:06 +0300)]
[3.6] bpo-29755: Fixed the lgettext() family of functions in the gettext module. (GH-2266) (#2297)

They now always return bytes.

Updated the gettext documentation..
(cherry picked from commit 26cb4657bcc9a7adffa95798ececb588dddfeadb)

7 years agobpo-30500: Fix the NEWS entry (#2296)
Victor Stinner [Tue, 20 Jun 2017 14:09:06 +0000 (16:09 +0200)]
bpo-30500: Fix the NEWS entry (#2296)

splithost() expects an URL starting with "//" not with "http://".

7 years agobpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2289)
Victor Stinner [Tue, 20 Jun 2017 13:37:24 +0000 (15:37 +0200)]
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 90e01e50ef8a9e6c91f30d965563c378a4ad26de)

7 years ago[3.6] bpo-30420: List cwd parameter in subprocess convenience APIs (GH-1685) (GH...
Mariatta [Tue, 20 Jun 2017 03:28:16 +0000 (20:28 -0700)]
[3.6] bpo-30420: List cwd parameter in subprocess convenience APIs (GH-1685) (GH-2253)

Partially clarify the subprocess convenience API documentation by
explicitly listing the `cwd` parameter in their abbreviated signatures.

While this has been merged as an improvement, it doesn't fully
resolve the issue, as the `cwd` should also be covered in the
"Frequently Used Arguments" section, and the fact these APIs
pass unlisted keyword arguments down to the lower level APIs
is currently still unclear.
(cherry picked from commit 368cf1d20630498ca7939069a05d744fabb570aa)

7 years agobpo-30687: Fixes build scripts to find msbuild.exe and stop relying on vcvarsall...
Steve Dower [Mon, 19 Jun 2017 18:12:56 +0000 (11:12 -0700)]
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.

7 years agobpo-29887: test_normalization handles PermissionError (#1196) (#2275)
Victor Stinner [Mon, 19 Jun 2017 13:42:43 +0000 (15:42 +0200)]
bpo-29887: test_normalization handles PermissionError (#1196) (#2275)

Skip test_normalization.test_main() if download raises a permission
error.
(cherry picked from commit d13d54748d3a7db023d9db37223ea7d40bb8f8e3)

7 years ago[3.6] bpo-29887: Test normalization now fails if download fails (GH-905) (#2271)
Mariatta [Mon, 19 Jun 2017 11:22:54 +0000 (04:22 -0700)]
[3.6] bpo-29887: Test normalization now fails if download fails (GH-905) (#2271)

* test_normalization fails if download fails

bpo-29887. The test is still skipped if "-u urlfetch" option is not
passed to regrtest (python3 -m test -u urlfetch test_normalization).

* Fix ResourceWarning in test_normalization

bpo-29887: Fix ResourceWarning in test_normalization if tests are
interrupted by CTRL+c.
(cherry picked from commit 722a3af092b94983aa26f5e591fb1b45e2c2a0ff)

7 years agoBump version for post 3.6.2rc1
Ned Deily [Sun, 18 Jun 2017 01:58:49 +0000 (21:58 -0400)]
Bump version for post 3.6.2rc1

7 years agoVersion bump to 3.6.2rc1 v3.6.2rc1
Ned Deily [Sat, 17 Jun 2017 08:48:35 +0000 (04:48 -0400)]
Version bump to 3.6.2rc1

7 years agoUpdate pydoc topics for v3.6.2rc1
Ned Deily [Sat, 17 Jun 2017 08:37:19 +0000 (04:37 -0400)]
Update pydoc topics for v3.6.2rc1

7 years agoRemove check for git binary in Mac installer build
Ned Deily [Sat, 17 Jun 2017 01:00:49 +0000 (21:00 -0400)]
Remove check for git binary in Mac installer build

7 years agoAdd option to pass vcs info into Mac installer build
Ned Deily [Fri, 16 Jun 2017 22:47:48 +0000 (18:47 -0400)]
Add option to pass vcs info into Mac installer build

7 years agobpo-30038: add Misc/NEWS entry.
Ned Deily [Sat, 17 Jun 2017 03:01:09 +0000 (23:01 -0400)]
bpo-30038: add Misc/NEWS entry.

7 years agobpo-23894: add Misc/NEWS entry. (#2255)
Ned Deily [Sat, 17 Jun 2017 02:30:50 +0000 (22:30 -0400)]
bpo-23894: add Misc/NEWS entry. (#2255)

7 years agobpo-30176: Add missing curses cell attributes constants (GH-1302). (GH-2241)
Mariatta [Fri, 16 Jun 2017 14:19:56 +0000 (07:19 -0700)]
bpo-30176: Add missing curses cell attributes constants (GH-1302). (GH-2241)

(cherry picked from commit 116dd5eba60a940b35db6aaf4e8c998ac30ad440)

7 years ago[email] bpo-29478: Fix passing max_line_length=None from Compat32 policy (GH-595...
Mariatta [Fri, 16 Jun 2017 14:18:58 +0000 (07:18 -0700)]
[email] bpo-29478: Fix passing max_line_length=None from Compat32 policy (GH-595) (GH-2233)

If max_line_length=None is specified while using the Compat32 policy,
it is no longer ignored..
(cherry picked from commit b459f7482612d340b88b62edc024628595ec6337)

7 years ago[3.6] bpo-30682: Removed a too-strict assertion that failed for certain f-strings...
Serhiy Storchaka [Fri, 16 Jun 2017 13:29:42 +0000 (16:29 +0300)]
[3.6] bpo-30682: Removed a too-strict assertion that failed for certain f-strings. (GH-2232) (#2242)

This caused a segfault on eval("f'\\\n'") and eval("f'\\\r'") in debug build..
(cherry picked from commit 11e97f2f80bf65cc828c127eafc95229df35d403)

7 years agoSynchronize libregrtest from master to 3.6 (#2244)
Victor Stinner [Fri, 16 Jun 2017 12:39:09 +0000 (14:39 +0200)]
Synchronize libregrtest from master to 3.6 (#2244)

* bpo-30523: regrtest: Add --list-cases option (#2238)
* bpo-30284: Fix regrtest for out of tree build (#1481)
* bpo-30540: regrtest: add --matchfile option (#1909)
* bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479)
* bpo-30263: regrtest: log system load (#1452)

7 years agoRevert "bpo-30673: test.bat: add -t option (timeout) (#2211) (#2225)" (#2246)
Victor Stinner [Fri, 16 Jun 2017 12:38:32 +0000 (14:38 +0200)]
Revert "bpo-30673: test.bat: add -t option (timeout) (#2211) (#2225)" (#2246)

This reverts commit e064d4dfeda09fd206653697b70b434e98cc1b57.

7 years ago[3.6]Add IDLE items to NEWS and idlelib/NEWS.txt (#2239) (#2240)
terryjreedy [Fri, 16 Jun 2017 06:11:31 +0000 (02:11 -0400)]
[3.6]Add IDLE items to NEWS and idlelib/NEWS.txt (#2239) (#2240)

7 years agobpo-30450: Pull Windows dependencies from GitHub rather than svn (GH-1783) (GH-2237)
Zachary Ware [Fri, 16 Jun 2017 06:06:36 +0000 (01:06 -0500)]
bpo-30450: Pull Windows dependencies from GitHub rather than svn (GH-1783) (GH-2237)

The Windows build now depends on Python 3.6 to fetch externals, but it will be downloaded via NuGet (which is downloaded via PowerShell) if it is not available via `py -3.6`.  This means the only thing that must be installed on a modern Windows box to do a full build of CPython with all extensions is Visual Studio.

Also fixes an outdated note about _lzma in PCbuild/readme.txt

(cherry-picked from commit 51599e2bdd10ab77212a7cbb41a13ea70ee13da8)

7 years agobpo-28837: Fix lib2to3 handling of map/zip/filter calls when followed with a 'trailer...
Mariatta [Fri, 16 Jun 2017 02:56:52 +0000 (19:56 -0700)]
bpo-28837: Fix lib2to3 handling of map/zip/filter calls when followed with a 'trailer', e.g. zip()[x] (GH-24) (GH-2235)

(cherry picked from commit 93b4b47e3a720171d67f3b608de406aef462835c)

7 years agoCheck that Python is 64-bit before enabling BLAKE2_USE_SSE. (GH-1332) (GH-2042)
Neil Schemenauer [Fri, 16 Jun 2017 02:12:46 +0000 (19:12 -0700)]
Check that Python is 64-bit before enabling BLAKE2_USE_SSE. (GH-1332) (GH-2042)

(cherry picked from commit 6c991bdee7ec4bedd8c1b8d3812dc884b654b57c)

7 years agobpo-30656: Fix Python C API Module Objects documentation (GH-2170) (GH-2230)
Mariatta [Fri, 16 Jun 2017 01:49:43 +0000 (18:49 -0700)]
bpo-30656: Fix Python C API Module Objects documentation (GH-2170) (GH-2230)

`PyModule_New()` now refers to `PyModule_NewObject()`
(cherry picked from commit 2d0afef82a07afdb666f2ca0c533aac5d39155cd)

7 years agobpo-23890: Fix ref cycle in TestCase.assertRaises (#858)
Victor Stinner [Thu, 15 Jun 2017 22:18:15 +0000 (00:18 +0200)]
bpo-23890: Fix ref cycle in TestCase.assertRaises (#858)

unittest.TestCase.assertRaises() now manually breaks a
reference cycle to not keep objects alive longer than expected.
(cherry picked from commit bbd3cf8f1ef1e91a8d6dac6411e18b4b9084abf5)

7 years agobpo-30673: test.bat: add -t option (timeout) (#2211) (#2225)
Victor Stinner [Thu, 15 Jun 2017 22:14:35 +0000 (00:14 +0200)]
bpo-30673: test.bat: add -t option (timeout) (#2211) (#2225)

(cherry picked from commit 258bfc462b1e58689b43f662a10e44ece3a10bef)

7 years ago[3.6] bpo-30626: Fix error handling in PyImport_Import(). (GH-2103) (#2221)
Serhiy Storchaka [Thu, 15 Jun 2017 18:15:11 +0000 (21:15 +0300)]
[3.6] bpo-30626: Fix error handling in PyImport_Import(). (GH-2103) (#2221)

In rare circumstances PyImport_Import() could return NULL without raising
an error.
(cherry picked from commit 145541c)

7 years agobpo-30149: Fix partialmethod without explicit self parameter (#1308) (#1662)
Dong-hee Na [Thu, 15 Jun 2017 14:41:57 +0000 (23:41 +0900)]
bpo-30149: Fix partialmethod without explicit self parameter (#1308) (#1662)

7 years ago[3.6] bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. (GH...
Serhiy Storchaka [Thu, 15 Jun 2017 14:16:38 +0000 (17:16 +0300)]
[3.6] bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. (GH-879) (#2217)

the original logic was just comparing the network address
but this is wrong because if the network address is equal then
we need to compare the ip address for breaking the tie

add more ip_interface comparison tests.
(cherry picked from commit 7bd8d3e794782582a4ad1c9749424fff86802c3e)

7 years ago[3.6] bpo-30650: Fixed a syntax error: missed right parentheses (GH-2154) (#2215)
Serhiy Storchaka [Thu, 15 Jun 2017 13:57:53 +0000 (16:57 +0300)]
[3.6] bpo-30650: Fixed a syntax error: missed right parentheses (GH-2154) (#2215)

(cherry picked from commit 0d32218)

7 years ago[3.6] bpo-30605: Fix compiling binary regexs with BytesWarnings enabled. (GH-2016...
Serhiy Storchaka [Thu, 15 Jun 2017 13:55:22 +0000 (16:55 +0300)]
[3.6] bpo-30605: Fix compiling binary regexs with BytesWarnings enabled. (GH-2016) (#2214)

Running our unit tests with `-bb` enabled triggered this failure..
(cherry picked from commit 171b9a354e816eebc6d4c3a8553303942e9c5025)

7 years agobpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) (#2200)
Victor Stinner [Wed, 14 Jun 2017 23:26:16 +0000 (01:26 +0200)]
bpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) (#2200)

* bpo-29591: Upgrade Modules/expat to libexpat 2.2

* bpo-29591: Restore Python changes on expat

* bpo-29591: Remove expat config of unsupported platforms

Remove the configuration (Modules/expat/*config.h) of unsupported
platforms:

* Amiga
* MacOS Classic on PPC32
* Open Watcom

* bpo-29591: Remove useless XML_HAS_SET_HASH_SALT

The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became
useless since our local expat copy was upgrade to expat 2.1 (it's now
expat 2.2.0).

(cherry picked from commit 23ec4b57e1359f9c539b8defc317542173ae087e)

7 years agobpo-30231: Remove skipped test_imaplib tests (#1419) (#2192)
Victor Stinner [Wed, 14 Jun 2017 20:43:01 +0000 (22:43 +0200)]
bpo-30231: Remove skipped test_imaplib tests (#1419) (#2192)

The public cyrus.andrew.cmu.edu IMAP server (port 993) doesn't accept
TLS connection using our self-signed x509 certificate. Remove the two
tests which are already skipped.

Write a new test_certfile_arg_warn() unit test for the certfile
deprecation warning.
(cherry picked from commit b18563da8803433509e9a0e29718e0271014659f)

7 years ago[3.6]bpo-15786: Fix IDLE autocomplete return problem. (#2198) (#2199)
terryjreedy [Wed, 14 Jun 2017 20:10:10 +0000 (16:10 -0400)]
[3.6]bpo-15786: Fix IDLE autocomplete return problem. (#2198) (#2199)

Before,  Enter would not, for instance, complete 're.c' to 're.compile' even with 'compile' highlighted.  Now it does.  Before, '\n' was inserted into text, which in Shell meant compile() and possibly execute.  Now cursor is left after completion.
(cherry picked from commit 32fd874afe55e396e3c9a5af35e7bb3d8e0b8f02)

7 years agobpo-30659 : Use ** for kwargs in namedtuple._replace() signature (GH-2173) (GH-2195)
Mariatta [Wed, 14 Jun 2017 18:59:37 +0000 (11:59 -0700)]
bpo-30659 : Use ** for kwargs in namedtuple._replace() signature (GH-2173) (GH-2195)

(cherry picked from commit 184bd82ba8106785ba22f0d2477dbd08bef821fb)

7 years agoFix trivial typo in Python Setup documentation (GH-2185) (GH-2188)
csabella [Wed, 14 Jun 2017 16:26:41 +0000 (12:26 -0400)]
Fix trivial typo in Python Setup documentation (GH-2185) (GH-2188)

Replace platform with platforms.
(cherry picked from commit 4ebf03d109f827c91a23256a447c1d74a203dfee)

7 years agobpo-15786: IDLE: Fix mouse clicks on autocompletetion window (#1811) (#2187)
terryjreedy [Wed, 14 Jun 2017 15:43:49 +0000 (11:43 -0400)]
bpo-15786: IDLE: Fix mouse clicks on autocompletetion window (#1811) (#2187)

Patch by Louie Lu.
(cherry picked from commit 778b484145edfd0d9b65129322d3295bed8eb71a)

7 years ago[3.6] bpo-30649: test_os tolerates 50 ms delta for utime (#2156) (#2175)
Victor Stinner [Wed, 14 Jun 2017 12:26:52 +0000 (14:26 +0200)]
[3.6] bpo-30649: test_os tolerates 50 ms delta for utime (#2156) (#2175)

* bpo-30649: test_os tolerates 50 ms delta for utime (#2156)

On Windows, tolerate a delta of 50 ms instead of 20 ms in
test_utime_current() and test_utime_current_old() of test_os.

On other platforms, reduce the delta from 20 ms to 10 ms.
(cherry picked from commit c94caca65cd38802243b5279cf85ee44ffb2abb8)

* bpo-30649: Revert utime delta in test_os (#2176)

PPC64 Fedora 3.x buildbot requires at least a delta of 14 ms: revert
the utime delta to 20 ms.

I tried 10 ms, but test_os failed on the PPC64 Fedora 3.x buildbot.
(cherry picked from commit 3402f7268897db15053866e1e68404cfa0e02706)

7 years ago[3.6]bpo-25514: Improve IDLE's connection refused message (#2177) (#2178)
terryjreedy [Wed, 14 Jun 2017 02:13:15 +0000 (22:13 -0400)]
[3.6]bpo-25514: Improve IDLE's connection refused message (#2177) (#2178)

When IDLE fail to start because the socket connection fails, direct people to a new subsection of the IDLE doc listing various causes and remedies.
(cherry picked from commit 188aedf8bb623d41302e10503268b0852ea91134)

7 years ago[3.6]bpo-27922: Stop gui flash from idle_test.test_parenmatch (#2171) (#2172)
terryjreedy [Tue, 13 Jun 2017 19:40:59 +0000 (15:40 -0400)]
[3.6]bpo-27922: Stop gui flash from idle_test.test_parenmatch (#2171) (#2172)

For unknown reasons, this does not work when running leak tests.
(cherry picked from commit 049cf2bb44038351e1b2eed4fc7b1b522329e550)

7 years ago[3.6]bpo-30642: Fix ref leak in idle_test.test_macosx (#2163) (#2165)
terryjreedy [Tue, 13 Jun 2017 15:52:08 +0000 (11:52 -0400)]
[3.6]bpo-30642: Fix ref leak in idle_test.test_macosx (#2163) (#2165)

(cherry picked from commit 8323189ff1a19566f923c04b95e4d17fa57d1f56)

7 years ago[3.6] bpo-24484: Avoid race condition in multiprocessing cleanup (GH-2159) (#2166)
Antoine Pitrou [Tue, 13 Jun 2017 15:51:26 +0000 (17:51 +0200)]
[3.6] bpo-24484: Avoid race condition in multiprocessing cleanup (GH-2159) (#2166)

* bpo-24484: Avoid race condition in multiprocessing cleanup

The finalizer registry can be mutated while inspected by multiprocessing
at process exit.

* Use test.support.start_threads()

* Add Misc/NEWS.
(cherry picked from commit 1eb6c0074d17f4fd425cacfdda893d65f5f77f0a)

7 years agobpo-30642: IDLE: Fix test_query refleak (#2147) (#2161)
terryjreedy [Tue, 13 Jun 2017 14:11:02 +0000 (10:11 -0400)]
bpo-30642: IDLE: Fix test_query refleak (#2147) (#2161)

Patch by Louie Lu.
(cherry picked from commit b070fd275b68df5c5ba9f6f43197b8d7066f0b18)

7 years ago[3.6] bpo-29514: Check magic number for bugfix releases (#2157)
Nick Coghlan [Tue, 13 Jun 2017 10:32:46 +0000 (20:32 +1000)]
[3.6] bpo-29514: Check magic number for bugfix releases (#2157)

Add a test to check the current MAGIC_NUMBER against the
expected number for the release if the current release is
at candidate or final level. On test failure, describe to
the developer the procedure for changing the magic number.

This ensures that pre-merge CI will automatically pick up
on magic number changes in maintenance releases (and
explain why those are problematic), rather than relying on
all core developers to be aware of the implications of
such changes.

7 years agobpo-30604: Fix __PyCodeExtraState_Get() prototype (#2152)
Victor Stinner [Tue, 13 Jun 2017 08:39:30 +0000 (10:39 +0200)]
bpo-30604: Fix __PyCodeExtraState_Get() prototype (#2152)

Replace __PyCodeExtraState_Get() with __PyCodeExtraState_Get(void) to
fix the following GCC warning:

./Include/pystate.h:63:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 __PyCodeExtraState* __PyCodeExtraState_Get();

7 years ago[3.6] Mention how to disable signal fd wakeup (GH-2140) (#2149)
Antoine Pitrou [Tue, 13 Jun 2017 08:23:13 +0000 (10:23 +0200)]
[3.6] Mention how to disable signal fd wakeup (GH-2140) (#2149)

(cherry picked from commit d79c1d4a9406384f10a37f26a7515ce79f9fdd78)

7 years agobpo-6519: Improve Python Input Output Tutorial (GH-2143) (GH-2145)
Mariatta [Tue, 13 Jun 2017 05:40:18 +0000 (22:40 -0700)]
bpo-6519: Improve Python Input Output Tutorial (GH-2143) (GH-2145)

Move up the discussion about 'with' keyword, so it appears earlier in the document.
(cherry picked from commit bd4e9e0ca96dabf33605d9b1fd1e0562ece8ae18)

7 years ago[3.6] bpo-30604: Move co_extra_freefuncs to interpreter state to avoid crashes in...
Dino Viehland [Tue, 13 Jun 2017 01:46:35 +0000 (18:46 -0700)]
[3.6] bpo-30604: Move co_extra_freefuncs to interpreter state to avoid crashes in threads (#2015)

* Move co_extra_freefuncs to interpreter state to avoid crashes in
multi-threaded scenarios involving deletion of code objects

* Don't require that extra be zero initialized

* Build test list instead of defining empty test class

* Ensure extra is always assigned on success

* Keep the old fields in the thread state object, just don't use them
Add new linked list of code extra objects on a per-interpreter basis
  so that interpreter state size isn't changed

* Rename __PyCodeExtraState_Get and add comment about it going away in 3.7
Fix sort order of import's in test_code.py

* Remove an extraneous space

* Remove docstrings for comments

* Touch up formatting

* Fix casing of coextra local

* Fix casing of another variable

* Prefix PyCodeExtraState with __ to match C API for getting it

* Update NEWS file for bpo-30604

7 years agobpo-30217: add the operators ~ and | to the index (GH-1502) (GH-2136)
Marco Buttu [Mon, 12 Jun 2017 19:41:42 +0000 (21:41 +0200)]
bpo-30217: add the operators ~ and | to the index (GH-1502) (GH-2136)

(cherry picked from commit dc980dfbcfce4695ccde056c3983160ba97b5a36)