[issue3140] str.format("{0:n}") poss. bug with setlocale()

2008-06-24 Thread Eric Smith
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

[issue3186] bin(long) doesn't have a trailing 'L'

2008-06-24 Thread Eric Smith
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

[issue3083] Add alternate (#) formatting for bin, oct, hex output for str.format()

2008-07-15 Thread Eric Smith
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

[issue3382] Make '%F' and float.__format__('F') convert results to upper case.

2008-07-16 Thread Eric Smith
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

[issue3382] Make '%F' and float.__format__('F') convert results to upper case.

2008-07-17 Thread Eric Smith
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

[issue3382] Make '%F' and float.__format__('F') convert results to upper case.

2008-07-17 Thread Eric Smith
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

[issue3411] str.format() on negative floats

2008-07-18 Thread Eric Smith
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

[issue2772] Add PendingDeprecationWarning for % formatting

2008-07-18 Thread Eric Smith
Changes by Eric Smith <[EMAIL PROTECTED]>: -- assignee: eric.smith -> ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2772> ___ ___

[issue2772] Add PendingDeprecationWarning for % formatting

2008-07-19 Thread Eric Smith
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://

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2008-07-25 Thread Eric Smith
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

[issue3595] Windows base64 Decode

2008-08-22 Thread Eric Smith
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 &

[issue3382] Make '%F' and float.__format__('F') convert results to upper case.

2008-08-25 Thread Eric Smith
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

[issue3721] invalid literal for int() with base 16: ''

2008-09-05 Thread Eric Smith
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

[issue3982] support .format for bytes

2008-09-27 Thread Eric Smith
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

[issue3982] support .format for bytes

2008-09-29 Thread Eric Smith
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

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2010-01-16 Thread Eric Smith
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

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2010-01-17 Thread Eric Smith
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

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2010-01-17 Thread Eric Smith
Eric Smith added the comment: I'm indeed seeing the same test_posixpath errors that Jason reported. -- ___ Python tracker <http://bugs.python.org/issu

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2010-01-18 Thread Eric Smith
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> ___ __

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2010-01-18 Thread Eric Smith
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

[issue7734] discuss mark-as-invalid trick in heapq docs

2010-01-18 Thread Eric Smith
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

[issue7743] Additional potential string -> float conversion issues.

2010-01-20 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue7743> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7758] cPickle.load() segfault on invalid data

2010-01-22 Thread Eric Smith
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

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-23 Thread Eric Smith
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

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-25 Thread Eric Smith
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

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Eric Smith
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

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Eric Smith
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

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Eric Smith
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

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Eric Smith
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

[issue7789] Issue using datetime with format()

2010-01-26 Thread Eric Smith
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}'.

[issue7789] Issue using datetime with format()

