[issue32911] Doc strings no longer stored in body of AST

2018-04-12 Thread INADA Naoki
INADA Naoki added the comment: > in practice `ast.parse()` is often used with smaller fragments of source code > that don't directly correspond to a complete module, and this behaviour makes > no sense in such cases. > > The resulting bug in kdev-python took a while to

[issue33265] contextlib.ExitStack abuses __self__

2018-04-12 Thread Yury Selivanov
Yury Selivanov added the comment: Yep, I think this is a good fix! -- ___ Python tracker ___

[issue32911] Doc strings no longer stored in body of AST

2018-04-12 Thread Francis Herne
Francis Herne added the comment: Note: Because this also applies to module-level docstrings, a rather strange effect that, for example, `ast.parse("'foo'")` is now an empty module. While the root node is always an instance of `ast.Module`, in practice `ast.parse()` is often

[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-12 Thread Andrés Delfino
Andrés Delfino added the comment: My contributor form shows as received now :) Don't know how to update the "CLA not signed" label on the PR. -- ___ Python tracker

[issue33211] lineno and col_offset are wrong on function definitions with decorators

2018-04-12 Thread Ethan Smith
Change by Ethan Smith : -- pull_requests: +6154 ___ Python tracker ___ ___

[issue33267] ctypes array types create reference cycles

2018-04-12 Thread Josh Rosenberg
Josh Rosenberg added the comment: Pretty sure this is a problem with classes in general; classes are self-referencing, and using multiplication to create new ctypes array types is creating new classes. -- nosy: +josh.r

[issue19993] Pool.imap doesn't work as advertised

2018-04-12 Thread Josh Rosenberg
Josh Rosenberg added the comment: Related: issue29842 "Make Executor.map work with infinite/large inputs correctly" for a similar problem in concurrent.futures (but worse, since it doesn't even allow you to begin consuming results until all inputs are

[issue33217] x in enum.Flag member is True when x is not a Flag

2018-04-12 Thread Ethan Furman
Ethan Furman added the comment: DeprecationWarning is in 3.7, now need to raise TypeError in 3.8. -- stage: patch review -> needs patch versions: -Python 3.6 ___ Python tracker

[issue33219] x in IntFlag should test raise TypeError if x is not an IntFlag

2018-04-12 Thread Ethan Furman
Ethan Furman added the comment: This and issue33217 are similar enough I'm going to track it in issue33217. -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> x in enum.Flag member is True when x is not a Flag

[issue33270] tags for anonymous code objects should be interned

2018-04-12 Thread Daniel Moisset
New submission from Daniel Moisset : In compile.c, some strings are created to be used as name of anonymous code objects: "", "", "", "", "" and "". Only the first two of those are interned (created with PyUnicode_InternFromString ), the rest are created with

[issue19173] Expose Queue maxsize parameter to multiprocessing.Pool class

2018-04-12 Thread Ned Deily
Change by Ned Deily : -- nosy: +davin, pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue19993] Pool.imap doesn't work as advertised

2018-04-12 Thread Ned Deily
Change by Ned Deily : -- nosy: +davin, pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue19993] Pool.imap doesn't work as advertised

2018-04-12 Thread Alex Garel
Alex Garel added the comment: Hello, I think this is a really important feature, it hits me hard those days. It would also solve https://bugs.python.org/issue19173 in a nice way. -- nosy: +alex-garel ___ Python tracker

[issue33266] 2to3 doesn't parse all valid string literals

2018-04-12 Thread Ned Deily
Change by Ned Deily : -- nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue32696] Fix pickling exceptions with multiple arguments

2018-04-12 Thread Jason R. Coombs
Jason R. Coombs added the comment: Kirill, see https://bugs.python.org/issue1692335#msg310951 in the related issue for one possible way to work around the issue on Python 3. -- ___ Python tracker

[issue14573] json iterencode can not handle general iterators

2018-04-12 Thread Ned Deily
Ned Deily added the comment: If there is still interest in this, perhaps @Zectbumo could rebase the patch as a PR against the master branch of the current python/cpython repo now that we've moved to git and GitHub (https://devguide.python.org/pullrequest/). There's no

[issue33065] IDLE debugger: problem importing user created module

2018-04-12 Thread Brett Cannon
Brett Cannon added the comment: Without knowing the exact Python version it's hard to tell as line 59 changed between Python 3.5 and where Python 3.6 is now (FYI, the line as it currently sits in Python 3.6 is

[issue33267] ctypes array types create reference cycles

2018-04-12 Thread Ned Deily
Change by Ned Deily : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge ___ Python tracker ___

