[issue24129] Incorrect (misleading) statement in the execution model documentation

2015-06-20 Thread levkivskyi
levkivskyi added the comment: Eric, the rule that classes don't play the nested scopes game is explained at beginning of the same section, but the explanation is one sided it only explains that names defined in classes are not visible inside functions. Nick, thank you for the thorough

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-20 Thread Yury Selivanov
Yury Selivanov added the comment: OK, let's go with cr_* prefix for coroutine type's slots. Nick, there is one more thing I'd be glad to receive your input on. Currently, inspect.iscoroutine(o) uses isinstance(o, abc.Coroutine) to do the check. Ben and Stefan reasonably ask to refactor

[issue14911] generator.throw() documentation inaccurate

2015-06-20 Thread Martin Panter
Martin Panter added the comment: See Issue 13213 for some analysis of the behaviour of different combinations of arguments. The docstring should be changed if necessary, but in this case I don’t see what needs changing. The argument names perhaps, just for consistency’s sake? --

[issue24478] asyncio: segfault in test_env_var_debug() on non-debug Windows buildbot

2015-06-20 Thread STINNER Victor
New submission from STINNER Victor: It looks like buildbot slave crashs since: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/23 or http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/22 Changes: changeset

[issue24474] Accidental exception chaining in inspect.Signature.bind()

2015-06-20 Thread Nick Coghlan
Nick Coghlan added the comment: The sentinel form of next() is nice when there's a natural sentinel value, but needing to *create* a sentinel is generally a sign that the out-of-band exception is a better fit. The function could likely do with some refactoring (e.g. breaking out some helper

[issue21279] str.translate documentation incomplete

2015-06-20 Thread Martin Panter
Martin Panter added the comment: Patch v6 looks okay, so I think it is ready to commit. -- stage: patch review - commit review versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21279

[issue24129] Incorrect (misleading) statement in the execution model documentation

2015-06-20 Thread Nick Coghlan
Nick Coghlan added the comment: The normal rules for name resolution reference here is referring to the name lookup rules as they existed prior to the introduction of lexical scoping for functions. It's a dated way of describing it, as the current behaviour of functions has now been around

[issue20387] tokenize/untokenize roundtrip fails with tabs

