Benjamin Peterson added the comment:
Yep, len() has to return something less than sys.maxsize.
--
nosy: +benjamin.peterson
resolution: -> works for me
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Benjamin Peterson added the comment:
You change caused test_socketserver to hang. I attempted a fix, but I'm not
sure if it's completely correct.
--
nosy: +benjamin.peterson
___
Python tracker
<http://bugs.python.
Benjamin Peterson added the comment:
2011/5/24 Charles-François Natali :
>
> Charles-François Natali added the comment:
>
>> You change caused test_socketserver to hang. I attempted a fix, but I'm not
>> sure if it's completely correct.
>
> I'm a mo
Benjamin Peterson added the comment:
2011/5/24 STINNER Victor :
>
> STINNER Victor added the comment:
>
>> It's a bit of a rite of passage for new developers to
>> break the buildbots. :)
>
> How long is this rite?
The approximate number of times you do it
Benjamin Peterson added the comment:
Here is an improved patch. Sans comments, I will apply in a few days.
--
Added file: http://bugs.python.org/file22100/fixwith2.patch
___
Python tracker
<http://bugs.python.org/issue12
Benjamin Peterson added the comment:
2011/5/24 Nick Coghlan :
>
> Nick Coghlan added the comment:
>
> Just to articulate the rationale, I'm guessing the reasoning behind this is
> to make it feasible for source->AST->source translators to retain the
> origina
Benjamin Peterson added the comment:
How exactly does it bring down your disk space?
--
nosy: +benjamin.peterson
___
Python tracker
<http://bugs.python.org/issue12
Benjamin Peterson added the comment:
2011/5/26 Mike Solomon :
>
> Mike Solomon added the comment:
>
> If you have a file with say a hundred functions, and each function contains
> the full path of that file on disk, your pyc file will contain about
> (100*(path_size+overhea
Benjamin Peterson added the comment:
As you can see, I've implemented a similar solution in 3.3. It should have the
same memory savings but not disk space saving. (This would require
reintroducing the marshal feature for interned st
Benjamin Peterson added the comment:
FWIW, if you still want to advance this, you could bring it up on Python-dev. I
still feel uncomfortable with the API but could be convinced with others
thought it was the best solution.
--
___
Python tracker
New submission from Benjamin Peterson :
You can write them as one compound statement in Python, so there's no point in
having two ast classes.
--
components: Interpreter Core
files: try.patch
keywords: patch
messages: 137097
nosy: benjamin.peterson, ncoghlan
priority: normal
sev
Benjamin Peterson added the comment:
Okay, I'll close.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.
Benjamin Peterson added the comment:
Thanks for the review. New patch.
--
Added file: http://bugs.python.org/file22170/try2.patch
___
Python tracker
<http://bugs.python.org/issue12
Benjamin Peterson added the comment:
Everything is an instance of object.
--
nosy: +benjamin.peterson
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
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
Benjamin Peterson added the comment:
e685024a2699
--
nosy: +benjamin.peterson
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
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
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
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
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
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
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).
>
>
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", "
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 __
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
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
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
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
Changes by Benjamin Peterson :
Removed file: http://bugs.python.org/file22252/argerror.patch
___
Python tracker
<http://bugs.python.org/issue12265>
___
___
Python-bug
Changes by Benjamin Peterson :
Added file: http://bugs.python.org/file22253/argerror.patch
___
Python tracker
<http://bugs.python.org/issue12265>
___
___
Python-bug
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/
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
Benjamin Peterson added the comment:
Hopefully this situation was improved by #12265.
--
___
Python tracker
<http://bugs.python.org/issue6474>
___
___
Python-bug
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
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
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
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
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'
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 -
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
Benjamin Peterson added the comment:
Can you produce a self-contained test case?
--
nosy: +benjamin.peterson
___
Python tracker
<http://bugs.python.org/issue12
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
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. :)
--
___
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
Benjamin Peterson added the comment:
Why can't you just call fileno() on the file object?
--
___
Python tracker
<http://bugs.python.org/issue12291>
___
___
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
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?
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
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;
>
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
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
Changes by Benjamin Peterson :
--
nosy: +ncoghlan
___
Python tracker
<http://bugs.python.org/issue12356>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Benjamin Peterson added the comment:
Nick (or anyone else), do you want to look at this?
--
___
Python tracker
<http://bugs.python.org/issue12356>
___
___
Pytho
Benjamin Peterson added the comment:
Maybe #12356 then?
--
___
Python tracker
<http://bugs.python.org/issue6474>
___
___
Python-bugs-list mailing list
Unsub
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
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
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
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
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
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
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
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 ->
Changes by Benjamin Peterson :
--
resolution: accepted -> invalid
___
Python tracker
<http://bugs.python.org/issue12511>
___
___
Python-bugs-list mai
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
Benjamin Peterson added the comment:
You're not getting this?
.FFE
==
ERROR: test_intfail4 (__main__.TestInt)
--
Traceback (most recent call last):
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
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
Changes by Benjamin Peterson :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12544>
___
___
Python-bugs-
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
Benjamin Peterson added the comment:
I say kill the loggers.
--
___
Python tracker
<http://bugs.python.org/issue12536>
___
___
Python-bugs-list mailing list
Unsub
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
Benjamin Peterson added the comment:
Just make it a SyntaxError.
--
___
Python tracker
<http://bugs.python.org/issue11343>
___
___
Python-bugs-list mailin
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
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
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
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
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
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
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
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
Changes by Benjamin Peterson :
--
dependencies: +add a AST validator
___
Python tracker
<http://bugs.python.org/issue12608>
___
___
Python-bugs-list mailin
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.
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
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
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>
___
___
Changes by Benjamin Peterson :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12654>
___
___
Python-bugs-
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
Changes by Benjamin Peterson :
Added file: http://bugs.python.org/file22797/sched_stuff.patch
___
Python tracker
<http://bugs.python.org/issue12655>
___
___
Python-bug
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
Changes by Benjamin Peterson :
Added file: http://bugs.python.org/file22805/sched_stuff.patch
___
Python tracker
<http://bugs.python.org/issue12655>
___
___
Python-bug
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
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
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
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
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
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
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
Changes by Benjamin Peterson :
--
assignee: -> vinay.sajip
nosy: +vinay.sajip
___
Python tracker
<http://bugs.python.org/issue12718>
___
___
Python-bugs-lis
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
101 - 200 of 5168 matches
Mail list logo