[issue12207] Document ast.PyCF_ONLY_AST

2011-05-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: Use of PyCF_ONLY_AST be superseded by ast.parse. -- nosy: +benjamin.peterson priority: normal -> low ___ Python tracker <http://bugs.python.org/issu

[issue12212] Minor proofreading typo in index.rst

2011-05-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: e685024a2699 -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue9326] Error message for incorrect number of (function) args is incorrect

2011-05-30 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think some one should just rewrite this code from scratch. Every time I fix something, it breaks something else. -- ___ Python tracker <http://bugs.python.org/issue9

[issue12216] future imports change the reporting of syntaxerrors

2011-05-30 Thread Benjamin Peterson
Benjamin Peterson added the comment: Actually anything before the last statement will cause this >>> compile("\ndef foo(", '', 'exec') Traceback (most recent call last): File "", line 1, in File "", l

[issue12225] current tip doesn't build without mercurial installed

2011-05-31 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/5/31 Roumen Petrov : > > Roumen Petrov added the comment: > > Check for python executable is not complete . What about if system has only > version 3+ installed ? Then hg can't possibly

[issue12221] segfaults with unexpanded $Revision$ id's in release candidate tarballs

2011-05-31 Thread Benjamin Peterson
Benjamin Peterson added the comment: I've fixed the pyexpat.__version__ from segfaulting. The other ones are harmless and can be removed later. -- priority: release blocker -> normal ___ Python tracker <http://bugs.python.org

[issue12236] Tkinter __version__ uses subversion substitution

2011-06-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yes, it's harmless, though. I've removed it for 3.3. -- priority: release blocker -> normal resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs

[issue12236] Tkinter __version__ uses subversion substitution

2011-06-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/2 Ned Deily : > > Ned Deily added the comment: > > Can we be sure it's harmless?  A quick Google search turned up at least one > package that depends on Tkinter.__version__ (granted, for Python 2). > >

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: No additional type-checking was added. The problem is that __dir__ didn't work on old-style classes at all in 2.7.1: $ python Python 2.7.1 (r271:86832, Mar 24 2011, 22:44:47) [GCC 4.4.5] on linux2 Type "help", "copyright", "

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/3 Nick Coghlan : > > Nick Coghlan added the comment: > > Ah, I wondered about that when I saw Barry was using old-style classes in his > example. Perhaps the answer then is to add a PyInstance_Check() to skip > invocation of __

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/3 Raymond Hettinger : > > Raymond Hettinger added the comment: > > I believe the type check was gratuitous to begin with and should be removed.   > There's no reason the result has to be a list. The reason for it is that the sor

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/4 Soren Hansen : > > Soren Hansen added the comment: > > When I first investigated this problem (I reported the original bug on > Launchpad), my first attempt to address this issue in pymox had me quite > stumped. The class

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/4 Soren Hansen : > > Soren Hansen added the comment: > > 2011/6/4 Benjamin Peterson : >> 2011/6/4 Soren Hansen : >>> So my question is: If this change stays (which seems clear given that the >>> only changes pr

[issue12265] revamp argument errors

2011-06-04 Thread Benjamin Peterson
New submission from Benjamin Peterson : This patch completely rewrites errors given for positional error mismatches. The goal is to give more informative and correct errors. Some examples: >>> def f(): pass ... >>> f(1) Traceback (most recent call last): File "&quo

[issue12265] revamp argument errors

2011-06-04 Thread Benjamin Peterson
Changes by Benjamin Peterson : Removed file: http://bugs.python.org/file22252/argerror.patch ___ Python tracker <http://bugs.python.org/issue12265> ___ ___ Python-bug

[issue12265] revamp argument errors

2011-06-04 Thread Benjamin Peterson
Changes by Benjamin Peterson : Added file: http://bugs.python.org/file22253/argerror.patch ___ Python tracker <http://bugs.python.org/issue12265> ___ ___ Python-bug

[issue4949] Constness in PyErr_NewException

2011-06-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: This patch is not applicable anymore to 3.x. -- nosy: +benjamin.peterson resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue12273] Change ast.__version__ calculation to provide consistent ordering

