[Python-3000] PATCH: library reference docs for PEP 3101

2007-08-30 Thread Talin
I just posted on the tracker a patch which adds extensive documentation for PEP 3101 to the Python Library Reference. This includes: str.format() format() __format__ Formatter format string syntax format specification mini-language http://bugs.python.org/issue1068 (Eric, my de

Re: [Python-3000] buildbots

2007-08-30 Thread Thomas Heller
Martin v. Löwis schrieb: >> Agreed, thus my original suggestion of a standalone wrapper executable >> (or using ctypes). > > That doesn't work well, either - how do we get this wrapper onto the > build slaves? It would work if such wrapper shipped with the > operating system. > >> I just think th

[Python-3000] Release Countdown

2007-08-30 Thread Guido van Rossum
I'm pretty happy where we stand now -- I just squashed the last two failing tests (test_mailbox and test_oldmailbox). It is 9:30 pm here and I'm tired, so I'm going to try and get a good night's sleep and do the release as early as I can tomorrow. Remember, I'll freeze the branch (not a real lock,

Re: [Python-3000] string.Formatter class

2007-08-30 Thread Ron Adam
Eric Smith wrote: > Ron Adam wrote: >> >> >> Eric Smith wrote: >>> Ron Adam wrote: > get_field(field_name, args, kwargs, used_args) > Given a field_name as returned by parse, convert it to an object to > be formatted. The default version takes strings of the form > defined in t

Re: [Python-3000] Need Decimal.__format__

2007-08-30 Thread Guido van Rossum
On 8/30/07, Eric Smith <[EMAIL PROTECTED]> wrote: > Talin wrote: > > I'm looking for a volunteer who understands the Decimal class well > > enough to write a __format__ method for it. It should handle all of the > > same format specifiers as float.__format__, but it should not use the > > same impl

Re: [Python-3000] Need Decimal.__format__

2007-08-30 Thread Eric Smith
Talin wrote: > I'm looking for a volunteer who understands the Decimal class well > enough to write a __format__ method for it. It should handle all of the > same format specifiers as float.__format__, but it should not use the > same implementation as float (so as to preserve accuracy.) If no

[Python-3000] Need Decimal.__format__

2007-08-30 Thread Talin
I'm looking for a volunteer who understands the Decimal class well enough to write a __format__ method for it. It should handle all of the same format specifiers as float.__format__, but it should not use the same implementation as float (so as to preserve accuracy.) Also, I'm interested in sug

Re: [Python-3000] string.Formatter class

2007-08-30 Thread Talin
Eric Smith wrote: > Ron Adam wrote: >> I wonder if this is splitting things up a bit too finely? If the format >> function takes a conversion argument, it makes it possible to do >> everything by overriding format_field. >> >> def format_field(self, value, format_spec, conversion): >>

Re: [Python-3000] string.Formatter class

2007-08-30 Thread Eric Smith
Ron Adam wrote: > > > Eric Smith wrote: >> Ron Adam wrote: get_field(field_name, args, kwargs, used_args) Given a field_name as returned by parse, convert it to an object to be formatted. The default version takes strings of the form defined in the PEP, such as "0[name]" or

[Python-3000] format_spec parameter to format() builtin defaults to "" [was: Re: string.Formatter class]

2007-08-30 Thread Eric Smith
Talin wrote: > Also I wanted to ask: How about making the built-in 'format' function > have a default value of "" for the second argument? So I can just say: > >format(x) > > as a synonym for: > >str(x) I implemented this in r57797. Eric.

Re: [Python-3000] string.Formatter class

2007-08-30 Thread Ron Adam
Eric Smith wrote: > Ron Adam wrote: >>> get_field(field_name, args, kwargs, used_args) >>> Given a field_name as returned by parse, convert it to an object to >>> be formatted. The default version takes strings of the form defined >>> in the PEP, such as "0[name]" or "label.title". It records

Re: [Python-3000] New PyException_HEAD fails to compile on Windows

