Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8219>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Smith :
--
nosy: +vinay.sajip
priority: -> normal
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2
___
Python tracker
<http://bugs.python.org/iss
Eric Smith added the comment:
It still doesn't say that the LOG_ constants are defined on SysLogHandler. Or
is the intention that the user just use the strings?
--
___
Python tracker
<http://bugs.python.org/i
Eric Smith added the comment:
> Vinay Sajip added the comment:
> Whoops, now fixed (I think).
Looks good. Thanks!
--
___
Python tracker
<http://bugs.python.org/
Eric Smith added the comment:
Good point. So that makes the implementation more like:
import traceback
import syslog
import sys
def syslog_exception(etype, evalue, etb):
# The result of traceback.format_exception might contain
# embedded newlines, so we have the nested loops.
for
Eric Smith added the comment:
>> Once it's moved into syslog, maybe syslog_exception named
>> syslog.log_exception.
That's "should be named", of course. Although on second thought maybe
syslog.syslog_exception really is the right name, to mirror syslog.syslo
Eric Smith added the comment:
Ah, I see. Yes, logexceptions needs a better name. Maybe
enable_exception_logging.
--
___
Python tracker
<http://bugs.python.org/issue8
Eric Smith added the comment:
Here's a version that would be more analogous to what the C implementation
would look like. It uses a class instead of a closure to capture the "chain"
value. The 2 exposed functions syslog_exception and enable_exception_logging
are the new APIs i
Eric Smith added the comment:
I agree with David that this is a Windows problem. I copied xcopy.exe into a
local directory as xcopy.exe and xcopy.a.exe. When running this VBScript, the
first line runs, the second gives me an error 0x8007002, "The system could not
find the file spec
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)
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
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
Changes by Eric Smith <[EMAIL PROTECTED]>:
--
nosy: +eric.smith
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2477>
__
___
Python-bugs
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'
Eric Smith <[EMAIL PROTECTED]> added the comment:
> It isn't hard (in Python):
It's more complex, because the "3" is locale dependent, and is allowed
to be something like "3, then 2, then 3, then 1, repeating until the
start of the string".
See _group
Eric Smith <[EMAIL PROTECTED]> added the comment:
Implemented in 2.6 as r63078. I'll port this to py3k shortly.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.
Eric Smith <[EMAIL PROTECTED]> added the comment:
Implemented in 3.0 as r63093. I'm closing this issue.
I added the C code that does the grouping insertion as
_PyString_InsertThousandsGrouping and _PyUnicode_InsertThousandsGrouping
(in 3.0). This might be useful to others, although
New submission from Eric Smith <[EMAIL PROTECTED]>:
3.0 has documentation for str.format(), but that documentation is
missing in 2.6. The 2.6 what's new document:
http://docs.python.org/dev/whatsnew/2.6.html also has an XXX reference
to this:
"Consult the 2.6 documentation for
Eric Smith <[EMAIL PROTECTED]> added the comment:
When backporting to 2.6, this needs to be documented for both str and
unicode.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Eric Smith <[EMAIL PROTECTED]>:
--
assignee: -> eric.smith
nosy: +eric.smith
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue4701>
___
___
Python-bugs-list mailing list
Unsubscribe:
301 - 400 of 805 matches
Mail list logo