2011-06-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: I propose we leave ast.__version__ alone. Using ast.__version__ at all should be a very advanced usecase. Generally, you should just be able to look at sys.version_info. We could document this rather than duplicating sys.version_info in ast.__version__. I

[issue6474] Inconsistent TypeError message on function calls with wrong number of arguments

2011-06-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: Hopefully this situation was improved by #12265. -- ___ Python tracker <http://bugs.python.org/issue6474> ___ ___ Python-bug

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: It should probably be buffered at 512 bytes or some other reasonable number. -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue12

[issue9284] inspect.findsource() cannot find source for doctest code

2011-06-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: - First line should be directly after the docstring - One import per line - Shouldn't this test be in test_inspect, since that's what you're changing? -- ___ Python tracker <http://bugs.py

[issue9284] inspect.findsource() cannot find source for doctest code

2011-06-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/9 Dirkjan Ochtman : > > Dirkjan Ochtman added the comment: > > I'm fine with moving the test; I put it in doctest because the inspect > behavior we're relying upon here seems somewhat doctest-specific, and the > test

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/9 Barry A. Warsaw : > > Barry A. Warsaw added the comment: > > Raymond, I like your patch and I think it addresses the issue nicely.  I made > one small change, which is to add a test for non-list-sequenceness instead of > cha

[issue12009] netrc module crashes if netrc file has comment lines

2011-06-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: I'd like to see this go in. +# seek to the beginning of the comment, then skip the line. +pos = len(tt) + 1 +lexer.instream.seek(-pos, 1) +lexer.instream.readline() Can'

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: I look at it this way: If I was browsing the 2.7 code and saw that type check, would I remove it in the bugfix release? No. I'm going to mark this resolved. Thanks everyone. -- resolution: -> works for me status: open -

[issue12332] Float division

2011-06-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yep. See http://docs.python.org/tutorial/floatingpoint.html -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12340] Access violation when using the C version of the io module

2011-06-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Can you produce a self-contained test case? -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue12

[issue12345] Add math.tau

2011-06-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Perhaps we should wait until \tau gains popularity larger than some impassioned physicist. \tau has been used to represent the golden ratio longer. -- nosy: +benjamin.peterson ___ Python tracker <h

[issue12345] Add math.tau

2011-06-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/16 STINNER Victor : > > STINNER Victor added the comment: > >> Actually, I've heard there are an infinity of them. > > Can you prove that? Don't have to. Axiom of infinity. :) -- ___

[issue12356] more argument error improving

2011-06-17 Thread Benjamin Peterson
New submission from Benjamin Peterson : After completing #12265, it was pointed out to me that the error message is still not perfect: >>> def f(a, b, c=3, d=4, e=6, f=3, g=32): pass ... >>> f(1, f=4, d=90) Traceback (most recent call last): File "", line 1, in

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: Why can't you just call fileno() on the file object? -- ___ Python tracker <http://bugs.python.org/issue12291> ___ ___

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/18 Vinay Sajip : > > Vinay Sajip added the comment: > > Sorry I'm being dense, but which file object do you mean? The python file object. -- ___ Python tracker <http://bugs.p

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/18 Vinay Sajip : > > Vinay Sajip added the comment: > >> Benjamin Peterson added the  comment: >> >  Vinay Sajip added the  comment: >> > >> > Sorry I'm being dense, but which file object do you  mean?

[issue12346] Python source code build fails with old mercurial

2011-06-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: So, it seems the problem is not actually that the build depends on mercurial, it's that it fails with ancient mercurials. -- title: Python source code build (release) depends on mercurial -> Python source code build fails with old m

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/19 Vinay Sajip : > > Vinay Sajip added the comment: > > This seems a bit hacky, and I'm not sure how reliable it is. I added this > after the read_object call: > >    if (is_file) { >        PyObject * newpos; >

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/19 Vinay Sajip : > > Vinay Sajip added the comment: > > The problem with calling fileno() and fdopen() is that you bypass the > buffering information held in BufferedIOReader. The first call works, but the > FILE * pointer is no

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think you're right about playing with the bare fd being too fragile. I think a simpler solution is to read say 1024 bytes at a time and buffer it internally. -- ___ Python tracker <http://bugs.py

