[issue21862] cProfile command-line should accept "-m module_name" as an alternative to script path

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le 07/11/2017 à 08:48, Nick Coghlan a écrit :
> 
> So from a runpy perspective, this approach gets a +1 from me, but I'd prefer 
> if there was someone more familiar with the cProfile module that was willing 
> to handle the merge.

Thanks Nick.  Can you confirm the runpy invocation in the PR is sane?

--

___
Python tracker 

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



[issue31950] Default event loop policy doc lacks precision

2017-11-07 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
keywords: +patch
pull_requests: +4269
stage:  -> patch review

___
Python tracker 

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



[issue31954] Don't prevent dict optimization by coupling with OrderedDict

2017-11-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for your microbenchmark Inada. The difference is small, but repeating 
it with different modifications almost always show small speedup.

The only problem is that this change increases the size of dict object by one 
word (up to 3% for small dicts).

I don't know what is better place for this flag, the dict object itself or the 
dict keys object.

--

___
Python tracker 

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



[issue31954] Don't prevent dict optimization by coupling with OrderedDict

2017-11-07 Thread INADA Naoki

INADA Naoki  added the comment:

I don't know why dk_lookup is in dictkeys object.  But I think
it's because sharing 1 word from all key-sharing dict.
So ma_clean flag can be in dictkeys object for same reason.

BTW, We use dk_lookup function pointer and it tooks 1 word.
But PyPy use flags for it.  So they can pack other informations into same word.

static dict_lookup_func lookup_funcs = {lookdict_unicode_nodummy, 
lookdict_unicode, lookdict_split, lookdict};
...
unsigned int ma_clean:1;
unsigned int ma_lookup_func:2; // lookup_funcs[ma_lookup_func]
...

In this way, we can have more flags for future optimization.
(e.g. "all keys are interned string and comparing pointer is enough for 
searching interned key" flag).

--

___
Python tracker 

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



[issue31950] Default event loop policy doc lacks precision

2017-11-07 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4270

___
Python tracker 

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



[issue31950] Default event loop policy doc lacks precision

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 4135c89395726024abddb7340a0c7a42c801f616 by Antoine Pitrou in 
branch 'master':
bpo-31950: Improve event loop policy doc (#4306)
https://github.com/python/cpython/commit/4135c89395726024abddb7340a0c7a42c801f616


--

___
Python tracker 

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



[issue31950] Default event loop policy doc lacks precision

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thank you Guido.  This is fixed now.

--
resolution:  -> fixed
stage: patch review -> 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



[issue31950] Default event loop policy doc lacks precision

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset e65617f65e203a2a6d3e3100d0d6fed0ffa0613d by Antoine Pitrou (Miss 
Islington (bot)) in branch '3.6':
bpo-31950: Improve event loop policy doc (GH-4306) (#4307)
https://github.com/python/cpython/commit/e65617f65e203a2a6d3e3100d0d6fed0ffa0613d


--

___
Python tracker 

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



[issue31966] print('hello\n', end='', flush=True) raises OSError when ran with py -u

2017-11-07 Thread Guillaume Aldebert

New submission from Guillaume Aldebert :

noticed on windows10, 3.6.3-64 and 3.7.0a2-64:

using this test.py file:

#!/usr/bin/env python3
print('hello\n', end='', flush=True)

and running it in unbuffered mode:

C:\Dev>py -u test.py
hello
Traceback (most recent call last):
  File "test.py", line 2, in 
print('hello\n', end='', flush=True)
OSError: [WinError 87] The parameter is incorrect

Note that (still using py -u):

print('hello', end='', flush=True) # works fine
print('', end='', flush=True) # raises OSError as well

--
components: Windows
messages: 305726
nosy: Guillaume Aldebert, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: print('hello\n', end='', flush=True) raises OSError when ran with py -u
type: behavior
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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Guido, Yury, what is your take on this?  Do you think it would be fine for 
Future._schedule_callbacks() to check the event loop is the current one, or do 
you think it would impact performance too much (or perhaps it is simply not 
desirable)?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue31967] [Windows] test_distutils: fatal error LNK1158: cannot run 'rc.exe'

2017-11-07 Thread STINNER Victor

New submission from STINNER Victor :

test_distutils failed on AMD64 Windows10 3.x buildbot:

http://buildbot.python.org/all/#/builders/3/builds/128

0:19:07 [165/407/1] test_distutils failed -- running: 
test_multiprocessing_spawn (377 sec)
xxmodule.c
xxmodule.obj : warning LNK4197: export 'PyInit_xx' specified multiple times; 
using first specification
   Creating library 
d:\temp\tmp4zg7rpix\Debug\temp\tmp4zg7rpix\xx_d.cp37-win_amd64.lib and object 
d:\temp\tmp4zg7rpix\Debug\temp\tmp4zg7rpix\xx_d.cp37-win_amd64.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the 
link command line to improve linker performance
LINK : fatal error LNK1158: cannot run 'rc.exe'
foo.c
   Creating library 
d:\temp\tmpy79shh6o\tempt\temp\tmpl63x182t\foo_d.cp37-win_amd64.lib and object 
d:\temp\tmpy79shh6o\tempt\temp\tmpl63x182t\foo_d.cp37-win_amd64.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the 
link command line to improve linker performance
LINK : fatal error LNK1158: cannot run 'rc.exe'
xxmodule.c
xxmodule.obj : warning LNK4197: export 'PyInit_xx' specified multiple times; 
using first specification
   Creating library 
d:\temp\tmpkb4gpfw9\Debug\temp\tmpkb4gpfw9\xx_d.cp37-win_amd64.lib and object 
d:\temp\tmpkb4gpfw9\Debug\temp\tmpkb4gpfw9\xx_d.cp37-win_amd64.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the 
link command line to improve linker performance
LINK : fatal error LNK1158: cannot run 'rc.exe'
foo.c
   Creating library 
d:\temp\tmppmjpg5zh\tempt\temp\tmpi1x5uxdd\foo_d.cp37-win_amd64.lib and object 
d:\temp\tmppmjpg5zh\tempt\temp\tmpi1x5uxdd\foo_d.cp37-win_amd64.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the 
link command line to improve linker performance
LINK : fatal error LNK1158: cannot run 'rc.exe'
xxmodule.c
xxmodule.obj : warning LNK4197: export 'PyInit_xx' specified multiple times; 
using first specification
   Creating library 
build\temp.win-amd64-3.7-pydebug\Debug\xx_d.cp37-win_amd64.lib and object 
build\temp.win-amd64-3.7-pydebug\Debug\xx_d.cp37-win_amd64.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the 
link command line to improve linker performance
LINK : fatal error LNK1158: cannot run 'rc.exe'

D:\buildarea\3.x.bolen-windows10\build\build\test_python_2228>exit 1 

D:\buildarea\3.x.bolen-windows10\build\build\test_python_2228>exit 0

(...)


==
ERROR: test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase)
--
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\_msvccompiler.py", 
line 519, in link
self.spawn([self.linker] + ld_args)
  File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\_msvccompiler.py", 
line 542, in spawn
return super().spawn(cmd)
  File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\ccompiler.py", 
line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
  File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\spawn.py", line 
38, in spawn
_spawn_nt(cmd, search_path, dry_run=dry_run)
  File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\spawn.py", line 
81, in _spawn_nt
"command %r failed with exit status %d" % (cmd, rc))
distutils.errors.DistutilsExecError: command 'C:\\Program Files 
(x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with 
exit status 1158

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"D:\buildarea\3.x.bolen-windows10\build\lib\distutils\tests\test_build_ext.py", 
line 82, in test_build_ext
cmd.run()
  File 
"D:\buildarea\3.x.bolen-windows10\build\lib\distutils\command\build_ext.py", 
line 339, in run
self.build_extensions()
  File 
"D:\buildarea\3.x.bolen-windows10\build\lib\distutils\command\build_ext.py", 
line 448, in build_extensions
self._build_extensions_serial()
  File 
"D:\buildarea\3.x.bolen-windows10\build\lib\distutils\command\build_ext.py", 
line 473, in _build_extensions_serial
self.build_extension(ext)
  File 
"D:\buildarea\3.x.bolen-windows10\build\lib\distutils\command\build_ext.py", 
line 558, in build_extension
target_lang=language)
  File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\ccompiler.py", 
