[issue9315] The trace module lacks unit tests

2010-08-01 Thread Eli Bendersky
Eli Bendersky added the comment: I understand you, Alexander, but this problem (as is the previous) **doesn't have anything to do with the fake module**. It would happen even if I didn't have it. Why does it only strike this test, then? Because of my usage of __file__ to compar

[issue6798] Argument for sys.settrace() callbacks documented incorrectly

2010-08-03 Thread Eli Bendersky
Eli Bendersky added the comment: I can confirm Robert's findings. 1) The documentation of C_RETURN and C_EXCEPTION indeed says None while the function object is passed. This is seen in the implementation of the C_TRACE macro in Python/ceval.c 2) The arg of RETURN can be indeed NULL

[issue9315] The trace module lacks unit tests

2010-08-05 Thread Eli Bendersky
Eli Bendersky added the comment: Alexander, Yes, I plan to work on this during the weekend (which starts tomorrow where I'm at). Georg, Are you having plans for writing comprehensive tests for the module, or is this just a placeholder? I have no problem merging with this change, b

[issue3821] trace module bug when using --missing

2010-08-05 Thread Eli Bendersky
Eli Bendersky added the comment: TestCoverage.test_coverage_ignore fails when running in verbose mode ("python regrtest.py -v test_trace", or directly "python test_trace.py"), because it attempts to compare stdout.getvalue() with the empty string, while verbose places o

[issue9315] The trace module lacks unit tests

2010-08-05 Thread Eli Bendersky
Eli Bendersky added the comment: The test class added into test_trace.py in issue 3821 fails in verbose mode (see my message http://bugs.python.org/msg113076). I'm merging that class into my larger test_trace.py and will fix this problem, unless you guys have other

[issue9315] The trace module lacks unit tests

2010-08-06 Thread Eli Bendersky
Eli Bendersky added the comment: I'm attaching a new patch for unit-testing of trace.py. Changes: 1. Fixed the problems that caused failures when run through regrtest 2. Added the test class from issue 3821 3. Removed the fake module creation, replacing it with a directory

[issue9531] test_complex.py fails

2010-08-06 Thread Eli Bendersky
New submission from Eli Bendersky : eli...@eliben-desktop:~/python_src/svn-27-maint/Lib/test$ py27 regrtest.py test_complex.py test_complex test test_complex failed -- Traceback (most recent call last): File "/home/eliben/python_src/27-maint/Lib/test/test_complex.py", lin

[issue9531] test_complex.py fails

2010-08-06 Thread Eli Bendersky
Changes by Eli Bendersky : -- components: +Tests ___ Python tracker <http://bugs.python.org/issue9531> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9531] test_complex.py fails

2010-08-06 Thread Eli Bendersky
Eli Bendersky added the comment: Sorry, I didn't build (make) the python executable before reporting. Everything works, so I'm closing the issue. -- status: open -> closed ___ Python tracker <http://bugs.pyth

[issue9264] trace.py documentation is incomplete

2010-08-06 Thread Eli Bendersky
Eli Bendersky added the comment: I think it makes sense to commit the same patch to 2.7, is this planned? -- ___ Python tracker <http://bugs.python.org/issue9

[issue9315] The trace module lacks unit tests

2010-08-06 Thread Eli Bendersky
Eli Bendersky added the comment: [attaching a new patch version] 1. Are you refering to Lib/test/tracedmodules/__init__.py? I did add it - it appears in the patchfile. What do you mean? 2. Fixed 3. Fixed 4. I'm not sure. Tracing of the current file is also a common use case, and I r

[issue9323] trace.py bug with the main file being traced

2010-08-06 Thread Eli Bendersky
Eli Bendersky added the comment: It appears to affect 2.7 as well (probably because of a back-port from py3k to 27-maint in revision 83421). -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue9

[issue9323] trace.py bug with the main file being traced

2010-08-06 Thread Eli Bendersky
Eli Bendersky added the comment: Looking at Lib/test/regrtest.py: if __name__ == '__main__': # Simplification for findtestdir(). assert __file__ == os.path.abspath(sys.argv[0]) I'm not sure regrtest.py is prepared to be run from trace at all. Note that this err

[issue9312] Fix usage of :option: markup in stdlib ReST docs

2010-08-07 Thread Eli Bendersky
Eli Bendersky added the comment: Following the discussions on pydev and some private correspondence with Georg Brandl, I'm attaching an updated patch. Things changed: 1. Changes of :option: to ``...`` similar to previous patch 2. :program:`prog` :option:`opt` was changed to ``prog opt

[issue9312] Fix usage of :option: markup in stdlib ReST docs

2010-08-07 Thread Eli Bendersky
Eli Bendersky added the comment: Eric, thanks for the catch and the fix. If there's anything else, just let me know. -- ___ Python tracker <http://bugs.python.org/i

[issue17232] Improve -O docs

2013-02-23 Thread Eli Bendersky
Eli Bendersky added the comment: +1, I've been bothered by this description of "optimization" for a long time. Terry's patch LGTM -- nosy: +eli.bendersky ___ Python tracker <http://bug

[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2013-02-25 Thread Eli Bendersky
Eli Bendersky added the comment: Serhiy, thanks for working on this! I didn't read the whole patch yet - will tinker with it a bit more when applying. Did you prepare the patch vs. 3.3 or default? The two are still synced and I'd be happy to apply it to both branches. Now, the rea

[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-02-25 Thread Eli Bendersky
Eli Bendersky added the comment: Henrik, there's no need to provide more information in 3.2 and 2.7 than in 3.3 and default. Could you just align your patches with those (i.e. same wording in the documentation)? -- ___ Python tracker

[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2013-02-25 Thread Eli Bendersky
Eli Bendersky added the comment: No problems. You can go ahead and commit this patch to 3.3 and default, then. I will review it post-commit, since I wanted to tweak some things around anyway. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2013-02-25 Thread Eli Bendersky
Changes by Eli Bendersky : -- versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue15083> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-02-26 Thread Eli Bendersky
Eli Bendersky added the comment: Henrik. Yes, I think the change in 3.3 was intentional in order to avoid duplication that can be a source of errors. If ET.find() does exactly what ET.getroot().find() does, it suffices to mention it with a link. Since Element docs come first and arguably

[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2013-02-26 Thread Eli Bendersky
Eli Bendersky added the comment: Great, thanks. Now looking forward to the patch getting rid of the module-level globals. One idea is explicitly pass the module into each testing class. The classes should not rely on anything global in this respect

[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2013-02-26 Thread Eli Bendersky
Eli Bendersky added the comment: On Tue, Feb 26, 2013 at 8:08 PM, Ezio Melotti wrote: > > Ezio Melotti added the comment: > > > The next logical step is to make all test classes in test_xml_etree > > accept the ET module in some way and store it, using it to get classes &g

[issue12768] docstrings for the threading module

2013-03-03 Thread Eli Bendersky
Eli Bendersky added the comment: moijes, did you address the review comments? Does your patch apply to 3.2? -- ___ Python tracker <http://bugs.python.org/issue12

[issue10590] Parameter type error for xml.sax.parseString(string, ...)

2013-03-03 Thread Eli Bendersky
Eli Bendersky added the comment: I'm not very knowledgeable in other XML modules, but I hate to see this patch linger. Also it's a pre-requisite for #16986, it seems. Serhiy, since the patch is large could you give a short summary of the things it fixes? Note that the best approach

[issue10590] Parameter type error for xml.sax.parseString(string, ...)

2013-03-04 Thread Eli Bendersky
Eli Bendersky added the comment: Serhiy, OK - I'll look at #2175 first. But yes, Christian is right, let's wait for the security issues to be resolved first. -- ___ Python tracker <http://bugs.python.o

[issue16575] ctypes: unions as arguments

2013-03-04 Thread Eli Bendersky
Eli Bendersky added the comment: A minimal fix would be to update the documentation. A more comprehensive fix would be to tweak ctypes to reject unions and bit-fields when running on non-x86 (does this work for ARM and other non-Intel archs?) An even more comprehensive fix would be to make

[issue12768] docstrings for the threading module

2013-03-06 Thread Eli Bendersky
Eli Bendersky added the comment: I wouldn't expend too much effort on older versions though. So unless it's simple to adapt, IMHO 3.3+ is good enough. -- ___ Python tracker <http://bugs.python.o

[issue16576] ctypes: structure with bitfields as argument

2013-03-06 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: +eli.bendersky ___ Python tracker <http://bugs.python.org/issue16576> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16576] ctypes: structure with bitfields as argument

2013-03-06 Thread Eli Bendersky
Eli Bendersky added the comment: I propose to start with the attached documentation fix (generated vs. 3.2 but should be applied to all active branches). A code fix has to be discussed more thoroughly because in theory some code running only on x86-32 can rely on it and will break

[issue16576] ctypes: structure with bitfields as argument

2013-03-06 Thread Eli Bendersky
Eli Bendersky added the comment: I propose to start with the attached documentation fix (generated vs. 3.2 but should be applied to all active branches). A code fix has to be discussed more thoroughly because in theory some code running only on x86-32 can rely on it and will break

[issue16576] ctypes: structure with bitfields as argument

2013-03-06 Thread Eli Bendersky
Changes by Eli Bendersky : -- Removed message: http://bugs.python.org/msg183596 ___ Python tracker <http://bugs.python.org/issue16576> ___ ___ Python-bugs-list m

[issue16576] ctypes: structure with bitfields as argument

2013-03-06 Thread Eli Bendersky
Changes by Eli Bendersky : Removed file: http://bugs.python.org/file29327/issue16576.docfix.1.patch ___ Python tracker <http://bugs.python.org/issue16576> ___ ___ Pytho

[issue16576] ctypes: structure with bitfields as argument

2013-03-06 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: +amaury.forgeotdarc, belopolsky ___ Python tracker <http://bugs.python.org/issue16576> ___ ___ Python-bugs-list mailin

[issue12768] docstrings for the threading module

2013-03-06 Thread Eli Bendersky
Eli Bendersky added the comment: > I haven't read the patch in detail but I think the reference to Java's > threading model could probably be discarded. First, I don't know if it's > still true, second, I don't think anyone cares :) > > I agree. I

[issue17375] Add docstrings to methods in the threading module

2013-03-07 Thread Eli Bendersky
Eli Bendersky added the comment: Duplicate of #12768? karl - feel free to review the patch submitted to that issue and offer your insights. -- nosy: +eli.bendersky ___ Python tracker <http://bugs.python.org/issue17

[issue17378] Document that ctypes automatically applies byref() when argtypes declares POINTER

2013-03-07 Thread Eli Bendersky
New submission from Eli Bendersky: While playing with ctypes a bit, I noticed a feature that doesn't appear to be documented. Suppose I import the readdir_r function (assuming DIRENT is a correctly declared ctypes.Structure): DIR_p = c_void_p DIRENT_p = POINTER(DIRENT) DIRENT_pp = PO

[issue17378] Document that ctypes automatically applies byref() when argtypes declares POINTER

2013-03-07 Thread Eli Bendersky
Eli Bendersky added the comment: Doc patch for 3.2 -- keywords: +patch Added file: http://bugs.python.org/file29340/issue17378.1.patch ___ Python tracker <http://bugs.python.org/issue17

[issue17378] Document that ctypes automatically applies byref() when argtypes declares POINTER

2013-03-07 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: +amaury.forgeotdarc, theller ___ Python tracker <http://bugs.python.org/issue17378> ___ ___ Python-bugs-list mailing list Unsub

[issue16576] ctypes: structure with bitfields as argument

2013-03-07 Thread Eli Bendersky
Eli Bendersky added the comment: The patch addresses issue16575 as well -- nosy: +theller ___ Python tracker <http://bugs.python.org/issue16576> ___ ___ Python-bug

[issue17375] Add docstrings to methods in the threading module

2013-03-09 Thread Eli Bendersky
Eli Bendersky added the comment: Raymond - which patch is it? You didn't specify the contributor in the commit. What about the duplicate issue #12768 where someone also worked to supply a patch? Also, you've only committed this t

[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-03-09 Thread Eli Bendersky
Eli Bendersky added the comment: Henrik, this patch fails to apply to 3.2 applying issue11367_branch32.patch patching file Doc/library/xml.etree.elementtree.rst Hunk #1 FAILED at 411 1 out of 1 hunks FAILED -- saving rejects to file Doc/library/xml.etree.elementtree.rst.rej patching file Lib

[issue17359] python modules.zip is not documented

2013-03-09 Thread Eli Bendersky
Eli Bendersky added the comment: Marc-Andre, Can this issue be closed or are the docs lacking in some way? -- ___ Python tracker <http://bugs.python.org/issue17

[issue17138] XPath error in xml.etree.ElementTree

2013-03-09 Thread Eli Bendersky
Eli Bendersky added the comment: Gutzwiller, the [position] syntax means the Nth child *of its parent*. Since you placed the second into , it's the first child of its parent. So the library's behavior is correct here. Note: >>> [e.text for e in xml.findall(&#

[issue15518] Provide test coverage for filecmp.dircmp.report methods.

2013-03-09 Thread Eli Bendersky
Eli Bendersky added the comment: Chris Calloway, would you like to pursue this issue further? -- ___ Python tracker <http://bugs.python.org/issue15518> ___ ___

[issue16954] Add docstrings for ElementTree module

2013-03-09 Thread Eli Bendersky
Eli Bendersky added the comment: Thanks David, the patch looks good. I will commit it with some slight modifications and touch-ups shortly. The issue of C extension docstrings vs. Python docstrings is an interesting one. It's a shame that help() shows empty strings, and it's a sham

[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-03-09 Thread Eli Bendersky
Eli Bendersky added the comment: No, according to the devguide patches for Python have to be created with 'hg diff' and applicable with 'hg patch'. I can fix the patch in a number of ways, but I think it's important for a new contributor to learn how to generate a

[issue15518] Provide test coverage for filecmp.dircmp.report methods.

2013-03-11 Thread Eli Bendersky
Eli Bendersky added the comment: Chris, your reply seems to indicate that you're irritated for some reason, and I'm not sure why. I was simply going through my open issue backlog, and since this is something I'd like to see fixed, I noticed that you said in October that you hav

[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-03-12 Thread Eli Bendersky
Eli Bendersky added the comment: Thanks for the patches - committed with slight adaptations (in default branch the internal documentation switched from comments to docstrings). -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -&g

[issue12768] docstrings for the threading module

2013-03-13 Thread Eli Bendersky
Eli Bendersky added the comment: See also #17375 -- ___ Python tracker <http://bugs.python.org/issue12768> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17375] Add docstrings to methods in the threading module

2013-03-13 Thread Eli Bendersky
Eli Bendersky added the comment: On Wed, Mar 13, 2013 at 2:52 AM, Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > > You didn't specify the contributor in the commit. > > I'm the contributor. > Oh, I see. I thought it's taken from o

[issue16575] ctypes: unions as arguments

2013-03-18 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: +theller ___ Python tracker <http://bugs.python.org/issue16575> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12768] docstrings for the threading module

2013-03-20 Thread Eli Bendersky
Eli Bendersky added the comment: moijes12, since Raymond went ahead and committed a patch to 2.7 in #17375, I think patches to other versions should also be based on his patch. The most constructive thing you can do at this point is review his changes in 2.7 and help porting them to 3.x. Also

[issue17494] References to stack bottom are confusing

2013-03-21 Thread Eli Bendersky
Eli Bendersky added the comment: Top/bottom is accepted and understood nomenclature when talking about stacks. Think about a stack of plates in the kitchen. You put a new plate on top, you take it out from top. That's it. Now, lists are just one way to implement stacks, and printing th

[issue17494] References to stack bottom are confusing

2013-03-21 Thread Eli Bendersky
Eli Bendersky added the comment: I actually find the growth direction confusing sometimes for the same reasons (too much x86 assembly). This is why I wrote this blog post a while back - mainly so I can always look at it and de-confuse myself: http://eli.thegreenplace.net/2011/02/04/where-the

[issue15518] Provide test coverage for filecmp.dircmp.report methods.

2013-04-06 Thread Eli Bendersky
Eli Bendersky added the comment: A lot of the code in the tests is devoted to building the tested directory tree and populating it ( _setUpDirectories and related functions). You keep building and deleting this tree for every running test. I think that a better idea would be to just create

[issue15518] Provide test coverage for filecmp.dircmp.report methods.

2013-04-10 Thread Eli Bendersky
Eli Bendersky added the comment: Thanks, looks much better now. I left a couple of small comments in the code review. Other than that, it makes sense to me to update the existing tests to follow this scheme as well. Thanks! On a related note, since you've obviously studied the fi

[issue12768] docstrings for the threading module

2013-04-12 Thread Eli Bendersky
Eli Bendersky added the comment: Issue #17375 supersedes this one. Please post updated patches there. -- ___ Python tracker <http://bugs.python.org/issue12

[issue12768] docstrings for the threading module

2013-04-12 Thread Eli Bendersky
Changes by Eli Bendersky : -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/issue12768> ___ ___ Python-bugs-

[issue16575] ctypes: unions as arguments

2013-04-12 Thread Eli Bendersky
Eli Bendersky added the comment: I've opened a libffi issue in an attempt to get this fixed upstream: https://github.com/atgreen/libffi/issues/33 -- ___ Python tracker <http://bugs.python.org/is

[issue17670] Improve str.expandtabs() doc

2013-04-12 Thread Eli Bendersky
Eli Bendersky added the comment: I agree the doc could be clearer and Ned's example is very good. However I'd go one step forward and add a further elaboration of how the method works. This is the current doc (in default branch): Return a copy of the string where all tab char

[issue16954] Add docstrings for ElementTree module

2013-04-12 Thread Eli Bendersky
Eli Bendersky added the comment: David, would you like to pursue this further (figuring out how to make docstrings show in help() without duplicating?) -- ___ Python tracker <http://bugs.python.org/issue16

[issue16954] Add docstrings for ElementTree module

2013-04-14 Thread Eli Bendersky
Eli Bendersky added the comment: You can ask on the python-dev mailing list. It's possible that other Python developers ran into a similar issue. -- ___ Python tracker <http://bugs.python.org/is

[issue17670] Improve str.expandtabs() doc

2013-04-15 Thread Eli Bendersky
Eli Bendersky added the comment: It's better, although the distinction between "tab column" and "tab position" is not entirely clear. -- ___ Python tracker <http:

[issue17741] event-driven XML parser

2013-04-15 Thread Eli Bendersky
Eli Bendersky added the comment: Thanks Antoine. This looks interesting - I'm somewhat swamped ATM but will try to review the patch in the next few days. Incidentally, since it is a new feature would it be worthwhile to discuss it on python-

[issue17741] event-driven XML parser

2013-04-18 Thread Eli Bendersky
Eli Bendersky added the comment: Antoine, the patch LGTM. There's some more cleaning that needs to be done in surrounding code, but I can do that later. Also I should probably update the documentation with a bit more details. Just add a NEWS entry when you commit. Thanks for working on

[issue17670] Improve str.expandtabs() doc

2013-04-21 Thread Eli Bendersky
Eli Bendersky added the comment: LGTM! -- ___ Python tracker <http://bugs.python.org/issue17670> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17736] Misleading method comment in _elementtree.c : get_attrib_from_keywords

2013-04-22 Thread Eli Bendersky
Changes by Eli Bendersky : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue15518] Provide test coverage for filecmp.dircmp.report methods.

2013-04-28 Thread Eli Bendersky
Eli Bendersky added the comment: Thanks for the heads up Chris. Since I'm a bit busy myself lately, it's fine to wait until you have time to complete the patch. I'll review it then. -- ___ Python tracker <http://bugs.pyt

[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-08 Thread Eli Bendersky
New submission from Eli Bendersky: [this came up as part of the Enum discussions. Full details in this thread: http://mail.python.org/pipermail/python-dev/2013-May/126076.html] namedtuple currently uses this code to obtain the __module__ for the class it creates dynamically so that pickling

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky
Changes by Eli Bendersky : Removed file: http://bugs.python.org/file30191/ref435.py ___ Python tracker <http://bugs.python.org/issue17947> ___ ___ Python-bugs-list mailin

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky
Eli Bendersky added the comment: I don't see docs in the patch, but perhaps that should be a separate patch to keep reviewing easier. Also, Ethan, number the patch files in some way (like pep-435.1.patch, pep-435.N.patch) as they go through rounds of reviews. -- assignee: docs@p

[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-10 Thread Eli Bendersky
Eli Bendersky added the comment: A question that came up while reviewing the new enum code: "module" or "module_name" for this extra argument? The former is shorter, but the latter is more correct in a way. -- ___ P

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky
Eli Bendersky added the comment: OK, I sent another batch of reviews through the code review system - Ethan you should've gotten an email about it. -- ___ Python tracker <http://bugs.python.org/is

[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-10 Thread Eli Bendersky
Eli Bendersky added the comment: On Fri, May 10, 2013 at 7:02 AM, Guido van Rossum wrote: > > Guido van Rossum added the comment: > > Module, please. The class attribute is also called __module__ after all. > Makes sense. Thanks. -- ___

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky
Eli Bendersky added the comment: Regarding module vs. module_name for the extra param in the functional API, Guido rightly points out in issue 17941 that __module__ is the class attribute, so "module" is a consistent choice. -- ___ Pyth

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky
Eli Bendersky added the comment: By the way, if anyone is willing to take on the documentation, that could be of great help. It shouldn't be very hard since PEP 435 is extremely detailed. The stdlib .rst doc would be the descriptions from PEP 435 plus a reference of the exposed classes

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky
Eli Bendersky added the comment: On Fri, May 10, 2013 at 8:09 PM, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Two requests: > > 1. Lose the frame hack. With the explicit "module=__name__" API available, > the implicit fragile magic isn't n

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky
Eli Bendersky added the comment: > 2. Mike Bayer (SQL Alchemy author) has requested the ability to derive a > custom metaclass that turns off the Enums-with-members-are-final > subclassing restriction (relaxing the rule that members of an enum are > instances of that enum to "m

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Eli Bendersky
Eli Bendersky added the comment: Ethan, something is wrong with _StealthProperty. Well, two things. First, it's way too general and can be cut to just what Enum needs. Second, this is enough to make the tests pass: class _StealthProperty(): """ Returns the value

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Eli Bendersky
Eli Bendersky added the comment: Also, your test must run within the regrtest framework. Currently I get: ./python -mtest.regrtest test_enum [1/1] test_enum test test_enum failed -- Traceback (most recent call last): File "/home/eliben/python-src/default/Lib/test/test_enum.py", li

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Eli Bendersky
Eli Bendersky added the comment: Benjamin, I guess you can just unlink the message from the issue? [and then your clarification, and when again this message from me ;-)] -- ___ Python tracker <http://bugs.python.org/issue17

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-12 Thread Eli Bendersky
Eli Bendersky added the comment: Nick, could you open a separate issue for the frame hack discussion, like you did for the other things? You can make this one depend on it, if you feel it's a "blocker", but let's please not intermix

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-12 Thread Eli Bendersky
Eli Bendersky added the comment: Ethan, I pasted the minimized version to point out the problem; I fully agree it should do the getattr lookup because otherwise it's very difficult to understand what's going on. Let's keep exceptions for actual exceptional situations and expl

[issue17963] Deprecate the frame hack for implicitly getting module details

2013-05-12 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue17963> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1772673] Replacing char* with const char*

2013-05-13 Thread Eli Bendersky
Eli Bendersky added the comment: For external APIs visible to user code, this can cause some compatibility problems and users may need to at the very least re-compile this code. So -1 here. For new external APIs, having const wherever appropriate should be considered on a case by case basis

[issue1772673] Replacing char* with const char*

2013-05-13 Thread Eli Bendersky
Eli Bendersky added the comment: Antoine, I was referring to the discussion linked earlier (http://mail.python.org/pipermail/python-dev/2006-February/060689.html). Users of the C API needed to recompile their code and also add preprocessor hacks to make things compatible with C and C++, AFAIU

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Eli Bendersky
Changes by Eli Bendersky : -- assignee: -> eli.bendersky ___ Python tracker <http://bugs.python.org/issue17989> ___ ___ Python-bugs-list mailing list Unsubscri

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Eli Bendersky
Eli Bendersky added the comment: Yes, overwriting the Python classes with C classes is not an error, but the original issue is legit. The error should be more immediately reported. -- ___ Python tracker <http://bugs.python.org/issue17

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Eli Bendersky
Eli Bendersky added the comment: The problem is that element_setattro is returning a wrong value for error - NULL instead of -1. So the exception is set and is triggered on the next line instead. Will fix for 3.3 and default branches -- ___ Python

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Eli Bendersky
Changes by Eli Bendersky : -- stage: -> needs patch type: -> behavior ___ Python tracker <http://bugs.python.org/issue17989> ___ ___ Python-bugs-list

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Eli Bendersky
Eli Bendersky added the comment: Fixed. Thanks for the report! Python 3.4.0a0 (default:1b760f926846+9682241dc8fc+, May 18 2013, 07:52:49) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> impo

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Eli Bendersky
Changes by Eli Bendersky : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue17988] ElementTree.Element != ElementTree._ElementInterface

2013-05-18 Thread Eli Bendersky
Eli Bendersky added the comment: These "compatibility" names are likely to be remnants from the out-of-tree xml etree implementation before it made it into the stdlib. I think they can simply be removed in 3.4, as they're not docu

[issue17901] _elementtree.TreeBuilder raises IndexError on end if constructed with element_factory=None

2013-05-18 Thread Eli Bendersky
Eli Bendersky added the comment: I committed a fix with a simplified test. Thanks for the contribution, Aaron. Also, to get your patches committed directly you need to sign the Python contributor agreement. -- ___ Python tracker <h

[issue17901] _elementtree.TreeBuilder raises IndexError on end if constructed with element_factory=None

2013-05-18 Thread Eli Bendersky
Changes by Eli Bendersky : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue17988] ElementTree.Element != ElementTree._ElementInterface

2013-05-18 Thread Eli Bendersky
Eli Bendersky added the comment: > +1 for deletion of them (even in 3.3.3). Hmm, I don't think I agree. If someone relies on this thing for some obscure reason, breaking when the switch to 3.4 is made is still less abrasive than a break in a maintenance version. Since this isn'

[issue17902] Document that _elementtree C API cannot use custom TreeBuilder for iterparse or IncrementalParser

2013-05-18 Thread Eli Bendersky
Eli Bendersky added the comment: Aaron, could you please sign the PSF CLA (http://www.python.org/psf/contrib/contrib-form/) - this will make it accepting patches from you easier. Other than that, I agree it's a legit patch. The alternative would be to fix _elementtree to actually

[issue17988] ElementTree.Element != ElementTree._ElementInterface

2013-05-19 Thread Eli Bendersky
Changes by Eli Bendersky : -- versions: -Python 3.3 ___ Python tracker <http://bugs.python.org/issue17988> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17988] ElementTree.Element != ElementTree._ElementInterface

2013-05-19 Thread Eli Bendersky
Changes by Eli Bendersky : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

<    7   8   9   10   11   12   13   >