[issue8219] Facility and priority values/constants not documented for SysLogHandler

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

[issue8219] Facility and priority values/constants not documented for SysLogHandler

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

[issue8219] Facility and priority values/constants not documented for SysLogHandler

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

[issue8219] Facility and priority values/constants not documented for SysLogHandler

2010-03-24 Thread Eric Smith
Eric Smith added the comment: > Vinay Sajip added the comment: > Whoops, now fixed (I think). Looks good. Thanks! -- ___ Python tracker <http://bugs.python.org/

[issue8214] Add exception logging function to syslog module

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

[issue8214] Add exception logging function to syslog module

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

[issue8214] Add exception logging function to syslog module

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

[issue8214] Add exception logging function to syslog module

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

[issue8224] subprocess.Popen raises WindowsError if there is a dot in program name

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

[issue6081] str.format_from_mapping()

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

[issue8252] add a metadata section in setup.cfg

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

[issue8257] Decimal constructor to accept float

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

[issue7994] object.__format__ should reject format strings

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

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

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

[issue8272] Odd exception messages when using cStringIO.StringIO instances as callables.

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

[issue8278] os.utime doesn't allow a atime (Last Access) which is 27 years in the future.

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

[issue7994] object.__format__ should reject format strings

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

[issue8293] HTTPSConnection.close() does not immediately close the connection.

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

[issue8298] in what way we have to save tha module?

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

[issue8304] strftime and Unicode characters

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

[issue8309] Sin(x) is Wrong

2010-04-03 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith type: performance -> behavior ___ Python tracker <http://bugs.python.org/issue8309> ___ ___ Python-bugs-list mai

[issue8325] improve regrtest command line help

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

[issue8325] improve regrtest command line help

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

[issue8327] unintuitive behaviour of logging message propagation

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

[issue8334] winreg.QueryValue should return bytes, not unicode

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

[issue8355] diff.py produce unified format by default

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

[issue8355] diff.py produce unified format by default

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

[issue8359] % formating - TypeError: not all arguments converted during string formatting

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

[issue8359] % formating - TypeError: not all arguments converted during string formatting

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

[issue8359] % formating - TypeError: not all arguments converted during string formatting

2010-04-10 Thread Eric Smith
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. -- _

[issue8355] diff.py produce unified format by default

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

[issue8355] diff.py produce unified format by default

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

[issue8402] glob returns empty list with "[" character in the folder name

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

[issue8402] glob returns empty list with "[" character in the folder name

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

[issue8404] Set operations don't work for dictionary views

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

[issue8413] String interpolation doesn't work with sys.version_info

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

[issue8419] dict constructor allows invalid identifiers in **kwargs

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

[issue8419] dict constructor allows invalid identifiers in **kwargs

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

[issue8425] a -= b should be fast if a is a small set and b is a large set

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

[issue8466] typo in tp_name of cStringIO

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

[issue8451] syslog.syslog('msg') logs message with ident "python".

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

[issue8413] String interpolation doesn't work with sys.version_info

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

[issue8451] syslog.syslog('msg') logs message with ident "python".

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

[issue8503] smtpd SMTPServer does not allow domain filtering

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

[issue8537] Add ConfigureAction to argparse

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

[issue8538] Add ConfigureAction to argparse

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

[issue8539] Add ConfigureAction to argparse

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

[issue8539] Add ConfigureAction to argparse

2010-04-26 Thread Eric Smith
Changes by Eric Smith : -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/issue8539> ___ ___ Python-bugs-list

[issue8537] Add ConfigureAction to argparse

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

[issue8538] Add ConfigureAction to argparse

2010-04-26 Thread Eric Smith
Changes by Eric Smith : -- priority: -> normal ___ Python tracker <http://bugs.python.org/issue8538> ___ ___ Python-bugs-list mailing list Unsubscri

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

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

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

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

[issue8550] Expose SSL contexts

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

[issue8413] String interpolation doesn't work with sys.version_info

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

[issue8413] String interpolation doesn't work with sys.version_info

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

[issue8413] String interpolation doesn't work with sys.version_info