line 717, in link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
  File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\_msvccompiler.py", 
line 522, in link
raise LinkError(msg)
distutils.errors.LinkError: command 'C:\\Program Files (x86)\\Microsoft Visual 
Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1158

--
components: Tests, Windows
messages: 305728
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: [Windows] 

[issue31967] [Windows] test_distutils: fatal error LNK1158: cannot run 'rc.exe'

2017-11-07 Thread STINNER Victor

STINNER Victor  added the comment:

Similar error on AMD64 Windows8 3.x:

http://buildbot.python.org/all/#/builders/32/builds/127

--

___
Python tracker 

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



[issue31967] [Windows] test_distutils: fatal error LNK1158: cannot run 'rc.exe'

2017-11-07 Thread STINNER Victor

STINNER Victor  added the comment:

I don't think that it's related, but a recent change in PCbuild is: bpo-31957.

IMHO it's more something that changed on the two buildbots.

--

___
Python tracker 

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



[issue31966] print('hello\n', end='', flush=True) raises OSError when ran with py -u

2017-11-07 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
components: +IO
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31967] [Windows] test_distutils: fatal error LNK1158: cannot run 'rc.exe'

2017-11-07 Thread STINNER Victor

STINNER Victor  added the comment:

Hi David Bolen: Would you mind to look at this bug, please? thank you in 
advance ;-)

--
nosy: +db3l

___
Python tracker 

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



[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I don't have any strong opinion, but I think doing the check at runtime is 
better.

--

___
Python tracker 

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



[issue31966] print('hello\n', end='', flush=True) raises OSError when ran with py -u

2017-11-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The problem is with _WindowsConsoleIO.

C:\py\cpython>python.bat -u -c "import sys; sys.stdout.buffer.write(b'')"
Running Release|Win32 interpreter...
Traceback (most recent call last):
  File "", line 1, in 
OSError: [WinError 87] The parameter is incorrect

--

___
Python tracker 

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



[issue31966] print('hello\n', end='', flush=True) raises OSError when ran with py -u

2017-11-07 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +easy (C)
stage:  -> needs patch

___
Python tracker 

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



[issue31966] print('hello\n', end='', flush=True) raises OSError when ran with py -u

2017-11-07 Thread STINNER Victor

STINNER Victor  added the comment:

Once the bug will be fixed, it would be nice to test this simple case :-)

