[issue21519] IDLE : Bug in keybinding validity check

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 93b88e995373c48713c9f7d4b32fe1d0166709e5 by terryjreedy in branch 
'3.6':
[3.6] bpo-21519: IDLE basic custom key entry better detects duplicates. 
(GH-2428) (#2433)
https://github.com/python/cpython/commit/93b88e995373c48713c9f7d4b32fe1d0166709e5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29910] Ctrl-D eats a character on IDLE

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thanks for the fix.  I am now comfortable enough with the new workflow to begin 
making a dent in the 100+ patch backlog waiting for review.

--
resolution:  -> fixed
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29910] Ctrl-D eats a character on IDLE

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 8bdc3bd3d66fefdc07d32bd19c41c6f902f16111 by terryjreedy in branch 
'3.6':
[3.6] bpo-29910: IDLE no longer deletes a character after commenting out a 
region (GH-825) (#2429)
https://github.com/python/cpython/commit/8bdc3bd3d66fefdc07d32bd19c41c6f902f16111


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

Well, this issue is not about discovering all test methods, but just to not
fail with an error on: ./python -m test --list-cases

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30754] textwrap.dedent mishandles empty lines

2017-06-26 Thread Julian Berman

Julian Berman added the comment:

@Terry IMHO it conflicts with the fundamental description of the function.

> Remove any common leading whitespace from every line in text.

If this behavior is intentional, textwrap.dedent does not do that, it does 
that, but also some other stuff.

As for whether it *should* do that, I can't really see how it'd be a good idea 
to do this -- whether indented blank lines are like trailing whitespace or not 
is a good reason not to *add* them, but if you've got some already, 
textwrap.dedent isn't responsible for them, they were there already.

It is also extremely hard to get the other behavior given a function that does 
this one, but trivial to do the reverse.

Also, the #1 reason to use textwrap.dedent (and also the very next line of the 
docstring after the one I quoted) is to line up sections of source code. With 
this behavior, that usecase goes away any time you need trailing whitespace, 
which is exactly how I found this behavior, by unittesting a function that was 
returning:

textwrap.dedent(
"""
foo '
bar
baz


quux
 '
""",
)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21519] IDLE : Bug in keybinding validity check

2017-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2481

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30763] There is functionality bug in linecache library.

2017-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I concur with Emily and Guido. This is not a bug. Maybe this should be 
documented more explicitly if "cache" in the name is not enough, I don't know. 
I have no any special relation to the linecache module, maybe just once fixed a 
bug or two.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21519] IDLE : Bug in keybinding validity check

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 44913e584bcf4e2a0e1a6372c304c2d5ea521fc6 by terryjreedy in branch 
'master':
bpo-21519: IDLE basic custom key entry better detects duplicates. (#2428)
https://github.com/python/cpython/commit/44913e584bcf4e2a0e1a6372c304c2d5ea521fc6


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19479] textwrap.dedent doesn't work properly with strings containing CRLF

2017-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm not sure that textwrap.dedent() should support the CRLF line separator. 
Usually the conversion between different line separators (CRLF, CR, LF) used in 
in external files and LF used internally is done at I/O level.

In any case this looks to me like rather a new feature than a bug fix.

--
nosy: +ncoghlan, pitrou, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29910] Ctrl-D eats a character on IDLE

2017-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2480

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30784] IDLE: separate editor window and text

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Absolutely essential, as I recentlly mentioned recently on another issue: text 
window and text frame containing scrolled wrapped text, status bar, and left 
side bar.  Also essential is a proper base class that has functions common to 
Editor, Shell, and Output, but not functions unique to any.  The current 
hierarchy is upside down.

How much of this does the patch for #9262, Tabbed shell and edit windows, do?  
Does it merely replace wrapped Text with Notebook within an unwieldly 
mega-class?  Or something more?  Review welcome (perhaps without immediate 
conversion to a PR).

--
title: IDLE: seperate editor window and text -> IDLE: separate editor window 
and text

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30754] textwrap.dedent mishandles empty lines

2017-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think the current behavior is useful, but undocumented. Otherwise a blank 
line starting with unmatched whitespaces (e.g. "  foo\n\t\n  bar") would block 
deindenting.

This also matches the behavior of Python parser which ignores all whitespaces 
in blank lines.

>>> exec('if 1:\n\tpass\n  pass\n') 
>>> 
>>> 
Traceback (most recent call last):  


  File "", line 1, in


  File "", line 3   


pass


   ^


IndentationError: unindent does not match any outer indentation level   


>>> exec('if 1:\n\t\n  pass\n') 
>>> 
>>> 
>>> 

Added Antoine and Nick as yet two experts of the textwrap module.

--
nosy: +ncoghlan, pitrou, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19479] textwrap.dedent doesn't work properly with strings containing CRLF

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Emily, do you have any opinion on the issue?  The complaint seems plausible, 
but I have not looked at the docs, nor the code to understand the import of '[^ 
\t\n]' (re for 'anything but space, tab, newline') matches '\r'.

Alexis, you must sign the PSF contributor license agreement,
https://www.python.org/psf/contrib/
before we can use your patch.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30769] [EASY (C)] test_execve_invalid_env() of test_os leaks references

2017-06-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage: commit review -> backport needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30769] [EASY (C)] test_execve_invalid_env() of test_os leaks references

2017-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 2d348f7a723db839aa18ce8213b8663ccb0a3d35 by Serhiy Storchaka 
(Emily Morehouse) in branch '3.6':
[3.6] bpo-30769: Fix reference leak introduced in 77703942c59 (GH-2416) (#2425)
https://github.com/python/cpython/commit/2d348f7a723db839aa18ce8213b8663ccb0a3d35


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30769] [EASY (C)] test_execve_invalid_env() of test_os leaks references

