[issue3158] Doctest fails to find doctests in extension modules

2013-07-16 Thread Zachary Ware
Zachary Ware added the comment: In looking at test_decimal for issue16748, I discovered that not all of the doctests for _decimal are being tested. So, I fixed it (or at least tried to :). This patch does the following: - Replace most inspect.isfunction checks in DocTestFinder with inspect.i

[issue18159] ConfigParser getters not available on SectionProxy

2013-07-16 Thread João Bernardo
João Bernardo added the comment: Was the patch accepted yet? Looks good to me -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue18404] Memory leak in gdbmmodule

2013-07-16 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue18467] argparse - problematic 'default' behavior

2013-07-16 Thread paul j3
paul j3 added the comment: I think this example illustrates your issue: class FooAction(argparse.Action): def __call__(self, parser, namespace, values, option_string = None): if values=='Q': setattr(namespace, self.dest, {

[issue10434] Document the rules for "public names"

2013-07-16 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue18478] Class bodies: when does a name become local?

2013-07-16 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18478] Class bodies: when does a name become local?

2013-07-16 Thread Terry J. Reedy
New submission from Terry J. Reedy: http://docs.python.org/3/reference/executionmodel.html#naming-and-binding says "The following are blocks: ... a class definition." and "If a name binding operation occurs anywhere within a code block, all uses of the name within the block are treated as refe

[issue18469] PyStructSequence does not handle exceptions correctly

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset af18829a7754 by Victor Stinner in branch 'default': Close #18469: Replace PyDict_GetItemString() with _PyDict_GetItemId() in structseq.c http://hg.python.org/cpython/rev/af18829a7754 -- nosy: +python-dev resolution: -> fixed stage: -> com

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: The public versus internal part of this issue is related to #10434 Document the rules for "public names", which contains among other things a suggested rewrite for PEP 8. -- ___ Python tracker

[issue18408] Fixes crashes found by pyfailmalloc

2013-07-16 Thread STINNER Victor
STINNER Victor added the comment: Oops. @Serhiy: Would *you* like to review attached patches ... -- ___ Python tracker ___ ___ Python

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Nick Coghlan
Nick Coghlan added the comment: Sure, I think it makes sense to put that in. I'll be running the whole patch by python-dev, enumerating the reasons for each change before I commit anything. -- ___ Python tracker __

[issue18408] Fixes crashes found by pyfailmalloc

2013-07-16 Thread STINNER Victor
STINNER Victor added the comment: @Serhiy: Would like to review attached patches listpop.patch (msg193130) and frame_fasttolocals.patch (msg193131)? (Other are already commited) -- ___ Python tracker _

[issue18408] Fixes crashes found by pyfailmalloc

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1872555a2f4e by Victor Stinner in branch 'default': Issue #18408: Mention changes in Misc/NEWS http://hg.python.org/cpython/rev/1872555a2f4e -- ___ Python tracker

[issue18408] Fixes crashes found by pyfailmalloc

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset c8696ee49291 by Victor Stinner in branch 'default': Issue #18408: Fix typo in build_node_tree() of the parser module http://hg.python.org/cpython/rev/c8696ee49291 New changeset cf8f42eadbd0 by Victor Stinner in branch 'default': Issue #18408: Fix Py

[issue18289] python.org Interactive interpreter linked with libedit can segfault on future OS X

2013-07-16 Thread Ned Deily
Ned Deily added the comment: Issue18458 has been opened to track this problem. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18289] python.org Interactive interpreter linked with libedit can segfault on future OS X

2013-07-16 Thread Ned Deily
Changes by Ned Deily : -- resolution: wont fix -> duplicate stage: -> committed/rejected superseder: -> libedit history offset workaround ___ Python tracker ___ ___

[issue18408] Fixes crashes found by pyfailmalloc

2013-07-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You are great! -- assignee: -> haypo nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bu

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Is the scope of this issue just what is in the title, the whole PEP, or something in between;-? For instance, Guido once approved (on pydev) adding an admonition to Programming Recommendations something like the following. * Use a def statement instead of an

