]> granicus.if.org Git - python/log
python
7 years agobpo-29585: Define PYTHONFRAMEWORK in PC/pyconfig.h (#2477)
Victor Stinner [Wed, 28 Jun 2017 16:34:42 +0000 (18:34 +0200)]
bpo-29585: Define PYTHONFRAMEWORK in PC/pyconfig.h (#2477)

* bpo-29585: Fix PC/pyconfig.h whitespaces

Run "make patchcheck".

* bpo-29585: Define PYTHONFRAMEWORK in PC/pyconfig.h

* site: Fix path separator in _get_path() on Windows

7 years agobpo-29585: optimize site.py startup time (GH-136)
INADA Naoki [Wed, 28 Jun 2017 15:31:53 +0000 (00:31 +0900)]
bpo-29585: optimize site.py startup time (GH-136)

Avoid importing `sysconfig` from `site` by copying minimum code.
Python startup is 5% faster on Linux and 30% faster on macOS

7 years agoClear potential ref cycle between Process and Process target (#2470)
Antoine Pitrou [Wed, 28 Jun 2017 10:29:08 +0000 (12:29 +0200)]
Clear potential ref cycle between Process and Process target (#2470)

* 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

7 years agobpo-30775: Fix refleaks in test_multiprocessing (#2467)
Antoine Pitrou [Wed, 28 Jun 2017 09:21:52 +0000 (11:21 +0200)]
bpo-30775: Fix refleaks in test_multiprocessing (#2467)

Forgetting to call Process.join() can keep some resources alive.

7 years agoFix compiler warnings on Windows introduced in bpo-13617. (#2464)
Serhiy Storchaka [Wed, 28 Jun 2017 06:55:22 +0000 (09:55 +0300)]
Fix compiler warnings on Windows introduced in bpo-13617. (#2464)

7 years ago[security] bpo-13617: Reject embedded null characters in wchar* strings. (#2302)
Serhiy Storchaka [Wed, 28 Jun 2017 05:30:06 +0000 (08:30 +0300)]
[security] bpo-13617: Reject embedded null characters in wchar* strings. (#2302)

Based on patch by Victor Stinner.

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

7 years agobpo-24813: IDLE tagline is Integrated Development and Learning Environment (#2451)
Mark Roseman [Wed, 28 Jun 2017 02:42:10 +0000 (19:42 -0700)]
bpo-24813: IDLE  tagline is Integrated Development and Learning Environment (#2451)

Patch by Mark Roseman

7 years agobpo-30723: IDLE -- Enhance parenmatch; add style, flash, and help (#2306)
wohlganger [Wed, 28 Jun 2017 02:36:23 +0000 (21:36 -0500)]
bpo-30723: IDLE -- Enhance parenmatch; add style, flash, and help (#2306)

* 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.

7 years agobpo-29512: Add test.bisect, bisect failing tests (#2452)
Victor Stinner [Wed, 28 Jun 2017 00:24:41 +0000 (02:24 +0200)]
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.

7 years agobpo-30704, bpo-30604: Fix memleak in code_dealloc() (#2455)
Victor Stinner [Wed, 28 Jun 2017 00:12:00 +0000 (02:12 +0200)]
bpo-30704, bpo-30604: Fix memleak in code_dealloc() (#2455)

Free also co_extra->ce_extras, not only co_extra.

7 years agoClarification to the `break` statement (GH-2453)
regexaurus [Tue, 27 Jun 2017 22:40:41 +0000 (18:40 -0400)]
Clarification to the `break` statement (GH-2453)

Clarify that the break statement breaks out of the innermost enclosing for or while loop.

7 years agobpo-30708: Check for null characters in PyUnicode_AsWideCharString(). (#2285)
Serhiy Storchaka [Tue, 27 Jun 2017 13:03:14 +0000 (16:03 +0300)]
bpo-30708: Check for null characters in PyUnicode_AsWideCharString(). (#2285)

Raise a ValueError if the second argument is NULL and the wchar_t\*
string contains null characters.

7 years agobpo-30674: IDLE: add docstrings to grep.py (#2213)
csabella [Tue, 27 Jun 2017 06:41:08 +0000 (02:41 -0400)]
bpo-30674: IDLE: add docstrings to grep.py (#2213)

Patch by Cheryl Sabella

7 years agobpo-21519: IDLE basic custom key entry better detects duplicates. (#2428)
terryjreedy [Tue, 27 Jun 2017 05:23:55 +0000 (01:23 -0400)]
bpo-21519: IDLE basic custom key entry better detects duplicates. (#2428)

7 years agobpo-29910: IDLE no longer deletes a character after commenting out a region (#825)
Serhiy Storchaka [Tue, 27 Jun 2017 04:02:32 +0000 (07:02 +0300)]
bpo-29910: IDLE no longer deletes a character after commenting out a region (#825)

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

7 years agobpo-24813: IDLE: Add build bitness to About Idle title (#2380)
csabella [Tue, 27 Jun 2017 02:28:58 +0000 (22:28 -0400)]
bpo-24813: IDLE: Add build bitness to About Idle title (#2380)

Patch by Cheryl Sabella.

7 years agobpo-30769: Fix reference leak introduced in 77703942c59 (#2416)
Eric N. Vander Weele [Tue, 27 Jun 2017 01:35:20 +0000 (21:35 -0400)]
bpo-30769: Fix reference leak introduced in 77703942c59 (#2416)

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>
7 years agobpo-30776: reduce regrtest -R false positives (#2422)
Victor Stinner [Tue, 27 Jun 2017 00:02:04 +0000 (02:02 +0200)]
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]

7 years agobpo-30728: IDLE: Refactor configdialog to PEP8 names (#2307)
csabella [Mon, 26 Jun 2017 21:46:26 +0000 (17:46 -0400)]
bpo-30728: IDLE: Refactor configdialog to PEP8 names (#2307)

Also, change '*' in the tkinter import to an explicit list of names.
Patch by Cheryl Sabella.

7 years agobpo-30532: Fix whitespace folding in certain cases
Joel Hillacre [Mon, 26 Jun 2017 21:41:35 +0000 (15:41 -0600)]
bpo-30532: Fix whitespace folding in certain cases

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.

7 years agobpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (#2403)
Antoine Pitrou [Mon, 26 Jun 2017 18:41:07 +0000 (20:41 +0200)]
bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (#2403)

* 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

7 years agobpo-30764: regrtest: add --fail-env-changed option (#2402)
Victor Stinner [Mon, 26 Jun 2017 16:33:19 +0000 (18:33 +0200)]
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.

7 years agobpo-30733: Fix typos in "What's New" entry (GH-2414)
Walter Dörwald [Mon, 26 Jun 2017 16:31:52 +0000 (18:31 +0200)]
bpo-30733: Fix typos in "What's New" entry (GH-2414)

7 years agobpo-30764: test_subprocess uses SuppressCrashReport (#2405)
Victor Stinner [Mon, 26 Jun 2017 15:23:03 +0000 (17:23 +0200)]
bpo-30764: test_subprocess uses SuppressCrashReport (#2405)

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.

7 years agobpo-30523: regrtest --list-cases --match (#2401)
Victor Stinner [Mon, 26 Jun 2017 12:18:51 +0000 (14:18 +0200)]
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.

7 years agobpo-6739: IDLE: Check for valid keybinding in config_keys (#2377)
csabella [Mon, 26 Jun 2017 04:55:48 +0000 (00:55 -0400)]
bpo-6739: IDLE: Check for valid keybinding in config_keys (#2377)

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.

7 years agobpo-30746: Port more tests for os.spawnvpe() and os.execve() from 2.7. (#2394)
Serhiy Storchaka [Sun, 25 Jun 2017 06:48:54 +0000 (09:48 +0300)]
bpo-30746: Port more tests for os.spawnvpe() and os.execve() from 2.7. (#2394)

7 years agobpo-30746: Prohibited the '=' character in environment variable names (#2382)
Serhiy Storchaka [Sun, 25 Jun 2017 04:33:01 +0000 (07:33 +0300)]
bpo-30746: Prohibited the '=' character in environment variable names (#2382)

in `os.putenv()` and `os.spawn*()`.

7 years agoUpdate `make patchcheck` for blurb and NEWS.d (#2381)
Antoine Pitrou [Sun, 25 Jun 2017 01:21:49 +0000 (03:21 +0200)]
Update `make patchcheck` for blurb and NEWS.d (#2381)

7 years agoCheck the whitespace of pull requests on Travis (GH-2367)
Brett Cannon [Sat, 24 Jun 2017 23:51:23 +0000 (16:51 -0700)]
Check the whitespace of pull requests on Travis (GH-2367)

7 years agoFix bpo-30596: Add close() method to multiprocessing.Process (#2010)
Antoine Pitrou [Sat, 24 Jun 2017 17:22:23 +0000 (19:22 +0200)]
Fix bpo-30596: Add close() method to multiprocessing.Process (#2010)

* Fix bpo-30596: Add close() method to multiprocessing.Process

* Raise ValueError if close() is called before the Process is finished running

* Add docs

* Add NEWS blurb

7 years agobpo-30745: Fix compiler warnings introduced in bpo-30730. (#2376)
Serhiy Storchaka [Sat, 24 Jun 2017 13:14:08 +0000 (16:14 +0300)]
bpo-30745: Fix compiler warnings introduced in bpo-30730. (#2376)

7 years agoFix a typo in a comment in coroutines.py (GH-2267)
Johan de Jager [Sat, 24 Jun 2017 05:18:54 +0000 (07:18 +0200)]
Fix a typo in a comment in coroutines.py (GH-2267)

defiend -> defined

7 years agobp-29304: Simplify dictobject.c (GH-2347)
INADA Naoki [Sat, 24 Jun 2017 00:03:19 +0000 (09:03 +0900)]
bp-29304:  Simplify dictobject.c (GH-2347)

replace `(i << 2) + 1` with `i*5`

7 years agobpo-24813: IDLE: Add default title to help_about (#2366)
csabella [Sat, 24 Jun 2017 00:00:58 +0000 (20:00 -0400)]
bpo-24813: IDLE: Add default title to help_about (#2366)

Patch by Cheryl Sabella.

7 years agobpo-30726: expat: Fix compiler warnings on Windows 64-bit (#2368)
Victor Stinner [Fri, 23 Jun 2017 23:08:56 +0000 (01:08 +0200)]
bpo-30726: expat: Fix compiler warnings on Windows 64-bit (#2368)

Explicitly cast on integer downcasting to fix compiler warnings.

(cherry picked from libexpat commit 788bff7a3baad1983b15b17c29e19e1a1a795c48)

7 years agoTrivial cleanup: remove redundant variable stores in ceval.c (#2012)
Adrian Wielgosik [Fri, 23 Jun 2017 20:35:41 +0000 (13:35 -0700)]
Trivial cleanup: remove redundant variable stores in ceval.c (#2012)

Redundant code leftover from cleanup in #16191: the variable `err` is being written to, even though it wasn't used after that point.

7 years agobpo-30664: The description of a unittest subtest now preserves the (#2265)
Serhiy Storchaka [Fri, 23 Jun 2017 18:47:39 +0000 (21:47 +0300)]
bpo-30664: The description of a unittest subtest now preserves the (#2265)

order of keyword arguments of TestCase.subTest().

7 years agobpo-30645: don't append to an inner loop path in imp.load_package() (GH-2268)
Alexandru Ardelean [Fri, 23 Jun 2017 17:35:03 +0000 (20:35 +0300)]
bpo-30645: don't append to an inner loop path in imp.load_package() (GH-2268)

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.

7 years agobpo-30730: Prevent environment variables injection in subprocess on Windows. (#2325)
Serhiy Storchaka [Fri, 23 Jun 2017 16:39:27 +0000 (19:39 +0300)]
bpo-30730: Prevent environment variables injection in subprocess on Windows. (#2325)

Prevent passing other invalid environment variables and command arguments.

7 years agobpo-24813: IDLE: Add icon to help_about (#2335)
csabella [Fri, 23 Jun 2017 16:00:29 +0000 (12:00 -0400)]
bpo-24813: IDLE: Add icon to help_about (#2335)

Patch by Cheryl Sabella

7 years agobpo-21071: struct.Struct.format type is now str (#845)
Victor Stinner [Fri, 23 Jun 2017 13:11:12 +0000 (15:11 +0200)]
bpo-21071: struct.Struct.format type is now str (#845)

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

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

Fix a regression introduced by myself in the commit
526b22657cb18fe79118c2ea68511aca09430c2c.

7 years agobpo-30726: Fix elementtree warnings on Windows due to expat upgrade (#2319)
Segev Finer [Fri, 23 Jun 2017 10:45:01 +0000 (13:45 +0300)]
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

7 years agobpo-30727: Fix a race condition in test_threading. (#2334)
Serhiy Storchaka [Fri, 23 Jun 2017 10:36:36 +0000 (13:36 +0300)]
bpo-30727: Fix a race condition in test_threading. (#2334)

7 years agobpo-30726: PCbuild _elementtree: remove duplicate defines (#2348)
Victor Stinner [Fri, 23 Jun 2017 08:09:34 +0000 (10:09 +0200)]
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>
7 years agobpo-29304: simplify lookdict_index() function. (GH-2273)
INADA Naoki [Fri, 23 Jun 2017 06:22:50 +0000 (15:22 +0900)]
bpo-29304: simplify lookdict_index() function. (GH-2273)

7 years agobpo-30736: upgrade to Unicode 10.0 (#2344)
Benjamin Peterson [Fri, 23 Jun 2017 05:31:08 +0000 (22:31 -0700)]
bpo-30736: upgrade to Unicode 10.0 (#2344)

Straightforward. While we're at it, though, strip trailing whitespace from generated tables.

7 years agobpo-30709: Improve code example in Descriptor HowTo doc (GH-2339)
_ = NaN [Fri, 23 Jun 2017 03:54:35 +0000 (11:54 +0800)]
bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339)

7 years agoAdd "Misc/NEWS.d" directory tree for "blurb". (GH-2316)
larryhastings [Thu, 22 Jun 2017 17:29:02 +0000 (10:29 -0700)]
Add "Misc/NEWS.d" directory tree for "blurb". (GH-2316)

Add "Misc/NEWS.d" directory tree for "blurb".

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 agobpo-30619: Clarify typing.Union documentation (GH-2326)
khyox [Thu, 22 Jun 2017 13:14:57 +0000 (15:14 +0200)]
bpo-30619: Clarify typing.Union documentation (GH-2326)

When a class and its subclass are present, the latter is skipped.

7 years agobpo-29212: Fix the ugly repr() ThreadPoolExecutor thread name. (#2315)
Gregory P. Smith [Thu, 22 Jun 2017 06:41:13 +0000 (23:41 -0700)]
bpo-29212: Fix the ugly repr() ThreadPoolExecutor thread name. (#2315)

bpo-29212: Fix the ugly ThreadPoolExecutor thread name.

Fixes the newly introduced ugly default thread name for concurrent.futures
thread.ThreadPoolExecutor threads.  They'll now resemble the old <=3.5
threading default Thread-x names by being named ThreadPoolExecutor-y_n.

7 years agoFix typo in idlelib.config_key.py (#2322)
terryjreedy [Thu, 22 Jun 2017 02:14:23 +0000 (22:14 -0400)]
Fix typo in idlelib.config_key.py (#2322)

7 years agobpo-30604: clean up co_extra support (#2144)
Dino Viehland [Wed, 21 Jun 2017 21:44:36 +0000 (14:44 -0700)]
bpo-30604: clean up co_extra support (#2144)

bpo-30604: port fix from 3.6 dropping binary compatibility tweaks

7 years agobpo-30183: Fixes HP-UX cc compilation error in pytime.c (#1351)
haney [Wed, 21 Jun 2017 18:18:21 +0000 (11:18 -0700)]
bpo-30183: Fixes HP-UX cc compilation error in pytime.c (#1351)

* bpo-30183: Fixes HP-UX cc compilation error in pytime.c

HP-UX does not support the CLOCK_MONOTONIC identifier, and will fail to
compile:

    "Python/pytime.c", line 723: error #2020: identifier
    "CLOCK_MONOTONIC" is undefined
          const clockid_t clk_id = CLOCK_MONOTONIC;

Add a new section for __hpux that calls 'gethrtime()' instead of
'clock_gettime()'.

* bpo-30183: Removes unnecessary return

7 years agobpo-30616: Functional API of enum allows to create empty enums. (#2304)
Dong-hee Na [Wed, 21 Jun 2017 16:52:32 +0000 (01:52 +0900)]
bpo-30616: Functional API of enum allows to create empty enums. (#2304)

* bpo-30616: Functional API of enum allows to create empty enums.

* Update NEWS

move addition to avoid conflict

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

New file: Modules/expat/siphash.h.

7 years agoFix trivial typo in idlelib/config.py (GH-2309)
KunYuChen [Wed, 21 Jun 2017 04:30:45 +0000 (12:30 +0800)]
Fix trivial typo in idlelib/config.py (GH-2309)

Comceptually -> Conceptually

7 years agoFix typo in 3.7 whatsnew (#2308)
Daniel Porteous [Wed, 21 Jun 2017 00:21:48 +0000 (10:21 +1000)]
Fix typo in 3.7 whatsnew (#2308)

7 years agoFix trivial typo in json module docstring (GH-2274)
dong-jy [Tue, 20 Jun 2017 20:07:20 +0000 (04:07 +0800)]
Fix trivial typo in json module docstring (GH-2274)

7 years agobpo-29933: Improve set_write_buffer_limits description (GH-2262)
Kojo Idrissa [Tue, 20 Jun 2017 19:32:00 +0000 (14:32 -0500)]
bpo-29933: Improve set_write_buffer_limits description (GH-2262)

Improve the description of the high and low parameters for set_write_buffer_limits.
Also fixed a small grammatical issue.

7 years agobpo-30054: Expose tracemalloc C API (#1236)
Victor Stinner [Tue, 20 Jun 2017 15:46:36 +0000 (17:46 +0200)]
bpo-30054: Expose tracemalloc C API (#1236)

* Make PyTraceMalloc_Track() and PyTraceMalloc_Untrack() functions
  public (remove the "_" prefix)
* Remove the _PyTraceMalloc_domain_t type: use directly unsigned
  int.
* Document methods

Note: methods are already tested in test_tracemalloc.

7 years agobpo-29755: Fixed the lgettext() family of functions in the gettext module. (#2266)
Serhiy Storchaka [Tue, 20 Jun 2017 14:13:29 +0000 (17:13 +0300)]
bpo-29755: Fixed the lgettext() family of functions in the gettext module. (#2266)

They now always return bytes.

Updated the gettext documentation.

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

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

7 years agobpo-30597: Show expected input in custom 'print' error message. (#2009)
Sanyam Khurana [Tue, 20 Jun 2017 13:31:32 +0000 (19:01 +0530)]
bpo-30597: Show expected input in custom 'print' error message. (#2009)

7 years agourllib: Simplify splithost by calling into urlparse. (#1849)
postmasters [Tue, 20 Jun 2017 13:02:44 +0000 (06:02 -0700)]
urllib: Simplify splithost by calling into urlparse. (#1849)

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``.

7 years agobpo-30629: Add Motoki Naruse to Misc/ACKS (#2284)
Motoki Naruse [Tue, 20 Jun 2017 08:10:12 +0000 (17:10 +0900)]
bpo-30629: Add Motoki Naruse to Misc/ACKS (#2284)

7 years agobpo-30687: Fixes build scripts to find msbuild.exe and stop relying on vcvarsall...
Steve Dower [Mon, 19 Jun 2017 17:34:25 +0000 (10:34 -0700)]
bpo-30687: Fixes build scripts to find msbuild.exe and stop relying on vcvarsall.bat (#2252)

* 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-30565: Add PYTHONCOERCECLOCALE=warn runtime flag (GH-2260)
Nick Coghlan [Sun, 18 Jun 2017 02:29:42 +0000 (12:29 +1000)]
bpo-30565: Add PYTHONCOERCECLOCALE=warn runtime flag (GH-2260)

- removes PY_WARN_ON_C_LOCALE build time flag
- locale coercion and compatibility warnings are now always compiled
  in, but are off by default
- adds PYTHONCOERCECLOCALE=warn runtime option to aid in
  debugging potentially locale related compatibility problems

Due to not-yet-resolved test failures on *BSD systems (including
Mac OS X), this also temporarily disables UTF-8 as a locale coercion
target, and skips testing the interpreter's behavior in the POSIX locale.

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

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

7 years agobpo-30629: Remove second call of str.lower() in html.parser.parse_endtag. (#2099)
Motoki Naruse [Sat, 17 Jun 2017 01:15:25 +0000 (10:15 +0900)]
bpo-30629: Remove second call of str.lower() in html.parser.parse_endtag. (#2099)

elem is the result of .lower() 6 lines above the handle_endtag call.
Patch by Motoki Naruse

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

This reverts commit 258bfc462b1e58689b43f662a10e44ece3a10bef.

7 years agobpo-30523: Add --list-cases unittest (#2243)
Louie Lu [Fri, 16 Jun 2017 11:15:28 +0000 (19:15 +0800)]
bpo-30523: Add --list-cases unittest (#2243)

* bpo-30523: Add --list-cases unittest

* Addressed haypo's request

* Addressed haypo's request

7 years agobpo-30682: Removed a too-strict assertion that failed for certain f-strings. (#2232)
ericvsmith [Fri, 16 Jun 2017 10:19:32 +0000 (06:19 -0400)]
bpo-30682: Removed a too-strict assertion that failed for certain f-strings. (#2232)

This caused a segfault on eval("f'\\\n'") and eval("f'\\\r'") in debug build.

7 years agobpo-30523: regrtest: Add --list-cases option (#2238)
mlouielu [Fri, 16 Jun 2017 09:36:19 +0000 (17:36 +0800)]
bpo-30523: regrtest: Add --list-cases option (#2238)

* bpo-30523: regrtest: Add --list-cases option

* bpo-30523: Enhance --list-cases

* Add get_abs_module() function, use it in list_cases()
* list_cases() now logs skipped tests into stderr

* Remove unused doctest

7 years agobpo-29783: Replace codecs.open() with io.open() (#599)
Victor Stinner [Fri, 16 Jun 2017 06:59:01 +0000 (08:59 +0200)]
bpo-29783: Replace codecs.open() with io.open() (#599)

7 years agoAdd IDLE items to NEWS and idlelib/NEWS.txt (#2239)
terryjreedy [Fri, 16 Jun 2017 05:54:57 +0000 (01:54 -0400)]
Add IDLE items to NEWS and idlelib/NEWS.txt (#2239)

7 years agobpo-30450: Add NEWS and whatsnew (GH-2236)
Zachary Ware [Fri, 16 Jun 2017 03:34:59 +0000 (22:34 -0500)]
bpo-30450: Add NEWS and whatsnew (GH-2236)

7 years agobpo-30176: Add missing curses cell attributes constants (GH-1302)
Xiang Zhang [Fri, 16 Jun 2017 03:20:07 +0000 (11:20 +0800)]
bpo-30176: Add missing curses cell attributes constants (GH-1302)

7 years agobpo-30631: Silence MSVC warnings in third-party code (GH-1963)
Segev Finer [Fri, 16 Jun 2017 03:12:05 +0000 (06:12 +0300)]
bpo-30631: Silence MSVC warnings in third-party code (GH-1963)

7 years agobpo-30450: Pull Windows dependencies from GitHub rather than svn (GH-1783)
Zachary Ware [Fri, 16 Jun 2017 03:08:51 +0000 (22:08 -0500)]
bpo-30450: Pull Windows dependencies from GitHub rather than svn (GH-1783)

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

7 years agobpo-30620: Remove dead lines from textwrap.dedent (GH-2064)
Jonathan Eunice [Fri, 16 Jun 2017 02:19:43 +0000 (22:19 -0400)]
bpo-30620: Remove dead lines from textwrap.dedent (GH-2064)

7 years agobpo-30603: add tests to textwrap.dedent (GH-2206)
Jonathan Eunice [Fri, 16 Jun 2017 02:18:54 +0000 (22:18 -0400)]
bpo-30603: add tests to textwrap.dedent (GH-2206)

* test dedent with declining indent level
* add textwrap.dedent test cases

7 years agobpo-30673: test.bat: add -t option (timeout) (#2211)
Victor Stinner [Thu, 15 Jun 2017 18:19:45 +0000 (20:19 +0200)]
bpo-30673: test.bat: add -t option (timeout) (#2211)

7 years agobpo-30626: Fix error handling in PyImport_Import(). (#2103)
Serhiy Storchaka [Thu, 15 Jun 2017 17:54:38 +0000 (20:54 +0300)]
bpo-30626: Fix error handling in PyImport_Import(). (#2103)

In rare circumstances PyImport_Import() could return NULL without raising
an error.

7 years agobpo-20627: Fix error message when keyword arguments are used (#2115)
Sylvain [Thu, 15 Jun 2017 15:05:23 +0000 (17:05 +0200)]
bpo-20627: Fix error message when keyword arguments are used (#2115)

7 years agobpo-30602: Fix refleak in os.spawnv() (#2212)
Victor Stinner [Thu, 15 Jun 2017 13:30:40 +0000 (15:30 +0200)]
bpo-30602: Fix refleak in os.spawnv() (#2212)

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.

7 years agobpo-28180: Standard stream & FS encoding differ on Mac OS X (GH-2208)
Nick Coghlan [Thu, 15 Jun 2017 09:11:39 +0000 (19:11 +1000)]
bpo-28180: Standard stream & FS encoding differ on Mac OS X (GH-2208)

In the C locale on Mac OS X, the default filesystem encoding
used for operating system interfaces is UTF-8, but the
default encoding used on the standard streams is still ASCII.

Setting the POSIX locale also behaves differently from setting
other locales on Mac OS X, so skip that in the test suite for now.

7 years agobpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164)
Victor Stinner [Wed, 14 Jun 2017 22:54:36 +0000 (00:54 +0200)]
bpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164)

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

7 years agobpo-30284: Fix regrtest for out of tree build (#1481)
Victor Stinner [Wed, 14 Jun 2017 22:44:05 +0000 (00:44 +0200)]
bpo-30284: Fix regrtest for out of tree build (#1481)

Use a build/ directory in the build directory, not in the source
directory, since the source directory may be read-only and must not
be modified.

Fallback on the source directory if the build directory is not
available (missing "abs_builddir" sysconfig variable).

7 years agobpo-30436: Raise ModuleNotFoundError for importlib.util.find_spec() when parent isn...
Milan Oberkirch [Wed, 14 Jun 2017 21:34:50 +0000 (07:34 +1000)]
bpo-30436: Raise ModuleNotFoundError for importlib.util.find_spec() when parent isn't a package (GH-1899)

Previously AttributeError was raised, but that's not very reflective of the fact that the requested module can't be found since the specified parent isn't actually a package.

7 years agobpo-15786: Fix IDLE autocomplete return problem. (#2198)
terryjreedy [Wed, 14 Jun 2017 19:43:15 +0000 (15:43 -0400)]
bpo-15786: Fix IDLE autocomplete return problem. (#2198)

Before, <return> would not, for instance, complete 're.c' to 're.compile' even with 'compile' highlighted.  Now it does.  Before, <return> was inserted into text, which in Shell meant compile() and possibly execute.  Now cursor is left after completion.

7 years agobpo-30231: Remove skipped test_imaplib tests (#1419)
Victor Stinner [Wed, 14 Jun 2017 16:48:32 +0000 (18:48 +0200)]
bpo-30231: Remove skipped test_imaplib tests (#1419)

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.

7 years agobpo-15786: IDLE: Fix mouse clicks on autocompletetion window (#1811)
mlouielu [Wed, 14 Jun 2017 15:13:19 +0000 (23:13 +0800)]
bpo-15786: IDLE: Fix mouse clicks on autocompletetion window (#1811)

The root problem was non-check for hide_event. When user clicks
on autocomplete window (acw), root widget gets focusOut event, then triggers hide_window to
close the acw. It should only be hide when acw is active, and acw didn't
get focus at FocusOut event (this event bind on acw and widget), or when
widget get a ButtonPress event (this event only bind on widget).

MacOS  froze after double click on acw because when
doubleclick_event try to hide window at the end, hide_window function
destory whole acw, but tkinter didn't get focus back to widget. So set focus
on widget first, then destory acw.

Windows could not respond on double click event, because of the misbehavior
of Configure event.  When acw was shown, tkinter called winconfig
event multiple times.  That caused tkinter to not response to double
click event.  When on Windows, unbind Configure event first
time get into winconfig_event to prevent multiple call of this event.

7 years agoFix trivial typo in Readme (GH-2185)
csabella [Wed, 14 Jun 2017 13:32:06 +0000 (09:32 -0400)]
Fix trivial typo in Readme (GH-2185)

Replace platform with platforms.

7 years agobpo-30602: Fix refleak in os.spawnve() (#2184)
Victor Stinner [Wed, 14 Jun 2017 12:26:21 +0000 (14:26 +0200)]
bpo-30602: Fix refleak in os.spawnve() (#2184)

When os.spawnve() fails while handling arguments, free correctly
argvlist: pass lastarg+1 rather than lastarg to free_string_array()
to also free the first item.

7 years agobpo-30649: Revert utime delta in test_os (#2176)
Victor Stinner [Wed, 14 Jun 2017 09:55:17 +0000 (11:55 +0200)]
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.

7 years agobpo-25514: Improve IDLE's connection refused message (#2177)
terryjreedy [Wed, 14 Jun 2017 01:32:16 +0000 (21:32 -0400)]
bpo-25514: Improve IDLE's connection refused message (#2177)

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.