2017-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The code in 3.5 differs from the code in master and 3.6, but it contains the 
same bug.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30763] There is functionality bug in linecache library.

2017-06-26 Thread Guido van Rossum

Guido van Rossum added the comment:

You nailed it, Emily! This is not a bug (though the docs could be a bit more 
upfront about this -- just having "cache" in the name doesn't cut it these days 
:-).

If either Serhiy or Raymond agrees they can close the issue (we won't wait for 
the third vote). If we don't hear from them within a reasonable time we can 
also close the issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser

2017-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have doubts that only 2 tests need to be modified. Making tests discoverable 
in Python 3 was a long work made by many developers in many issues, and it 
still is not finished. Some of changes were not trivial and needed rewriting 
the architecture of the tests.

Yet one option is forgot about 2.7.

--
nosy: +serhiy.storchaka, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30754] textwrap.dedent mishandles empty lines

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This is related to #19479 at least in the sense of addressing the same module, 
and being about   It has a patch, so it would be good to accept or reject. 
Martin, could you take a look?  There is currently no expert listed for 
textwrap.  Georg is current dormant as far as cpython is concerned.

To call the current behavior a bug, it should conflict with somethings in the 
docs.  Otherwise, it may be an enhancement proposal, in which case python-ideas 
would be a good place to discuss.  Julian, look in the docs to see if you find 
a conflict.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21519] IDLE : Bug in keybinding validity check

2017-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2479

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29910] Ctrl-D eats a character on IDLE

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 213ce12adfc9281c6f381bb45d132e9de8ffd450 by terryjreedy (Serhiy 
Storchaka) in branch 'master':
bpo-29910: IDLE no longer deletes a character after commenting out a region 
(#825)
https://github.com/python/cpython/commit/213ce12adfc9281c6f381bb45d132e9de8ffd450


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30783] Spawned subprocesses don't respect environment

2017-06-26 Thread Eryk Sun

Eryk Sun added the comment:

cmd.exe implements its own search, like shutil.which, and uses the 
CreateProcess lpApplicationName parameter that corresponds to the Popen 
executable parameter. But in general (not always) it's better to use 
shutil.which because you don't have to worry about the security problems that 
come with using the shell.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30783] Spawned subprocesses don't respect environment

2017-06-26 Thread Ofek Lev

Ofek Lev added the comment:

Fixed with shell=True

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30784] IDLE: seperate editor window and text

2017-06-26 Thread Louie Lu

New submission from Louie Lu:

Currently, IDLE EditorWindow was mixed with the GUI skeleton and text area, and 
the other plugin such as hyperparser was operate on editwin. Such a design let 
IDLE is difficult to changed its GUI design, from new window to new tab style.

If we seperate EditorWindow and the text zone, it will make more easy to port 
to ttk.Notebook. How do you think about this, terry?

--
assignee: terry.reedy
components: IDLE
messages: 296992
nosy: louielu, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: seperate editor window and text
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24813] Redesign Help => About IDLE, make it non-modal

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This completes 1,3,and 4.  Pause for now as I would like to try my 
re-arrangement next, before worrying about modality.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24813] Redesign Help => About IDLE, make it non-modal

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 8047f02a4b0db81cb023df1f5ce4cc1c42d17821 by terryjreedy in branch 
'3.6':
[3.6] bpo-24813: IDLE: Add build bitness to About Idle title (GH-2380) (#2426)
https://github.com/python/cpython/commit/8047f02a4b0db81cb023df1f5ce4cc1c42d17821


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30783] Spawned subprocesses don't respect environment

2017-06-26 Thread Eryk Sun

Eryk Sun added the comment:

subprocess.Popen calls CreateProcess on Windows, which searches for an 
unqualified executable in the command line as follows:

1. The directory from which the application loaded.
2. The current directory for the parent process. (Starting with
   Vista, the current directory is excluded from this search if
   the environment variable NoDefaultCurrentDirectoryInExePath is
   defined.)
3. The 32-bit Windows system directory. Use the GetSystemDirectory
   function to get the path of this directory.
4. The 16-bit Windows system directory. There is no function that
   obtains the path of this directory, but it is searched. The
   name of this directory is System.
5. The Windows directory. Use the GetWindowsDirectory function to
   get the path of this directory.
6. The directories that are listed in the PATH environment
   variable.

Thus searching for "python" will always find "python.exe" from the application 
directory. 

To work around this, you can use shutil.which() to find python.exe on PATH and 
pass it as the `executable` argument. For example:

os.environ['PATH'] = ';'.join([r'C:\Program Files\Python35', old_path])
python35 = shutil.which('python')

>>> print(python35)
C:\Program Files\Python35\python.EXE

>>> _ = subprocess.call('python -V')
Python 3.6.1

>>> _ = subprocess.call('python -V', executable=python35)
Python 3.5.2

--
nosy: +eryksun
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser

2017-06-26 Thread Emily Morehouse

Changes by Emily Morehouse :


--
nosy: +emilyemorehouse

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30763] There is functionality bug in linecache library.

2017-06-26 Thread Emily Morehouse

Emily Morehouse added the comment:

This is the expected functionality of linecache. As each file is read, it is 
stored in a cache, subsequent calls using linecache do not check to see if the 
file has changed.

If you know that the file has changed, you should call linecache.checkcache() 
to check all files or linecache.checkcache(filename) to check a specific file. 
(https://docs.python.org/2/library/linecache.html#linecache.checkcache)


[Since no one is listed in the Experts Index, I've included some other 
contributors to linecache who can assist in closing out this issue]

--
components: +Library (Lib) -2to3 (2.x to 3.x conversion tool)
nosy: +emilyemorehouse, gvanrossum, rhettinger, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24813] Redesign Help => About IDLE, make it non-modal