2015-06-20 Thread Dingyuan Wang
Dingyuan Wang added the comment: Sorry for the inconvenience. I failed to find this old bug. I think there is another problem. The docs of `untokenize` said The iterable must return sequences with **at least** two elements, the token type and the token string. Any additional sequence elements

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-20 Thread Nick Coghlan
Nick Coghlan added the comment: My view is that the gi_* prefixed attributes are the ducktyped representation of whether an object is a generator-iterator or a coroutine. With the change, it means hasattr(obj, 'cr_running') is to hasattr(obj, 'gi_running') as isinstance(obj,

[issue24129] Incorrect (misleading) statement in the execution model documentation

2015-06-20 Thread Armin Rigo
Armin Rigo added the comment: Related to http://bugs.python.org/issue19979 and others mentioned there. -- nosy: +arigo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24129 ___

[issue13213] generator.throw() behavior

2015-06-20 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- resolution: - duplicate stage: - resolved status: open - closed superseder: - generator.throw() documentation inaccurate ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13213

[issue24474] Accidental exception chaining in inspect.Signature.bind()

2015-06-20 Thread Yury Selivanov
Yury Selivanov added the comment: This isn't a bug, as raise exc from None only hides *display* of the context, it doesn't lose the record of the context entirely. Agree. My patch, though, is still valid. I think removing try..except blocks actually simplifies the code, and removes the

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-20 Thread Nick Coghlan
Nick Coghlan added the comment: Based on that last comment, I realised there's something else @types.coroutine should now do: delegate both the existing gi_* attributes *and* the new cr_* attributes to the underlying generator. That should allow all of the poking around in code object flags

[issue24479] Support LMMS project files in mimetypes.guess_type

2015-06-20 Thread Andreas Nilsson
New submission from Andreas Nilsson: There is no support for recognizing LMMS project files (.mmpz / .mmp). Could this be added for strict=False? -- components: Library (Lib) messages: 245556 nosy: Andreas Nilsson priority: normal severity: normal status: open title: Support LMMS

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-20 Thread Nick Coghlan
Nick Coghlan added the comment: I believe the key issue of concern for Cython is being able to emulate the native CPython types in a way that things like asyncio just work, rather than specifically needing to have inspect report them as native generators and coroutines. As such, having

[issue19979] Missing nested scope vars in class scope (bis)

2015-06-20 Thread Nick Coghlan
Nick Coghlan added the comment: With the fact that the existence of Python without closures predates Python 2.2, this now reads like a straight up compiler bug to me. Compare the behaviour with no local assignment in the class body: def f(): ... n = 1 ... class C: ...

[issue10482] subprocess and deadlock avoidance

2015-06-20 Thread Martin Panter
Martin Panter added the comment: Related: Issue 1260171, essentially proposing streaming readers and writers for communicate() instead of fixed buffers, but without using OS threads. -- ___ Python tracker rep...@bugs.python.org

[issue20344] subprocess.check_output() docs misrepresent what shell=True does

2015-06-20 Thread Martin Panter
Martin Panter added the comment: I think it might be better to leave the platform-specific details in the full Popen description, not under Frequently Used Arguments. I suggest to use 20344_4.patch: * Move existing pointer to Popen constructor details up to top of section * Explain the

[issue24370] OrderedDict behavior is unclear with misbehaving keys.

2015-06-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would expect the behavior to be undefined (though non-crashing). That is all you should expect. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24370

[issue24474] Accidental exception chaining in inspect.Signature.bind()

2015-06-20 Thread Nick Coghlan
Nick Coghlan added the comment: This isn't a bug, as raise exc from None only hides *display* of the context, it doesn't lose the record of the context entirely. This means Walter's display code is incorrect, as it isn't checking for __suppress_context__: import inspect try: ...

[issue20387] tokenize/untokenize roundtrip fails with tabs

2015-06-20 Thread Jason R. Coombs
Jason R. Coombs added the comment: @gumblex: This is a good start. It certainly provides a candidate implementation. First, can I suggest that you remove the changes pertinent to the at least two elements and address that in a separate ticket/discussion? Second, any patch will necessarily

[issue24478] asyncio: segfault in test_env_var_debug() on non-debug Windows buildbot

2015-06-20 Thread Steve Dower
Steve Dower added the comment: Presumably it's from the C implementation of lru cache -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24478 ___

[issue24306] Backport py.exe to 3.4

2015-06-20 Thread Steve Dower
Steve Dower added the comment: Attached a patch to set the component IDs in the 3.4 installer to match the ones we're using for 3.5 and later. This should prevent downgrading of the launcher in future releases, though it's not strictly the right way to do this. (Nosied Martin in case he wants

[issue24480] Python 2.7.10

2015-06-20 Thread Yunlong Liu
New submission from Yunlong Liu: Hi, I detected an inconsistency in the Modules stack of Python 2.7.10. In Module/_ssl.c, I see all _ssl._SSLContext are changed to ssl.SSLContext but it is inconsistent with the lib file in Lib/ssl.py. In ssl.py, it is still importing _SSLContext, which

[issue24129] Incorrect (misleading) statement in the execution model documentation

2015-06-20 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Eric, I have submitted a new version of the patch. Could you please make a review? Nick, it will be interesting to hear your opinion too. I tried to follow such rules: 1. Explanation should be succinct yet clear 2. It should tell as less as possible about

[issue24478] asyncio: segfault in test_env_var_debug() on non-debug Windows buildbot

2015-06-20 Thread Zachary Ware
Zachary Ware added the comment: Note that it's not necessarily that changeset; I think build 22 is around when the buildbot started actually doing non-debug builds (the buildmaster and buildslave scripts in Tools/buildbot had no support for a non-debug build before then). I'll try to run the

[issue4322] function with modified __name__ uses original name when there's an arg error

2015-06-20 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4322 ___ ___

[issue24480] Python 2.7.10

2015-06-20 Thread Yunlong Liu
Yunlong Liu added the comment: I have seen this has been corrected in the svn python chunk. But I doubt it is still there in the public download tar ball. Please make a change to the tar ball. Thanks -- status: open - closed ___ Python tracker

[issue24306] Backport py.exe to 3.4

2015-06-20 Thread Larry Hastings
Larry Hastings added the comment: Last installed wins isn't perfect, but at least it's predictable. Is it possible to make the 3.4 installer detect that 3.5+ is installed and not install the launcher? -- ___ Python tracker rep...@bugs.python.org

[issue24481] hotspot pack_string Heap Buffer Overflow

2015-06-20 Thread JohnLeitch
New submission from JohnLeitch: The hotspot module suffer from a heap buffer overflow due to a memcpy in the pack_string function at line 633: static int pack_string(ProfilerObject *self, const char *s, Py_ssize_t len) { if (len + PISIZE + self-index = BUFFERSIZE) { if

[issue24462] bytearray.find Buffer Over-read

2015-06-20 Thread JohnLeitch
JohnLeitch added the comment: Given my understanding of the issue, the memcmp approach seems like a viable fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24462 ___

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-20 Thread Yury Selivanov
Yury Selivanov added the comment: Nick, Martin, here's an updated patch with all your comments addressed. -- Added file: http://bugs.python.org/file39751/corotype.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-06-20 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- dependencies: +Awaitable ABC incompatible with functools.singledispatch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24017 ___

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-20 Thread Nick Coghlan
Nick Coghlan added the comment: Latest version looks good to me - I'd suggest we merge this, and file any remaining problems as separate issues. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400

[issue24468] Expose C level compiler flag constants to Python code

2015-06-20 Thread Nick Coghlan
Nick Coghlan added the comment: Making _opcode a builtin module rather than an extension module makes more sense to me than adding more random stuff to the sys module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24468

[issue24325] Speedup types.coroutine()

2015-06-20 Thread Nick Coghlan
Nick Coghlan added the comment: +1 from me for merging this for 3.5.0 and deferring issue 24468 (which now proposes making _opcode a builtin module to allow compiler constants to be easily shared between C code and Python code) to 3.6 instead. The design changes to address issue 24400 cleaned

[issue15753] No-argument super in method with variable arguments raises SystemError

2015-06-20 Thread Martin Panter
Martin Panter added the comment: The obvious workaround is to include an explicit “self” parameter (name shouldn’t matter): def f(arbitrary, *positional, **most_keywords): all_positional = (arbitrary,) + positional ... If you need to reserve all keyword parameter names, you could try

[issue24325] Speedup types.coroutine()

2015-06-20 Thread Yury Selivanov
Yury Selivanov added the comment: Larry, Nick, Looking at how issue24400 progresses, I think it would be really great if we can merge this one in 3.5.0. It also makes it unnecessary to merge issue24468 in 3.5. -- dependencies: +Awaitable ABC incompatible with

[issue24481] hotshot pack_string Heap Buffer Overflow

2015-06-20 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +benjamin.peterson stage: - needs patch title: hotspot pack_string Heap Buffer Overflow - hotshot pack_string Heap Buffer Overflow ___ Python tracker rep...@bugs.python.org

[issue20387] tokenize/untokenize roundtrip fails with tabs

2015-06-20 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've committed the patch without the change for at least two elements as https://bitbucket.org/jaraco/cpython-issue20387/commits/b7fe3c865b8dbdb33d26f4bc5cbb6096f5445fb2. The patch corrects the new test, demonstrating its effectiveness, but yields two new

[issue24479] Support LMMS project files in mimetypes.guess_type

2015-06-20 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- keywords: +easy stage: - needs patch versions: +Python 3.6 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24479 ___