[issue12356] more argument error improving

2011-06-20 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue12356> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12370] Use of super overwrites use of __class__ in class namespace

2011-06-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: One reason is that it bumps the pyc magic number. -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue12

[issue12356] more argument error improving

2011-06-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: Nick (or anyone else), do you want to look at this? -- ___ Python tracker <http://bugs.python.org/issue12356> ___ ___ Pytho

[issue6474] Inconsistent TypeError message on function calls with wrong number of arguments

2011-06-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: Maybe #12356 then? -- ___ Python tracker <http://bugs.python.org/issue6474> ___ ___ Python-bugs-list mailing list Unsub

[issue12399] make cell var initialization more efficient

2011-06-24 Thread Benjamin Peterson
New submission from Benjamin Peterson : Initializing cell variables currently involves 2 nested loops every function call. This patch makes that process much more efficient by saving information which doesn't change every function call to the code object. -- components: Interp

[issue12399] make cell var initialization more efficient

2011-06-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/24 Jesús Cea Avión : > > Jesús Cea Avión added the comment: > > Could you possibly post a before/after timing comparison?. Some realistic > code... Post the test code too. > > And yes, I know that the difference will depend

[issue12399] make cell var initialization more efficient

2011-06-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: The attached highly braindead benchmark reports about a 2% improvement. -- Added file: http://bugs.python.org/file22444/x.py ___ Python tracker <http://bugs.python.org/issue12

[issue12399] simplify cell var initialization by storing constant data on the code object

2011-06-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: Thanks for the review. -- Added file: http://bugs.python.org/file22450/bettercells2.patch ___ Python tracker <http://bugs.python.org/issue12

[issue12414] getsizeof() on code objects is wrong

2011-06-25 Thread Benjamin Peterson
New submission from Benjamin Peterson : sys.getsizeof() on a code object returns on the size of the code struct, not the arrays and tuples which it references. -- components: Interpreter Core messages: 139142 nosy: benjamin.peterson priority: normal severity: normal status: open title

[issue11302] Add more tests to test_ast.py

2011-06-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: You still haven't explained why including multiline literals is a good idea. Also, the reason we avoid matching exact messages is it can vary across implementations. You can still do an accurate test with something like self.assertIn("foob

[issue11302] Add more tests to test_ast.py

2011-06-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/27 Vincent Legoll : > > Vincent Legoll added the comment: > > I was testing exact matches on the strings because I think pypy wants to be > as compliant as possible with cpython, and IMHO that include exception msgs > as far as

[issue12503] "with" statement error message is more confusing in Py2.7

2011-07-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: The message is not inaccurate, but indeed misleading. In wonder what to do considering the traditional message of AttributeError is simply the missing attribute. -- nosy: +benjamin.peterson priority: normal ->

[issue12511] class/instance xyz has no attribute '_abc'

2011-07-07 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: accepted -> invalid ___ Python tracker <http://bugs.python.org/issue12511> ___ ___ Python-bugs-list mai

[issue12519] Call next version 3.3.0

2011-07-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/7/9 Éric Araujo : > > Éric Araujo added the comment: > > Benjamin committed 2ebcbdca0dee for patchlevel.h, but idlever, > distutils.__init__ and others are not edited yet. I don't care that much. When the tree is bumped to 3.0.0a

[issue12527] assertRaisesRegex doc'd with 'msg' arg, but it's not implemented?

2011-07-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: You're not getting this? .FFE == ERROR: test_intfail4 (__main__.TestInt) -- Traceback (most recent call last):

[issue12530] cpython 3.3, __class__ missing.

2011-07-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: No, this is consistent (again) with Python 2. -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12535] Chained tracebacks are confusing because the first traceback is minimal