2017-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2478

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24813] Redesign Help => About IDLE, make it non-modal

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 9a02ae3d3d645f0c8178f3362694f473bab6fe3e by terryjreedy 
(csabella) in branch 'master':
bpo-24813: IDLE: Add build bitness to About Idle title (#2380)
https://github.com/python/cpython/commit/9a02ae3d3d645f0c8178f3362694f473bab6fe3e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30783] Spawned subprocesses don't respect environment

2017-06-26 Thread Ofek Lev

New submission from Ofek Lev:

The following example shows that we are indeed changing PATH, but the 
subprocess does not acknowledge it in Windows 7 x64. Also note this works in 
Linux (Ubuntu 16.04).

-

import os
import subprocess
from contextlib import contextmanager
from tempfile import TemporaryDirectory


def get_python_path():
return subprocess.check_output(
['python', '-c', 'import sys;print(sys.executable)']
).decode().strip()


@contextmanager
def temp_chdir(cwd=None):
with TemporaryDirectory() as d:
origin = cwd or os.getcwd()
os.chdir(d)

try:
yield d
finally:
os.chdir(origin)


def create_venv(d, pypath=None):
command = ['virtualenv', d]
if pypath:
command.extend(['-p', pypath])
subprocess.call(command)


@contextmanager
def venv(d):
if os.path.exists(os.path.join(d, 'bin')):  # no cov
venv_exe_dir = os.path.join(d, 'bin')
elif os.path.exists(os.path.join(d, 'Scripts')):
venv_exe_dir = os.path.join(d, 'Scripts')
else:
raise OSError('Unable to locate executables directory.')

old_path = os.environ['PATH']
os.environ['PATH'] = '{}{}{}'.format(venv_exe_dir, os.pathsep, old_path)
yield
os.environ['PATH'] = old_path


def test_venv():
with temp_chdir() as d:
d = os.path.join(d, 'test_env')
create_venv(d)
global_python = get_python_path()
print('PATH', os.environ['PATH'][:140])

with venv(d):
print('PATH', os.environ['PATH'][:140])
venv_python = get_python_path()

assert global_python != venv_python
assert global_python == get_python_path()

--
components: Windows
messages: 296986
nosy: Ofekmeister, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Spawned subprocesses don't respect environment
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30769] [EASY (C)] test_execve_invalid_env() of test_os leaks references

2017-06-26 Thread Emily Morehouse

Changes by Emily Morehouse :


--
pull_requests: +2477

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30769] [EASY (C)] test_execve_invalid_env() of test_os leaks references

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a7874c73c0c729bbec2fd4b077bd0eec276cfff4 by Victor Stinner (Eric 
N. Vander Weele) in branch 'master':
bpo-30769: Fix reference leak introduced in 77703942c59 (#2416)
https://github.com/python/cpython/commit/a7874c73c0c729bbec2fd4b077bd0eec276cfff4


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30773] async generator receives wrong value when shared between coroutines

2017-06-26 Thread Emily Morehouse

Changes by Emily Morehouse :


--
nosy: +emilyemorehouse

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19479] textwrap.dedent doesn't work properly with strings containing CRLF

2017-06-26 Thread Emily Morehouse

Emily Morehouse added the comment:

@georg.brandl and @terry.reedy, this issue was mentioned again recently 
(http://bugs.python.org/issue30754). 

Would you like to revisit it?

--
nosy: +emilyemorehouse

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30754] textwrap.dedent mishandles empty lines

2017-06-26 Thread Emily Morehouse

Emily Morehouse added the comment:

I concur with Martin, whitespace is not expected to be preserved on 
whitespace-only lines nor even considered when finding common leading 
whitepace. To illustrate this, see the examples below:

The following yields the same (expected) results:

> python2 -c 'from textwrap import dedent; print repr(dedent(" " * 2 + "\n" 
+ " " * 4 + "\t\n"))'
> '\n\n'

And a simplified version of a test case from test_textwrap.py:

> python2 -c 'from textwrap import dedent; print repr(dedent("  Foo\n \n"))'
> 'Foo\n\n'

--
nosy: +emilyemorehouse

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed

2017-06-26 Thread Andy Balaam

Changes by Andy Balaam :


--
pull_requests: +2475

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed

2017-06-26 Thread Andy Balaam

New submission from Andy Balaam:

asyncio.as_completed allows us to provide lots of coroutines (or Futures) to 
schedule, and then deal with the results as soon as they are available, in a 
loop, or a streaming style.

I propose to allow as_completed to work on very large numbers of coroutines, 
provided through a generator (rather than a list).  In order to make this 
practical, we need to limit the number of coroutines that are scheduled 
simultaneously to a reasonable number.

For tasks that open files or sockets, a reasonable number might be 1000 or 
fewer.  For other tasks, a much larger number might be reasonable, but we would 
still like some limit to prevent us running out of memory.

I suggest adding a "limit" argument to as_completed that limits the number of 
coroutines that it schedules simultaneously.