[issue33269] InteractiveConsole behaves differently when used on terminal and used within script

2018-04-12 Thread Kadir Haldenbilen
Kadir Haldenbilen added the comment: Attached is a non working example I could not attach a second file, which works OK within script I will attach separately -- Added file: https://bugs.python.org/file47533/iitests.py ___

[issue33269] InteractiveConsole behaves differently when used on terminal and used within script

2018-04-12 Thread Kadir Haldenbilen
Kadir Haldenbilen added the comment: This script works OK. Compare with iitests.py uploaded before -- Added file: https://bugs.python.org/file47534/iiteswok.py ___ Python tracker

[issue32696] Fix pickling exceptions with multiple arguments

2018-04-12 Thread Kirill Matsaberydze
Kirill Matsaberydze added the comment: Hi, I encounter similar behavior in python 3.6.5 with following code: import pickle class CustomException(Exception): def __init__(self, arg1, arg2): msg = "Custom message {} {}".format(arg1, arg2)

[issue33269] InteractiveConsole behaves differently when used on terminal and used within script

2018-04-12 Thread Kadir Haldenbilen
New submission from Kadir Haldenbilen : on terminal push and runcode accepts indentation where required (like for loop etc), within script gives error message on terminal import works properly and objects can be found as normal, within script you may need to add

[issue33266] 2to3 doesn't parse all valid string literals

2018-04-12 Thread Eric V. Smith
Eric V. Smith added the comment: Is 2to3 supposed to be able to parse non-python2 files? I don't recall. -- nosy: +eric.smith ___ Python tracker

[issue14573] json iterencode can not handle general iterators

2018-04-12 Thread Jan Vlcinsky
Jan Vlcinsky added the comment: I found proposed change very handy (came here researching why it is not behaving that way). Taking into account: - Python shines in handling lists, using generators and iterators - Largest group of python developers develop web

[issue33265] contextlib.ExitStack abuses __self__

2018-04-12 Thread Nick Coghlan
Nick Coghlan added the comment: Yury, could you double check the async exit stack change in the PR? I think it's fine since the bound method just passes back the underlying coroutine and the tests all still pass, but a second opinion would be good :) -- nosy:

[issue33268] iteration over attrs in metaclass' __new__ affects class' __name__

2018-04-12 Thread tkhyn
tkhyn added the comment: oops, indeed. Sometimes the obvious things are not so obvious .. Sorry for the noise! -- ___ Python tracker

[issue33268] iteration over attrs in metaclass' __new__ affects class' __name__

2018-04-12 Thread Eric V. Smith
Eric V. Smith added the comment: In the loop, you're reassigning the value of name, then using it in the super call. If you change the name of the loop variable, your code works. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open ->

[issue33268] iteration over attrs in metaclass' __new__ affects class' __name__

2018-04-12 Thread tkhyn
New submission from tkhyn : The following script, run with python 3.6.5, highlights an issue with the class' __name__ attribute being set incorrectly just because of a loop in the metaclass' __new__ method: class MC(type): def __new__(mcs, name, bases, attrs):

[issue33267] ctypes array types create reference cycles

2018-04-12 Thread Eric Wieser
Eric Wieser added the comment: Apologies, I missed the important part of that snippet: ``` In [3]: gc.collect(); x = make_array_ctype((1,)); del x; gc.collect() Out[3]: 7 ``` -- ___ Python tracker

[issue33267] ctypes array types create reference cycles

2018-04-12 Thread Eric Wieser
New submission from Eric Wieser : Discovered in https://github.com/numpy/numpy/pull/10882/files#r180813166 A reproduction: ``` In [1]: import ctypes In [2]: def make_array_ctype(shape): ...: import ctypes ...: ct = ctypes.c_uint8 ...: for i in

[issue33266] 2to3 doesn't parse all valid string literals

2018-04-12 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +6152 stage: -> patch review ___ Python tracker ___

[issue33266] 2to3 doesn't parse all valid string literals

2018-04-12 Thread Zsolt Dollenstein
New submission from Zsolt Dollenstein : For example `rf"blah"` is not tokenized properly. -- components: 2to3 (2.x to 3.x conversion tool) messages: 315215 nosy: Zsolt Dollenstein priority: normal severity: normal status: open title: 2to3 doesn't parse all valid

[issue29456] bugs in unicodedata.normalize: u1176, u11a7 and u11c3

2018-04-12 Thread Wonsup Yoon
Wonsup Yoon added the comment: Hello! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue33265] contextlib.ExitStack abuses __self__

2018-04-12 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list