2010-01-26 Thread Eric Smith
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(

[issue7789] Issue using datetime with format()

2010-01-26 Thread Eric Smith
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

[issue7789] Issue using datetime with format()

2010-01-26 Thread Eric Smith
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

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Eric Smith
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

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Eric Smith
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

[issue7789] Issue using datetime with format()

2010-01-26 Thread Eric Smith
Changes by Eric Smith : -- assignee: eric.smith -> georg.brandl nosy: +georg.brandl ___ Python tracker <http://bugs.python.org/issue7789> ___ ___ Python-

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2010-02-02 Thread Eric Smith
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

[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-02 Thread Eric Smith
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

[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-02 Thread Eric Smith
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

[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2010-02-02 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue7839> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7844] Add -3 warning for absolute imports.

2010-02-03 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue7844> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-04 Thread Eric Smith
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

[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-04 Thread Eric Smith
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

[issue7906] float("INFI") returns inf on certain platforms

2010-02-11 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith, mark.dickinson ___ Python tracker <http://bugs.python.org/issue7906> ___ ___ Python-bugs-list mailing list Unsub

[issue7906] float("INFI") returns inf on certain platforms

2010-02-12 Thread Eric Smith
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

[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread Eric Smith
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: +

[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread Eric Smith
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.

[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread Eric Smith
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

[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread Eric Smith
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

[issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True

2010-02-17 Thread Eric Smith
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

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-02-17 Thread Eric Smith
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: &

[issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True

2010-02-18 Thread Eric Smith
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

[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-02-18 Thread Eric Smith
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

[issue7980] time.strptime not thread safe

2010-02-22 Thread Eric Smith
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

[issue7980] time.strptime not thread safe

2010-02-22 Thread Eric Smith
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

[issue7928] String formatting: grammar wrongly limits [index] to integer

2010-02-22 Thread Eric Smith
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 &

[issue7928] String formatting: grammar wrongly limits [index] to integer

2010-02-22 Thread Eric Smith
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

[issue5988] Delete PyOS_ascii_formatd, PyOS_ascii_strtod, and PyOS_ascii_atof

2010-02-22 Thread Eric Smith
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 __

[issue5988] Delete PyOS_ascii_formatd, PyOS_ascii_strtod, and PyOS_ascii_atof

2010-02-22 Thread Eric Smith
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

[issue7980] time.strptime not thread safe

2010-02-22 Thread Eric Smith
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

[issue7988] complex.__format__ has incorrect default alignment

2010-02-22 Thread Eric Smith
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

[issue6857] float().__format__() default alignment

2010-02-22 Thread Eric Smith
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 ___

[issue6871] decimal.py: more format issues

2010-02-22 Thread Eric Smith
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

[issue6871] decimal.py: more format issues

2010-02-22 Thread Eric Smith
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

[issue7994] object.__format__ should reject format strings

2010-02-22 Thread Eric Smith
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

[issue6902] Built-in types format incorrectly with 0 padding.

2010-02-22 Thread Eric Smith
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

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-02-22 Thread Eric Smith
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

[issue7997] http://www.python.org/dev/faq/ doesn't seem to explain how to regenerate "configure"

2010-02-22 Thread Eric Smith
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

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-02-23 Thread Eric Smith
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

[issue7994] object.__format__ should reject format strings

2010-02-23 Thread Eric Smith
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

[issue5965] Format Specs: doc 's' and implicit conversions

2010-02-24 Thread Eric Smith
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

[issue5965] Format Specs: doc 's' and implicit conversions

2010-02-24 Thread Eric Smith
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

[issue7309] crasher in str(Exception())

2010-02-24 Thread Eric Smith
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

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-02-24 Thread Eric Smith
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

[issue5965] Format Specs: doc 's' and implicit conversions

2010-02-24 Thread Eric Smith
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.

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-02-24 Thread Eric Smith
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 "

[issue5965] Format Specs: doc 's' and implicit conversions

2010-02-25 Thread Eric Smith
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

[issue7928] String formatting: grammar wrongly limits [index] to integer

2010-02-25 Thread Eric Smith
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

[issue7994] object.__format__ should reject format strings

2010-02-26 Thread Eric Smith
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

[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2010-02-28 Thread Eric Smith
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

[issue8049] Wrong calculation result

2010-03-03 Thread Eric Smith
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/

[issue8039] precedence rules for ternary operator

2010-03-03 Thread Eric Smith
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.

[issue8050] smtplib SMTP.sendmail (TypeError: expected string or buffer)

2010-03-03 Thread Eric Smith
Changes by Eric Smith : -- components: +Library (Lib) -Regular Expressions type: crash -> behavior ___ Python tracker <http://bugs.python.org/issue8050> ___ _

[issue8060] PEP 3101 string formatting missing engineering presentation type for floating point

2010-03-04 Thread Eric Smith
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

[issue8096] locale.format_string fails on mapping keys

2010-03-09 Thread Eric Smith
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 ___

[issue7300] Unicode arguments in str.format()

2010-03-11 Thread Eric Smith
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

[issue8128] String interpolation with unicode subclass fails to call __str__

2010-03-13 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue8128> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8134] collections.defaultdict gives KeyError with format()

2010-03-13 Thread Eric Smith
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

[issue8134] collections.defaultdict gives KeyError with format()

2010-03-13 Thread Eric Smith
Eric Smith added the comment: See also issue 6081. -- ___ Python tracker <http://bugs.python.org/issue8134> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6081] str.format_from_mapping()

2010-03-15 Thread Eric Smith
Changes by Eric Smith : -- assignee: -> eric.smith ___ Python tracker <http://bugs.python.org/issue6081> ___ ___ Python-bugs-list mailing list Unsubscri

[issue8155] Incompatible change to test.test_support.check_warnings behaviour

2010-03-16 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue8155> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6081] str.format_from_mapping()

2010-03-18 Thread Eric Smith
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

[issue6081] str.format_from_mapping()

2010-03-19 Thread Eric Smith
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

[issue6081] str.format_from_mapping()

2010-03-19 Thread Eric Smith
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

[issue6081] str.format_from_mapping()

2010-03-19 Thread Eric Smith
Changes by Eric Smith : Removed file: http://bugs.python.org/file16585/issue6081.diff ___ Python tracker <http://bugs.python.org/issue6081> ___ ___ Python-bugs-list mailin

[issue6081] str.format_from_mapping()

2010-03-19 Thread Eric Smith
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

[issue8188] Unified hash for numeric types.

2010-03-20 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue8188> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8214] Add exception logging function to syslog module

2010-03-23 Thread Eric Smith
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

[issue8214] Add exception logging function to syslog module

2010-03-23 Thread Eric Smith
Changes by Eric Smith : -- components: +Extension Modules ___ Python tracker <http://bugs.python.org/issue8214> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6081] str.format_from_mapping()

2010-03-23 Thread Eric Smith
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

<    1   2   3   4   5   6   7   8   9   >