For me, the key advantage of as_completed (in the proposed modified form) is 
that it enables a streaming style that looks quite like synchronous code, but 
is efficient in terms of memory usage (as you'd expect from a streaming style):


#!/usr/bin/env python3

import asyncio
import sys

limit = int(sys.argv[1])

async def double(x):
await asyncio.sleep(1)
return x * 2

async def print_doubles():
coros = (double(x) for x in range(100))
for res in asyncio.as_completed(coros, limit=limit):
r = await res
if r % 10 == 0:
print(r)

loop = asyncio.get_event_loop()
loop.run_until_complete(print_doubles())
loop.close()


Using my prototype implementation, this runs faster and uses much less memory 
on my machine when you run it with a limit of 100K instead of 1 million 
concurrent tasks:

$ /usr/bin/time --format "Memory usage: %MKB\tTime: %e seconds" ./example 
100
Memory usage: 2234552KB Time: 97.52 seconds

$ /usr/bin/time --format "Memory usage: %MKB\tTime: %e seconds" ./example 10
Memory usage: 252732KB  Time: 94.13 seconds

I have been working on an implementation and there is some discussion in my 
blog posts: 
http://www.artificialworlds.net/blog/2017/06/12/making-100-million-requests-with-python-aiohttp/
 and 
http://www.artificialworlds.net/blog/2017/06/27/adding-a-concurrency-limit-to-pythons-asyncio-as_completed/

Possibly the most controversial thing about this proposal is the fact that we 
need to allow passing a generator to as_completed instead of enforcing that it 
be a list.  This is fundamental to allowing the style I outlined above, but 
it's possible that we can do better than the blanket allowing of all generators 
that I did.

--
components: asyncio
messages: 296982
nosy: andybalaam, yselivanov
priority: normal
severity: normal
status: open
title: Allow limiting the number of concurrent tasks in asyncio.as_completed
type: enhancement
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30728] IDLE: Modernize configdialog code.

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 938e73809d10f6073c85ecd330c88a85c6095530 by terryjreedy in branch 
'3.6':
[3.6] bpo-30728: IDLE: Refactor configdialog to PEP8 names (GH-2307) (#2421)
https://github.com/python/cpython/commit/938e73809d10f6073c85ecd330c88a85c6095530


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30728] IDLE: Modernize configdialog code.

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I decided that most other changes should be separate issues that are 
dependencies of this one.

30779 Docstrings and comments
28523 Colour to color
30779 Factor out Changes class
30780 Test GUI - depends on 30779
30781 Switch to ttk - depends on 30780

--
assignee:  -> terry.reedy
components: +IDLE
dependencies: +IDLE: configdialog - add tests for ConfigDialog GUI., IDLE: 
configdialog -- add docstrings and improve comments, IDLE: configdialog -- 
factor out Changes class, IDLE: configdialog -- switch to ttk widgets., 
Idlelib.configdialog: use 'color' insteadof 'colour', test_bsddb3 crash on x86 
Windows XP 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30705] python2.7 -m test -R 3:3 hangs on Refleaks 2.7 buildbots

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

Oh, for test_regrtest which hangs on Windows, I'm quite sure that it comes from 
test_crashed() which opens a popup!

In the master branch, test_crashed() uses faulthandler._sigsegv() which 
disables the Windows popup using SetErrorMode() and _set_abort_behavior().

In Python 2.7, test_crashed() just calls ctypes.string_at(0) which doesn't 
prevent the Windows popup.

My PR https://github.com/python/cpython/pull/2423 implements 
support.SuppressCrashReport on Windows and so will allow to fix this issue!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30758] test_pydoc (regrtest?) hangs on some buildbots

2017-06-26 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
title: test_pydoc (regrtest?) hangs on ARMv7 Ubuntu 3.x -> test_pydoc 
(regrtest?) hangs on some buildbots

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30769] [EASY (C)] test_execve_invalid_env() of test_os leaks references

2017-06-26 Thread Emily Morehouse

Changes by Emily Morehouse :


--
stage:  -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 48b5c422ffb03affb00c184b9a99e5537be92732 by Victor Stinner in 
branch 'master':
bpo-30776: reduce regrtest -R false positives (#2422)
https://github.com/python/cpython/commit/48b5c422ffb03affb00c184b9a99e5537be92732


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

Real-world examples of false positives from the x86 Gentoo Refleaks 2.7 
buildbot:

http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%202.7/builds/32/steps/test/logs/stdio

test_nntplib leaked [0, 85, 0] references, sum=85
test_multiprocessing leaked [0, 0, -35] references, sum=-35

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30675] test_zipfile leaks references on Python 3.5 on the wo Refleaks buildbots (Gentoo, Windows)

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

I tested: "./python -m test -j2 -R 3:3 -m test_random_open test_zipfile" now 
pass on 2.7, 3.5, 3.6 and master branches. So this issue is now fixed.

By the way, bpo-30776 should reduce even further false positive when hunting 
reference leaks.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30673] Add -t option (timeout) to Tools/buildbot/test.bat for "AMD64 Windows8.1 Refleaks 3.x" buildbot

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

I reverted my Tools/buildbot/test.bat change on all branches.

I checked that --timeout is now properly set on the Gentoo Refleaks and Windows 
Refleaks buildbots on 3.5, 3.6 and master branches.

So this issue is now fixed!

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30706] EmailMessage Object Creation

2017-06-26 Thread R. David Murray

R. David Murray added the comment:

Given that there hasn't been any response that would help us improve the docs 
on this, I'm going to close the issue.  I hope you've figured out how to do 
what you want to do!

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30542] test_files() of test_tools.test_unparse.DirectoryTestCase leaks references

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

Example of 3 runs:

test_tools leaked [10, 15, 0] references, sum=25
test_tools leaked [2, 13, 0] references, sum=15
test_tools leaked [180, 0, 0] references, sum=180

The bpo-30776 should fix this issue by ignoring the result, since it's a false 
positive in pratice.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30764] regrtest: Add --fail-env-changed option

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

Oops, I used the wrong bpo number for the test_subprocess fixes: the right bpo 
is bpo-30448!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30448] test_subprocess creates a core dump on FreeBSD

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