--
nosy: +haypo

___
Python tracker 

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



[issue31808] tarfile.extractall fails to overwrite symlinks

2017-11-07 Thread Berker Peksag

Change by Berker Peksag :


--
nosy: +serhiy.storchaka
stage:  -> needs patch
versions: +Python 3.7 -Python 3.5

___
Python tracker 

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



[issue31967] [Windows] test_distutils: fatal error LNK1158: cannot run 'rc.exe'

2017-11-07 Thread David Bolen

David Bolen  added the comment:

This seems to correlate with my upgrading to the latest Win10 SDK on those 
workers (Steve pointed out I was still getting ucrt warnings during 
compilation).  So they both jumped from like 10240 up to 16299.  But that's all 
I changed.

Interestingly I only had to fix 8.1 and 10, as 7 already had a version (15063) 
avoiding the warning, and it's tedious to change.  But it's not experiencing 
the linking problem.

I could swear I recall past link/rc problems, but my searching (and memory) are 
failing me at the moment.  But I wonder if that's why I had left these two 
workers back at 10240, or if I had some local fix in place.

--

___
Python tracker 

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



[issue31626] Writing in freed memory in _PyMem_DebugRawRealloc() after shrinking a memory block

2017-11-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 3cc4c53a64bdcf21431ad306eca0e568f88735a2 by Serhiy Storchaka in 
branch 'master':
bpo-31626: Mark ends of the reallocated block in debug build. (#4210)
https://github.com/python/cpython/commit/3cc4c53a64bdcf21431ad306eca0e568f88735a2


--

___
Python tracker 

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



[issue31626] Writing in freed memory in _PyMem_DebugRawRealloc() after shrinking a memory block

2017-11-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

There are large discussions at PR 3844 and PR 4210.

--

___
Python tracker 

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



[issue31626] Writing in freed memory in _PyMem_DebugRawRealloc() after shrinking a memory block

2017-11-07 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4271

___
Python tracker 

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



[issue31626] Writing in freed memory in _PyMem_DebugRawRealloc() after shrinking a memory block

2017-11-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Yet one issue is left. In debug mode two debug allocators are used, the one is 
nested in the other. Is it correct?

--

___
Python tracker 

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



[issue31967] [Windows] test_distutils: fatal error LNK1158: cannot run 'rc.exe'

2017-11-07 Thread David Bolen

David Bolen  added the comment:

Ok, so rc.exe appears truly not to be found when the test runs.  The binary is 
a bit buried in the Windows Kit directory tree, and I'm guessing something is 
off after the upgrade (I'm not sure where it was in the tree before).  I 
manually placed a copy in a directory I know is on the path and that seems to 
have resolved it.

I also found a similar copy of rc.exe from the SDK to a local directory on my 
Windows 7 worker, so I suspect that was what I was remembering, and I probably 
hit the same thing when updating the SDK on that worker previously.

Not sure if there's some better way it should work, but at least this resolves 
the issue from the SDK update - builds are currently in progress, but both 
workers passed test_distutils.

--

___
Python tracker 

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



[issue31889] difflib SequenceMatcher ratio() still have unpredictable behavior

2017-11-07 Thread Simon Descarpentries

Simon Descarpentries  added the comment:

Hi,

I missed the part of the doc you pointed out, being focused on ratio()
function family.

Thanks for your gentle reply.

--

___
Python tracker 

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



[issue21862] cProfile command-line should accept "-m module_name" as an alternative to script path

2017-11-07 Thread Nick Coghlan

Nick Coghlan  added the comment:

I added an inline comment on the PR - I think what's there now would work fine, 
but I also suggested a slightly shorter and clearer (at least to me) 
alternative.

--

___
Python tracker 

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



[issue21862] cProfile command-line should accept "-m module_name" as an alternative to script path

2017-11-07 Thread Nick Coghlan

Nick Coghlan  added the comment:

Also, based on reviewing this, I suspect the same approach would also work for 
the pure Python profile module.

--

___
Python tracker 

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



[issue31626] Writing in freed memory in _PyMem_DebugRawRealloc() after shrinking a memory block

2017-11-07 Thread STINNER Victor

STINNER Victor  added the comment:

For allocations larger than 512 bytes, PyObject_Malloc() calls 
PyMem_RawMalloc(). When debug hooks are installed, PyObject_Malloc() calls a 
debug hook which calls PyMem_RawMalloc() which calls another debug hook.

--

___
Python tracker 

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



[issue31966] print('hello\n', end='', flush=True) raises OSError when ran with py -u

2017-11-07 Thread STINNER Victor

STINNER Victor  added the comment:

serhiy.storchaka: "keywords: + easy (C)"

For easy issue, you should explain how do you want the issue to be fixed.

--

___
Python tracker 

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



[issue28791] update sqlite to latest version before beta 1

2017-11-07 Thread STINNER Victor

STINNER Victor  added the comment:

> sqlite-3.15.1 fixes an old annoying bug (hidden since 3.8.0)

Since the bug seems to be important, maybe it's worth it to backport the commit 
upgrading SQLite to Python 2.7 and 3.6?

--

___
Python tracker 

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



[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread Ilya Polyakovskiy

New submission from Ilya Polyakovskiy :

I'm using exec() to run code with globals object inherited from dict. The 
problem is overloaded __getitem__ doesn't called to load default argument for 
class methods.
Here the example. Let's assume we create some variable storage for code 
execution

class Env(dict):
def __init__(self, external_storage):
super().__init__()
self._external_storage = external_storage

def __setitem__(self, key, value):
print('__setitem__: {}'.format(key))
self._external_storage[key] = value

def __getitem__(self, key):
print('__getitem__: {}'.format(key))
return self._external_storage[key]


storage = {}
env = Env(storage)
env['var'] = 2

exec("""
class A:
def foo(self, x=var):
print('foo(): {}'.format(x))

a = A()
a.foo()
""", env)

This code will fail with output:
__setitem__: var
Traceback (most recent call last):
  File "inheri-test.py", line 29, in 
""", env)
  File "", line 2, in 
  File "", line 3, in A
NameError: name 'var' is not defined


As far as I understand the problem is Python/ceval.c:2120. There is only 
PyDict_GetItem used to load variable from f_globals, instead of 
PyObject_GetItem in case of f_globals is not exact dict.

--
components: Interpreter Core
messages: 305746
nosy: Ilya Polyakovskiy
priority: normal
severity: normal
status: open
title: exec(): method's default arguments from dict-inherited globals
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread Ilya Polyakovskiy

Change by Ilya Polyakovskiy :


--
type:  -> behavior

___
Python tracker 

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



[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread R. David Murray

R. David Murray  added the comment:

Yes, that's the way it works (and is intended to work, for performance 
reasons).  The documentation on this could be improved...while it does say 
globals must be a dict and that locals can be any mapping object, it does it in 
a sentence that is a bit confusing in this context, and it doesn't make it 
clear that it has to be a "real" dict, not a subclass.  (I wouldn't be 
surprised if that sentence was written back when you couldn't subclass dict.)

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, r.david.murray
versions: +Python 3.7 -Python 3.5

___
Python tracker 

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



[issue20486] msilib: can't close opened database

2017-11-07 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset a935654f0613640535fbf0ba190f81d02a63d35c by Berker Peksag in 
branch 'master':
bpo-20486: Implement Database.Close() method in msilib (GH-4141)
https://github.com/python/cpython/commit/a935654f0613640535fbf0ba190f81d02a63d35c


--

___
Python tracker 

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



[issue20486] msilib: can't close opened database

2017-11-07 Thread Berker Peksag

Berker Peksag  added the comment:

Thank you, all. The OP's snippet should work now:

>>> import msilib as m
>>> db = m.OpenDatabase('py33.msi', m.MSIDBOPEN_TRANSACT)
>>> db.Commit()
>>> db2 = m.OpenDatabase('py33.msi', m.MSIDBOPEN_TRANSACT)
Traceback (most recent call last):
  File "", line 1, in 
_msi.MSIError: 1: 2203 2: py33.msi 3: -2147287008
>>> db.Close()
>>> db2 = m.OpenDatabase('py33.msi', m.MSIDBOPEN_TRANSACT)

I didn't backport this to bugfix branches since we added a new public function 
to the API.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 2.7, Python 3.6

___
Python tracker 

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



[issue31966] print('hello\n', end='', flush=True) raises OSError when ran with py -u

2017-11-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I don't know which part of _WindowsConsoleIO.write() fails to handle empty 
bytes string, but the simplest and the most efficient way to fix this bug it to 
add an explicit check for zero length at the begin of this method and return 
Python integer 0 in this case.

The test should check that sys.stdout.buffer.write(b''), 
sys.stdout.buffer.write(b'') and sys.stdout.buffer.raw.write(b'') return 0 (the 
latter to checks should be performed only if the corresponding buffer and raw 
attributes exist). There are special tests for WindowsConsoleIO, it would be 
nice to add an explicit test here too.

--

___
Python tracker 

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



[issue31969] re.groups() is not checking the arguments

2017-11-07 Thread Narendra

New submission from Narendra :

Hi Team,

I have observed a bug in re.groups() function behavior in Python as below:

Issue:
re.groups() is not validating the arguments

Example:
>>> m = re.match(r'(\w+)@(\w+)\.(\w+)','usern...@hackerrank.com')
>>> m.groups()
('username', 'hackerrank', 'com')
>>> m.groups(1)
('username', 'hackerrank', 'com')
>>> m.groups(1000)
('username', 'hackerrank', 'com')
>>>

>From the above, its clear that re.groups() and re.groups() both are 
>same. I think re.groups() is not validating the arguments.

Please review the same and provide your comments whether my views are correct 
or wrong

--
components: Regular Expressions
messages: 305751
nosy: ezio.melotti, mrabarnett, narendrac
priority: normal
severity: normal
status: open
title: re.groups() is not checking the arguments
type: behavior
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



[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou

New submission from Antoine Pitrou :

Each time a new future, handle or task is created, asyncio with debug mode 
enabled will parse the whole call stack and create a StackSummary object for 
it.  Imagine a recursive coroutine: with N nested calls, you get O(N**2) 
performance.

Ideally debug mode wouldn't slow things too much, at least for development and 
testing setups.

--
components: Library (Lib), asyncio
messages: 305752
nosy: giampaolo.rodola, haypo, pitrou, yselivanov
priority: normal
severity: normal
status: open
title: asyncio debug mode is very slow
type: behavior
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



[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread Ilya Polyakovskiy

Change by Ilya Polyakovskiy :


--
keywords: +patch
pull_requests: +4272
stage:  -> patch review

___
Python tracker 

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



[issue31969] re.groups() is not checking the arguments

2017-11-07 Thread Narendra

Narendra  added the comment:

Please look in to the following example:

>>> m.groups()
('narendra', 'happiestmidns', 'com')
>>> m.groups(1)
('narendra', 'happiestmidns', 'com')
>>> m.groups(34)
('narendra', 'happiestmidns', 'com')
>>> m.groups(1000)
('narendra', 'happiestmidns', 'com')
>>>

--
status: closed -> open

___
Python tracker 

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



[issue31969] re.groups() is not checking the arguments

2017-11-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

All work as designed. In your example you don't see a difference because all 
groups are defined. Look at other example:

>>> import re
>>> m = re.match(r'(?:(\w+)@)?(\w+)\.(\w+)', 'hackerrank.com')
>>> m.groups()
(None, 'hackerrank', 'com')
>>> m.groups(1)
(1, 'hackerrank', 'com')
>>> m.groups(1000)
(1000, 'hackerrank', 'com')

--
nosy: +serhiy.storchaka
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



[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
keywords: +patch
pull_requests: +4273
stage:  -> patch review

___
Python tracker 

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



[issue31969] re.groups() is not checking the arguments

2017-11-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

There is nothing wrong with this output if you use the first example.

--

___
Python tracker 

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



[issue31969] re.groups() is not checking the arguments

2017-11-07 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
status: open -> closed

___
Python tracker 

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



[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

If this is accepted on the principle, it would be great to also patch 3.6.

--

___
Python tracker 

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



[issue31966] print('hello\n', end='', flush=True) raises OSError when ran with py -u

2017-11-07 Thread Eryk Sun

Eryk Sun  added the comment:

The error is in _io__WindowsConsoleIO_write_impl. If it's passed a length 0 
buffer, it still tries to decode it via MultiByteToWideChar, which fails as 
documented. As Serhiy says, it can simply return Python int(0) in the 
zero-length case.

--
nosy: +eryksun

___
Python tracker 

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



[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
nosy: +asvetlov

___
Python tracker 

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



[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread Ilya Polyakovskiy

Change by Ilya Polyakovskiy :


--
pull_requests: +4274

___
Python tracker 

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



[issue31955] distutils C compiler: set_executables() incorrectly parse values with spaces

2017-11-07 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4275

___
Python tracker 

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



[issue31956] Add start and stop parameters to the array.index()

2017-11-07 Thread Николай Спахиев

Николай Спахиев  added the comment:

I plan to work on a patch.

--

___
Python tracker 

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



[issue31955] distutils C compiler: set_executables() incorrectly parse values with spaces

2017-11-07 Thread Dee Mee

Dee Mee  added the comment:

I agree, that this fix is necessary only for Python 2. Submitted new PR 4316

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Yury Selivanov

Yury Selivanov  added the comment:

> On the other hand, the Future implementation is entirely not thread-safe 
> (btw, the constructor optimistically claims the done callbacks are scheduled 
> using call_soon_threadsafe(), but the implementation actually calls 
> call_soon()).

This is weird.  PEP 3156 specifies that Future uses call_soon.  The 
implementation uses call_soon.  And it actually makes sense to use call_soon 
for Futures.  

Situations when Future.cancel() or Future.set_result() is called from a 
different thread are extremely rare, so we want to avoid the overhead of using 
call_soon_threadsafe().  Moreover, I bet there are many other cases where 
Future implementation is not threadsafe.

If one absolutely needs to call Future.set_result() from a different thread, 
they can always do `loop.call_soon_threadsafe(fut.set_result, ...)`.

My opinion on this: update documentation for all Python versions to reflect 
that Future uses call_soon.

> Do you think it would be fine for Future._schedule_callbacks() to check the 
> event loop is the current one, or do you think it would impact performance 
> too much (or perhaps it is simply not desirable)?

I think we should update `Future._schedule_callbacks` to check if the loop is 
in debug mode.  If it is call `loop._check_thread()`, which will raise a 
RuntimeError if the current thread is different from the one that the loop 
belongs to.  

This will have no detectable overhead, but will ease debugging of edge cases 
like writing multithreaded asyncio applications.

--

___
Python tracker 

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



[issue31966] [EASY C][Windows] print('hello\n', end='', flush=True) raises OSError when ran with py -u

2017-11-07 Thread STINNER Victor

STINNER Victor  added the comment:

The _io__WindowsConsoleIO_write_impl() function should be fixed to not call 
MultiByteToWideChar() but use 0 if the input string is zero. Ok, it makes sense.

In that case, I agree to call it a simple issue ;-)

--
title: print('hello\n', end='', flush=True) raises OSError when ran with py -u 
-> [EASY C][Windows] print('hello\n', end='', flush=True) raises OSError when 
ran with py -u

___
Python tracker 

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



[issue31971] idle_test: failures on x86 Windows7 3.x

2017-11-07 Thread STINNER Victor

New submission from STINNER Victor :

http://buildbot.python.org/all/#/builders/58/builds/122

==
ERROR: tearDownClass (idlelib.idle_test.test_configdialog.KeysPageTest)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\idlelib\idle_test\test_configdialog.py",
 line 701, in tearDownClass
del page.set_keys_type, page.load_keys_list
AttributeError: set_keys_type
==
FAIL: test_set_keys_type (idlelib.idle_test.test_configdialog.KeysPageTest)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\idlelib\idle_test\test_configdialog.py",
 line 859, in test_set_keys_type
eq(d.custom_keyset_on.state(), ('selected',))
AssertionError: Tuples differ: ('selected', 'hover') != ('selected',)
First tuple contains 1 additional elements.
First extra element 1:
'hover'
- ('selected', 'hover')
? 
+ ('selected',)

--
components: Tests
messages: 305763
nosy: haypo, terry.reedy
priority: normal
severity: normal
status: open
title: idle_test: failures on x86 Windows7 3.x
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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> My opinion on this: update documentation for all Python versions to reflect 
> that Future uses call_soon.

Agreed.

> I think we should update `Future._schedule_callbacks` to check if the loop is 
> in debug mode.

Unfortunately this is not sufficient for the snippet I posted.  The loop's 
thread_id is only set when the loop runs, but the main loop in that example 
never runs.

--

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread STINNER Victor

Change by STINNER Victor :


--
nosy:  -haypo

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

My underlying question is why the Future has to set its loop in its 
constructor, instead of simply using get_event_loop() inside 
_schedule_callbacks().  This would always work.

--

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
keywords: +patch
pull_requests: +4277
stage:  -> patch review

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Yury Selivanov

Yury Selivanov  added the comment:

>> I think we should update `Future._schedule_callbacks` to check if the loop 
>> is in debug mode.

> Unfortunately this is not sufficient for the snippet I posted.  The loop's 
> thread_id is only set when the loop runs, but the main loop in that example 
> never runs.

If the loop isn't running, call_soon works just fine from any thread.  

call_soon_threadsafe is different from call_soon when the loop *is* running.  
When it's running and blocked on IO, call_soon_threadsafe will make sure that 
the loop will be woken up.

Currently, _schedule_callbacks() calls loop.call_soon(), which already calls 
loop._check_thread().  So it looks like we don't need to change anything after 
all, right?

--
stage: patch review -> 

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The call_soon / call_soon_threadsafe distinction is not relevant to the problem 
I posted.  The problem is that the Future is registered with the event loop for 
the thread it was created in, even though it is only ever used in another 
thread (with another event loop).

Just try the snippet :-) If you want to see it finish in a finite time, move 
the future instantiation inside the coroutine.

--

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Yury Selivanov

Yury Selivanov  added the comment:

> My underlying question is why the Future has to set its loop in its 
> constructor, instead of simply using get_event_loop() inside 
> _schedule_callbacks().  This would always work.

So imagine a Future `fut` is completed. And we call `fut.add_done_callback()` 
in different contexts with different active event loops.  With your suggestion 
we'll schedule our callbacks in different loops.

Ideally you should use `loop.create_future()` when you can (and in libraries 
you usually can do that) to always make it explicit which loop your Future is 
attached to.

--

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> So imagine a Future `fut` is completed. And we call `fut.add_done_callback()` 
> in different contexts with different active event loops.  With your 
> suggestion we'll schedule our callbacks in different loops.

I'm wondering: does this situation occur in practice?  Since Future isn't 
threadsafe, is there really a point in using it from several loops at once?

> Ideally you should use `loop.create_future()` when you can (and in libraries 
> you usually can do that) to always make it explicit which loop your Future is 
> attached to.

Unfortunately that's not possible in our case.  Short version: we are using 
Tornado which creates a asyncio Future eagerly, see 
https://github.com/tornadoweb/tornado/blob/master/tornado/locks.py#L199

--

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Yury Selivanov

Yury Selivanov  added the comment:

> Just try the snippet :-) If you want to see it finish in a finite time, move 
> the future instantiation inside the coroutine.

Yeah, I see the problem.  OTOH your proposed change to lazily attach a loop to 
the future isn't fully backwards compatible.  It would be a nightmare to find a 
bug in a large codebase caused by this change in Future behaviour.  So I'm -1 
on this idea, that ship has sailed.

> Unfortunately that's not possible in our case.  Short version: we are using 
> Tornado which creates a asyncio Future eagerly, see 
> https://github.com/tornadoweb/tornado/blob/master/tornado/locks.py#L199

Maybe the solution is to fix Tornado?

--

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 22b1128559bdeb96907da5840960691bb050d11a by Antoine Pitrou in 
branch 'master':
bpo-31960: Fix asyncio.Future documentation for thread (un)safety. (#4319)
https://github.com/python/cpython/commit/22b1128559bdeb96907da5840960691bb050d11a


--

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4278
stage:  -> patch review

___
Python tracker 

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



[issue31965] Incorrect documentation for multiprocessing.connection.{Client, Listener}

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 1e5d54cfa031f1de9ee2d2e968e0551b6e2397b7 by Antoine Pitrou (Jelle 
Zijlstra) in branch 'master':
bpo-31965: fix doc for multiprocessing.connection.Client and Listener (#4304)
https://github.com/python/cpython/commit/1e5d54cfa031f1de9ee2d2e968e0551b6e2397b7


--

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Maybe the solution is to fix Tornado?

That's a possibility.  I have to convince Ben Darnell that it deserves fixing 
:-)

Another possibility is to use the asyncio concurrency primitives on Python 3, 
though that slightly complicates things, especially as the various coroutines 
there don't take a timeout parameter.

--
stage: patch review -> 

___
Python tracker 

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



[issue31965] Incorrect documentation for multiprocessing.connection.{Client, Listener}

2017-11-07 Thread Roundup Robot

Change by Roundup Robot :


--
keywords: +patch
pull_requests: +4279
stage:  -> patch review

___
Python tracker 

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



[issue31965] Incorrect documentation for multiprocessing.connection.{Client, Listener}

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset d9c61c2a2662761dc89e0be14ceb7ea57531c836 by Antoine Pitrou (Miss 
Islington (bot)) in branch '3.6':
bpo-31965: fix doc for multiprocessing.connection.Client and Listener (GH-4304) 
(#4321)
https://github.com/python/cpython/commit/d9c61c2a2662761dc89e0be14ceb7ea57531c836


--

___
Python tracker 

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



[issue31965] Incorrect documentation for multiprocessing.connection.{Client, Listener}

2017-11-07 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 518c6b97868d9c665475a40567b0aa417afad607 by Antoine Pitrou (Miss 
Islington (bot)) in branch '3.6':
bpo-31960: Fix asyncio.Future documentation for thread (un)safety. (GH-4319) 
(#4320)
https://github.com/python/cpython/commit/518c6b97868d9c665475a40567b0aa417afad607


--

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The documentation has been fixed.  Should we close this now?  Ideally I'd 
rather have asyncio warn me in such situations, but I feel this won't be doable.

--

___
Python tracker 

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



[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 921e9432a1461bbf312c9c6dcc2b916be6c05fa0 by Antoine Pitrou in 
branch 'master':
bpo-31970: Reduce performance overhead of asyncio debug mode. (#4314)
https://github.com/python/cpython/commit/921e9432a1461bbf312c9c6dcc2b916be6c05fa0


--

___
Python tracker 

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



[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
pull_requests: +4280

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Yury Selivanov

Yury Selivanov  added the comment:

I guess you can set Resolution to "postponed", Stage to "Resolved".

--

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
resolution:  -> postponed
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



[issue31793] Allow to specialize smart quotes in documentation translations

2017-11-07 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 5a66c8a64d180b5f3c80307924adaec53cc8faa3 by INADA Naoki (Julien 
Palard) in branch 'master':
bpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006)
https://github.com/python/cpython/commit/5a66c8a64d180b5f3c80307924adaec53cc8faa3


--
nosy: +inada.naoki

___
Python tracker 

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



[issue31793] Allow to specialize smart quotes in documentation translations

2017-11-07 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4281

___
Python tracker 

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



[issue31793] Allow to specialize smart quotes in documentation translations

2017-11-07 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4282

___
Python tracker 

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



[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thank you for the quick reviews!

--
resolution:  -> fixed
stage: patch review -> 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



[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset d8d218ffda6b7569625ff9edadbbc9a2b1055e32 by Antoine Pitrou in 
branch '3.6':
[3.6] bpo-31970: Reduce performance overhead of asyncio debug mode. (GH-4314) 
(#4322)
https://github.com/python/cpython/commit/d8d218ffda6b7569625ff9edadbbc9a2b1055e32


--

___
Python tracker 

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



[issue31793] Allow to specialize smart quotes in documentation translations

2017-11-07 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 47eaaa55247b6ad8ae507c0048509c2e3db79bf0 by INADA Naoki (Miss 
Islington (bot)) in branch '2.7':
bpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006)
https://github.com/python/cpython/commit/47eaaa55247b6ad8ae507c0048509c2e3db79bf0


--

___
Python tracker 

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



[issue31793] Allow to specialize smart quotes in documentation translations

2017-11-07 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 64f10492dcda4117ac06399ae46ab645cb09b19e by INADA Naoki (Miss 
Islington (bot)) in branch '3.6':
bpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006)
https://github.com/python/cpython/commit/64f10492dcda4117ac06399ae46ab645cb09b19e


--

___
Python tracker 

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



[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Yury Selivanov

Yury Selivanov  added the comment:

Thank you for helping with asyncio!  I'll try to get to that transport 
performance issues you found sometime this week.  I've a few ideas how to add 
0-copy support to protocols.

--

___
Python tracker 

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



[issue31793] Allow to specialize smart quotes in documentation translations

2017-11-07 Thread INADA Naoki

INADA Naoki  added the comment:

Thanks, Julien.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue31937] Add the term "dunder" to the glossary

2017-11-07 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

Thanks Raymond. +1 for adding the above list. 

I don't think FAQ is the right place either, I prefer we don't have to add the 
entries in the form of questions & answers.

--

___
Python tracker 

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



[issue31620] asyncio.Queue leaks memory if the queue is empty and consumers poll it frequently

2017-11-07 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset c62f0cb3b1f6f9ca4ce463b1c99b0543bdfa38d6 by Andrew Svetlov (Suren 
Nihalani) in branch 'master':
bpo-31620: have asyncio/queues not leak memory when you've exceptions during 
waiting (#3813)
https://github.com/python/cpython/commit/c62f0cb3b1f6f9ca4ce463b1c99b0543bdfa38d6


--
nosy: +asvetlov

___
Python tracker 

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



[issue31620] asyncio.Queue leaks memory if the queue is empty and consumers poll it frequently

2017-11-07 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4283

___
Python tracker 

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



[issue31425] Expose AF_QIPCRTR in socket module

2017-11-07 Thread Christian Heimes

Change by Christian Heimes :


--
assignee:  -> christian.heimes
nosy: +christian.heimes

___
Python tracker 

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



[issue31972] Inherited docstrings for pathlib classes are confusing

2017-11-07 Thread Éric Araujo

New submission from Éric Araujo :

pydoc pathlib.Path shows the docstring of PurePath:

 |  PurePath represents a filesystem path and offers operations which
 |  don't imply any actual filesystem I/O.

But immediately after we see methods like chmod, exists and co which obviously 
aren’t pure.  Looking at the reST docs or the source code, the reader can 
deduce that this is the docstring of PurePath inherited by Path, but I find it 
confusing.

Solution: adding docstrings to all pathlib classes.  PurePath and Path can have 
all the info, Posix/Windows* subclasses only one line with a reference.

--
components: Library (Lib)
keywords: easy
messages: 305788
nosy: eric.araujo
priority: normal
severity: normal
stage: needs patch
status: open
title: Inherited docstrings for pathlib classes are confusing
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



[issue31620] asyncio.Queue leaks memory if the queue is empty and consumers poll it frequently

2017-11-07 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset ac4f6d4448fb6f9affb817bafb8357450fe43349 by Andrew Svetlov (Miss 
Islington (bot)) in branch '3.6':
bpo-31620: have asyncio/queues not leak memory when you've exceptions during 
waiting (GH-3813) (#4326)
https://github.com/python/cpython/commit/ac4f6d4448fb6f9affb817bafb8357450fe43349


--

___
Python tracker 

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



[issue31951] import curses is broken on windows

2017-11-07 Thread joe m

joe m  added the comment:

I would much prefer the curses module to be supported in newer versions  since 
I believe that curses is installed as a built in module (not sure about that).

Anyhow, thank you for your help but I have found a replacement module called 
"asciimatics" which for fills all the functions that I really need.

--

___
Python tracker 

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



[issue31937] Add the term "dunder" to the glossary

2017-11-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Agreed with Raymond that Python folk terminology should not go into the 
glossary.  I don't think I ever say "dunder" myself.

--
nosy: +pitrou

___
Python tracker 

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



[issue31937] Add the term "dunder" to the glossary

2017-11-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I never seen terms like "stir" or "inker", but the term "dunder" is used pretty 
widely. The glossary already contains abbreviations and Python folk terminology 
like EAFP and BDFL.

--

___
Python tracker 

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



[issue31824] Missing default argument detail in documentation of StreamReaderWriter

2017-11-07 Thread Berker Peksag

Berker Peksag  added the comment:

For those who want to work on this issue: codecs.StreamReaderWriter 
documentation is located at Doc/library/codecs.rst.

--
keywords: +easy
nosy: +berker.peksag
stage:  -> needs patch
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



[issue31486] calling a _json.Encoder object raises a SystemError in case obj.items() returned a tuple

2017-11-07 Thread Berker Peksag

Berker Peksag  added the comment:

PR 3840 has been merged and it looks like Oren was correct. I'm getting the 
following output with current master:

>>> encoder(obj=BadDict({'spam': 42}), _current_indent_level=4)
['{}']

--
nosy: +berker.peksag
resolution:  -> out of date
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



[issue28791] update sqlite to latest version before beta 1

2017-11-07 Thread Zachary Ware

Zachary Ware  added the comment:

I'd say that's up to Ned and Benjamin.  It's a very simple backport at this 
point.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue31486] calling a _json.Encoder object raises a SystemError in case obj.items() returned a tuple

2017-11-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

bpo-28280 fixed this issue only in the master branch. I had left this issue 
open for fixing 3.6.

--
resolution: out of date -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

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



  1   2   >