2007-08-30 Thread Collin Winter
On 8/30/07, Amaury Forgeot d'Arc <[EMAIL PROTECTED]> wrote: > Hello, > > the windows version of py3k suddenly stopped compiling because of an > extra semicolon in PyException_HEAD: PyObject_HEAD definition already > ends with a semicolon. > > gcc seems more tolerant though... Sorry, fix on the way

[Python-3000] New PyException_HEAD fails to compile on Windows

2007-08-30 Thread Amaury Forgeot d'Arc
Hello, the windows version of py3k suddenly stopped compiling because of an extra semicolon in PyException_HEAD: PyObject_HEAD definition already ends with a semicolon. gcc seems more tolerant though... -- Amaury Forgeot d'Arc ___ Python-3000 mailing

Re: [Python-3000] string.Formatter class

2007-08-30 Thread Eric Smith
Ron Adam wrote: >> get_field(field_name, args, kwargs, used_args) >> Given a field_name as returned by parse, convert it to an object to be >> formatted. The default version takes strings of the form defined in >> the PEP, such as "0[name]" or "label.title". It records which args >> have been

Re: [Python-3000] buildbots

2007-08-30 Thread Martin v. Löwis
> Agreed, thus my original suggestion of a standalone wrapper executable > (or using ctypes). That doesn't work well, either - how do we get this wrapper onto the build slaves? It would work if such wrapper shipped with the operating system. > I just think that if someone needs the functionality

Re: [Python-3000] buildbots

2007-08-30 Thread David Bolen
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > However, we can't use pywin32 on the buildbot slaves - it's not > installed. Agreed, thus my original suggestion of a standalone wrapper executable (or using ctypes). But for end users of Python on Windows, this is a direct Windows-specific API wra

Re: [Python-3000] Release 3.0a1 Countdown

2007-08-30 Thread Martin v. Löwis
> Tomorrow (Friday August 31) I want to do the 3.0a1 release. I want to > do it early in the day (US west coast time). It's going to be a > lightweight release -- I plan to put out a source tarball only, if > Martin wants to contribute an MSI installer that would be great. I see what I can do. An

Re: [Python-3000] Python-love (was Release 3.0a1 Countdown)

2007-08-30 Thread Neil Toronto
Guido van Rossum wrote: > Thanks everyone for the large number of improvements that came in this week! Can I echo this in general? I just lurk here, being fascinated by the distributed language development process, so I don't have much license to post and steal precious developer attention. But

Re: [Python-3000] current status

2007-08-30 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Aug 30, 2007, at 3:00 AM, Neal Norwitz wrote: > Some of the failures in test_mailbox and test_old_mailbox are the > same, but I think test_mailbox might have more problems. It does, and I won't be spending any more time before a1 looking at it.

[Python-3000] Release 3.0a1 Countdown

2007-08-30 Thread Guido van Rossum
Tomorrow (Friday August 31) I want to do the 3.0a1 release. I want to do it early in the day (US west coast time). It's going to be a lightweight release -- I plan to put out a source tarball only, if Martin wants to contribute an MSI installer that would be great. I plan to lock the tree Friday mo

Re: [Python-3000] current status

2007-08-30 Thread Thomas Heller
Neal Norwitz schrieb: > * On Win64, there's this assert: >SystemError: Objects\longobject.c:412: bad argument to internal function > I don't see how it's getting triggered based on the traceback though Python/getargs.c, line 672: ival = PyInt_AsSsize_t(arg); calls Objects/long

Re: [Python-3000] current status

2007-08-30 Thread Walter Dörwald
Walter Dörwald wrote: > [...] > However test_tarfile.py still segfaults for me in the py3k branch. The > top of the stacktrace is: > > #0 0xb7eec07f in memcpy () from /lib/tls/libc.so.6 > #1 0xb7a905bc in s_pack_internal (soself=0xb77dc97c, args=0xb77cddfc, > offset=0, buf=0x8433c4c "") >

Re: [Python-3000] current status