[issue18036] "How do I create a .pyc file?" FAQ entry is out of date

2013-07-16 Thread A Kaptur
A Kaptur added the comment: Here is a suggestion for updated documentation in this section. I've added the description of __pycache__, included a very short description of what a .pyc file is, and moved the troubleshooting to the end of the section. I'm not sure whether the description ("a by

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue18467] argparse - problematic 'default' behavior

2013-07-16 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue18477] fix_import (2to3 fixer) is not case-sensitive

2013-07-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue18477] fix_import (2to3 fixer) is not case-sensitive

2013-07-16 Thread ProgVal
New submission from ProgVal: In a project, I have a package with a module named Socket.py, and the __init__.py imports the "socket" module (from the standard Python lib). However, when fix_import went over it _on Windows_, it converted "import socket" to "from . import Socket". I also had this

[issue18408] Fixes crashes found by pyfailmalloc

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 533eb9ab895a by Victor Stinner in branch 'default': Issue #18408: Fix fileio_read() on _PyBytes_Resize() failure http://hg.python.org/cpython/rev/533eb9ab895a New changeset f0efd7ea1627 by Victor Stinner in branch 'default': Issue #18408: Fix cjkcod

[issue17890] argparse: mutually exclusive groups full of suppressed args can cause AssertionErrors

2013-07-16 Thread paul j3
paul j3 added the comment: I just submitted a patch to http://bugs.python.org/issue11874 that substantially rewrites _format_actions_usage(). It generates the group and action parts separately, and does not do the kind of cleanup that produces this issue. --

[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2013-07-16 Thread p0lar_bear
Changes by p0lar_bear : -- versions: +Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2013-07-16 Thread p0lar_bear
p0lar_bear added the comment: I get similar results if my CGI script sends a Content-Type header of anything besides "text/html", e.g. print('Content-Type: text/json'). -- nosy: +p0lar_bear ___ Python tracker _

[issue16468] argparse only supports iterable choices

2013-07-16 Thread paul j3
paul j3 added the comment: I just submitted a patch to http://bugs.python.org/issue11874 which rewrites _format_actions_usage(). It now formats the groups and actions directly, keeping a list of these parts. It no longer has to cleanup or split a usage line into parts. So it is not sensitiv

[issue18349] argparse usage should preserve () in metavars such as range(20)

2013-07-16 Thread paul j3
paul j3 added the comment: I just submitted at patch to http://bugs.python.org/issue11874 that takes care of this issue as well. I rewrote _format_actions_usage() so it formats the parts directly, so there is no need cleanup or parse the full text string. -- _

[issue11874] argparse assertion failure with brackets in metavars

2013-07-16 Thread paul j3
paul j3 added the comment: Here's a patch that takes a different approach - rewrite _format_actions_usage() so it formats groups (and unattached actions) directly. It uses the same logic to determine when to format a group, but then it calls _format_group_usage() to format the group, withou

[issue18457] Fix and cleanup the ss1.py demo

2013-07-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue18448] Tools/demo/eiffel.py fails to run tests.

2013-07-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue18448] Tools/demo/eiffel.py fails to run tests.

2013-07-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___

[issue18448] Tools/demo/eiffel.py fails to run tests.

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset a9f7c2d49149 by Serhiy Storchaka in branch '2.7': Issue #18448: Fix a typo in Demo/newmetaclasses/Eiffel.py. http://hg.python.org/cpython/rev/a9f7c2d49149 New changeset 6e8ad6071100 by Serhiy Storchaka in branch '3.3': Issue #18448: Fix a typo in To

[issue18457] Fix and cleanup the ss1.py demo

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9098a4ad4d3e by Serhiy Storchaka in branch '3.3': Issue #18457: Fixed saving of formulas and complex numbers in Tools/demo/ss1.py. http://hg.python.org/cpython/rev/9098a4ad4d3e New changeset c6b91d894577 by Serhiy Storchaka in branch 'default': Issu

[issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts

2013-07-16 Thread paul j3
paul j3 added the comment: This patch produces the same usage as before, but I have rewritten _format_actions_usage() for both HelpFormatter and MultiGroupFormater. The original HelpFormatter._format_actions_usage() formats the actions, splices in group markings, cleans up the text, if needed,

[issue17214] http.client.HTTPConnection.putrequest encode error

2013-07-16 Thread LDTech
LDTech added the comment: This problem still exist in Python 3.3.2. The following code gives you an example: import urllib.request url = "http://www.libon.it/libon/search/isbn/3499155443"; req = urllib.request.Request(url) response = urllib.request.urlopen(req, timeout=30) the_page = response.r

[issue18211] -Werror=statement-after-declaration problem

2013-07-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: Why not? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue2263] struct.pack() + numpy int raises SystemError

2013-07-16 Thread Yury V. Zaytsev
Yury V. Zaytsev added the comment: As noted in issue5476, I've submitted a pull request for NumPy: ttps://github.com/numpy/numpy/pull/3526 . I hope that this fixes this problem too: on Py2, I've added Py_TPFLAGS_INT_SUBCLASS, on Py3, NumPy doesn't inherit from int anymore, because it's not a

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2013-07-16 Thread Yury V. Zaytsev
Yury V. Zaytsev added the comment: NumPy no longer uses the Trac for issues, the tracking has been moved to GitHub. I hope that the problem will be finally solved in NumPy by https://github.com/numpy/numpy/pull/3526 . -- nosy: +zaytsev ___ Python tr

[issue18448] Tools/demo/eiffel.py fails to run tests.

2013-07-16 Thread Févry Thibault
Févry Thibault added the comment: One more update. When it fails, it sometimes fails with : == ERROR: testEiffelMetaClass1 (__main__.Tests) -- Traceback (most r

[issue18475] No unittest.main in Lib/test/test_email/test_inversion.py

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset b92db0aebc42 by R David Murray in branch '3.3': Closes #18475: add unittest.main() to test_email/test_inversions. http://hg.python.org/cpython/rev/b92db0aebc42 New changeset 48f27b745519 by R David Murray in branch 'default': Merge: Closes #18475: a

[issue17778] Fix test discovery for test_multiprocessing.py

2013-07-16 Thread Richard Oudkerk
Richard Oudkerk added the comment: Thanks for the patches! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue18475] No unittest.main in Lib/test/test_email/test_inversion.py

2013-07-16 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue18476] No way to pass custom arguments for loggers and formatters.

2013-07-16 Thread Vinay Sajip
Vinay Sajip added the comment: I would prefer not to extend the functionality of fileConfig(), as dictConfig() is the preferred configuration approach. It's much more general than fileConfig() can be (without doing significant work on fileConfig(), which I'd like to not develop any further).

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This is expected. When you assign to "n.__div__" a function which takes two parameters, you have to call it with two parameters: aFunction = lambda x, y: (x, y) n.__div__ = aFunction aFunction(1, 2) n.__div__(1, 2) After all, aFunction an

[issue17778] Fix test discovery for test_multiprocessing.py

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8a922b28b97d by Richard Oudkerk in branch '3.3': Issue #17778: Fix test discovery for test_multiprocessing. (Patch by http://hg.python.org/cpython/rev/8a922b28b97d New changeset c704735487ae by Richard Oudkerk in branch 'default': Issue #17778: Fix

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: Could you provide an entire example, showing the class num and how you assign __div__? -- nosy: +eric.smith ___ Python tracker ___ _

[issue18476] No way to pass custom arguments for loggers and formatters.

2013-07-16 Thread Piotr Dobrogost
New submission from Piotr Dobrogost: It seems there's no way to pass custom arguments for loggers (http://hg.python.org/cpython/file/d9893d13c628/Lib/logging/__init__.py#l) and formatters (http://hg.python.org/cpython/file/d9893d13c628/Lib/logging/config.py#l117) the same way they are bei

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread James Lu
James Lu added the comment: Also,there were some bugs, but after I fixed them, it would only work if I did this: n.__div__(n,3) -- ___ Python tracker ___ ___