Oops, I mentioned the wrong bpo in my PRs: the fix was pushed using bpo-30764 
identifier :-/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30329] poplib and imaplib should catch "OSError: [WinError 10022] An invalid argument was supplied" on shutdown

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

> The bug should now be catched.

Oops, I wanted to write: "should now be fixed", sorry!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30351] [2.7] regrtest hangs on Python 2.7 (test_threading?)

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

The bpo-30727 (test_threading hangs in ConditionTests.test_notify()) has been 
fixed by my commit da6d305b6fcd49ba1224b1fd2131d7648a5be6b9, followed by a 
better made by Serhiy: commit 7709b4d57b433ef027a2e7e63b4cab3fc9ad910d (Serhiy 
applied his fix to all branches).

I hope that this bug (regrtest hangs on Python 2.7) will slowly become less 
likely!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30727] [2.7] test_threading.ConditionTests.test_notify() hangs randomly on Python 2.7

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

Hum, my commit was not reported in the issue:

commit da6d305b6fcd49ba1224b1fd2131d7648a5be6b9
Author: Victor Stinner 
Date:   Thu Jun 22 02:09:40 2017 +0200

bpo-8799: Reduce timing sensitivity of condition test by explicitly (#2320)
delaying the main thread so that it doesn't race ahead of the workers.
(cherry picked from commit 020af2a2bc4708215360a3793b5a1790e15d05dd)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30329] poplib and imaplib should catch "OSError: [WinError 10022] An invalid argument was supplied" on shutdown

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

The bug should now be catched.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30764] regrtest: Add --fail-env-changed option

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

Test failure on x86-64 Sierra 2.7 buildbot:

http://buildbot.python.org/all/builders/x86-64%20Sierra%202.7/builds/111/steps/test/logs/stdio

test_shell_string_with_spaces (test.test_subprocess.CommandsWithSpaces) ... 
test test_subprocess failed -- Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/2.7.billenstein-sierra/build/Lib/test/test_subprocess.py",
 line 1302, in test_child_terminated_in_stopped_state
self.assertLess(returncode, 0)  # signal death, likely SIGSEGV.
AssertionError: 1 not less than 0

skipped 'mswindows only'

==
FAIL: test_child_terminated_in_stopped_state 
(test.test_subprocess.POSIXProcessTestCase)
Test wait() behavior when waitpid returns WIFSTOPPED; issue29335.
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/2.7.billenstein-sierra/build/Lib/test/test_subprocess.py",
 line 1302, in test_child_terminated_in_stopped_state
self.assertLess(returncode, 0)  # signal death, likely SIGSEGV.
AssertionError: 1 not less than 0

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30781] IDLE: configdialog -- switch to ttk widgets.

2017-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
dependencies: +IDLE: configdialog - add tests for ConfigDialog GUI.

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30781] IDLE: configdialog -- switch to ttk widgets.

2017-06-26 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Change imports and see what else needs fixing.
#27755 is one specific ttk switch that could be done before, as part of, or 
after this.

This issue depends on #30780 test GUI

--
assignee: terry.reedy
components: IDLE
messages: 296964
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: configdialog -- switch to ttk widgets.
type: enhancement
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30764] regrtest: Add --fail-env-changed option

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

I tried to implement test.support.SuppressCrashReport on Windows using only 
ctypes for Python 2.7, but I failed: see attached suppress_crash.py. So I 
created https://github.com/python/cpython/pull/2423 which adds new functions 
and constants to the _testcapi module. IMHO it's more reliabe to do that, but 
it adds more C code.

--
Added file: http://bugs.python.org/file46976/suppress_crash.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30777] IDLE: configdialog -- add docstrings and improve comments

2017-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30764] regrtest: Add --fail-env-changed option

2017-06-26 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2474

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30779] IDLE: configdialog -- factor out Changes class

2017-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30750] Update `make patchcheck` to understand Misc/NEWS.d

2017-06-26 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30780] IDLE: configdialog - add tests for ConfigDialog GUI.

2017-06-26 Thread Terry J. Reedy

New submission from Terry J. Reedy:

A complete test of the GUI  will simulate user interaction with every widget 
and then query Changes() to see that the proper changes orders have been 
recorded.

This issue depends on #30779, factor out Changes class.

--
messages: 296963
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: configdialog - add tests for ConfigDialog GUI.
type: enhancement
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30780] IDLE: configdialog - add tests for ConfigDialog GUI.

2017-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE
dependencies: +IDLE: configdialog -- factor out Changes class

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30779] IDLE: configdialog -- factor out Changes class

2017-06-26 Thread Terry J. Reedy

New submission from Terry J. Reedy:

configdialog.ConfigDialog mixes together two things: a user interface for  
changing options and a mechanism for storing proposed changes and applying them 
to the configuration dictionaries managed by config.  The change mechanism is 
based on a 3-level dict that maps user config file, config file section, and 
section entry to a new values.  Most GUI event handlers insert entries into the 
dict.  Cancel clears the dict. Apply and call a method to apply changes (and 
then clear them).

This issue will factor out the changes structure and all methods that touch it 
into a new Changes class.  ConfigDialog needs to be able to call methods to add 
changes, clear changes, apply changes, and maybe something else.  GUI tests 
need to be able to query currently stored changes.

Tests of Changes, which are part of this issue and should be 'complete', will 
accept examples changes from the test functions and send changes to either 
configparser mocks or even the actual configparser structures, but not to disk.

A complete test of the GUI (not part of this issue) will simulate user 
interaction with every widget and then query Changes() to see that the proper 
changes orders have been recorded.

--
messages: 296962
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: configdialog -- factor out Changes class
type: enhancement
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30754] textwrap.dedent mishandles empty lines