2010-04-29 Thread Eric Smith
Eric Smith added the comment: Looks like that's issue 1820. -- ___ Python tracker <http://bugs.python.org/issue8413> ___ ___ Python-bugs-list mailing list

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

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

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2010-04-29 Thread Eric Smith
Eric Smith added the comment: See also issue 8413, which would be addressed by this change. -- ___ Python tracker <http://bugs.python.org/issue1820> ___ ___ Pytho

[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

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

[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

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

[issue8671] A small erorr on http://docs.python.org/library/re.html

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

[issue1600] str.format() produces different output on different platforms (Py30a2)

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

[issue1600] str.format() produces different output on different platforms (Py30a2)

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

[issue1600] str.format() produces different output on different platforms (Py30a2)

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

[issue2264] empty specifier for float.__format__ does not always print at least one decimal digit

2008-03-10 Thread Eric Smith
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, &

[issue2264] empty specifier for float.__format__ does not always print at least one decimal digit

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

[issue2264] empty specifier for float.__format__ does not always print at least one decimal digit

2008-03-17 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: Fixed checked in as r61434. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs

[issue1633807] from __future__ import print_function

2008-03-17 Thread Eric Smith
Changes by Eric Smith <[EMAIL PROTECTED]>: -- nosy: +eric.smith _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1633807> _ ___ Python-bugs

[issue1633807] from __future__ import print_function

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

[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2008-03-18 Thread Eric Smith
Changes by Eric Smith <[EMAIL PROTECTED]>: -- nosy: +eric.smith __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1745> __ ___ Python-bugs

[issue2412] Check 2to3 for support of print function.

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

[issue1633807] from __future__ import print_function

2008-03-18 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: Checked in as r61577. -- resolution: -> accepted status: open -> closed _ Tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue2416] % string formatting does not support %b

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

[issue2436] Should __future__ print_function be valid in 3.0?

2008-03-20 Thread Eric Smith
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

[issue2436] Should __future__ print_function be valid in 3.0?

2008-03-20 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: Implemented in r61682. -- resolution: accepted -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs

[issue2477] parser support for future import of unicode_strings

2008-03-25 Thread Eric Smith
Changes by Eric Smith <[EMAIL PROTECTED]>: -- nosy: +eric.smith __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2477> __ ___ Python-bugs

[issue2526] str.format() :n format does not appear to work

2008-04-05 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: I'm looking into it. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2526> __ ___ Python-bugs-list ma

[issue2526] str.format() :n format does not appear to work for int and float

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

[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

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

[issue2416] % string formatting does not support %b

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

[issue2416] % string formatting does not support %b

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

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

2008-04-23 Thread Eric Smith
Changes by Eric Smith <[EMAIL PROTECTED]>: -- nosy: +eric.smith __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1222> __ ___ Python-bugs-list mailin

[issue2526] str.format() :n format does not appear to work for int and float

2008-04-29 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: Committed fix in r62586. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs

[issue2598] "{ +(}".format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format

2008-05-06 Thread Eric Smith
Changes by Eric Smith <[EMAIL PROTECTED]>: -- assignee: -> eric.smith nosy: +eric.smith __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2598> __ ___

[issue1588] str.format() wrongly formats complex() numbers (Py30a2)

2008-05-06 Thread Eric Smith
Changes by Eric Smith <[EMAIL PROTECTED]>: -- nosy: +eric.smith __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1588> __ ___ Python-bugs-list mailin

[issue2772] Add PendingDeprecationWarning for % formatting

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

[issue2772] Add PendingDeprecationWarning for % formatting

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

[issue2772] Add PendingDeprecationWarning for % formatting

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

[issue2772] Add PendingDeprecationWarning for % formatting

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

[issue2772] Add PendingDeprecationWarning for % formatting

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

[issue2772] Add PendingDeprecationWarning for % formatting

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

[issue2772] Add PendingDeprecationWarning for % formatting

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

[issue2802] str.format() :n integer output

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

[issue2802] str.format() :n integer output

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

[issue2802] str.format() :n integer output

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

[issue2802] str.format() :n integer output

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

[issue2836] str.format() documentation needs to be backported to 2.6

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

[issue2836] str.format() documentation needs to be backported to 2.6

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

[issue4482] 10e667.__format__('+') should return 'inf'

2008-12-01 Thread Eric Smith
Changes by Eric Smith <[EMAIL PROTECTED]>: -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue4701> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    1   2   3   4   5   6   7   8   9   >