2011-07-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: There _is_ no full traceback for the first exception. It stops as soon as it's handled. -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/is

[issue12544] Avoid using a pseudo-dict for _type_equality_funcs in unittest

2011-07-12 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue12544> ___ ___ Python-bugs-

[issue12544] Avoid using a pseudo-dict for _type_equality_funcs in unittest

2011-07-13 Thread Benjamin Peterson
Benjamin Peterson added the comment: Actually, what happened was I saw the bug report, didn't see your patch, and started working on my own patch. I see we came to roughly the same conclusion, though. :) About the test, I'm not sure testcases having no cyclic references is p

[issue12536] lib2to3 BaseFix class creates un-needed loggers leading to refleaks

2011-07-13 Thread Benjamin Peterson
Benjamin Peterson added the comment: I say kill the loggers. -- ___ Python tracker <http://bugs.python.org/issue12536> ___ ___ Python-bugs-list mailing list Unsub

[issue12544] Avoid using a pseudo-dict for _type_equality_funcs in unittest

2011-07-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Done. 2011/7/15 Michael Foord : > > Michael Foord added the comment: > > I wouldn't object to having a cyclic reference test for TestCase, although if > it ever becomes a problem for the development of unittest we may have to > di

[issue11343] Make errors due to full parser stack identifiable

2011-07-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Just make it a SyntaxError. -- ___ Python tracker <http://bugs.python.org/issue11343> ___ ___ Python-bugs-list mailin

[issue11343] Make errors due to full parser stack identifiable

2011-07-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Oh, I see Martin disagrees. SyntaxError is raised for anything which Python won't compile. For example, too many arguments gets a SyntaxError. -- ___ Python tracker <http://bugs.python.org/is

[issue11343] Make errors due to full parser stack identifiable

2011-07-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/7/16 Nick Coghlan : > > Nick Coghlan added the comment: > > +1 for a new exception type to indicate "this may technically be legal > Python, but this Python implementation cannot handle it correctly" > > Whatever exc

[issue11343] Make errors due to full parser stack identifiable

2011-07-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/7/16 Nick Coghlan : > > Nick Coghlan added the comment: > > It's important to remember that other implementations treat CPython as > the "gold standard" for compatibility purposes. If we declare > something to be a

[issue11343] Make errors due to full parser stack identifiable

2011-07-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/7/16 Nick Coghlan : > > Nick Coghlan added the comment: > > It also makes it clear to users whether they've just run up against a > limitation of the implementation they're using or whether what they've > written is gen

[issue11343] Make errors due to full parser stack identifiable

2011-07-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/7/16 Nick Coghlan : > > Nick Coghlan added the comment: > > It matters, because Python "users" are programmers, and most > programmers want to know *why* they're being told something is wrong. > Raising MemoryError

[issue12575] add a AST validator

2011-07-16 Thread Benjamin Peterson
New submission from Benjamin Peterson : The goal of this patch to keep people doing silly things like producing a Try with no finalbody or excepthandlers and segfaulting the compiler in unpleasant ways. -- components: Interpreter Core files: ast_validator.patch keywords: patch

[issue12575] add a AST validator

2011-07-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/7/16 Armin Ronacher : > > Armin Ronacher added the comment: > > I see what you did there :P Is that a message of approval? :) -- ___ Python tracker <http://bugs.python

[issue12610] Fatal Python error: non-string found in code slot

2011-07-22 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> duplicate status: open -> closed superseder: -> SystemError: Objects/codeobject.c:64: bad argument to internal function ___ Python tracker <http://bugs.python.or

[issue12608] crash in PyAST_Compile when running Python code

2011-07-23 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- dependencies: +add a AST validator ___ Python tracker <http://bugs.python.org/issue12608> ___ ___ Python-bugs-list mailin

[issue12651] -O2 or -O3? this brings excitement to computing!

2011-07-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in default. It's harmless in other versions. -- nosy: +benjamin.peterson resolution: -> wont fix status: open -> closed ___ Python tracker <http://bugs.python.

