[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Eric Smith
Eric Smith added the comment: I'd need access to this without having to build a PyUnicodeObject, for efficiency. But it sounds like it does have the basic functionality I need. For my use I'd really need it to take the result of Py_UNICODE_NEXT. Something like:

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Eric Smith
Eric Smith added the comment: The code will basically be: Py_UCS4 fill; parse_format_string(fmt, ..., &fill, ...); /* lots more code */ if (fill_needed) { /* compute how many characters to reserve */ space_needed = Py_UNICODE_NUM_NEEDED(

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Eric Smith
Eric Smith added the comment: The compiler's decision to inline something should not be related to its ability to put variables in a register. But I definitely agree that we should get the abstraction right first and worry about the implementation

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-27 Thread Eric Smith
Eric Smith added the comment: > The idea is that the first part refers to what the macro > returns (Py_UCS4) and the "read" part of the name refers > to moving a pointer across an array (any array of integers). I thought the first part generally meant the type of

[issue10557] Malformed error message from float()

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

[issue10563] Spurious newline in time.ctime

2010-11-28 Thread Eric Smith
Eric Smith added the comment: There's an error in time_ctime where it expects the length of the string to be fixed: if (p[24] == '\n') p[24] = '\0'; It doesn't count on the year having 5 digits. It should probably say (untested): l = len(p);

[issue10563] Spurious newline in time.ctime

2010-11-28 Thread Eric Smith
Eric Smith added the comment: That should be strlen(), of course. -- ___ Python tracker <http://bugs.python.org/issue10563> ___ ___ Python-bugs-list mailin

[issue10563] Spurious newline in time.ctime

2010-11-28 Thread Eric Smith
Eric Smith added the comment: What platform are you running this on? My Fedora 32 bit system won't support a time_t that large. -- ___ Python tracker <http://bugs.python.org/is

[issue10563] Spurious newline in time.ctime

2010-11-28 Thread Eric Smith
Eric Smith added the comment: Can you try this diff and see if it solves the problem: Index: Modules/timemodule.c === --- Modules/timemodule.c(revision 86848) +++ Modules/timemodule.c(working copy) @@ -639,6 +639,7

[issue10563] Spurious newline in time.ctime

2010-11-28 Thread Eric Smith
Changes by Eric Smith : -- components: +Extension Modules -Library (Lib) keywords: +easy, patch stage: -> unit test needed ___ Python tracker <http://bugs.python.org/issu

[issue10557] Malformed error message from float()

2010-12-03 Thread Eric Smith
Eric Smith added the comment: According to comments in the code and verified by inspection, PyOS_string_to_double does not accept any whitespace. -- ___ Python tracker <http://bugs.python.org/issue10

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-03 Thread Eric Pruitt
Changes by Eric Pruitt : -- nosy: -ericpruitt ___ Python tracker <http://bugs.python.org/issue10562> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Eric Smith
Eric Smith added the comment: I agree. It would be nice, but the impact on existing code is too large. I can easily imagine someone parsing the output of "print(somecomplexnumber)" and not considering spaces. For the record, it would require changing complex.__repr__ (which is als

[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Eric Smith
Eric Smith added the comment: There are no tests or docs to fix: it's an internal (static) helper function. It's not a particularly straightforward change, because you're inserting a space into the middle of the floating point imaginary string. There would be extra bookkee

[issue10624] Move requires_IEEE_754 decorator from test_complex into test.support

2010-12-04 Thread Eric Smith
New submission from Eric Smith : The decorator could be shared in at least datetimetester, test_cmath, test_complex, test_decimal, test_fractions, test_long, and test_math. -- assignee: eric.smith components: Tests keywords: easy messages: 123346 nosy: eric.smith, mark.dickinson

[issue10625] There is no test for repr(complex(-0., 1.)) special handling

2010-12-04 Thread Eric Smith
New submission from Eric Smith : There's a special test in the C code for this, but there no test for it in test_complex. Note that this needs to be a IEEE 754 specific test. -- assignee: eric.smith components: Tests keywords: easy messages: 123348 nosy: eric.smith priority: n

[issue10624] Move requires_IEEE_754 decorator from test_complex into test.support

2010-12-04 Thread Eric Smith
Eric Smith added the comment: Moved from test_math.py into support.py in r87040. I'll fix up the other modules shortly. -- ___ Python tracker <http://bugs.python.org/is

[issue10625] There is no test for repr(complex(-0., 1.)) special handling

2010-12-04 Thread Eric Smith
Eric Smith added the comment: Technically the special handling in complex_repr() is for +0, but there needs to be a test both ways. -- ___ Python tracker <http://bugs.python.org/issue10

[issue10624] Move requires_IEEE_754 decorator from test_complex into test.support

2010-12-04 Thread Eric Smith
Eric Smith added the comment: Modified all other tests to use support.requires_IEEE_754 in r87043. -- resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue10625] There is no test for repr(complex(-0., 1.)) special handling

2010-12-04 Thread Eric Smith
Eric Smith added the comment: Checked-in in r87044. -- resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Eric Smith
Changes by Eric Smith : Removed file: http://bugs.python.org/file19940/unnamed ___ Python tracker <http://bugs.python.org/issue10621> ___ ___ Python-bugs-list mailin

[issue10634] Windows timezone changes not reflected by time.localtime

2010-12-05 Thread Eric Pruitt
New submission from Eric Pruitt : If the current time zone changes on Windows, time.localtime will continue to return results that reflect the time zone the system used when the module was imported. My current work around is to use GetLocalTime from kernel32 with ctypes. Windows does not have

[issue10633] string.format() Unexpected output with numeric '#' prefix and 0 width

2010-12-05 Thread Eric Smith
Eric Smith added the comment: I disagree that your expected output is how it should behave. I believe it's more likely that the user wants the entire field width specified. In addition, compatibility with %-formatting would dictate that we keep the current behavior. >>> &#x

[issue10634] Windows timezone changes not reflected by time.localtime

2010-12-06 Thread Eric Pruitt
Eric Pruitt added the comment: Is there a way to force the time module to be reinitialized? I had no success experimenting with reload and del, but I assume that has something to do with the module being CRT based. -- ___ Python tracker <h

[issue10516] Add list.clear() and list.copy()

2010-12-06 Thread Eric Smith
Changes by Eric Smith : Removed file: http://bugs.python.org/file19959/unnamed ___ Python tracker <http://bugs.python.org/issue10516> ___ ___ Python-bugs-list mailin

[issue10660] format() to lower and uppercase

2010-12-09 Thread Eric Smith
Eric Smith added the comment: I agree with David. Here's an example of using such a subclass. It extends the format string for strings to begin with an optional 'u' or 'l': --- class U(str): def __format__(self, fmt): if fmt

[issue10661] ElementTree QName has a very uninformative repr()

2010-12-09 Thread Eric Smith
Eric Smith added the comment: This should be either: '' % (self.text,) or: ''.format(self.text) If self.text is a tuple (which granted is its own error), then the version checked in will raise an exception. -- nosy: +eric.smith resolution: fixed ->

[issue10669] Remove Deprecation Warnings

2010-12-10 Thread Eric Smith
Eric Smith added the comment: Are the warnings originating in your code, or in the standard library, or elsewhere? If in the standard library, please provide specific details. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.

[issue10634] Windows timezone changes not reflected by time.localtime

2010-12-12 Thread Eric Pruitt
Changes by Eric Pruitt : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue10634> ___ ___ Python-bugs-list mailing list Unsubscri

[issue9232] Allow trailing comma in any function argument list.

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

[issue10715] uninformative error message

2010-12-16 Thread Eric Smith
Eric Smith added the comment: Operating systems also return this errno for many, many things unrelated to files. So while we might be able to fix this in some specific cases, in general it's not possible to add file names to all errors. Once we know your specific case we can see if

[issue10729] fwbackups python lib error

2010-12-18 Thread Eric Smith
Eric Smith added the comment: fwbackups is a third party package. See if you can submit a bug at http://www.diffingo.com/oss/fwbackups -- nosy: +eric.smith resolution: -> invalid stage: -> committed/rejected status: open -> closed _

[issue10715] uninformative error message

2010-12-21 Thread Eric Smith
Changes by Eric Smith : Removed file: http://bugs.python.org/file20126/unnamed ___ Python tracker <http://bugs.python.org/issue10715> ___ ___ Python-bugs-list mailin

[issue10715] uninformative error message

2010-12-21 Thread Eric Smith
Eric Smith added the comment: Because you're sending email as HTML, the message shows up both as plain text and as an attachment. It's the attachments that are being removed. If you could, please stop sending HTML email. -- ___ Pyth

[issue10715] uninformative error message

2010-12-21 Thread Eric Smith
Eric Smith added the comment: Here's a code snippet that shows the problem: >>> import subprocess >>> subprocess.Popen(['foo']) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.5/subprocess.py", line 593

[issue10715] Command name missing from exception in subprocess.Popen

2010-12-21 Thread Eric Smith
Changes by Eric Smith : -- title: uninformative error message -> Command name missing from exception in subprocess.Popen ___ Python tracker <http://bugs.python.org/issu

[issue10715] Command name missing from exception in subprocess.Popen

2010-12-21 Thread Eric Smith
Changes by Eric Smith : -- stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue10715> ___ ___ Python-bugs-list mailing list Unsubscri

[issue10715] Command name missing from exception in subprocess.Popen

2010-12-21 Thread Eric Smith
Eric Smith added the comment: This has already been fixed in 3.2: Python 3.2b2 (py3k:87413, Dec 21 2010, 07:09:13) [GCC 4.1.2 20070626 (Red Hat 4.1.2-13)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>

[issue10715] Command name missing from exception in subprocess.Popen

2010-12-21 Thread Eric Smith
Eric Smith added the comment: That change was just a tweak. The real change was in r86593. It references issue 4925, of which this is a duplicate. I'm closing this, if you want to follow the issue add yourself to 4925. -- resolution: -> duplicate stage: needs patch ->

[issue9090] Error code 10035 calling socket.recv() on a socket with a timeout (WSAEWOULDBLOCK - A non-blocking socket operation could not be completed immediately)

2010-12-22 Thread Eric Hohenstein
Eric Hohenstein added the comment: I have ported the changes related to this problem from the 3.2 branch to the 2.6 version of socketmodule.c. The changes are attached as a diff from Python 2.6.2. The changes apply to all platforms but I've only tested them on Windows.

[issue10797] Wrong detection of lines in readlines() function

2010-12-30 Thread Eric Smith
Eric Smith added the comment: Either use mode 'U' or the io module if you want to match 3.x. $ python Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01) [GCC 4.3.4 20090804 (release) 1] on cygwin Type "help", "copyright", "credits" or "lice

[issue10833] Replace %.100s by %s in PyErr_Format(): the arbitrary limit of 500 bytes is outdated

2011-01-05 Thread Eric Smith
Eric Smith added the comment: I always thought that one of the reasons for specifying the length was in case a pointer pointed to garbage: at least you'd be limiting how much trash was printed. But maybe that's just my imagination and there is no such reason. -- nosy: +

[issue3173] external strftime for Python?

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

[issue3173] external strftime for Python?

2011-01-06 Thread Eric Smith
Eric Smith added the comment: I think we're stuck with strftime for quite a while, no matter how ugly it is. datetime.__format__ uses it, for example. Although maybe it's possible to write an strftime-format to new-format translator. If we're going to take this on (re-writi

[issue10873] String formatting example invalid

2011-01-09 Thread Eric Smith
Eric Smith added the comment: This feature was added in 2.7 (and 3.1, I think). If the numeric indices are not specified, they take the args in order. -- assignee: d...@python -> eric.smith nosy: +eric.smith resolution: -> invalid stage: -> committed/rejected status: open

[issue10876] Zipfile crashes when zip password is set to 610

2011-01-09 Thread Eric Smith
Eric Smith added the comment: What do you mean by "is set to 610"? Can you show us the code that caused this error? -- nosy: +eric.smith ___ Python tracker <http://bugs.python.o

[issue10930] dict.setdefault: Bug: default argument is ALWAYS evaluated, i.e. no short-circuit eval

2011-01-18 Thread Eric Smith
Eric Smith added the comment: Or use a collections.defaultdict, which has a factory function as a constructor argument. It sort of depends on what you're trying to do. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/is

[issue10968] threading.Timer should be a class so that it can be derived

2011-01-21 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith title: Timer should be a class so that it can be derived -> threading.Timer should be a class so that it can be derived ___ Python tracker <http://bugs.python.org/issu

[issue11032] _string: formatter_field_name_split() and formatter_parser doesn't check input type

2011-01-27 Thread Eric Smith
Eric Smith added the comment: I'll review this tomorrow. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue11032> ___ ___ Python-bugs-l

[issue11032] _string: formatter_field_name_split() and formatter_parser doesn't check input type

2011-01-28 Thread Eric Smith
Eric Smith added the comment: The patch looks good to me. I've added some more tests to cover some corner cases. Go ahead and commit it. -- Added file: http://bugs.python.org/file20572/_string0.patch ___ Python tracker <http://bugs.py

[issue11039] Use of 'L' specifier is inconsistent when printing long integers

2011-01-28 Thread Eric Smith
Eric Smith added the comment: There is no suffix in python 3.x. Since this is a feature request, and there will be no new releases of 2.x, I'm closing this. -- nosy: +eric.smith resolution: -> rejected stage: -> committed/rejected status: open -> closed type: ->

[issue11051] system calls per import

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

[issue11032] _string: formatter_field_name_split() and formatter_parser doesn't check input type

2011-01-28 Thread Eric Smith
Changes by Eric Smith : -- type: -> crash ___ Python tracker <http://bugs.python.org/issue11032> ___ ___ Python-bugs-list mailing list Unsubscri

[issue11032] _string: formatter_field_name_split() and formatter_parser() don't check input type

2011-01-28 Thread Eric Smith
Eric Smith added the comment: Release manager: You can decide if this fix should go in before 3.2. It's a trivial fix to a crasher, but it's extremely unlikely anyone would trip over it. It's been a crasher since 3.0. It's also a crasher in 2.7, although there it's

[issue11032] _string: formatter_field_name_split() and formatter_parser() don't check input type

2011-01-29 Thread Eric Smith
Eric Smith added the comment: It looks like the canonical message is "expected X, got Y". With that change I've checked it in in r88226. I'll backport. -- assignee: haypo -> eric.smith ___ Python tracker <http://

[issue11032] _string: formatter_field_name_split() and formatter_parser() don't check input type

2011-01-29 Thread Eric Smith
Eric Smith added the comment: Actually this error doesn't exist on older versions because these used to be methods on a string. The error was introduced in r85456 (issue 9418) when these became functions in the _string module. No need to backport. -- resolution: -> accept

[issue9418] Move _formatter_* methods from string type into _string module

2011-01-29 Thread Eric Smith
Eric Smith added the comment: No further action required. I'm not going to remove format() and friends from stringlib as long as there's chatter about adding a .format() for bytes. -- resolution: -> accepted stage: patch review -> committed/rejected status

[issue11072] Add MLSD command support to ftplib

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

[issue11095] subprocess popen broken for bytes and backslash

2011-02-02 Thread Eric Smith
Eric Smith added the comment: 1: subprocess.call is documented as taking a string, not bytes. If you think it should also take bytes, I suggest opening a separate bug as a feature request. 2: You're running into both Python and the shell escaping. If you have an odd number of backsl

[issue11114] file.tell extremely slow

2011-02-04 Thread Eric Smith
Eric Smith added the comment: Do you have a benchmark program you can post? -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue4> ___ ___

[issue11122] bdist_rpm fails

2011-02-04 Thread Eric Smith
Eric Smith added the comment: "rpm -ba" is very old. I think it's been at least since 2002 that "-ba" was supported by rpm. I believe bdist_rpm is calling "rpmbuild -ba", and if that doesn't exist, then "rpm -ba" is a transition str

[issue11125] csv documentation should not use open() without close()

2011-02-04 Thread Eric Smith
New submission from Eric Smith : Many places open() is shown as a parameter to a csv method, but close() can't be called. This is not a practice we should be advocating. Better would be to show a 'with' statement, or at least a note explaining this isn't an ideal usage.

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-05 Thread Eric Smith
Eric Smith added the comment: While I also dislike the existing behavior, note that you can get what you want by using an equal sign. >>> import argparse >>> parser = argparse.ArgumentParser(prog='a2x') >>> parser.add_argument('--asciidoc-opts

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Eric Smith
Eric Smith added the comment: "--" won't work. Traditionally, this has been used to separate optional arguments from positional arguments. Continuing the "cd" example, that's what would let you cd into a directory whose name starts with a hyphen: $ cd -links-/

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Eric Smith
Eric Smith added the comment: Good point, I hadn't thought of that. Maybe ArgumentParser needs a "don't try to be so helpful, parse like optparse" option. Which is what Steven suggested earlier, I believe. I'd take a crack at this if there's general consensus on

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Eric Smith
Eric Smith added the comment: I'd also like to see this as the default. After all, presumably we'd like Python scripts to work like all other command line programs, and I too am unaware of any other option parsing library that works the way argparse does. But changing released b

[issue11113] html.entities mapping dicts need updating?

2011-02-06 Thread Eric Smith
Eric Smith added the comment: I don't see the need for a parameter to support different sets of entities. Just supporting the ones from HTML 5 seems like the right thing. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/is

[issue11113] html.entities mapping dicts need updating?

2011-02-06 Thread Eric Smith
Eric Smith added the comment: Ah. I hadn't thought of generating them, only parsing them. In that case, then yes, it's an issue for generation. -- ___ Python tracker <http://bugs.python.o

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-07 Thread Eric Smith
Eric Smith added the comment: Steven: Yes, the current structure of the first pass scan makes any patch problematic. It really would be an implementation of a different algorithm. I'm still interested in looking at it, though. -- ___ P

[issue11145] '%o' % user-defined instance

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

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-08 Thread Eric Smith
Eric Smith added the comment: Without guessing which args are options, I don't see how it's possible to implement parse_known_args(). I'd propose raising an exception if it's called and dont_assume_everything_that_looks_like_a_flag_is_intended_to_be_one (or whatever it

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-17 Thread Eric Smith
Eric Smith added the comment: [I doubt my terminology is exactly correct in this post, but I've tried my best to make it so.) The more I think about this the more I realize we can't implement a parser that doesn't make guesses about '-' prefixed args and that works

[issue11264] Format Specification Mini-Language missing type 'i'?

2011-02-21 Thread Eric Smith
Eric Smith added the comment: It would be redundant, so we don't need both. I don't recall any discussion when PEP 3101 was developed as to choosing 'd' over 'i'. In all of the C code I've seen use printf, I don't think I've ever seen 'i

[issue2337] Backport oct() and hex() to use __index__

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

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

2008-05-20 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: After discussing this with Talin, we've decided this is "works as designed". The problem, if any, is that **{' +(': 44} is allowed as a parameter. I think that perhaps that should be an error, but I haven&#x

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

2008-05-20 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: I should have been clearer. By "The problem, if any, is that **{' +(': 44} is allowed as a parameter", I meant in general, for all function/method calls. It's not an issue

[issue2630] repr() should not escape non-ASCII characters

2008-06-03 Thread Eric Smith
Changes by Eric Smith <[EMAIL PROTECTED]>: -- nosy: +eric.smith ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2630> ___ ___ Python

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

2008-06-11 Thread Eric Smith
New submission from Eric Smith <[EMAIL PROTECTED]>: Per Guido in http://mail.python.org/pipermail/python-3000/2008-May/013912.html, add this to the PEP 3101 (Advanced String Formatting) implementation. This will add the prefixes 0b, 0o, and 0x. -- assignee: eric.smith comp

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

2008-06-19 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: I'd say that's a bug. I'll look at it. -- components: +Interpreter Core nosy: +talin ___ Python tracker <[EMAIL PROTECTED]> <ht

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

2008-06-19 Thread Eric Smith
Changes by Eric Smith <[EMAIL PROTECTED]>: -- versions: +Python 2.6 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3140> ___ __

[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

[issue3200] Python's crash in heavy multithreading IO operations

2008-06-25 Thread Eric Sadit
New submission from Eric Sadit <[EMAIL PROTECTED]>: Hello, I found a rare bug in heavy multithreading IO operations. The bug arises under a stupid sequence of I/O operations. The sequence is not a normal one, but the real problem is that the Python's interpreter crashes. The corre

[issue3200] Python's crash in heavy multithreading IO operations

2008-06-25 Thread Eric Sadit
Eric Sadit <[EMAIL PROTECTED]> added the comment: Ok, I will try to reproduce it in the python 2.6b1 version, and I report to you the result Saludos On Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d'Arc < [EMAIL PROTECTED]> wrote: > > Amaury Forgeot d'Arc &

[issue3200] Python's crash in heavy multithreading IO operations

2008-06-25 Thread Eric Sadit
Eric Sadit <[EMAIL PROTECTED]> added the comment: Thanks Amaury I run a test script and Python 2.5.2 crashes, but 2.6b1 runs perfectly throwing a ValueError exception (Operation of closed file) in the reader/writer thread and "IOError: close() called during concurrent operation on th

[issue3200] Python's crash in heavy multithreading IO operations

2008-06-25 Thread Eric Sadit
Eric Sadit <[EMAIL PROTECTED]> added the comment: The test script #!/usr/bin/python import sys import thread f = file("o.test","w") buff = " " * 1024 def run(): while 1: try: f.read(100) # f.write(buff) ex

[issue3200] Python's crash in heavy multithreading IO operations

2008-06-25 Thread Eric Sadit
Eric Sadit <[EMAIL PROTECTED]> added the comment: #!/usr/bin/python import sys import thread f = file("o.test","w") buff = " " * 1024 def run(): while 1: try: f.read(100) # f.write(buff) except Exception, e:

[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

<    1   2   3   4   5   6   7   8   9   10   >