2017-06-26 Thread Martin Panter

Martin Panter added the comment:

Some people like to avoid indented blank lines, treating them the same as 
trailing whitespace. I suspect this behaviour may be intentional.

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29335] subprocess module does not check WIFSTOPPED on SIGCHLD

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 2097b9e0ef32ab7a0d745edc0f707c615780c006 by Victor Stinner in 
branch '2.7':
[2.7] bpo-30764: test_subprocess uses SuppressCrashReport (#2405) (#2412)
https://github.com/python/cpython/commit/2097b9e0ef32ab7a0d745edc0f707c615780c006


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29335] subprocess module does not check WIFSTOPPED on SIGCHLD

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 9ad50d94599aed0c37beaf78948ec271c8aa3881 by Victor Stinner in 
branch '3.6':
bpo-30764: test_subprocess uses SuppressCrashReport (#2405) (#2410)
https://github.com/python/cpython/commit/9ad50d94599aed0c37beaf78948ec271c8aa3881


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30764] regrtest: Add --fail-env-changed option

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 2097b9e0ef32ab7a0d745edc0f707c615780c006 by Victor Stinner in 
branch '2.7':
[2.7] bpo-30764: test_subprocess uses SuppressCrashReport (#2405) (#2412)
https://github.com/python/cpython/commit/2097b9e0ef32ab7a0d745edc0f707c615780c006


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30778] test_bsddb3 crash on x86 Windows XP 2.7

2017-06-26 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/x86%20Windows%20XP%202.7/builds/213/steps/test/logs/stdio

Run tests in parallel using 2 child processes
...
0:22:09 [321/404/1] test_bsddb3 crashed -- running: test_io (242 sec)
  test_bsddb3 still working, be patient...
Berkeley DB 4.7.25: (May 15, 2008)
Test path prefix:  c:\docume~1\db3l\locals~1\temp\z-test_bsddb3-2068
...
361 tests OK.
1 test failed:
test_bsddb3
...
Re-running test 'test_bsddb3' in verbose mode
...
testCheckElapsedTime (test.test_bsddb3.TimingCheck) ... ok
test01_get_returns_none (bsddb.test.test_get_none.GetReturnsNoneTestCase) ... ok
test02_get_raises_exception (bsddb.test.test_get_none.GetReturnsNoneTestCase) 
... ok
testCheckElapsedTime (test.test_bsddb3.TimingCheck) ... ok
test01_join (bsddb.test.test_join.JoinTestCase) ... ok
testCheckElapsedTime (test.test_bsddb3.TimingCheck) ... ok
test01_simple (bsddb.test.test_lock.LockingTestCase) ... ok
test02_threaded (bsddb.test.test_lock.LockingTestCase) ... ok
test04_lock_timeout2 (bsddb.test.test_lock.LockingTestCase) ... FAIL
testCheckElapsedTime (test.test_bsddb3.TimingCheck) ... ok
test01_badpointer (bsddb.test.test_misc.MiscTestCase) ... Berkeley DB 4.7.25: 
(May 15, 2008)
Test path prefix:  c:\docume~1\db3l\locals~1\temp\z-test_bsddb3-644
program finished with exit code -1073741819
elapsedTime=2073.50

--
messages: 296956
nosy: haypo
priority: normal
severity: normal
status: open
title: test_bsddb3 crash on x86 Windows XP 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30764] regrtest: Add --fail-env-changed option

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 9ad50d94599aed0c37beaf78948ec271c8aa3881 by Victor Stinner in 
branch '3.6':
bpo-30764: test_subprocess uses SuppressCrashReport (#2405) (#2410)
https://github.com/python/cpython/commit/9ad50d94599aed0c37beaf78948ec271c8aa3881


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30778] test_bsddb3 crash on x86 Windows XP 2.7

2017-06-26 Thread STINNER Victor

Changes by STINNER Victor :


--
components: +Tests, Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
versions: +Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30777] IDLE: configdialog -- add docstrings and improve comments

2017-06-26 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Spinoff from #30728.  Docstrings are a form of comment.  Both leave behavior 
alone and do not require testing, just human review.  Add the docstrings from 
the original version of PR 2307, and any others.  Review and fix comments in 
light of the comments on that PR.

--
messages: 296955
nosy: csabella, louielu, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: configdialog -- add docstrings and improve comments
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30758] test_pydoc (regrtest?) hangs on ARMv7 Ubuntu 3.x

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

Similar issue:

http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/800/steps/test/logs/stdio

...
1:49:04 [403/406/1] test_compile passed -- running: test_subprocess (4969 sec)
1:49:10 [404/406/1] test_strptime passed -- running: test_subprocess (4975 sec)
1:49:14 [405/406/1] test_unicode_file passed -- running: test_subprocess (4980 
sec)

command timed out: 1200 seconds without output running 
['Tools\\buildbot\\test.bat', '-j2', '--timeout', '900'], attempting to kill
program finished with exit code 1
elapsedTime=7768.278000

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

Similar but difference issue.

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.5/builds/215/steps/test/logs/stdio

==
FAIL: test_directory_compiled 
(test.test_multiprocessing_main_handling.SpawnCmdLineTest)
--
Traceback (most recent call last):
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_multiprocessing_main_handling.py",
 line 207, in test_directory_compiled
self._check_script(script_dir)
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_multiprocessing_main_handling.py",
 line 155, in _check_script
rc, out, err = assert_python_ok(*run_args, __isolated=False)
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\support\script_helper.py",
 line 150, in assert_python_ok
return _assert_python(True, *args, **env_vars)
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\support\script_helper.py",
 line 136, in _assert_python