[issue18475] No unittest.main in Lib/test/test_email/test_inversion.py

2013-07-16 Thread Vajrasky Kok
New submission from Vajrasky Kok: There is no unittest.main in Lib/test/test_email/test_inversion.py. In other word, you can not execute the test by doing something like this: [abcdef@localhost cpython]$ ./python Lib/test/test_email/test_inversion.py Attached the menial fix. -- compon

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread James Lu
James Lu added the comment: instance,assinged during __init__ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread James Lu
James Lu added the comment: 2.5,new-style -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread Brett Cannon
Brett Cannon added the comment: What version of Python is this and did you assign the lambda to an instance or class (and if this is Python 2, new-style or classic class)? -- nosy: +brett.cannon ___ Python tracker

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread James Lu
Changes by James Lu : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread James Lu
New submission from James Lu: if you assign a lambda to a object and call it,you get this: Traceback (most recent call last): File "", line 1, in n.__div__(3) TypeError: () takes exactly 2 arguments (1 given) The full test is here: >>> n = num() >>> n.__div__ at 0x040B2DF0> >>> n/3 Traceb

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains

2013-07-16 Thread Aaron Iles
Aaron Iles added the comment: My +1 is for the callback based approach. The brevity of the search loop for finding the innermost function is (in my opinion at least) non-obvious, relying on for loops not having their own scope as it does. If a generator based API was adopted instead, I propose

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Nick Coghlan
Nick Coghlan added the comment: Tweaked the wording in the introduction to cover removal of obsolete conventions along with adding new ones. -- Added file: http://bugs.python.org/file30938/issue18472_pep_8_update3.diff ___ Python tracker

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Nick Coghlan
Nick Coghlan added the comment: Thomas Wouters made a couple of good points regarding absolute vs explicit relative imports, so I've improved the rationale in the PEP accordingly. -- Added file: http://bugs.python.org/file30937/issue18472_pep_8_update2.diff

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Nick Coghlan
Nick Coghlan added the comment: Attached diff has 5 changes: * Explicit note that this is a living document that evolves over time * Adds another explicit reason for not complying with the style guide (i.e. the code is old but still works and there's no other reason to change it) * Fixed outdat

[issue18448] Tools/demo/eiffel.py fails to run tests.

2013-07-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- type: -> behavior versions: +Python 3.3, Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mail

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2013-07-16 Thread Mikhail Korobov
Mikhail Korobov added the comment: my copy-paste went wrong, last statement in the example should be >>> pickle.dumps(dct, protocol=1, fix_imports=False) b'ccollections\ndefaultdict\nq\x00)Rq\x01.' -- ___ Python tracker

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2013-07-16 Thread Mikhail Korobov
New submission from Mikhail Korobov: I think REVERSE_IMPORT_MAPPING is wrong (see http://hg.python.org/cpython/file/7272ef213b7c/Lib/_compat_pickle.py#l80 ). It relies on dictionary items order and maps 'collections' module to either UserString or UserList. This makes it impossible to unpickle

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Nick Coghlan
New submission from Nick Coghlan: A home for a couple of proposed PEP 8 updates (as per the thread starting at http://mail.python.org/pipermail/python-dev/2013-July/127284.html) -- messages: 193159 nosy: ncoghlan priority: normal severity: normal status: open title: PEP 8 updates - inte

[issue18211] -Werror=statement-after-declaration problem

2013-07-16 Thread STINNER Victor
STINNER Victor added the comment: By the way, I don't think that Python should pass the optimization level (-O0 or -O3) to extensions, except for builtin extensions (of the stdlib). -- ___ Python tracker _

[issue18211] -Werror=statement-after-declaration problem

2013-07-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue9033] cmd module tab misbehavior

2013-07-16 Thread Ronald Oussoren
Ronald Oussoren added the comment: I no longer particularly like my patch, although something needs to be done. The easiest way forward is likely a (private) helper function in the readline module that can translate simple readline configuration strings to something that libedit understands an