Eric Smith <[EMAIL PROTECTED]> added the comment:
Fixed in r64499 (trunk) and r64500 (py3k).
I now get:
>>> import locale
>>> locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
'en_US.UTF-8'
>>> for x in
(123,1234,12345,123456,1234567,12345678,12
Eric Smith <[EMAIL PROTECTED]> added the comment:
See
http://mail.python.org/pipermail/python-dev/2008-February/077062.html,
where Guido endorses my approach to implementing bin() without the
trailing L for longs.
Note that he also agrees with not adding a __bin__ function, whi
Eric Smith <[EMAIL PROTECTED]> added the comment:
Implemented in trunk in r64958 and r64984; in py3k in r64960 and r64985.
--
resolution: -> accepted
status: open -> closed
type: -> feature request
___
Python tracker <[EMAIL
New submission from Eric Smith <[EMAIL PROTECTED]>:
See http://mail.python.org/pipermail/python-dev/2008-July/081242.html
for the discussion. Basically, 'F' did the same as 'f' because it was
assumed that neither would ever produce an exponent. But they do, for
numbe
Eric Smith <[EMAIL PROTECTED]> added the comment:
Implemented for trunk in r65069; for py3k in r65073.
--
resolution: -> accepted
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Eric Smith <[EMAIL PROTECTED]> added the comment:
Changes backed out, pending fixing on Windows.
--
resolution: accepted ->
status: closed -> open
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Eric Smith <[EMAIL PROTECTED]> added the comment:
Thanks for catching this. I was not skipping the leading sign char when
looking for the decimal point in the string, which was causing me to
incorrectly determine that a decimal wasn't present.
Fixed in r65125 (trunk) and r
Changes by Eric Smith <[EMAIL PROTECTED]>:
--
assignee: eric.smith ->
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2772>
___
___
Eric Smith <[EMAIL PROTECTED]> added the comment:
I agree. That's one of the reasons I un-assigned it to me.
Well, that and I couldn't get it to pass all tests.
___
Python tracker <[EMAIL PROTECTED]>
<http://
Eric Smith <[EMAIL PROTECTED]> added the comment:
I'd recommend breaking the patch into the 3 parts mentioned in msg61929,
then committing the first 2 parts. That should make the 3rd part much
easier to evaluate.
___
Python tracker <[EMAIL PRO
Eric Smith <[EMAIL PROTECTED]> added the comment:
Please upload your script, or (preferably) some small test code.
I suspect the problem is related to line endings and binary versus text
files.
--
nosy: +eric.smith
___
Python tracker &
Eric Smith <[EMAIL PROTECTED]> added the comment:
Unfortunately, I missed the window to get these into 3.0 and 2.6.
Better luck for 3.1 and 2.7!
--
versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0
___
Python tracker <[EMAIL
Eric Smith <[EMAIL PROTECTED]> added the comment:
The test fails for me on 2.5.1 (stock Mac OS 10.5.4) in the same way as
described in this bug.
In 2.6 (r66230) the test succeeds.
I recommend we close this.
--
nosy: +eric.smith
___
Python t
Eric Smith <[EMAIL PROTECTED]> added the comment:
Yes, it would be easy to add. Maybe bring this up on python-dev (or
python-3000) to get consensus?
Are we in feature freeze for 3.0?
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Eric Smith <[EMAIL PROTECTED]> added the comment:
> I don't think that b'...'.format() is a good idea. Programmers
> will continue to mix characters and bytes since .format() target
> are characters.
b''.format() would return bytes, not a string. This is
Eric Smith added the comment:
I don't see where the patch is outdated.
I'm attaching an updated patch 18 that works cleanly against r77557. It also
fixes an unterminated comment.
XP runs correctly (without the new functionality) with this patch. However, on
Windows 7 as a normal
Eric Smith added the comment:
Yes, "Run as administrator" solves the permissions problem, leaving an error in
test_posixpath that I'll investigate.
What's the expectations with the buildbots? Will these tests work there? We
could create a branch and run a buildbot test i
Eric Smith added the comment:
I'm indeed seeing the same test_posixpath errors that Jason reported.
--
___
Python tracker
<http://bugs.python.org/issu
Eric Smith added the comment:
No, it won't be backported to 2.6. It's clearly a new feature.
--
___
Python tracker
<http://bugs.python.org/issue1578269>
___
__
Eric Smith added the comment:
My concern about testing is that we're adding a feature that won't be tested by
the buildbots. Although I don't have any suggestions (other than possibly
adding the specific permission to the buildbots).
If there is a skip test, it should be d
Eric Smith added the comment:
Assigning to Raymond, per his request in the c.l.p. thread.
--
assignee: georg.brandl -> rhettinger
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/iss
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue7743>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
This is a duplicate of issue 7455.
--
components: +Extension Modules -None
nosy: +eric.smith
resolution: out of date -> duplicate
superseder: -> cPickle: stack underflow in load_pop()
___
Python tracker
Eric Smith added the comment:
I like this. I've visually reviewed the patch, but haven't tested it yet. I'm
willing to commit this.
Could you add to the tests to assert that .major is equal to [0], etc.?
Also, the documentation says that element [4] is "text", but
Eric Smith added the comment:
Here's an updated patch. I fixed some docstrings, modified it to work with the
most recent assertIsInstance changes, and added #ifdef for Windows.
There are a number of test failures still, I think all of them relating to
errors in platform.py where it
Eric Smith added the comment:
The more I think about this, the more concerned I am about changing the number
of elements in the tuple. That's the change that broke platform.py. Maybe we
should add a parameter named something like "level", defaulting to 0.
0 = existing beh
Eric Smith added the comment:
Great idea, Marc-Andre. I agree that's the better approach.
It looks like PyStructSequence supports this, by setting n_in_sequence to a
value smaller then the number of PyStructSequence_Fields. A quick look doesn't
show any uses of this in the C co
Eric Smith added the comment:
Here's a patch that implement's Marc-Andre's suggestion. The docstring and
documentation need work. I still need to verify that this isn't a misuse of
PyStructSequence, but the tests pass on Windows. I need to verify a few other
platforms to
Eric Smith added the comment:
I can confirm the most recent patch (ex2) doesn't break anything on MacOS or
Linux.
It's clear that structseq.c is designed to be used this way, with more named
members than unnamed members (and vice-versa, actually). See n_members vs.
n_in_sequence
Eric Smith added the comment:
datetime.datetime passes its format string to strftime:
>>> import datetime
>>> x = datetime.datetime(2001, 1, 2, 3, 4)
>>> x.strftime('%Y-%m-%d')
'2001-01-02'
>>> '{0:%Y-%m-%d}'.
Eric Smith added the comment:
I don't think this is documented (that I can find, at least), so I'll assign it
to Georg.
I think the correct thing to do is something like this, in the datetime, date,
and time object descriptions:
date.__format__(fmt)
For a date d, format(
Eric Smith added the comment:
The documentation for this belongs in the mini-language specification, since
that just address built-in types. Each type can define its own format
specification language.
So I think adding documentation of __format__ to each non-builtin type that
implements
Eric Smith added the comment:
Eric Smith wrote:
> The documentation for this belongs in the mini-language specification, ...
Oops. "does NOT belong in the mini-language specification".
--
___
Python tracker
<http://bugs.pyth
Eric Smith added the comment:
Here's the final version of the patch. After some testing on various platforms
I'll commit it.
--
Added file: http://bugs.python.org/file16020/winver_as_structseq_ex4.diff
___
Python tracker
<http://bu
Eric Smith added the comment:
Committed in trunk r77763, in py3k r77765.
--
assignee: -> eric.smith
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pytho
Changes by Eric Smith :
--
assignee: eric.smith -> georg.brandl
nosy: +georg.brandl
___
Python tracker
<http://bugs.python.org/issue7789>
___
___
Python-
Eric Smith added the comment:
- When run with patch 20 as non-admin on Windows 7, I get the same test_tarfile
errors that Brian gets. I do not get these errors with an unpatched py3k build.
- When run with patch 20 as an admin on Windows 7, I do not get the errors in
test_tarfile. However, I
Eric Smith added the comment:
>From David's patch:
Note in particular that options and their arguments go in separate list
elements, while arguments that need quoting when used in the shell
(such as filenames containing spaces or the python command shown
above) are sin
Eric Smith added the comment:
Now you need to put the import of subprocess back in!
Otherwise it looks good to me.
--
___
Python tracker
<http://bugs.python.org/issue6
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue7839>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue7844>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
I think this is an improvement to the existing docs, and should be committed.
--
___
Python tracker
<http://bugs.python.org/issue6
Eric Smith added the comment:
When merging to py3k, don't forget to modify the print statement to be a
function.
--
status: pending -> open
___
Python tracker
<http://bugs.python.or
Changes by Eric Smith :
--
nosy: +eric.smith, mark.dickinson
___
Python tracker
<http://bugs.python.org/issue7906>
___
___
Python-bugs-list mailing list
Unsub
Eric Smith added the comment:
I agree that backporting the various parts needed to get this working would be
risky and shouldn't be done.
As for Solaris sure, I'm not sure. You might ask on python-dev. I get the
impression that few (if any) core developers have access to a Solar
Eric Smith added the comment:
str->float conversions have been reworked in 2.7 and 3.1. The 'D' exponent will
not on any platform starting with those versions.
So, this would be a non-platform specific feature request.
--
assignee: ronaldoussoren ->
components: +
Eric Smith added the comment:
That was supposed to say:
The 'D' exponent will not work on any platform starting with those versions.
--
___
Python tracker
<http://bugs.python.
Eric Smith added the comment:
Unless and until we implement 'd' exponents, we should add a test to make sure
they don't work. That they ever worked on any platform was a surprise.
--
Eric.
--
title: reading scientific notation using d instead of e on max osx -> r
Eric Smith added the comment:
I'm -1 on this, too. Closing.
--
resolution: -> rejected
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyt
Eric Smith added the comment:
This was just discussed in issue 6760.
--
nosy: +eric.smith
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
superseder: -> patch to subprocess docs to better explain Popen's
New submission from Eric Smith :
It surprised me that this doesn't work:
>>> "{0[-1]}".format('fox')
Traceback (most recent call last):
File "", line 1, in
TypeError: string indices must be integers
I was expecting it to be equivalent to:
&
Eric Smith added the comment:
If you want to generate some more discussion, I suggest you close this issue
and reopen the other one, since that has more people on the nosy list.
--
___
Python tracker
<http://bugs.python.org/issue7
Eric Smith added the comment:
At the language summit we okay'd using ctypes in the tests for standard lib
modules, specifically for this issue.
--
___
Python tracker
<http://bugs.python.org/issu
Eric Smith added the comment:
With 10.6's stock python, I've had this test either work or crash Python.
On trunk, I get it to either work or give the same error as the original report.
Unfortunately I've been unable to get it to crash again in a debugger so I can
get a stack
Eric Smith added the comment:
Oops, sorry for not specifying that. It's:
Python 2.6.4 (r264:75706, Jan 27 2010, 12:09:19)
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
--
___
Python tracker
<http://bugs.python.org/i
Eric Smith added the comment:
I'm not exactly sure what wording to use here.
element_index: `integer` | `identifier`
is not exactly correct, because it can be a non-identifier (as the example that
eddy quotes points out. It's really "any sequence of characters except &
Eric Smith added the comment:
Proposed patch attached. The rest of the documentation in the following 2
paragraphs looks correct. It refers to __getitem__, which is how either strings
or integers is looked up.
--
keywords: +patch
stage: -> patch review
Added file: h
Eric Smith added the comment:
These were originally deprecated in issue 5835.
Removed them from py3k in r78306.
--
resolution: -> accepted
stage: -> committed/rejected
status: open -> closed
superseder: -> Deprecate PyOS_ascii_formatd
__
Eric Smith added the comment:
I closed this even though the functions remain in 2.7. They would not be
removed until 2.8, and since 2.8 seems unlikely I'll close this. Even if there
is a 2.8, then these functions will still be present but do no
Eric Smith added the comment:
I just tried it again under gdb on MacOS 10.6, the supplied python 2.6.4 and
got this backtrace:
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to process 61133]
0x7fff87a4b790 in __CFInitialize ()
(gdb) bt
#0 0x7fff87a4b790 in
Eric Smith added the comment:
Checked in:
trunk r78329
py3k r78333
release31-maint r78334
--
priority: -> low
resolution: -> accepted
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pytho
Eric Smith added the comment:
With the fixes for complex in issue 7988, I believe this issue is completed.
--
priority: -> normal
resolution: -> accepted
stage: -> committed/rejected
status: open -> closed
type: -> behavior
___
Eric Smith added the comment:
I think there are no remaining issues here that don't have their own issue. I'm
going to close this unless one of you think otherwise.
--
assignee: -> eric.smith
resolution: -> out of date
status: open -> pending
Eric Smith added the comment:
[If the status is pending, any comment turns it back to open, by design.]
I'd rather float.__format__ agree with %-formatting for floats than with
anything else.
>>> '%+08.4f' % float('nan')
'+nan'
>>> &q
New submission from Eric Smith :
Background:
format(obj, fmt) eventually calls object.__format__(obj, fmt) if obj (or one of
its bases) does not implement __format__. The behavior of object.__format__ is
basically:
def __format__(self, fmt):
return str(self).__format__(fmt)
So the
Eric Smith added the comment:
The root of this problem is an interaction with ',' formatting that was
introduced in 2.7 and 3.1. I'm still trying to figure out how to implement it.
I'm changing the priority to low because I can't imagine this is a problem in
p
Eric Smith added the comment:
Could you add a comment on why you're calling PyUnicode_FromString and then
throwing away the result? I believe it's so you'll get the same error checking
as PyUnicode_FromString, but it's sufficiently tricky that I think it deserves
a commen
Eric Smith added the comment:
Isn't it true that after regenerating configure that you need to check it back
in? Or is that so obvious to everyone except me that it's not worth mentioning?
--
nosy: +eric.smith
___
Python trac
Eric Smith added the comment:
The patch looks good to me, in that it implements your desired functionality
well.
I haven't been following the issue closely enough to know whether or not this
new functionality is the right way to go. (I'm not saying it's not, just that I
Eric Smith added the comment:
This version of the patch adds support for classic classes and adds tests.
Documentation still needs to be written.
Again, this diff is against trunk.
If anyone wants to review this, in particular the tests that exercise
PendingDeprecationWarning, that would be
Eric Smith added the comment:
I think the only remaining issue here is that 's' isn't documented. The
exceptions are now more meaningful, and commas have been documented.
--
versions: +Python 3.2 -Python 3.0
___
Python
Eric Smith added the comment:
Here's my proposed changes. Please review.
I put the string type 's' into its own table. That's probably overkill, but I
think it gets lost if it's just mentioned in the text. Feel free to change
that, though.
Also, I'm not wil
Eric Smith added the comment:
> A much better solution would IMHO be to forbid setting the encoding,
> object and reason attributes to objects of the wrong type in the first
> place. Unfortunately this would require an extension to PyMemberDef for
> the T_OBJECT and T_OBJECT_EX ty
Eric Smith added the comment:
I'm working on a similar issue for int.__format__('c'). What's not clear to me
is why this doesn't work the same as chr(i). That is, shouldn't chr(i) ==
('%c' % i) hold for i in range(256)? And if that's so, why not j
Eric Smith added the comment:
That looks good. I tweaked it a little and fixed a few other problems with the
patch. New patch attached.
--
Added file: http://bugs.python.org/file16360/issue5965-1.diff
___
Python tracker
<http://bugs.python.
Eric Smith added the comment:
Of course. Sorry about that.
But then why not copy unichr()? It calls PyUnicode_FromOrdinal.
I guess my real question is:
Should "'%c' % i" be identical to "chr(i)" and should "u'%c' % i" be identical
to "
Eric Smith added the comment:
Checked in.
trunk: r78440
release26-maint: r78441
py3k: r78442
release31-maint: r78443
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python track
Eric Smith added the comment:
Checked in.
trunk: r78444
release26-maint: r78445
py3k: r78446
release31-maint: r78447
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python track
Eric Smith added the comment:
I haven't looked at the patch, but:
Thanks for the the additional tests. Missing unicode was definitely a mistake.
str(w[0].message) is an improvement.
The PEP is out of date in many respects. I think it's best to note that in the
PEP and continue t
Eric Smith added the comment:
I think the better design is to have 2 distinct APIs: Popen_shell and
Popen_exec. I'm not wild about the name Popen_exec, suggestions welcome.
Neither of these would accept a shell parameter.
For starters these could be convenience APIs that just call Popen
Eric Smith added the comment:
Please read http://docs.python.org/tutorial/floatingpoint.html
--
nosy: +eric.smith
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Eric Smith added the comment:
For what it's worth, these are properly called "Conditional Expressions". See
PEP 308 for the gory details, including figuring out what the precedence is. It
was news to me that the allowed syntax is slightly different in 2.x and 3.x.
Changes by Eric Smith :
--
components: +Library (Lib) -Regular Expressions
type: crash -> behavior
___
Python tracker
<http://bugs.python.org/issue8050>
___
_
Eric Smith added the comment:
This would be a new feature, so it can't be added to 2.6 or 3.2. It's an
interesting idea, though.
--
assignee: -> eric.smith
nosy: +mark.dickinson
___
Python tracker
<http://bugs.pyth
Eric Smith added the comment:
There's definitely some weirdness going on with handling mapping keys. I'll
look at it.
--
assignee: -> eric.smith
keywords: +easy
nosy: +eric.smith
priority: -> normal
stage: -> needs patch
___
Eric Smith added the comment:
I'm not sure I'm wild about doing the work twice, once as string and once as
unicode if need be. But I'll consider it, especially since this is only a 2.7
issue.
There could be side effects of evaluating the replacement strings, but I'm
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8128>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
str.format() does not take a mapping object. You want:
>>> "{0[foo]}".format(d)
'0'
--
resolution: -> invalid
stage: test needed -> committed/rejected
status: open -> closed
___
P
Eric Smith added the comment:
See also issue 6081.
--
___
Python tracker
<http://bugs.python.org/issue8134>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Smith :
--
assignee: -> eric.smith
___
Python tracker
<http://bugs.python.org/issue6081>
___
___
Python-bugs-list mailing list
Unsubscri
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8155>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
I agree with David.
Although it's not clear to my why the code doesn't just work with the addition
of do_string_format_using_mapping and without the other code. It's possible the
existing code is too dict-specific and should be calling a more ge
Eric Smith added the comment:
I believe this patch fixes the issue. Tests and documentation are still needed,
of course.
--
Added file: http://bugs.python.org/file16585/issue6081.diff
___
Python tracker
<http://bugs.python.org/issue6
Eric Smith added the comment:
Added a comment to explain the change.
--
Added file: http://bugs.python.org/file16586/issue6081.diff
___
Python tracker
<http://bugs.python.org/issue6
Changes by Eric Smith :
Removed file: http://bugs.python.org/file16585/issue6081.diff
___
Python tracker
<http://bugs.python.org/issue6081>
___
___
Python-bugs-list mailin
Eric Smith added the comment:
http://docs.python.org/library/stdtypes.html#str.format, for starters. This is
in Doc/library/stdtypes.rst.
For tests, probably in Lib/test/test_unicode.py.
I'm not sure if we should add this to 2.7 (or even 3.2, for that matter), but
if so, we should sta
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8188>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Eric Smith :
Sean Reifschneider proposed [1] adding the ability to log an exception using
the syslog module.
My proposed implementation is along the lines of:
def logexceptions(chain=True):
import sys
import traceback
import syslog
# Should we chain to the
Changes by Eric Smith :
--
components: +Extension Modules
___
Python tracker
<http://bugs.python.org/issue8214>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
I'm not sure I'm wild about the *args parameter. Calling "Fred" the 0-th
parameter here seems non-intuitive:
"My name is {0}".format_using_mapping({}, 'Fred')
If you're going to have *args, why not **kwargs and then
201 - 300 of 805 matches
Mail list logo