err))
AssertionError: Process return code is 1
command line: 
['C:\\buildbot.python.org\\3.5.kloth-win64\\build\\PCbuild\\amd64\\python_d.exe',
 '-X', 'faulthandler', '-E', 
'C:\\Users\\Buildbot\\AppData\\Local\\Temp\\tmp47s9eead', 'spawn']

stdout:
---

---

stderr:
---
Traceback (most recent call last):

  File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\runpy.py", line 193, 
in _run_module_as_main

"__main__", mod_spec)

  File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\runpy.py", line 85, in 
_run_code

exec(code, run_globals)

  File "C:\Users\Buildbot\AppData\Local\Temp\tmp47s9eead\__main__.py", line 23, 
in 

RuntimeError: Timed out waiting for results
---


Second run:


==
FAIL: test_directory (test.test_multiprocessing_main_handling.SpawnCmdLineTest)
--
Traceback (most recent call last):
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_multiprocessing_main_handling.py",
 line 197, in test_directory
self._check_script(script_dir)
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_multiprocessing_main_handling.py",
 line 155, in _check_script
rc, out, err = assert_python_ok(*run_args, __isolated=False)
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\support\script_helper.py",
 line 150, in assert_python_ok
return _assert_python(True, *args, **env_vars)
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\support\script_helper.py",
 line 136, in _assert_python
err))
AssertionError: Process return code is 1
command line: 
['C:\\buildbot.python.org\\3.5.kloth-win64\\build\\PCbuild\\amd64\\python_d.exe',
 '-X', 'faulthandler', '-E', 
'C:\\Users\\Buildbot\\AppData\\Local\\Temp\\tmp3hfxysdu', 'spawn']

stdout:
---

---

stderr:
---
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\runpy.py", line 193, 
in _run_module_as_main
"__main__", mod_spec)
  File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\runpy.py", line 85, in 
_run_code
exec(code, run_globals)
  File "C:\Users\Buildbot\AppData\Local\Temp\tmp3hfxysdu\__main__.py", line 23, 
in 
raise RuntimeError("Timed out waiting for results")
RuntimeError: Timed out waiting for results
---

==
FAIL: test_directory_compiled 
(test.test_multiprocessing_main_handling.SpawnCmdLineTest)
--
Traceback (most recent call last):
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_multiprocessing_main_handling.py",
 line 207, in test_directory_compiled
self._check_script(script_dir)
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_multiprocessing_main_handling.py",
 line 155, in _check_script
rc, out, err = assert_python_ok(*run_args, __isolated=False)
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\support\script_helper.py",
 line 150, in assert_python_ok
return _assert_python(True, *args, **env_vars)
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\support\script_helper.py",
 line 136, in _assert_python
err))
AssertionError: Process return code is 1
command line: 
['C:\\buildbot.python.org\\3.5.kloth-win64\\build\\PCbuild\\amd64\\python_d.exe',
 '-X', 'faulthandler', '-E', 
'C:\\Users\\Buildbot\\AppData\\Local\\Temp\\tmpvez1m7b1', 'spawn']

stdout:
---

---

stderr:
---
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\runpy.py", line 193, 
in _run_module_as_main
"__main__", mod_spec)
  File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\runpy.py", line 85, in 
_run_code
exec(code, run_globals)
  File 

[issue30703] Non-reentrant signal handler (test_multiprocessing_forkserver hangs)

2017-06-26 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
pull_requests: +2473

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

I had to write this change to be able to bisect bpo-30775 reference leak. 
Without this change, my bisection tool picked the wrong tests and failed to 
find the tests which leaked. For example, it took a subtest of tests which was 
considered as leaking because the reference differences was [3, 0, 0]. This 
pattern more looks like a late initialization than a real leak. In the case of 
the bpo-30775, a leak was closer to [222, 222, 225]: much more references than 
just 3 :-) Many leaks for all runs :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2017-06-26 Thread Stefan Behnel

Stefan Behnel added the comment:

Sorry for not responding, missed the message, it seems.

Cython has to support old-style relative imports also in Py3 because that's how 
the user code was originally written, using Py2-style syntax and semantics. 
Most Cython code has not been converted to Py3 syntax/semantics, but still 
needs to work in Py3.

>From a user perspective, it's best to switch on "__future__.absolute_import" 
>and use explicit relative imports (or write Py3 code), because it reduces the 
>overhead at import time.

I'm hoping to look into multi-step module initialisation this summer. As Nick 
noted, this might also help with this issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks

2017-06-26 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2472

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30728] IDLE: Modernize configdialog code.

2017-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2471

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks

2017-06-26 Thread STINNER Victor

New submission from STINNER Victor:

Currently, regrtest considers that a test file leaks if at least one run 
increased or decreased the global reference counter. The problem is that in 
practice, Python is full of singletons, caches, and other jokes of the garbage 
collector, etc.

To reduce false alarms and focus more on real bugs, I suggest to change the 
reference difference checker from:

 def check_rc_deltas(deltas):
return any(deltas)

to:

 def check_rc_deltas(deltas):
return all(delta>=1 for delta in deltas)

It would allow to ignore false positives like:

* [3, 0, 0]
* [0, 1, 0]
* [8, -8, 1]

--
components: Tests
messages: 296950
nosy: haypo
priority: normal
severity: normal
status: open
title: regrtest: change -R/--huntrleaks rule to decide if a test leaks
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30728] IDLE: Modernize configdialog code.

2017-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset bac7d3363b099d0cdef3e541f8581859edfddc85 by terryjreedy 
(csabella) in branch 'master':
bpo-30728: IDLE: Refactor configdialog to PEP8 names (#2307)
https://github.com/python/cpython/commit/bac7d3363b099d0cdef3e541f8581859edfddc85


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30532] email.policy.SMTP.fold() mangles long headers

