]> granicus.if.org Git - python/log
python
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.

7 years agobpo-30595: Increase test_queue_feeder_donot_stop_onexc() timeout (#2148)
Victor Stinner [Tue, 13 Jun 2017 21:48:47 +0000 (23:48 +0200)]
bpo-30595: Increase test_queue_feeder_donot_stop_onexc() timeout (#2148)

_test_multiprocessing.test_queue_feeder_donot_stop_onexc() now uses a
timeout of 1 second on Queue.get(), instead of 0.1 second, for slow
buildbots.

7 years agobpo-30649: test_os tolerates 50 ms delta for utime (#2156)
Victor Stinner [Tue, 13 Jun 2017 21:48:27 +0000 (23:48 +0200)]
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.

7 years agobpo-30659 : Use ** for kwargs in namedtuple._replace() signature (GH-2173)
Ben Hoyt [Tue, 13 Jun 2017 19:20:51 +0000 (15:20 -0400)]
bpo-30659 : Use ** for kwargs in namedtuple._replace() signature (GH-2173)

7 years agobpo-30603: Add test case to textwrap.dedent (GH-2014)
Jonathan Eunice [Tue, 13 Jun 2017 19:04:10 +0000 (15:04 -0400)]
bpo-30603: Add test case to textwrap.dedent (GH-2014)

7 years agobpo-27922: Stop gui flash from idle_test.test_parenmatch (#2171)
terryjreedy [Tue, 13 Jun 2017 18:40:10 +0000 (14:40 -0400)]
bpo-27922: Stop gui flash from idle_test.test_parenmatch (#2171)

For unknown reasons, this does not work when running leak tests.

7 years agobpo-30656: Fix Python C API Module Objects documentation (GH-2170)
Emily Morehouse [Tue, 13 Jun 2017 17:58:18 +0000 (11:58 -0600)]
bpo-30656: Fix Python C API Module Objects documentation (GH-2170)

`PyModule_New()` now refers to `PyModule_NewObject()`

7 years agobpo-24744: Raises error in pkgutil.walk_packages if path is str (#1926)
Sanyam Khurana [Tue, 13 Jun 2017 17:11:14 +0000 (22:41 +0530)]
bpo-24744: Raises error in pkgutil.walk_packages if path is str (#1926)

bpo-24744: Raise error in pkgutil.walk_packages if path is str

Previously an empty result list was accidentallly returned, since the
code iterated over the string as if it were the expected list of paths,
and of course found nothing.

7 years agobpo-24484: Avoid race condition in multiprocessing cleanup (#2159)
Antoine Pitrou [Tue, 13 Jun 2017 15:10:39 +0000 (17:10 +0200)]
bpo-24484: Avoid race condition in multiprocessing cleanup (#2159)

* 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

7 years agoFix ref leak in idle_test.test_macosx (#2163)
terryjreedy [Tue, 13 Jun 2017 14:52:29 +0000 (10:52 -0400)]
Fix ref leak in idle_test.test_macosx (#2163)

7 years agobpo-30650: Fixed a syntax error: missed right parentheses (#2154)
messi Liao [Tue, 13 Jun 2017 14:30:43 +0000 (22:30 +0800)]
bpo-30650: Fixed a syntax error: missed right parentheses (#2154)

7 years agobpo-28180: assume UTF-8 for Mac OS X PEP 538 tests (GH-2130)
Nick Coghlan [Tue, 13 Jun 2017 12:49:44 +0000 (22:49 +1000)]
bpo-28180: assume UTF-8 for Mac OS X PEP 538 tests (GH-2130)

7 years agobpo-30642: IDLE: Fix test_query refleak (#2147)
mlouielu [Tue, 13 Jun 2017 12:29:44 +0000 (20:29 +0800)]
bpo-30642: IDLE: Fix test_query refleak (#2147)

Patch by Louie Lu.

7 years agobpo-30635: Fix refleak in test_c_locale_coercion (#2126)
Victor Stinner [Tue, 13 Jun 2017 11:32:31 +0000 (13:32 +0200)]
bpo-30635: Fix refleak in test_c_locale_coercion (#2126)

When checking for reference leaks, test_c_locale_coercion is run
multiple times and so _LocaleCoercionTargetsTestCase.setUpClass() is
called multiple times. setUpClass() appends new value at each call,
so it looks like a reference leak.

Moving the setup from setUpClass() to setUpModule() avoids
this, eliminating the false alarm.

7 years agobpo-28180: Fix test_capi.test_forced_io_encoding() (#2155)
Victor Stinner [Tue, 13 Jun 2017 09:49:44 +0000 (11:49 +0200)]
bpo-28180: Fix test_capi.test_forced_io_encoding() (#2155)

Don't run Python in an empty environment, but copy the current
environment and set PYTHONIOENCODING. So the test works also on
Python compiled in shared mode (using libpython).

7 years agoMention how to disable signal fd wakeup (#2140)
Antoine Pitrou [Tue, 13 Jun 2017 08:14:09 +0000 (10:14 +0200)]
Mention how to disable signal fd wakeup (#2140)

7 years agobpo-30643: Fix race condition in signal wakeup in forkserver (followup to PR #1989...
Antoine Pitrou [Tue, 13 Jun 2017 07:46:06 +0000 (09:46 +0200)]
bpo-30643: Fix race condition in signal wakeup in forkserver (followup to PR #1989) (#2139)

* Fix race condition in signal wakeup in forkserver (followup to PR #1989)

There's an admittedly well-known race condition where ECHILD can arrive
just before the C function epoll_wait() and the latter wouldn't therefore
return EINTR.  The solution is to use set_wakeup_fd(), which was designed
to avoid such race conditions.

* Reset wakeup fd in child

7 years agobpo-6519: Improve Python Input Output Tutorial (GH-2143)
Andrew Kuchling [Tue, 13 Jun 2017 05:31:01 +0000 (01:31 -0400)]
bpo-6519: Improve Python Input Output Tutorial (GH-2143)

Move up the discussion about 'with' keyword, so it appears earlier in the document.

7 years agobpo-30636: Fix the indentation for the help (#2131)
Stéphane Wirtel [Tue, 13 Jun 2017 01:31:11 +0000 (03:31 +0200)]
bpo-30636: Fix the indentation for the help (#2131)

7 years agobpo-30177: add NEWS entry (#2135)
Antoine Pietri [Mon, 12 Jun 2017 16:40:13 +0000 (18:40 +0200)]
bpo-30177: add NEWS entry (#2135)

7 years agoFix bpo-30589: improve Process.exitcode with forkserver (#1989)
Antoine Pitrou [Mon, 12 Jun 2017 13:28:19 +0000 (15:28 +0200)]
Fix bpo-30589: improve Process.exitcode with forkserver (#1989)

* Fix bpo-30589: improve Process.exitcode with forkserver

When the child is killed, Process.exitcode should return -signum, not 255.

* Add Misc/NEWS

7 years agobpo-30624 remaining bare except (#2108)
Giampaolo Rodola [Mon, 12 Jun 2017 12:43:40 +0000 (14:43 +0200)]
bpo-30624 remaining bare except (#2108)

bpo-30624 / selectors: use bare 'except' clause instead of 'except
Exception'

7 years agobpo-30636: Add PYTHONCOERCECLOCALE to the help of the command line (GH-2125)
Stéphane Wirtel [Mon, 12 Jun 2017 11:30:33 +0000 (13:30 +0200)]
bpo-30636: Add PYTHONCOERCECLOCALE to the help of the command line (GH-2125)

7 years ago[email] bpo-29478: Fix passing max_line_length=None from Compat32 policy (GH-595)
mircea-cosbuc [Mon, 12 Jun 2017 06:43:41 +0000 (08:43 +0200)]
[email] bpo-29478: Fix passing max_line_length=None from Compat32 policy (GH-595)

If max_line_length=None is specified while using the Compat32 policy,
it is no longer ignored.

7 years agobpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (#2034)
Serhiy Storchaka [Mon, 12 Jun 2017 05:25:04 +0000 (08:25 +0300)]
bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (#2034)

The traceback no longer displayed for SystemExit raised in a callback registered by atexit.

7 years agobpo-30621: Update Input Output Tutorial Example(GH-2074)
suketa [Mon, 12 Jun 2017 01:42:59 +0000 (10:42 +0900)]
bpo-30621: Update Input Output Tutorial Example(GH-2074)

 import json before using json module

7 years agoRevert "bpo-29406: asyncio SSL contexts leak sockets after calling close with certain...
Yury Selivanov [Sun, 11 Jun 2017 14:46:35 +0000 (16:46 +0200)]
Revert "bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (#409)" (#2111)

This reverts commit a608d2d5a7f1aabe9bcbfc220135c5e126189390.

7 years agobpo-30508: Don't log exceptions if Task/Future "cancel()" method called (#2050)
Yury Selivanov [Sun, 11 Jun 2017 13:49:18 +0000 (13:49 +0000)]
bpo-30508: Don't log exceptions if Task/Future "cancel()" method called (#2050)

7 years agobpo-30501: Make the compiler producing optimized code for condition expressions....
Serhiy Storchaka [Sun, 11 Jun 2017 11:50:22 +0000 (14:50 +0300)]
bpo-30501: Make the compiler producing optimized code for condition expressions. (#1851)

7 years agobpo-11822: Improve disassembly to show embedded code objects. (#1844)
Serhiy Storchaka [Sun, 11 Jun 2017 11:09:39 +0000 (14:09 +0300)]
bpo-11822: Improve disassembly to show embedded code objects. (#1844)

The depth argument limits recursion.

7 years agoremove extra word (#2101)
Benjamin Peterson [Sun, 11 Jun 2017 07:24:38 +0000 (00:24 -0700)]
remove extra word (#2101)

7 years agoclarify recv() and send() on SSLObject (#2100)
Benjamin Peterson [Sun, 11 Jun 2017 07:15:14 +0000 (00:15 -0700)]
clarify recv() and send() on SSLObject (#2100)

SSLObject has recv() and send(), but they don't do any network io.

7 years agoShow what's changed when Travis fails regen check (GH-2095)
Zachary Ware [Sun, 11 Jun 2017 04:04:36 +0000 (23:04 -0500)]
Show what's changed when Travis fails regen check (GH-2095)

Also fixed a few more line endings that were missed in GH-840, which were causing failure.

7 years agobpo-28180: Implementation for PEP 538 (#659)
Nick Coghlan [Sun, 11 Jun 2017 03:16:15 +0000 (13:16 +1000)]
bpo-28180: Implementation for PEP 538 (#659)

- new PYTHONCOERCECLOCALE config setting
- coerces legacy C locale to C.UTF-8, C.utf8 or UTF-8 by default
- always uses C.UTF-8 on Android
- uses `surrogateescape` on stdin and stdout in the coercion
  target locales
- configure option to disable locale coercion at build time
- configure option to disable C locale warning at build time

7 years agoUse Travis to make sure all generated files are up to date (GH-2080)
Zachary Ware [Sun, 11 Jun 2017 02:37:40 +0000 (21:37 -0500)]
Use Travis to make sure all generated files are up to date (GH-2080)

7 years agoUpdate idlelib NEWS for 3.7 (#2089)
terryjreedy [Sun, 11 Jun 2017 00:46:08 +0000 (20:46 -0400)]
Update idlelib NEWS for 3.7 (#2089)

7 years agoAdd IDLE NEWS items for 3.7 (#2090)
terryjreedy [Sun, 11 Jun 2017 00:34:38 +0000 (20:34 -0400)]
Add IDLE NEWS items for 3.7 (#2090)

7 years ago#30624 / selectors: use bare except clause in order to not leave the fd in a bad...
Giampaolo Rodola [Sat, 10 Jun 2017 23:51:52 +0000 (01:51 +0200)]
#30624 / selectors: use bare except clause in order to not leave the fd in a bad state in case of error (#2082)

7 years agobpo-27425: Be more explicit in .gitattributes (GH-840)
Zachary Ware [Sat, 10 Jun 2017 19:58:42 +0000 (14:58 -0500)]
bpo-27425: Be more explicit in .gitattributes (GH-840)

Updates checked-in line endings on several files.

7 years agobpo-28556: Updates to typing module (#2076)
Ivan Levkivskyi [Sat, 10 Jun 2017 19:57:56 +0000 (21:57 +0200)]
bpo-28556: Updates to typing module (#2076)

This PR contains two updates to typing module:

- Support ContextManager on all versions (original PR by Jelle Zijlstra).
- Add generic AsyncContextManager.

7 years agobpo-30312: Small correction in datastructures set code sample (GH-2081)
KatherineMichel [Sat, 10 Jun 2017 19:19:09 +0000 (14:19 -0500)]
bpo-30312: Small correction in datastructures set code sample (GH-2081)

7 years agobpo-30599: Fix test_threaded_import reference leak (#2029)
Victor Stinner [Sat, 10 Jun 2017 17:41:24 +0000 (19:41 +0200)]
bpo-30599: Fix test_threaded_import reference leak (#2029)

Mock os.register_at_fork() when importing the random module, since
this function doesn't allow to unregister callbacks and so leaked
memory.

7 years agobpo-30595: Fix multiprocessing.Queue.get(timeout) (#2027)
Victor Stinner [Sat, 10 Jun 2017 11:10:13 +0000 (13:10 +0200)]
bpo-30595: Fix multiprocessing.Queue.get(timeout) (#2027)

multiprocessing.Queue.get() with a timeout now polls its reader in
non-blocking mode if it succeeded to aquire the lock but the acquire
took longer than the timeout.

Co-Authored-By: Grzegorz Grzywacz <grzgrzgrz3@gmail.com>
7 years agoRegenerate Argument Clinic code for bpo-19180. (#2073)
Serhiy Storchaka [Sat, 10 Jun 2017 10:13:51 +0000 (13:13 +0300)]
Regenerate Argument Clinic code for bpo-19180. (#2073)

7 years agobpo-30605: Fix compiling binary regexs with BytesWarnings enabled. (#2016)
Roy Williams [Sat, 10 Jun 2017 05:01:16 +0000 (22:01 -0700)]
bpo-30605: Fix compiling binary regexs with BytesWarnings enabled. (#2016)

Running our unit tests with `-bb` enabled triggered this failure.

7 years agobpo-30600: Fix error messages (condition order in Argument Clinic) (#2051)
Sylvain [Sat, 10 Jun 2017 04:51:48 +0000 (06:51 +0200)]
bpo-30600: Fix error messages (condition order in Argument Clinic) (#2051)

The function '_PyArg_ParseStack()' and
'_PyArg_UnpackStack' were failing (with error
"XXX() takes Y argument (Z given)") before
the function '_PyArg_NoStackKeywords()' was called.
Thus, the latter did not raise its more meaningful
error : "XXX() takes no keyword arguments".

7 years agobpo-25409: Clarify fnmatch and fnmatchcase documentation (GH-1535)
csabella [Sat, 10 Jun 2017 04:42:11 +0000 (00:42 -0400)]
bpo-25409: Clarify fnmatch and fnmatchcase documentation (GH-1535)

Mention that fnmatchcase does not call normcase, and fnmatch does.

7 years agobpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers...
Nikolay Kim [Sat, 10 Jun 2017 04:04:39 +0000 (21:04 -0700)]
bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (#409)

* asyncio SSL contexts leak sockets after calling close with certain servers

* cleanup _shutdown_timeout_handle on _fatal_error

7 years agoFix TypeError is asyncio/proactor_events (#993)
Jim Fasarakis-Hilliard [Sat, 10 Jun 2017 02:56:34 +0000 (05:56 +0300)]
Fix TypeError is asyncio/proactor_events (#993)

7 years agobpo-30417: Disable `cpu` resource on AppVeyor (GH-1951)
Zachary Ware [Sat, 10 Jun 2017 01:20:24 +0000 (20:20 -0500)]
bpo-30417: Disable `cpu` resource on AppVeyor (GH-1951)

7 years agoMake codecov config on master the only config used (GH-2041)
Brett Cannon [Fri, 9 Jun 2017 23:26:03 +0000 (16:26 -0700)]
Make codecov config on master the only config used (GH-2041)

This will allow for centralized management of the Codecov config to prevent skew as well as easier management going forward.

Closes python/core-workflow#81.

7 years agoAdd a NEWS entry for #29870 (PR #981) (#2047)
Yury Selivanov [Fri, 9 Jun 2017 22:38:30 +0000 (18:38 -0400)]
Add a NEWS entry for #29870 (PR #981) (#2047)

7 years agoBreak circular references when closing SSLTransport objects (#981)
Michaël Sghaïer [Fri, 9 Jun 2017 22:29:46 +0000 (18:29 -0400)]
Break circular references when closing SSLTransport objects (#981)

7 years agoClosing transport during handshake process leaks socket (#480)
Nikolay Kim [Fri, 9 Jun 2017 21:46:14 +0000 (14:46 -0700)]
Closing transport during handshake process leaks socket (#480)

7 years agoClarify what --enable-optimizations does (GH-1847)
Brett Cannon [Fri, 9 Jun 2017 20:56:57 +0000 (13:56 -0700)]
Clarify what --enable-optimizations does (GH-1847)

7 years agobpo-27585: Add a NEWS entry for #1031 (#2036)
Yury Selivanov [Fri, 9 Jun 2017 20:34:29 +0000 (16:34 -0400)]
bpo-27585: Add a NEWS entry for #1031 (#2036)

7 years agobpo-30335: Add deprecation alias entry for assertNotRegexpMatches (GH-1536)
Jim Fasarakis-Hilliard [Fri, 9 Jun 2017 20:27:20 +0000 (23:27 +0300)]
bpo-30335: Add deprecation alias entry for assertNotRegexpMatches (GH-1536)

Document that assertNotRegexpMatches is a deprecated alias for assertNotRegex.

7 years agobpo-30014: make poll-like selector's modify() method faster (#1030)
Giampaolo Rodola [Fri, 9 Jun 2017 20:20:41 +0000 (22:20 +0200)]
bpo-30014: make poll-like selector's modify() method faster (#1030)

* #30014: make selectors.DefaultSelector.modify() faster by relying on selector's modify() method instead of un/register()ing the fd

* #30014: add unit test

* speedup poll/epoll/devpoll modify() method by using internal modify() call

* update doc

* address PR comments

* update NEWS entries

* use != instead of 'is not'

7 years agoFix waiter cancellation in asyncio.Lock (#1031)
Mathieu Sornay [Fri, 9 Jun 2017 20:17:40 +0000 (22:17 +0200)]
Fix waiter cancellation in asyncio.Lock (#1031)

Avoid a deadlock when the waiter who is about to take the lock is
cancelled

Issue #27585

7 years agoFix regression in error message introduced in bpo-29951. (#2028)
Serhiy Storchaka [Fri, 9 Jun 2017 16:27:06 +0000 (19:27 +0300)]
Fix regression in error message introduced in bpo-29951. (#2028)

* Fix regression in error message introduced in bpo-29951.

* Add test.

* Make the test more strong.

7 years agobpo-30266: support "= None" pattern in AbstractContextManager (#1448)
Jelle Zijlstra [Fri, 9 Jun 2017 15:21:47 +0000 (08:21 -0700)]
bpo-30266: support "= None" pattern in AbstractContextManager (#1448)

contextlib.AbstractContextManager now supports anti-registration
by setting __enter__ = None or __exit__ = None, following the pattern
introduced in bpo-25958.

7 years agobpo-30524: Write unit tests for FASTCALL (#2022)
Victor Stinner [Fri, 9 Jun 2017 14:48:45 +0000 (16:48 +0200)]
bpo-30524: Write unit tests for FASTCALL (#2022)

Test C functions:

* _PyObject_FastCall()
* _PyObject_FastCallDict()
* _PyObject_FastCallKeywords()

7 years agobpo-30217: Add the operators ~ and | to the index (#1502)
Marco Buttu [Fri, 9 Jun 2017 14:28:28 +0000 (16:28 +0200)]
bpo-30217: Add the operators ~ and | to the index (#1502)

7 years agobpo-19180: Updated references for RFC 1750, RFC 3280 & RFC 4366 (GH-148)
Chandan Kumar [Fri, 9 Jun 2017 09:43:58 +0000 (15:13 +0530)]
bpo-19180: Updated references for RFC 1750, RFC 3280 & RFC 4366 (GH-148)

* RFC 1750 has been been obsoleted by RFC 4086.
* RFC 3280 has been obsoleted by RFC 5280.
* RFC 4366 has been obsoleted by RFC 6066.

7 years agoAdd a test for bad IDNA in ssl server_hostname (#1997)
Nathaniel J. Smith [Fri, 9 Jun 2017 09:35:16 +0000 (02:35 -0700)]
Add a test for bad IDNA in ssl server_hostname (#1997)

See discussion:
  https://github.com/python/cpython/pull/1992#issuecomment-307024778

7 years agobpo-30540: regrtest: add --matchfile option (#1909)
Victor Stinner [Fri, 9 Jun 2017 08:18:48 +0000 (10:18 +0200)]
bpo-30540: regrtest: add --matchfile option (#1909)

* Add a new option taking a filename to get a list of test names to
  filter tests.
* support.match_tests becomes a list.
* Modify run_unittest() to accept to match the whole test identifier,
  not just a part of a test identifier.

For example, the following command only runs test_default_timeout()
of the BarrierTests class of test_threading:

$ ./python -m test -v test_threading -m test.test_threading.BarrierTests.test_default_timeout

Remove also some empty lines from test_regrtest.py to make flake8
tool happy.

7 years agobpo-24755: Document asyncio.wrap_future (GH-603)
adisbladis [Fri, 9 Jun 2017 06:28:59 +0000 (14:28 +0800)]
bpo-24755: Document asyncio.wrap_future (GH-603)