Eric Smith added the comment:
It occurs to me that Raymond's use case could be satisfied using existing
Python, by slightly changing the format string. After all, str.format()
supports mapping lookup already:
$ ./python.exe
Python 2.6.5+ (release26-maint:79421, Mar 25 2010, 08:51:39)
Eric Devolder added the comment:
This seems to be fixed now under 3.1.2, and works properly for me.
Great stuff, thank you.
Eric
P.S. Last time I mistakenly tagged the bug to be "Python 3.2" as well,
correcting this now.
--
versions: -
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8252>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8257>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
Meador: Your patch (-3) looks identical to mine (-2), unless I'm making some
mistake. Could you check? I'd like to get this applied in the next few days,
before 2.7b1.
Thanks!
--
___
Python trac
Eric Smith added the comment:
I had some style issues at one point, but I haven't looked at it closely
recently. I won't have time to look at this before next week, so proceed
without me.
--
___
Python tracker
<http://bugs.python.org
Eric Smith added the comment:
cStringIO.StringIO is a factory function, so those messages are correct. This
is mentioned in http://docs.python.org/library/stringio.html#module-cStringIO .
--
nosy: +eric.smith
resolution: -> rejected
status: open ->
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8278>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
Committed in trunk in r79596. I'll leave this open until I port to py3k, check
the old tests for this usage, and create the issue to make it a
DeprecationWarning.
--
stage: patch review -> committed/
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8293>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
Hi.
Please don't use the bug tracker to ask Python questions. You've already been
asked twice to refer to
http://www.python.org/about/help/#got-a-python-problem-or-question . Please
read and follow those instructions. Your questions have not been abo
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8304>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Smith :
--
nosy: +eric.smith
type: performance -> behavior
___
Python tracker
<http://bugs.python.org/issue8309>
___
___
Python-bugs-list mai
Eric Smith added the comment:
Any suggestions for what these changes would be?
--
nosy: +eric.smith
stage: -> needs patch
type: -> feature request
versions: +Python 3.2
___
Python tracker
<http://bugs.python.org/
Eric Smith added the comment:
That diff format looks fine to me. I'll review the content of your changes in
the next day or so.
--
keywords: +easy, needs review
priority: -> normal
stage: needs patch -> patch review
___
Python tra
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8327>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8334>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
This would be easier to review if the patch were generated with 'svn diff'.
That said, it looks okay in concept to me, although I couldn't apply it and
test without manually mucking with the patch.
2.6 is in bugfix mode, so it can't be change
Eric Smith added the comment:
I tried -p1 and it failed, but no matter. The contents were clear enough, and
exactly how I would have changed the code.
$ patch -p1 < 8355.diff-py-unified-by-default.diff
patching file Tools/scripts/diff.py
Hunk #1 FAILED at 13.
Hunk #2 FAILED at 34.
2 out o
Eric Smith added the comment:
Can you use str.format instead? It doesn't have this restriction. It's
available in 2.6 and 3.0.
--
nosy: +eric.smith
versions: +Python 2.7, Python 3.2 -Python 2.5, Python 2.6, Python 3.1
___
Python trac
Eric Smith added the comment:
Also, if you use the 'mapping' version of %-formatting you also don't have this
restriction:
>>> 'One hour' % {'n': 3}
--
___
Pytho
Eric Smith added the comment:
I don't understand how this:
n=1
print "One hour." % n
is different from this:
map={'n': 3}
print "One hour." % map
In any event, if str.format works for you, use that. It's the new style.
--
_
Eric Smith added the comment:
To change the default, you need to know how many people it will benefit, and
how many people will be negatively impacted by the change. I personally suspect
that both numbers are zero, which is why I have a hard time getting excited
about it.
Are there any real
Changes by Eric Smith :
--
nosy: -eric.smith
___
Python tracker
<http://bugs.python.org/issue8355>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
See the explanation at
http://docs.python.org/library/fnmatch.html#module-fnmatch , which uses the
same rules.
--
nosy: +eric.smith
resolution: -> invalid
status: open -> closed
___
Python tracker
Eric Smith added the comment:
The documentation for fnmatch.translate, which is what ultimately gets called,
says:
There is no way to quote meta-characters.
Sorry.
If you want to see this changed, you could open a feature request. If you have
a patch, that would help!
You probably want
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8404>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
This affects any type implemented as PyStructSequence. For example, sys.flags
has the same behavior.
--
components: +Interpreter Core -Library (Lib)
priority: -> normal
type: -> behavior
___
Python tracker
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8419>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
I agree with Mark. Guido's point was that if it's implementation defined,
you'll have portability problems:
http://mail.python.org/pipermail/python-dev/2010-April/099435.html
--
___
Python
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8425>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
>From issue 8121:
That name is actually correct. cStringIO features two different types,
depending on whether you call cStringIO.StringIO() with or without an argument.
One is called "StringI", the other "StringO".
--
nosy:
Eric Smith added the comment:
A couple of points:
Didn't we decide that instead of using:
openlog(ident[, logopt[, facility]])
we'd use:
openlog(ident, logopt=None, facility=None)
(or whatever the defaults are)? I can't find a reference, but the argument was
that
Eric Smith added the comment:
I think the right way to handle this is to modify the test:
if (Py_TYPE(args)->tp_as_mapping && !PyTuple_Check(args) &&
!PyObject_TypeCheck(args, &PyBaseString_Type))
to also exclude PyStructSequence's, but since they're all d
Eric Smith added the comment:
I have the same reasoning as David, although I was thinking about python vs.
pythonw. But it's not a big deal.
I think you should check it in as-is, and we can worry about modifying it
later, if ne
Eric Smith added the comment:
This is the right place, thanks for the patch!
Since this is a feature request it can only be added to 3.2 (and 2.8, if such a
thing ever exists).
--
nosy: +eric.smith
priority: -> normal
stage: -> unit test needed
type: -> feature request
New submission from Eric Smith :
>From a python-dev email from Neal Becker, copied here so it won't get lost.
steven.beth...@gmail.com made a very nice module for me to enhance argparse
called argparse_bool.py, which contains ConfigureAction. This will
New submission from Eric Smith :
>From a python-dev email from Neal Becker, copied here so it won't get lost.
steven.beth...@gmail.com made a very nice module for me to enhance argparse
called argparse_bool.py, which contains ConfigureAction. This will
New submission from Eric Smith :
>From a python-dev email from Neal Becker, copied here so it won't get lost.
steven.beth...@gmail.com made a very nice module for me to enhance argparse
called argparse_bool.py, which contains ConfigureAction. This will
Changes by Eric Smith :
--
resolution: -> duplicate
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue8539>
___
___
Python-bugs-list
Eric Smith added the comment:
Sorry for the dupes. My ISP keeps disconnecting, but apparently it was able to
create this issue 3 times for me.
--
resolution: -> duplicate
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Changes by Eric Smith :
--
priority: -> normal
___
Python tracker
<http://bugs.python.org/issue8538>
___
___
Python-bugs-list mailing list
Unsubscri
Eric Smith added the comment:
I agree with Georg. I think 2.x is arguably correct, and 3.1 is broken.
It looks like this has already been fixed in 3.2. It's not immediately obvious
why that is, I'll have to look at the code more than the quick glance I just
gave it.
Python 3.1.1+
Eric Smith added the comment:
Yes, that's the cause, thanks for finding that issue. It's actually fixed in
3.1.2, I just hadn't updated my local copy.
Closing, since there's nothing to fix here. The 2.6 behavior is correct, and
the 3.x behavior that was b
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8550>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
The other thing to do would be to convince PyTuple_Check that PyStructSequences
are tuples, but that would no doubt come with its own set of regressions.
Since this problem is 1) hard to fix and 2) probably of minimal impact, I think
the best course is to do
Eric Smith added the comment:
Yes, but sys.version_info isn't a namedtuple (which are in fact tuples), it's
the (sort-of) C equivalent, which isn't a real tuple.
>>> from collections import namedtuple
>>> x = namedtuple('x', 'a b c
Eric Smith added the comment:
Looks like that's issue 1820.
--
___
Python tracker
<http://bugs.python.org/issue8413>
___
___
Python-bugs-list mailing list
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue1820>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
See also issue 8413, which would be addressed by this change.
--
___
Python tracker
<http://bugs.python.org/issue1820>
___
___
Pytho
Eric Smith added the comment:
Does the standard library really need something so trivial? I'd put it in your
own program. And I'd make the one in distutils private (and fix it to use a
with statement).
--
nosy: +eric.smith
___
Pyth
Eric Smith added the comment:
I agree that with the addition of the new requirement that it be an atomic
write, it should be in a library.
I'd also do it as a context manager, since that's the more general case.
distutils2 can either call the context manager version, or have
Eric Smith added the comment:
Fixed in:
trunk: r81026
release26-maint: r81027
It was already correct in py3k and release31-maint.
Thanks!
--
nosy: +eric.smith
resolution: -> accepted
stage: -> committed/rejected
status: open -> closed
versions: +P
New submission from Eric Huss:
Creating a ZipFile object with a certain type of zip file can cause it
to go into an infinite loop. The problem is the new extra field parsing
routine. It unpacks integers as a signed value, which if they are
sufficiently large (over 32767), then it will loop
New submission from Eric Moyer:
I installed the python-2.5.1.msi stable package from the python.org
website using a super-user account on my system. I installed "for all
users" and used the default location and chose to install everything,
not omitting any component.
After insta
Eric Moyer added the comment:
I tried adding my normal account to the administrators group and that
did not fix the problem.
And my system:
I am running fully patched Windows XP professional SP 2 on a Presario
V2000 (AMD Turion 64 ML-37 with 480 MB ram (the other 32 MB RAM is used
by the video
Eric Moyer added the comment:
I tried rolling back the computer and installing it on my normal account
with added super-user privileges and though the install succeeded, I
still couldn't run it. However, the normal super-user could run it just
fine.
Looks like this is some
New submission from Eric Andresen:
The tarfile.TarFile.extractall() method is [by default] silently failing
to set directory permissions and times on all but the lexically-latest
directory extracted. This is due to an unintentional re-use of the
'path' variable.
The provided patch r
Changes by Eric Andresen:
--
type: -> behavior
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1735>
__
___
Python-bugs-list mailing list
Uns
Eric Huss added the comment:
Some of this work has already been done, see issue 1189216.
You'll obviously need to keep the CRC unpack as signed because the
binascii module uses signed values.
Some header values are stored as 0x to denote the value is stored
in the 64-bit ext
Eric Huss added the comment:
Alan, your changes look good to me, but it is missing my patch in this bug
that fixes the sign issue in _decodeExtra. While you're there, you might
as well change the other 3 unpack lines to use a capital Q.
-Eric
__
Tracker &l
Eric Sammons added the comment:
Please find the attached ceval.c. This file was generated from oprofile
and gives clear indicators where the simple program below gets hung up.
You will find in the oprofile output, from ceval.c, that PyEval_Frame
has a total of 1649 26.2789. This indicates
Eric Sammons added the comment:
Has anybody else tested this against an RPC server that has more than
300 items to be returned. I find it interesting that before all the
xmlrpc code changed everything works fine, but after the code change
(re-write) things don't seem to work.
As for the b
Eric Sammons added the comment:
I have added the verbose=1 option, the processing hangs in the body: where :
for a in l:
print a['channel_label']
Is returning the data. Initially it returns data quickly and then slows
until it eventually stops.
Here is the sample of the
Eric Sammons added the comment:
Here is the header information that I get:
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Tue, 22 Jan 2008 14:42:54 GMT
header: Server: Apache
header: Content-Length: 183
header: Content-Type: text/xml;charset=UTF-8
Then I get addition send followed by m
Eric Sammons added the comment:
Some strace data:
WORKS:
strace -cf ./test.py >/tmp/out
Process 9439 detached
% time seconds usecs/call callserrors syscall
-- --- --- - -
33.100.009125 8 1086 956 o
Eric Smith added the comment:
Given Mark Dickinson's input, I think we should follow it. That
effectively means leaving the Linux/MacOS input as is, and modifying the
Windows output. I'll work up a patch, but I'd still like to get some
input on changing the output of existin
Eric Smith added the comment:
Checked in as r60909. I started with Mark's patch, but added code to
both increase or decrease the number of zeros, as needed.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python
Eric Smith <[EMAIL PROTECTED]> added the comment:
Issue closed with commit r60909. Fixed as suggested by Mark Dickinson:
"The exponent always contains at least two digits, and only as many more
digits as necessary to represent the exponent."
--
resolution: ->
New submission from Eric Smith <[EMAIL PROTECTED]>:
PEP 3101 specifies that the empty format presentation type for float
will always print at least one digit after the decimal point, but it
does not do that if the number is output with an exponent:
works:
>>> format(3.0, &
Eric Smith <[EMAIL PROTECTED]> added the comment:
I think the best way to handle this is to add a new format code to
PyOS_ascii_formatd, which implements this behavior. There can be no
backward compatibility issues, because PyOS_ascii_formatd currently
ensures its format specifier type c
Eric Smith <[EMAIL PROTECTED]> added the comment:
Fixed checked in as r61434.
--
resolution: -> fixed
status: open -> closed
__
Tracker <[EMAIL PROTECTED]>
<http://bugs
Changes by Eric Smith <[EMAIL PROTECTED]>:
--
nosy: +eric.smith
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1633807>
_
___
Python-bugs
Eric Smith <[EMAIL PROTECTED]> added the comment:
I'm going to review Anthony's patch and attempt to get it working in the
current trunk.
I'm going to start by adding some print tests to 3.0, then backport.
_
Tracker <
Changes by Eric Smith <[EMAIL PROTECTED]>:
--
nosy: +eric.smith
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1745>
__
___
Python-bugs
New submission from Eric Smith <[EMAIL PROTECTED]>:
Issue 1633807 is a backport of the print function to 2.6, using a
__future__ import. Once it is committed, we need to ensure that 2to3
does the right thing (namely, nothing) with print functions in modules
that have the __future__
Eric Smith <[EMAIL PROTECTED]> added the comment:
Checked in as r61577.
--
resolution: -> accepted
status: open -> closed
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.py
New submission from Eric Smith <[EMAIL PROTECTED]>:
PEP 3127 "Integer Literal Support and Syntax" says that % string
formatting should support %b. This needs to be added to both 2.6 and
3.0. It needs to support the forms %b and %#b.
--
assignee: eric.smith
components:
New submission from Eric Smith <[EMAIL PROTECTED]>:
Should this be accepted in 3.0, and become a no-op:
from __future__ import print_function
?
It might make using code in 2.6 and 3.0 easier, since you would not have
to delete this line.
I note that:
from __future__ import with_statem
Eric Smith <[EMAIL PROTECTED]> added the comment:
Implemented in r61682.
--
resolution: accepted -> fixed
status: open -> closed
__
Tracker <[EMAIL PROTECTED]>
<http://bugs
Eric Ries <[EMAIL PROTECTED]> added the comment:
This code is more than three years old, so the attached version has gone
stale. Still, here at IMVU we have continued to use the xmlrpc
boxcarring, and could probably provide an updated diff if desired. Let
us know if this is a feature of in
Changes by Eric Smith <[EMAIL PROTECTED]>:
--
nosy: +eric.smith
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2477>
__
___
Python-bugs
Eric Huss <[EMAIL PROTECTED]> added the comment:
Sorry for the long delay. Yes, the latest patch looks very good to me.
-Eric
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Eric Smith <[EMAIL PROTECTED]> added the comment:
I'm looking into it.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2526>
__
___
Python-bugs-list ma
Eric Smith <[EMAIL PROTECTED]> added the comment:
The same issue exists with floats:
# continuing the example
>>> locale.format("%g", 12345, True)
'12,345'
>>> "{0:n}".format(12345.0)
'12345'
The same issue exists in 2.6.
Eric Smith <[EMAIL PROTECTED]> added the comment:
The patch doesn't apply cleanly for me. I can fix the non-clean patch,
but another error is that obj2ast_arguments doesn't call arguments()
with the correct parameters. If I pass in NULL's for the new params,
all tests pass
Eric Smith <[EMAIL PROTECTED]> added the comment:
On the python-3000 list we decided not to add new features to %
formatting, since it will be deprecated in favor of str.format.
--
resolution: -> wont fix
status: open -> closed
__
Tra
Eric Smith <[EMAIL PROTECTED]> added the comment:
I should have noted that the PEP was modified to remove %b and %#b
formatting.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Eric Smith <[EMAIL PROTECTED]>:
--
nosy: +eric.smith
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1222>
__
___
Python-bugs-list mailin
Eric Smith <[EMAIL PROTECTED]> added the comment:
Committed fix in r62586.
--
resolution: -> fixed
status: open -> closed
__
Tracker <[EMAIL PROTECTED]>
<http://bugs
Changes by Eric Smith <[EMAIL PROTECTED]>:
--
assignee: -> eric.smith
nosy: +eric.smith
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2598>
__
___
Changes by Eric Smith <[EMAIL PROTECTED]>:
--
nosy: +eric.smith
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1588>
__
___
Python-bugs-list mailin
New submission from Eric Smith <[EMAIL PROTECTED]>:
Per http://mail.python.org/pipermail/python-3000/2008-April/013094.html,
add a PendingDeprecationWarning to 3.0 for % formatting.
The attached patch implements this for 3.0. For 2.6, it should only be
a PendingDeprecationWarning
Eric Smith <[EMAIL PROTECTED]> added the comment:
Right. But is it worth adding per-thread machinery to this? I was
going to do that, but it seemed like overkill. Upon further reflection,
however, I think you may be right.
I'll remove the "easy" keyword!
--
Eric Smith <[EMAIL PROTECTED]> added the comment:
Since we're just trying to prevent this function from recursing
(indirectly) into itself, I think all of the logic can go here.
What would you suggest the function _PyErr_InErrorProcessing do differently?
I think the real issue is
Eric Smith <[EMAIL PROTECTED]> added the comment:
> Well, the first thing to check for is Py_Py3kWarning. Then do the
> extra logic and execution speed.
In 3.0, it's always a PendingDeprecationWarning, so that won't work.
The test needs to be:
if not recursing and war
Eric Smith <[EMAIL PROTECTED]> added the comment:
I'm not sure Py_EnterRecursiveCall is what I want, because that allows
the recursion to happen, but just aborts it when it gets too deep. What
I want to achieve is to have the warning not called if it's the warning
that'
Eric Smith <[EMAIL PROTECTED]> added the comment:
> That would make user code warning that uses '%"' brittle. However, if
> we warn about it, I think it's ok.
True enough. Then I think we should go with:
1. Use .format() in the warnings module.
2. Tell the users
Eric Smith <[EMAIL PROTECTED]> added the comment:
The attached patch (percent_formatting_pending_deprecation_0.diff) adds
both the simple global lock to unicode_mod() and changes warnings.py to
use .format() instead of % formatting.
I think this is good enough. We should add a warning
Eric Smith <[EMAIL PROTECTED]> added the comment:
The reason for this is that 'n' is defined in PEP 3101 as being a float
format only, and the rule is that if an integer sees a float format, it
does a float conversion and then prints the float with the supplied format.
I'
601 - 700 of 5181 matches
Mail list logo