Re: [Python-Dev] file(file)

2007-01-13 Thread Georg Brandl
Terry Reedy schrieb: | We should also consider the semantics in more detail. Should the seek | position be shared between the two objects? What about buffering? | | That's definitely the hard part. But it's somewhat similar to | normal mutable objects which are (I think always, right?)

Re: [Python-Dev] [Python-3000] Warning for 2.6 and greater

2007-01-13 Thread Michael Hudson
[EMAIL PROTECTED] writes: On 10:12 am, [EMAIL PROTECTED] wrote: For practical reasons (we have enough work to be getting on with) PyPy is more-or-less ignoring Python 2.5 at the moment. After funding and so on, when there's less pressure, maybe it will seem worth it. Not soon though. I

Re: [Python-Dev] [Python-3000] Warning for 2.6 and greater

2007-01-13 Thread Martin v. Löwis
Anthony Baxter schrieb: There's a couple of ways I see it - we could add a -3 command line flag to enable 3.x compat, or maybe a from __future__ statement. Although the latter would be a global thing, which is different to how all existing from __future__s work, so probably not good.

Re: [Python-Dev] [Python-3000] Warning for 2.6 and greater

2007-01-13 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: It would certainly be possible to have: from __future__ import items_is_iter be the same as: __py3k_compat_items_is_iter__ = True and have the 2.x series' items() method check the globals() of the calling scope to identify the return value of items()

Re: [Python-Dev] [Python-3000] Warning for 2.6 and greater

2007-01-13 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: There will certainly be demand for an asynchronous server in 3.0, To flip the question around: there might be a demand for Twisted in 3.0, but will there be a demand for 3.0 in Twisted? It might just be easier for everyone concerned to just continue maintaining 2.x

Re: [Python-Dev] file(file)

2007-01-13 Thread Giovanni Bajo
On 13/01/2007 1.37, Brett Cannon wrote: For security reasons I might be asking for file's constructor to be removed from the type for Python source code at some point (it can be relocated to an extension module if desired). Isn't there the wrong list then? I can't see how this can ever

[Python-Dev] updating Misc/NEWS

2007-01-13 Thread Neal Norwitz
I've noticed a bunch of changes recently without corresponding items added to Misc/NEWS. Can everyone update NEWS especially when fixing bugs or adding new features?If you have made recent checkins, it would be great if you could go back and update Misc/NEWS if you missed it the first time.

[Python-Dev] C standard io library, flush/read/write problem

2007-01-13 Thread Emerson Clarke
The other night i was watching a google techtalk about python 3000 and Guido mentioned some problems with the C standard io library. In particular he highlighted an issue with switching between reading and writing without flushing and the fact that it caused serious errors. Not that i dont think

[Python-Dev] IOError errno=514 in time.sleep(1)

2007-01-13 Thread Sean Reifschneider
I've been tracking down an issue with some code sporadically raising IOError with errno=514 on time.sleep(1). time.sleep() is implemented with the select() system call, and on Linux this is sporadically returning errno=514 (ERESTARTNOHAND). This is on 2.6.9, though I've heard reports of it

Re: [Python-Dev] [Python-3000] Warning for 2.6 and greater

2007-01-13 Thread glyph
On 08:19 am, [EMAIL PROTECTED] wrote: Georg Brandl schrieb: If Python 3.0 was simply a release which removed deprecated features, there would clearly be no issue. I would update my code in advance of the 3.0 release to not use any of those features being removed, and I'm all set. But that's

Re: [Python-Dev] C standard io library, flush/read/write problem

2007-01-13 Thread Martin v. Löwis
Emerson Clarke schrieb: Add this to the Read() method before reading takes place: If you don't submit it as a patch to sf.net/projects/python, it is likely to get ignored. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] IOError errno=514 in time.sleep(1)

2007-01-13 Thread Martin v. Löwis
Sean Reifschneider schrieb: In general I'm reluctant to suggest a Python fix to this, but it's fairly unexpected for time.sleep() to raise an exception... Thoughts? Unless there is a reproducible test case, no action should be taken. Once there is a test case, the specific action to take

[Python-Dev] buglet in long(123\0, 10)

2007-01-13 Thread Guido van Rossum
What's wrong with this session? :-) Python 2.6a0 (trunk:53416, Jan 13 2007, 15:24:17) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type help, copyright, credits or license for more information. int('123\0') Traceback (most recent call last): File stdin, line 1, in module ValueError:

Re: [Python-Dev] buglet in long(123\0, 10)

2007-01-13 Thread Nick Coghlan
Guido van Rossum wrote: long('123\0', 10) 123L Interesting - long_new goes through PyNumber_Long if no explicit base is provided. That does a pre-check for embedded NULLs in the input string. With an explicit base, however, PyLong_FromString is called directly. Since that API takes a char*