2007-08-30 Thread Walter Dörwald
Guido van Rossum wrote: > [...[ > >> * On ia64, test_tarfile.PAXUnicodeTest.test_utf7_filename generates >> this exception: >> Objects/exceptions.c:1392: PyUnicodeDecodeError_Create: Assertion >> `start < 2147483647' failed. > > That's probably an uninitialized variable 'startinpos' in one of th

Re: [Python-3000] refleak in test_io?

2007-08-30 Thread Guido van Rossum
On 8/30/07, Thomas Wouters <[EMAIL PROTECTED]> wrote: > > > On 8/30/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > > I tried recreating the leak with more controllable types, but I haven't > > > got very far. It seems to be caused by some weird interaction between > > > io.FileIO, _fileio._Fi

Re: [Python-3000] current status

2007-08-30 Thread Guido van Rossum
On 8/30/07, Neal Norwitz <[EMAIL PROTECTED]> wrote: > There are 6 tests that fail on all platforms AFAIK: > > 3 tests failed: > test_mailbox test_old_mailbox test_unicode_file > 3 skips unexpected on linux2: > test_smtplib test_sundry test_ssl Martin fixed test_unicode_file (I think he may

Re: [Python-3000] buildbots

2007-08-30 Thread Martin v. Löwis
> For SetErrorMode, if you're just looking for a non-ctypes wrapping, > it's already covered by pywin32's win32api, which seems simple enough > to obtain (and likely to already be present) if you're working at this > level with Win32 calls as a user of Python. Nor is ctypes very > complicated as a

Re: [Python-3000] refleak in test_io?

2007-08-30 Thread Thomas Wouters
On 8/30/07, Neal Norwitz <[EMAIL PROTECTED]> wrote: > > On 8/29/07, Thomas Wouters <[EMAIL PROTECTED]> wrote: > > > > Am I the only one seeing a refleak in test_io? > > I know of leaks in 4 modules, but they all may point to the same one > you identified: > > test_io leaked [62, 62] references, sum

Re: [Python-3000] refleak in test_io?

2007-08-30 Thread Thomas Wouters
On 8/30/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > > I tried recreating the leak with more controllable types, but I haven't > > got very far. It seems to be caused by some weird interaction between > > io.FileIO, _fileio._FileIO and io.IOBase, specifically io.IOBase.__del_ > > _() callin

Re: [Python-3000] buildbots

2007-08-30 Thread David Bolen
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: >> So, an environment variable would be useful, but maybe there should also be >> a Python function available that calls set_error_mode(). >> sys.set_error_mode()? > > Even though this would be somewhat lying - I'd put it into > msvcrt.set_error_mode

Re: [Python-3000] buildbots

2007-08-30 Thread Martin v. Löwis
> But unlike Unix, these text messages are guaranteed to be lost. Not really. We are probably talking about release builds primarily, where the only such message is the system error (as the assertions aren't compiled in, anyway). If such an error occurs, the message is lost - but an error code is

Re: [Python-3000] buildbots

2007-08-30 Thread Thomas Heller
Martin v. Löwis schrieb: >> So, an environment variable would be useful, but maybe there should also be >> a Python function available that calls set_error_mode(). >> sys.set_error_mode()? > > Even though this would be somewhat lying - I'd put it into > msvcrt.set_error_mode. For the _CrtSet fun

Re: [Python-3000] buildbots

2007-08-30 Thread Eric Smith
Martin v. Löwis wrote: >>> It should still require an environment variable, say >>> PYTHONNOERRORWINDOW, whether or not it should be considered only >>> in debug releases, I don't know. One place to put it would be >>> Modules/main.c (where all the other environment variables are >>> considered). >

Re: [Python-3000] current status

2007-08-30 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Aug 30, 2007, at 3:00 AM, Neal Norwitz wrote: > There are 6 tests that fail on all platforms AFAIK: > > 3 tests failed: > test_mailbox test_old_mailbox test_unicode_file > 3 skips unexpected on linux2: > test_smtplib test_sundry test_ssl >

Re: [Python-3000] [Python-3000-checkins] r57691 - python/branches/py3k/Lib/email

2007-08-30 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Aug 29, 2007, at 11:51 PM, Guido van Rossum wrote: > On 8/29/07, Barry Warsaw <[EMAIL PROTECTED]> wrote: >> On Aug 29, 2007, at 11:28 PM, Guido van Rossum wrote: >>> No, I don't think I can recover the changes. Would it work to just >>> copy the fi

Re: [Python-3000] buildbots

2007-08-30 Thread Martin v. Löwis
>> It should still require an environment variable, say >> PYTHONNOERRORWINDOW, whether or not it should be considered only >> in debug releases, I don't know. One place to put it would be >> Modules/main.c (where all the other environment variables are >> considered). > > It should also not be us

Re: [Python-3000] string.Formatter class

2007-08-30 Thread Ron Adam
Eric Smith wrote: > One of the things that PEP 3101 deliberately under specifies is the > Formatter class, leaving decisions up to the implementation. Now that a > working implementation exists, I think it's reasonable to tighten it up. > > I have checked in a Formatter class that specifies t

Re: [Python-3000] buildbots

2007-08-30 Thread Eric Smith
Martin v. Löwis wrote: >> New patch (still detects the debug build because the name of the C runtime >> dll depends on it): > > I know it will be difficult to talk you into not using ctypes :-), > but... > > I think this should go into the interpreter code itself. One problem > with your patch is

Re: [Python-3000] string.Formatter class

2007-08-30 Thread Eric Smith
Talin wrote: > Eric Smith wrote: >> Eric Smith wrote: >>> Jim Jewett wrote: >> but you might want to take inspiration from the "tail" of an elementtree node, and return the field with the literal next to it as a single object. (literal_text, field_name, format_spec, con

Re: [Python-3000] refleak in test_io?

2007-08-30 Thread Martin v. Löwis
> I tried recreating the leak with more controllable types, but I haven't > got very far. It seems to be caused by some weird interaction between > io.FileIO, _fileio._FileIO and io.IOBase, specifically io.IOBase.__del_ > _() calling self.close(), and io.FileIO.close() calling > _fileio._FileIO.clo

Re: [Python-3000] buildbots

2007-08-30 Thread Martin v. Löwis
> So, an environment variable would be useful, but maybe there should also be > a Python function available that calls set_error_mode(). > sys.set_error_mode()? Even though this would be somewhat lying - I'd put it into msvcrt.set_error_mode. For the _CrtSet functions, one might expose them as-i

Re: [Python-3000] buildbots

2007-08-30 Thread Thomas Heller
Martin v. Löwis schrieb: >> New patch (still detects the debug build because the name of the C runtime >> dll depends on it): > > I know it will be difficult to talk you into not using ctypes :-), > but... > > I think this should go into the interpreter code itself. One problem > with your patch

Re: [Python-3000] string.Formatter class

2007-08-30 Thread Talin
Eric Smith wrote: > Eric Smith wrote: >> Jim Jewett wrote: > >>> but you might want to take inspiration from the "tail" of an >>> elementtree node, and return the field with the literal next to it as >>> a single object. >>> >>> (literal_text, field_name, format_spec, conversion) >> I think I

Re: [Python-3000] buildbots

2007-08-30 Thread Martin v. Löwis
> New patch (still detects the debug build because the name of the C runtime > dll depends on it): I know it will be difficult to talk you into not using ctypes :-), but... I think this should go into the interpreter code itself. One problem with your patch is that it breaks if Python is build wi

[Python-3000] current status

2007-08-30 Thread Neal Norwitz
There are 6 tests that fail on all platforms AFAIK: 3 tests failed: test_mailbox test_old_mailbox test_unicode_file 3 skips unexpected on linux2: test_smtplib test_sundry test_ssl I believe test_smtplib, test_sundry fail for the same reason at least partially. They can't import email.bas