2017-06-26 Thread R. David Murray

Changes by R. David Murray :


--
stage:  -> backport needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30532] email.policy.SMTP.fold() mangles long headers

2017-06-26 Thread R. David Murray

R. David Murray added the comment:


New changeset b350c22ebcbb891412e0b334afc9f0db19534e06 by R. David Murray (Joel 
Hillacre) in branch 'master':
bpo-30532: Fix whitespace folding in certain cases
https://github.com/python/cpython/commit/b350c22ebcbb891412e0b334afc9f0db19534e06


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2017-06-26 Thread Patrick Grafe

Patrick Grafe added the comment:

Is this ready to get backported to Python 3.5 and 3.6?  I see the tags on the 
issue, but I'm not clear on the process for actually backporting patches.

--
nosy: +Patrick Grafe

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30775] test_multiprocessing_forkserver leaks references on Python 3

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

> Is it test_finalize or test_barrier?

Try yourself: it only leaks when you run both :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30775] test_multiprocessing_forkserver leaks references on Python 3

2017-06-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Is it test_finalize or test_barrier?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30775] test_multiprocessing_forkserver leaks references on Python 3

2017-06-26 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +davin, pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30775] test_multiprocessing_forkserver leaks references on Python 3

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

The first message was on Python 3.6. On master, regrtest sees even more kinds 
of leaks: references, memory blocks and file descriptors.

haypo@selma$ ./python -m test 
--match=test.test_multiprocessing_forkserver.WithProcessesTestBarrier.test_barrier
 
--match=test.test_multiprocessing_forkserver.WithProcessesTestFinalize.test_finalize
 -R 3:3 test_multiprocessing_forkserver 
Run tests sequentially
0:00:00 load avg: 0.25 [1/1] test_multiprocessing_forkserver
beginning 6 repetitions
123456
..
test_multiprocessing_forkserver leaked [492, 492, 492] references, sum=1476
test_multiprocessing_forkserver leaked [221, 222, 225] memory blocks, sum=668
test_multiprocessing_forkserver leaked [4, 4, 4] file descriptors, sum=12
test_multiprocessing_forkserver failed

1 test failed:
test_multiprocessing_forkserver

Total duration: 5 sec
Tests result: FAILURE

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30775] test_multiprocessing_forkserver leaks references on Python 3

2017-06-26 Thread STINNER Victor

STINNER Victor added the comment:

test_multiprocessing_spawn doesn't leak:

haypo@selma$ ./python -m test 
--match=test.test_multiprocessing_spawn.WithProcessesTestBarrier.test_barrier 
--match=test.test_multiprocessing_spawn.WithProcessesTestFinalize.test_finalize 
-R 3:3 test_multiprocessing_spawn
Run tests sequentially
0:00:00 load avg: 0.11 [1/1] test_multiprocessing_spawn
beginning 6 repetitions
123456
..
1 test OK.

Total duration: 10 sec
Tests result: SUCCESS

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30775] test_multiprocessing_forkserver leaks references on Python 3

2017-06-26 Thread STINNER Victor

Changes by STINNER Victor :


--
title: [3.6] test_multiprocessing_forkserver leaks references on Python 3.6 -> 
test_multiprocessing_forkserver leaks references on Python 3
versions: +Python 3.5, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30775] [3.6] test_multiprocessing_forkserver leaks references on Python 3.6

2017-06-26 Thread STINNER Victor

New submission from STINNER Victor:

$ ./python -m test 
--match=test.test_multiprocessing_forkserver.WithProcessesTestBarrier.test_barrier
 
--match=test.test_multiprocessing_forkserver.WithProcessesTestFinalize.test_finalize
 -R 3:3 test_multiprocessing_forkserver 

test_multiprocessing_forkserver leaked [222, 222, 225] memory blocks, sum=669
test_multiprocessing_forkserver failed

Total duration: 5 sec
Tests result: FAILURE

--
components: Tests
messages: 296942
nosy: haypo
priority: normal
severity: normal
status: open
title: [3.6] test_multiprocessing_forkserver leaks references on Python 3.6
type: resource usage
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30765] PyThread_acquire_lock can block even when asked not ot

2017-06-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Travis-CI and the 3.x buildbots seem fine.

--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30765] PyThread_acquire_lock can block even when asked not ot

2017-06-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset 828488393ca79f2ceb0acc2d7c30fb68baad85f8 by Antoine Pitrou in 
branch '2.7':
[2.7] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to 
(GH-2403) (#2420)
https://github.com/python/cpython/commit/828488393ca79f2ceb0acc2d7c30fb68baad85f8


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20703] RuntimeError caused by lazy imports in pdb

2017-06-26 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30765] PyThread_acquire_lock can block even when asked not ot

2017-06-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset 85b34edd8b575b918490afbcb0db6f791874dbdd by Antoine Pitrou in 
branch '3.5':
[3.5] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to 
(GH-2403) (#2419)
https://github.com/python/cpython/commit/85b34edd8b575b918490afbcb0db6f791874dbdd


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30774] list_repr not safe against concurrent mutation

2017-06-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Attaching reproducer script.  I don't know if that is worth fixing.

--
Added file: http://bugs.python.org/file46975/siglist.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30765] PyThread_acquire_lock can block even when asked not ot

2017-06-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset 55ab604e3fdb91baabe98d1c407b5910eeb31cef by Antoine Pitrou in 
branch '3.6':
[3.6] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to 
(GH-2403) (#2418)
https://github.com/python/cpython/commit/55ab604e3fdb91baabe98d1c407b5910eeb31cef


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   >