Eric Smith added the comment:
This looks okay to me, and passes the tests.
In PyOS_string_to_double, you can simplify it by using PyErr_Format
instead of printing into a buffer and using PyErr_SetString. Sorry I
didn't catch this ea
Eric Smith added the comment:
With the implementation of issue5859 (py3k only), the only case where
this matters in NAN and INF. I'm going to address those in 3.1, and not
make any change for 2.x.
--
versions: -Python 2.7
___
Python tracker
Eric Smith added the comment:
With the new PyOS_double_to_string, this issue largely goes away. There
are some remaining issues with commas, 'n' and the like. I'll address those.
--
___
Python tracker
<http://bugs.py
Eric Smith added the comment:
About your patch: Wouldn't it make more sense to switch to type 's',
with a precision of 0, so as to use the same logic that float_str uses?
I realize it's the same result, but if we're making the point that we
want to match float_str, it
Eric Smith added the comment:
> Yes, that makes some sense. How would you handle
> '{:.10}'.format(10/3.), though? We could either change 's' to allow a
> precision, or use 's' when there's no precision specified and 'g' (with
> the
Eric Smith added the comment:
> I've generated a new patch, attached. I don't know why you had trouble
> applying.
Yeah, I'm not sure what that was about. Part of the patch applied, but
not the rest. In any event, the current one applied cleanly.
I'm not sure
Eric Smith added the comment:
This looks okay to me. (The itertools import isn't needed, but easy
enough to fix on checkin.)
I'd still like someone else to look it over, but if no one does before
the beta, I'll check it in.
--
keywords: +needs review
stage:
Eric Smith added the comment:
I've reviewed this and it looks good. I'll check it in to py3k shortly.
Then I'll backport it to 2.7 and fix the user documentation.
--
resolution: -> accepted
stage: patch review ->
___
New submission from Eric Smith :
I get a bus error in test_lchflags in test_posix.py on my Mac OS X 10.5 box.
I'll try and spend some time later today to debug this, but here's the
backtrace if anyone wants to look at it:
Program received signal EXC_BAD_ACCESS, Could not access memo
Eric Smith added the comment:
Fedora Core 6 works okay.
--
___
Python tracker
<http://bugs.python.org/issue5943>
___
___
Python-bugs-list mailing list
Unsub
Eric Smith added the comment:
Yes, that patch fixes the problem for me on Mac OS.
--
___
Python tracker
<http://bugs.python.org/issue5943>
___
___
Python-bug
Eric Smith added the comment:
My Fedora Core 6 box still works with the patch.
--
___
Python tracker
<http://bugs.python.org/issue5943>
___
___
Python-bugs-list m
Eric Smith added the comment:
Committed in py3k r72333 and trunk r72348. I also updated the
documentation. Closing the issue.
--
components: +Interpreter Core
status: open -> closed
___
Python tracker
<http://bugs.python.org/iss
Eric Smith added the comment:
Looking at Guido's removal of this back in 1999, he says:
"""
* Lib/ntpath.py:
Withdraw the UNC support from splitdrive(). Instead, a new function
splitunc() parses UNC paths. The contributor of the UNC parsing in
splitdrive() doesn't lik
Changes by Eric Smith :
--
assignee: eric.smith ->
___
Python tracker
<http://bugs.python.org/issue5799>
___
___
Python-bugs-list mailing list
Unsubscri
Eric Smith added the comment:
Thanks for looking at this, Mark. If we could only assign issues to
Python 3.2 and 3.3 to change the pending deprecation warning to a real
one, and to remove the function entirely, we'd be all set! I'm always
worried we'll forg
Eric Smith added the comment:
Checked in to py3k in 72398. I'm reconsidering whether to make this
change in 2.7. I might make the change there, I'll have to check on the
impacts.
--
___
Python tracker
<http://bugs.python.
New submission from Eric Devolder :
Hi,
Same problem as issue 4407, but on release 3.1b1 this time.
Guessing the same cure would apply...
for reference, here is the updated text, taken from event viewer:
Product: Python 3.1b1 -- Error 1722. There is a problem with this
Windows Installer
Eric Smith added the comment:
PEP 3101 says it's ignored. I chose to be strict. I don't see the
advantage of allowing but ignoring it.
--
___
Python tracker
<http://bugs.python.
Changes by Eric Smith :
--
assignee: georg.brandl -> eric.smith
___
Python tracker
<http://bugs.python.org/issue5963>
___
___
Python-bugs-list mailing list
Un
Eric Smith added the comment:
I updated the docs to say precision is not allowed for integers.
--
resolution: -> accepted
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Eric Smith added the comment:
"integer presentation types" is still not exactly correct, because there
are presentation types that work across value types. Specifically, 'n'
works on integers and floats. Precision is allowed for floats, but not ints:
>>> format(10
Eric Smith added the comment:
I'll look at it. The comma stuff needs to be added for 2.7 and 3.1, too.
--
___
Python tracker
<http://bugs.python.org/i
Eric Woudenberg added the comment:
Patch applied to Python 2.4 wave.py
--
Added file: http://bugs.python.org/file13931/wave24.py
___
Python tracker
<http://bugs.python.org/issue1483
Eric Woudenberg added the comment:
Patch applied to Python 2.5 wave.py
--
Added file: http://bugs.python.org/file13932/wave25.py
___
Python tracker
<http://bugs.python.org/issue1483
New submission from Eric Smith :
These 3 functions were deprecated in 2.7 and 3.1, and need to be removed
in 2.8 and 3.2.
This is currently assigned to version 3.2 only because the bug tracker
can't assign issues to 2.8.
--
assignee: eric.smith
components: Interpreter Core
key
Eric Smith added the comment:
>From the code:
/* assume %f produces at most (L)DBL_DIG
digits before and after the decimal
point, plus the latter plus a sign */
This is not correct. DBL_DIG is 15 on my x86 Linux machine.
printf("%.*f\n", DBL_DIG, 1e20) produces a str
Eric Smith added the comment:
I don't see any point in backporting to 3.0 at this point.
While it's definitely a problem in 2.6, it seems like a big change to
make in a bugfix release. I guess I'm +0 on it.
--
___
Python
Eric Smith added the comment:
It looks good to me.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue5829>
___
___
Python-bugs-list mailin
New submission from Eric Atienza :
this simple code:
"
import gtk
from threading import Timer
from time import sleep
def p():
print "p"
Timer(1, p).start()
#gtk.main()
sleep(10)
print "done"
does print "p" a second after it starts.
when I remove the com
Eric Smith added the comment:
Any character after a ']' other than '.' or '[' triggers this bug:
>>> '{0[0]x}'.format([None])
Assertion failed: (0), function FieldNameIterator_next, file
Objects/stringlib/string_format.h, line 379
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue6081>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
Fixed in:
trunk: r72848
release26-maint: r72849
py3k: r72850
release30-main: r72851
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Eric Smith added the comment:
I think this would be useful.
I don't fee terribly strongly about it, but I think I'd like the name
str.format_using_mapping(). When I initially saw this, I thought from
the name it was creating a format object (whatever that would be) from a
mapp
New submission from Eric Promislow :
I have a simple test file, test01.py, with this output:
$ cat test01.py
#!/usr/bin/env python
print("Line 1")
print("Line 2")
print("Line 3")
$
$ # Now try debugging it.
$ python3.0 -mpdb test01.py
--Return--
> /home/eri
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue1943>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Promislow added the comment:
Similar problem with 3.1rc1:
C:\...>c:\Python31rc1\python.exe -m pdb hello01.py
--Return--
> c:\python31rc1\lib\encodings\cp437.py(19)encode()->b'Hello'
-> return codecs.charmap_encode(input,self.errors,encoding_map)[0]
(Pdb) b 2
*** Bl
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue6198>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
I can duplicate this with Visual C++ 9.0 Express Edition on XP.
--
___
Python tracker
<http://bugs.python.org/issue6198>
___
___
Eric Smith added the comment:
Yes, this test passes on py3k on my Windows box. That would be a
nightmare if it didn't!
I agree that this is a test problem, not a code problem. I suggest we
just remove the offending line from formatfloat_testcases.txt in trunk.
I can do this and verify it
Eric Smith added the comment:
I had to remove a bunch of tests. Some were of the form
"5", rounded to before the 5. Some were comparing a large
number of digits.
Then there's these:
%#.0g 0 -> 0. Got '0.0'
%#.1g 0 -> 0. Got '0.0'
%#.2g 0
Eric Smith added the comment:
Checked in to trunk in r73240.
--
assignee: marketdickinson -> eric.smith
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
type: -> behavior
___
Python tracker
<http
Eric Smith added the comment:
Mark Dickinson wrote:
> Out of interest, what does '%#.0f' % 1.5 produce on
> Python 2.7/Windows? I'd expect to get '2.' both for
> round-half-to-even and round-half-away-from-zero.
> Does Windows round this down to
Eric Smith added the comment:
> [Mark]
>> Out of interest, what does '%#.0f' % 1.5 produce on
>> Python 2.7/Windows? I'd expect to get '2.' both for
>> round-half-to-even and round-half-away-from-zero.
>> Does Windows round this down to
Eric Smith added the comment:
In r73314, I restored the one test erroneously removed ("%#.0f 1.5 -> 2.").
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bug
Eric Smith added the comment:
I'll take a look at it. I've been meaning to use argparse, anyway.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.
Eric Smith added the comment:
It's unfortunate (at least to me, but I know I have a skewed view of
this) that the help string in add_argument uses %-formatting when
formatting the result. I'd much rather it use str.format().
I see a couple of options:
- leave it as-is and
Eric Smith added the comment:
> So is this a cosmetic issue or a functional issue?
It's a cosmetic issue.
> Also, even if it could figure that out, how would it know whether
> a particular filename "stringification" with os.path.join() was
> intended for display
Eric Smith added the comment:
Tim Golden wrote:
> Just for information's sake, the shell APIs usually only accept backslashes.
That's good to know. Do you have any specific examples?
CreateFile and the like, which is where my experience is, take either.
90% of my Windows Python
Changes by Eric Smith :
--
assignee: -> eric.smith
components: +Interpreter Core -Extension Modules, Library (Lib)
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/iss
Eric Smith added the comment:
This is by design. Where d is a datetime, format(d, format_string)
returns d.strftime(format_string).
>>> d.strftime('30')
'30'
--
resolution: -> invalid
status: open -> closed
__
New submission from Eric Smith :
This was reported a few weeks ago by Benjamin Peterson, but I haven't
gotten around to fixing it. This is a reminder to myself to do it.
This is due to a bug in Objects/stringlib/formatter.h. Before I fix it
trunk, I need to backport some 3.1 code to kee
New submission from Eric Huss :
Importing the "uuid" module on a posix system (FreeBSD in my case) that
does not have a C compiler causes "cc: not found" to be sent to stderr.
This is because it imports ctypes and calls ctypes.util.find_library
which attempts to determine
Eric Smith added the comment:
I agree with Mark: -1.
Do you have any specific use cases where this has caused problems, or is
this academic?
Maybe you can get some support for this on python-ideas, but I suggest
we close it in the meantime
Eric Devolder added the comment:
problem fixed under final 3.1
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue5960>
___
___
Python-
Eric Smith added the comment:
Could you attach the source to a small example? I don't think anyone's
interested in running a random .msi file.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.
Changes by Eric Smith :
--
___
Python tracker
<http://bugs.python.org/issue8789>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/m
Changes by Eric Smith :
Removed file: http://bugs.python.org/file17442/unnamed
___
Python tracker
<http://bugs.python.org/issue8789>
___
___
Python-bugs-list mailin
Changes by Eric Smith :
--
___
Python tracker
<http://bugs.python.org/issue8790>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/m
Changes by Eric Smith :
Removed file: http://bugs.python.org/file17443/unnamed
___
Python tracker
<http://bugs.python.org/issue8790>
___
___
Python-bugs-list mailin
Changes by Eric Smith :
--
___
Python tracker
<http://bugs.python.org/issue8791>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/m
Changes by Eric Smith :
Removed file: http://bugs.python.org/file17444/unnamed
___
Python tracker
<http://bugs.python.org/issue8791>
___
___
Python-bugs-list mailin
Eric Smith added the comment:
I don't think so. That quote came from the docstring for fnmatch.translate.
>>> help(fnmatch.translate)
Help on function translate in module fnmatch:
translate(pat)
Translate a shell PATTERN to a regular expression.
There is no way
Eric Smith added the comment:
This is a dupe of issue 7212.
--
nosy: +eric.smith
resolution: -> duplicate
status: open -> closed
superseder: -> Retrieve an arbitrary element from a set without removing it
___
Python track
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue1724822>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
Keep in mind this isn't an entirely backwards compatible change. See issue
8413, for example.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/i
Eric Smith added the comment:
I think Alexander's example is best written as:
"Today is: {0:%a %b %d %H:%M:%S %Y}".format(datetime.now())
I agree with Brett that there's nothing unusual about having type-specific
formatting languages, and for datetime strftime is the ob
Eric Smith added the comment:
This documentation should also be added for datetime.time and datetime.date, in
addition to datetime.datetime.
--
___
Python tracker
<http://bugs.python.org/issue8
Eric Smith added the comment:
Unfortunately I think it's too late to do anything about this. I, for one, have
many lines of code in production that use the strftime format specifier for
datetime.__format__.
You only option would be to invent a new language that was somehow
distinguis
Eric Smith added the comment:
I think that every type that # does not apply to should raise an exception.
--
___
Python tracker
<http://bugs.python.org/issue8
Eric Smith added the comment:
I agree with David. For the issue raised here, at most I would make (list,
shell=True) and (str, shell=False) raise errors.
There's an issue (that I can't find right now) for creating functions that
convert from str->list and list->str for ca
Eric Smith added the comment:
get_integer uses the narrowest possible definition for integer indexes, in
order to pass all other strings to mappings.
>>> '{0[ 0 ]} {0[-1]}'.format({' 0 ': 'foo', '-1': 'bar'})
'foo bar'
Rem
Eric Smith added the comment:
I agree with Mark: there's probably nothing Python can do about this. It's
almost certainly an error with how Python is being invoked.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.
Eric Smith added the comment:
That being said, it would be interesting to see what the registry key
HKEY_CLASSES_ROOT\Python.File\shell\open\command contains.
--
___
Python tracker
<http://bugs.python.org/issue7
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8972>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Smith :
--
versions: -Python 2.7
___
Python tracker
<http://bugs.python.org/issue7951>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
I'll consider this a duplicate. Issue 7951 is the existing feature request for
this issue. I'll merge the nosy lists.
--
resolution: rejected -> duplicate
superseder: -> Should str.format allow negative indexes when used for
__
Eric Smith added the comment:
Closed issue 8985 as a duplicate of this; merging nosy lists.
--
nosy: +gosella, mark.dickinson, merwok
___
Python tracker
<http://bugs.python.org/issue7
Changes by Eric Smith :
--
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issue7951>
___
___
Python-bugs-list mailing list
Unsubscri
Eric Smith added the comment:
Addressing just the last part of Mark's message right now:
The PEP goes on to say:
Implementation note: The implementation of this proposal is
not required to enforce the rule about a simple or dotted name
being a valid Python identifier. ...
I
Eric Smith added the comment:
So the real question is is: how does that key get that invalid value? I can't
reproduce the problem.
I believe that key you mention is an alias for
HKEY_CURRENT_USER\Software\Classes\Applications\python.exe\shell\open\command,
which doesn't exis
Eric Smith added the comment:
I can see the point of allowing negative indices for a consistency point, but
is there really any practical problem that's currently causing people hardship
that this would solve?
As for the rest of it, I think it's just not worth the additional
Eric Smith added the comment:
I realize the ship's already sailed on this issue [1], but isn't it a problem
that editing this code makes it more difficult to apply patches from Gay's
original code? What do we do if Gay releases a new version of his code with bug
fixes?
[1] S
Eric Smith added the comment:
Just to be clear: I'm okay with this divergence, as long as we've made it
clear we're explicitly doing so and we've given our reasons. Mark's done
that, and of course he's the expert in the subject.
--
Eric Smith added the comment:
I suppose that's correct, although I have no way to test it.
I haven't spent a lot of time looking at the code in tokenizer.c, but if
there's a problem with sign-extending signed chars, it wouldn't surprise me if
it shows up in more than one
Eric Smith added the comment:
It would also be good to get a test case for this. I realize it's difficult,
but that's the sort of change that might get undone some day by someone going
through and "optimizing" the code.
--
__
Eric Smith added the comment:
It would be easier for me to review if you did it in the other order: fix the
variable names first.
Although I'm still pretty busy and won't have much time to review, so my needs
shouldn't be your
Eric Smith added the comment:
I agree with Raymond. I'm not convinced it allows you to write any code that
you can't currently write, and I'm fairly sure it violates the moratorium.
Implementing this would clearly put a burden on other implementations.
Marking as &q
Eric Smith added the comment:
I agree with this approach.
--
___
Python tracker
<http://bugs.python.org/issue9020>
___
___
Python-bugs-list mailing list
Unsub
Eric Smith added the comment:
>
> Alexander Belopolsky added the comment:
>
>> - ignore the rounding mode completely, always doing round-half-to-even.
> +1
Agreed. +1
--
___
Python tracker
<http://bugs
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue9077>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Eric Hohenstein :
This error is unfortunately difficult to reproduce. I've only seen it happen on
Windows XP running on a dual core VMWare VM. I haven't been able to reproduce
it on a non-VM system running Windows 7. The only way I've been able to
reprodu
Eric Smith added the comment:
-1 on this functionality being in os, for the same reasons David mentions.
I find both of these behaviors useful and I have small utility functions of my
own that do the same (and ignore any errors). I'm not so sure they need to be
in stdlib, thoug
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue9109>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Huss added the comment:
Alexander, the use case I was involved with was an RPC system which allowed
exceptions to propagate over the connection. In this case, you do not have
absolute control over which exceptions may be raised, or who wrote the code
that is raising the exception
Eric Smith added the comment:
I think you could preserve backward compatibility by doing something like the
following (in httplib):
_sentinel = object()
__HTTP_DEFAULT_TIMEOUT = _sentinel
In httplib.HTTPConnection.__init__(), in Python 2.6.
def __init__(self, host, port=None, strict=None
Eric Smith added the comment:
We can't change this for 2.6 since it's not a bug fix, and it's too late for
2.7. I doubt we would ever change it for 2.x, since it's likely to break other
code is subtle ways.
In 3.x all classes are new-style, so it's not at issu
Eric Smith added the comment:
Thanks for taking the lead on this.
In this sentence:
+The new format syntax also supports new and different options, showed in the
+follow examples.
"showed" should be "shown".
I like to use an example showing attribute access on named
Eric Smith added the comment:
Instead of "named types", I meant "named arguments", of course.
--
___
Python tracker
<http://bugs.python.org/issue9139>
___
Eric Smith added the comment:
This looks like a definite improvement to me.
When you merge to py3k, don't forget to change the versionchanged tag to 3.1.
--
___
Python tracker
<http://bugs.python.org/i
3201 - 3300 of 6621 matches
Mail list logo