[issue12655] Expose sched.h functions

2011-07-29 Thread Benjamin Peterson
New submission from Benjamin Peterson : For fun and profit. :) -- components: Extension Modules files: sched_stuff.patch keywords: patch messages: 141401 nosy: benjamin.peterson, pitrou priority: normal severity: normal status: open title: Expose sched.h functions type: feature request

[issue12655] Expose sched.h functions

2011-07-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/7/29 Amaury Forgeot d'Arc : > > Amaury Forgeot d'Arc added the comment: > >> @@ -10330,26 +10899,34 @@ INITFUNC(void) > I know that it's only an increase of 5%, but I feel that posixmodule.c is > already large en

[issue12575] add a AST validator

2011-07-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: It'd be nice to get this in soon, so phase 2 can begin. -- ___ Python tracker <http://bugs.python.org/issue12575> ___ ___

[issue12654] sum() works with bytes objects

2011-07-29 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue12654> ___ ___ Python-bugs-

[issue12655] Expose sched.h functions

2011-07-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: I actually implemented this because I wanted to confine a Python process to a cpu to prevent keep it from being tossed from core to core. It made sense to bring the other scheduling functions along for the ride

[issue12655] Expose sched.h functions

2011-07-29 Thread Benjamin Peterson
Changes by Benjamin Peterson : Added file: http://bugs.python.org/file22797/sched_stuff.patch ___ Python tracker <http://bugs.python.org/issue12655> ___ ___ Python-bug

[issue12655] Expose sched.h functions

2011-07-30 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/7/30 Charles-François Natali : > > Charles-François Natali added the comment: > >> I actually implemented this because I wanted to confine a Python process to >> a cpu to prevent keep it from being tossed from core to core. It ma

[issue12655] Expose sched.h functions

2011-07-30 Thread Benjamin Peterson
Changes by Benjamin Peterson : Added file: http://bugs.python.org/file22805/sched_stuff.patch ___ Python tracker <http://bugs.python.org/issue12655> ___ ___ Python-bug

[issue12675] tokenize module happily tokenizes code with syntax errors

2011-08-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: This should probably be fixed (patches welcome). However, note even with valid Python code, the tokens are not the same. -- ___ Python tracker <http://bugs.python.org/issue12

[issue8639] Allow callable objects in inspect.getfullargspec

2011-08-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: I'm -0.5. I think the current patch makes too many assumptions for the caller. For example, someone calling a class may really desire __new__'s signature, not that of __init__. Moreover, conceptually, getargspec() returns the argspec of a

[issue12675] tokenize module happily tokenizes code with syntax errors

2011-08-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: tokenize has useful features that the builtin tokenizer does not possess such as the NL token. -- ___ Python tracker <http://bugs.python.org/issue12

[issue12681] unittest expectedFailure could take a message argument like skip does

2011-08-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: Too late I'm afraid as expectedFailure not expectedFailure() is the decorator. -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/is

[issue12685] The backslash escape doesn't concatenate two strings in one in the with statement

2011-08-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: Why would you expect that to concatenate strings? You have an unterminated quote? -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12716] Reorganize os docs for files/dirs/fds

2011-08-09 Thread Benjamin Peterson
New submission from Benjamin Peterson : Right now many of the os function docs are split up into "Files and directories" and "file descriptor operations". This means, for example, that fchmod() and fchmodat() are in a different section than chmod(). It would make more s

[issue12716] Reorganize os docs for files/dirs/fds

2011-08-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: Also, symbolic constants should be close to the functions they are used in. For example, open() flags shouldn't be in their own section. -- ___ Python tracker <http://bugs.python.org/is

[issue12718] Logical mistake of importer method in logging.config.BaseConfigurator

2011-08-09 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> vinay.sajip nosy: +vinay.sajip ___ Python tracker <http://bugs.python.org/issue12718> ___ ___ Python-bugs-lis

[issue12719] Direct access to tp_dict can lead to stale attributes

2011-08-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is forbidden, and I agree there should be a doc note. See #1878. -- assignee: -> docs@python components: +Documentation -Extension Modules nosy: +benjamin.peterson, docs@python ___ Python tracker &l

[issue12720] Expose linux extended filesystem attributes

2011-08-09 Thread Benjamin Peterson
New submission from Benjamin Peterson : These allow extra metadata to be attached to files. -- components: Extension Modules files: xattrs.patch keywords: patch messages: 141842 nosy: benjamin.peterson priority: normal severity: normal stage: patch review status: open title: Expose

[issue12608] crash in PyAST_Compile when running Python code

2011-08-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: Officially fixed by #12575. -- ___ Python tracker <http://bugs.python.org/issue12608> ___ ___ Python-bugs-list mailin

[issue12608] crash in PyAST_Compile when running Python code

2011-08-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/8/10 Meador Inge : > > Meador Inge added the comment: > > I have verified that the code checked in for issue12575 keep the test case > from this issue from crashing the interpreter: > > [meadori@motherbrain cpython]$ ./python test

[issue10588] imp.find_module raises unexpected SyntaxError

2011-08-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: The reason for this is that file_module tries to detect the encoding of the file to set the encoding for the opened file. IMO, it should just return a file in binary mode. -- nosy: +benjamin.peterson, haypo

[issue12724] Add Py_RETURN_NOTIMPLEMENTED

2011-08-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: +1 -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue12724> ___ ___ Python-bugs-list mailin

[issue12746] normalization is affected by unicode width

2011-08-12 Thread Benjamin Peterson
New submission from Benjamin Peterson : Narrow build: unicodedata.normalize("NFKC", "𝔘𝔫𝔦𝔠𝔬𝔡𝔢") '𝔘𝔫𝔦𝔠𝔬𝔡𝔢' Wide build: >>> unicodedata.normalize("NFKC", "𝔘𝔫𝔦𝔠𝔬𝔡𝔢") 'Unicode' Normalization needs to properly

[issue12751] Use macros for surrogates in unicodeobject.c

2011-08-16 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> duplicate status: open -> closed superseder: -> Py_UNICODE_NEXT and other macros for surrogates ___ Python tracker <http://bugs.python.or

[issue12760] Add create mode to open()

2011-08-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think this should be brought up on python-ideas or python-dev. -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue12

[issue12766] strange interaction between __slots__ and class-level attributes

2011-08-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: This sort of thing is true of any slotted class with class attributes: >>> class X: ... __slots__ = () ... foo = None ... >>> X().foo = "hello" Traceback (most recent call last): File "", line 1, in Attribu

[issue12766] strange interaction between __slots__ and class-level attributes

2011-08-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: So would you prefer to see >>> x.foo Traceback (most recent call last): File "", line 1, in AttributeError: foo >>> x.foo = 5 >>> x.foo 5 ? -- ___ Python tracke

[issue12766] strange interaction between __slots__ and class-level attributes

2011-08-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: I'm afraid that's not (easily) possible. Using __slots__ implicitly gives classes attributes, so what you are seeing is the effect of toying with that. It's not really possible to pretend there are different attributes on the class than

[issue12720] Expose linux extended filesystem attributes

2011-08-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: Here is a new patch, implementing Antoine's suggestions. -- Added file: http://bugs.python.org/file22937/xattrs.patch ___ Python tracker <http://bugs.python.org/is

[issue12720] Expose linux extended filesystem attributes

2011-08-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: And here is the next version, taking into account neologix's review. -- Added file: http://bugs.python.org/file23056/xattrs.patch ___ Python tracker <http://bugs.python.org/is

[issue12720] Expose linux extended filesystem attributes

2011-08-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/8/28 Antoine Pitrou : > > Antoine Pitrou added the comment: > > Is it normal that listxattr() succeeds but getxattr() fails with ENOTSUPP? > >>>> os.listxattr("/") > [] >>>> os.getxattr("/"

<    1   2   3   4   5   6   7   8   9   10   >