Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Cameron Simpson
On 11Mar2009 02:20, Antoine Pitrou wrote: | Christian Heimes cheimes.de> writes: | > I agree with you, fsync() shouldn't be called by default. I didn't plan | > on adding fsync() calls all over our code. However I like to suggest a | > file.sync() method and a synced flag for files to make the jo

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Cameron Simpson
On 10Mar2009 22:14, A.M. Kuchling wrote: | On Wed, Mar 11, 2009 at 11:31:52AM +1100, Cameron Simpson wrote: | > On 10Mar2009 18:09, A.M. Kuchling wrote: | > | The mailbox module tries to be careful and always fsync() before | > | closing files, because mail messages are pretty important. | > | >

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Guido van Rossum
On Tue, Mar 10, 2009 at 7:45 PM, Christian Heimes wrote: > Antoine Pitrou wrote: >> Christian Heimes cheimes.de> writes: >>> I agree with you, fsync() shouldn't be called by default. I didn't plan >>> on adding fsync() calls all over our code. However I like to suggest a >>> file.sync() method an

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Christian Heimes
Antoine Pitrou wrote: > Christian Heimes cheimes.de> writes: >> I agree with you, fsync() shouldn't be called by default. I didn't plan >> on adding fsync() calls all over our code. However I like to suggest a >> file.sync() method and a synced flag for files to make the job of >> application deve

Re: [Python-Dev] Deprecated __cmp__ and total ordering

2009-03-10 Thread Raymond Hettinger
[Michael Foord] > Is there something you don't like about this one: http://code.activestate.com/recipes/576529/ [Mart Sõmermaa ] Yes -- it is not in the standard library. As I said, eventually all the 15,000 matches on Google Code need to update their code and copy that snippet to their uti

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Antoine Pitrou
Christian Heimes cheimes.de> writes: > > I agree with you, fsync() shouldn't be called by default. I didn't plan > on adding fsync() calls all over our code. However I like to suggest a > file.sync() method and a synced flag for files to make the job of > application developers easier. We alread

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread A.M. Kuchling
On Wed, Mar 11, 2009 at 11:31:52AM +1100, Cameron Simpson wrote: > On 10Mar2009 18:09, A.M. Kuchling wrote: > | The mailbox module tries to be careful and always fsync() before > | closing files, because mail messages are pretty important. > > Can it be turned off? I hadn't realised this. No, th

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Christian Heimes
Guido van Rossum wrote: > If I understand the post properly, it's up to the app to call fsync(), > and it's only necessary when you're doing one of the rename dances, or > updating a file in place. Basically, as he explains, fsync() is a very > heavyweight operation; I'm against calling it by defau

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Cameron Simpson
On 10Mar2009 18:09, A.M. Kuchling wrote: | On Tue, Mar 10, 2009 at 09:11:38PM +0100, Christian Heimes wrote: | > Python's file type doesn't use fsync() and be the victim of the very | > same issue, too. Should we do anything about it? IMHO, beyond _offering_ an fsync method, no. | The mailbox mo

Re: [Python-Dev] Addition of further status options to tracker

2009-03-10 Thread Brett Cannon
[adding python-dev back on to the email] On Tue, Mar 10, 2009 at 15:51, Tennessee Leeuwenburg wrote: > >>> Pretty much. I've got two views. One is that I'd like to search for >>> issues that are up for grabs which I could take over, hack on, and generally >>> not get underfoot of core developmen

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Antoine Pitrou
Neil Hodgson gmail.com> writes: > > What would be useful is a simple, generic > way in Python to copy all the appropriate metadata (ownership, ACLs, > ...) to another file so the temporary-and-rename technique could be > used. How about shutil.copystat()? __

[Python-Dev] Fwd: Addition of further status options to tracker

2009-03-10 Thread Tennessee Leeuwenburg
On Wed, Mar 11, 2009 at 9:43 AM, Brett Cannon wrote: > > > On Tue, Mar 10, 2009 at 15:33, Nick Coghlan wrote: > >> Brett Cannon wrote: >> > If we can come up with a simple solution to this problem (perhaps have >> > issues set to under development with no activity shift down a status >> > level

Re: [Python-Dev] Regexp 2.7

2009-03-10 Thread Antoine Pitrou
Hello, > So, if there's interest in investigating how much of the PCRE tests > can augment the existing tests, I am offering to do so. IMO there's nothing wrong with having more tests, provided that: - they don't make the test suite slower than it should be - they aren't too implementation-spec

Re: [Python-Dev] Addition of further status options to tracker

2009-03-10 Thread Brett Cannon
On Tue, Mar 10, 2009 at 15:33, Nick Coghlan wrote: > Brett Cannon wrote: > > If we can come up with a simple solution to this problem (perhaps have > > issues set to under development with no activity shift down a status > > level after a month) then maybe we will have something everyone can be >

Re: [Python-Dev] Addition of further status options to tracker

2009-03-10 Thread Nick Coghlan
Brett Cannon wrote: > If we can come up with a simple solution to this problem (perhaps have > issues set to under development with no activity shift down a status > level after a month) then maybe we will have something everyone can be > happy with. If an issue is assigned, then somebody has clai

Re: [Python-Dev] Regexp 2.7

2009-03-10 Thread Nick Coghlan
Terry Reedy wrote: > There is a conflict between running a thorough test of everything > possible and not having the test suite run for hours. I believe a > couple of other modules have a regular sanity-check test and an extended > patch-check test. Something like that might be appropriate for re

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread A.M. Kuchling
On Tue, Mar 10, 2009 at 09:11:38PM +0100, Christian Heimes wrote: > Python's file type doesn't use fsync() and be the victim of the very > same issue, too. Should we do anything about it? The mailbox module tries to be careful and always fsync() before closing files, because mail messages are pret

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Martin v. Löwis
> If I understand the post properly, it's up to the app to call fsync(), Correct. > and it's only necessary when you're doing one of the rename dances, or > updating a file in place. No. It's in general necessary when you want to be sure that the data is on disk, even if the power is lost. So e

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-10 Thread Bill Janssen
Aahz wrote: > Second, please follow the advice to put ALL patches on the tracker. I don't care about top-posting, but I second the Second point. Let's move this thread to the issue tracker. Bill ___ Python-Dev mailing list Python-Dev@python.org http:

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mar 10, 2009, at 4:46 PM, Neil Hodgson wrote: The technique advocated by Theodore Ts'o (save to temporary then rename) discards metadata. What would be useful is a simple, generic way in Python to copy all the appropriate metadata (ownership, A

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Guido van Rossum
On Tue, Mar 10, 2009 at 1:46 PM, Neil Hodgson wrote: >   The technique advocated by Theodore Ts'o (save to temporary then > rename) discards metadata. What would be useful is a simple, generic > way in Python to copy all the appropriate metadata (ownership, ACLs, > ...) to another file so the temp

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mar 10, 2009, at 4:23 PM, Guido van Rossum wrote: On Tue, Mar 10, 2009 at 1:11 PM, Christian Heimes wrote: Multiple blogs and news sites are swamped with a discussion about ext4 and KDE 4.0. Theodore Ts'o - the developer of ext4 - explains th

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Neil Hodgson
The technique advocated by Theodore Ts'o (save to temporary then rename) discards metadata. What would be useful is a simple, generic way in Python to copy all the appropriate metadata (ownership, ACLs, ...) to another file so the temporary-and-rename technique could be used. On Windows, the

Re: [Python-Dev] Regexp 2.7

2009-03-10 Thread Terry Reedy
Jared Grubb wrote: I'm not criticizing the current battery of tests, nor am I arguing that we replace them. There's a comment in the test_re.py that says that "these tests were carefully modeled to cover most of the code"... That is a very difficult statement to maintain and/or verify, especi

Re: [Python-Dev] Ext4 data loss

2009-03-10 Thread Guido van Rossum
On Tue, Mar 10, 2009 at 1:11 PM, Christian Heimes wrote: > Multiple blogs and news sites are swamped with a discussion about ext4 > and KDE 4.0. Theodore Ts'o - the developer of ext4 - explains the issue > at > https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/317781/comments/54. > > > Pyt

[Python-Dev] Ext4 data loss

2009-03-10 Thread Christian Heimes
Multiple blogs and news sites are swamped with a discussion about ext4 and KDE 4.0. Theodore Ts'o - the developer of ext4 - explains the issue at https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/317781/comments/54. Python's file type doesn't use fsync() and be the victim of the very same

Re: [Python-Dev] reviewing patches

2009-03-10 Thread Brett Cannon
On Tue, Mar 10, 2009 at 11:43, Terry Reedy wrote: > Brett Cannon wrote: > >> >> This is somewhat covered by components, but it's implicit. Would it be >> worth making this explicit? I have always wondered if people would be more >> willing to help out if they could easily search for pure Python c

Re: [Python-Dev] Regexp 2.7

2009-03-10 Thread Jared Grubb
I'm not criticizing the current battery of tests, nor am I arguing that we replace them. There's a comment in the test_re.py that says that "these tests were carefully modeled to cover most of the code"... That is a very difficult statement to maintain and/or verify, especially if the lib

Re: [Python-Dev] Regexp 2.7

2009-03-10 Thread A.M. Kuchling
On Tue, Mar 10, 2009 at 11:32:10AM -0700, Guido van Rossum wrote: > Hm, what's wrong with the existing set of regex test cases? This is > one of the most complete set of test cases in our test suite. There's never anything wrong with having more test cases! However, if you have a choice of which

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-10 Thread Aahz
On Tue, Mar 10, 2009, Dan Mahn wrote: > > Ahh ... I see. I should have done a bit more digging to find where the > standard tests were. > > I created a few new tests that could be included in that test suite -- > see the attached file. Do you think that this would be sufficient? First of all

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-10 Thread Dan Mahn
Ahh ... I see. I should have done a bit more digging to find where the standard tests were. I created a few new tests that could be included in that test suite -- see the attached file. Do you think that this would be sufficient? - Dan Bill Janssen wrote: Dan Mahn wrote: Yes, that was

Re: [Python-Dev] reviewing patches

2009-03-10 Thread Terry Reedy
Brett Cannon wrote: This is somewhat covered by components, but it's implicit. Would it be worth making this explicit? I have always wondered if people would be more willing to help out if they could easily search for pure Python code issues if that is as far as they feel comfortable. If an

Re: [Python-Dev] Regexp 2.7

2009-03-10 Thread Guido van Rossum
Hm, what's wrong with the existing set of regex test cases? This is one of the most complete set of test cases in our test suite. On Tue, Mar 10, 2009 at 11:08 AM, Jared Grubb wrote: > Would there be any interest in augmenting the test case library for the > regex stuff? > > When I was working on

Re: [Python-Dev] Regexp 2.7

2009-03-10 Thread Jared Grubb
Would there be any interest in augmenting the test case library for the regex stuff? When I was working on PyPy, we were using a simplified regular expression matcher to implement the tokenizer for Python. I was able to take a lot of PCRE's regex tests and port them to test our regular ex

Re: [Python-Dev] PyS60 - mailbox

2009-03-10 Thread R. David Murray
On Tue, 10 Mar 2009 at 22:41, Mahesh S wrote: I am from the PyS60 (Python port on S60 platform) team. We have ported the Python 2.5.4 core in the latest 1.9.x series of PyS60. http://wiki.opensource.nokia.com/projects/PyS60 Currently we have a problem with the mailbox module. Check the code snip

Re: [Python-Dev] Deprecated __cmp__ and total ordering

2009-03-10 Thread Michael Foord
Mart Sõmermaa wrote: On Tue, Mar 10, 2009 at 3:57 PM, Michael Foord mailto:fuzzy...@voidspace.org.uk>> wrote: Is there something you don't like about this one: http://code.activestate.com/recipes/576529/ Yes -- it is not in the standard library. As I said, eventually all the 15,00

Re: [Python-Dev] OS X Installer for 3.0.1 and supported versions

2009-03-10 Thread Russell E. Owen
In article , Ronald Oussoren wrote: > On 27 Feb, 2009, at 1:57, Ned Deily wrote: > > > In article , > > "Russell E. Owen" wrote: > >> I want to follow up on this a bit. In the past if the Mac Python > >> installer was built on a machine that did NOT have a locally > >> installed > >> Tcl/Tk

Re: [Python-Dev] PyS60 - mailbox

2009-03-10 Thread Guido van Rossum
Great news on the port! On your issue: Is this module relevant for the platform? Do you know of any existing app that uses the qmail mailbox format? As a work-around, I can think of several values to substitute for atime: the current time, or the mtime, or perhaps even the max of mtime and ctime.

Re: [Python-Dev] Addition of further status options to tracker

2009-03-10 Thread Brett Cannon
On Mon, Mar 9, 2009 at 22:39, Tennessee Leeuwenburg wrote: > I don't mind what approach is taken -- I'm happy to work within the >>> current infrastructure if someone can suggest a good way. I really just want >>> to be able to start distinguishing between issues that are essentially new >>> and

[Python-Dev] PyS60 - mailbox

2009-03-10 Thread Mahesh S
Hi, I am from the PyS60 (Python port on S60 platform) team. We have ported the Python 2.5.4 core in the latest 1.9.x series of PyS60. http://wiki.opensource.nokia.com/projects/PyS60 Currently we have a problem with the mailbox module. Check the code snippet below, from the mailbox module. *def c

Re: [Python-Dev] Deprecated __cmp__ and total ordering

2009-03-10 Thread Mart Sõmermaa
On Tue, Mar 10, 2009 at 3:57 PM, Michael Foord wrote: > Is there something you don't like about this one: > http://code.activestate.com/recipes/576529/ > Yes -- it is not in the standard library. As I said, eventually all the 15,000 matches on Google Code need to update their code and copy that s

Re: [Python-Dev] Review of Issue http://bugs.python.org/issue2706, timedelta operators

2009-03-10 Thread Alexander Belopolsky
On Tue, Mar 10, 2009 at 12:34 AM, Tennessee Leeuwenburg wrote: > .. I'm not sure what's best: >   * Post the review as a comment on the associated issue. Only nosies will > be updated. You should always do that. If you feel that the nosy list is too small and you want to raise awareness for the

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-10 Thread Bill Janssen
Dan Mahn wrote: > Yes, that was a good idea. I found some problems, and attached a new > version. It looks more complicated than I wanted, but it is a very > regular repetition, so I hope it is generally readable. That's great, but I was hoping for more tests in lib/test/test_urllib.py. Bill

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-10 Thread Dan Mahn
I submitted an explanation of this and my proposed modification as issue 5468. http://bugs.python.org/issue5468 - Dan Bill Janssen wrote: Aahz wrote: On Sat, Mar 07, 2009, Dan Mahn wrote: After a harder look, I concluded there was a bit more work to be done, but still very basic modific

Re: [Python-Dev] Deprecated __cmp__ and total ordering

2009-03-10 Thread Michael Foord
Raymond Hettinger wrote: [Mart Sõmermaa] To provide total ordering without __cmp__ one has to implement all of __lt__, __gt__, __le__, __ge__, __eq__ and __ne__. However, in all but a few cases it suffices only to provide a "real" implementation for e.g. __lt__ and define all the other method

Re: [Python-Dev] Deprecated __cmp__ and total ordering

2009-03-10 Thread Raymond Hettinger
[Mart Sõmermaa] To provide total ordering without __cmp__ one has to implement all of __lt__, __gt__, __le__, __ge__, __eq__ and __ne__. However, in all but a few cases it suffices only to provide a "real" implementation for e.g. __lt__ and define all the other methods in terms of it as follows

Re: [Python-Dev] Decimal in C status (was Re: draft 3.1 releaseschedule)

2009-03-10 Thread Nick Coghlan
Raymond Hettinger wrote: > > [Nick Coghlan] >>> What about decimal-in-C, by the way? Is anyone still working on it? > > I'm seeking funding for the project. If it is forthcoming, I intend to do > a pure C version that simply implements the spec and then adds > wrappers for the pure python interfa

Re: [Python-Dev] Deprecated __cmp__ and total ordering

2009-03-10 Thread Michael Foord
Raymond Hettinger wrote: [Mart Sõmermaa] To provide total ordering without __cmp__ one has to implement all of __lt__, __gt__, __le__, __ge__, __eq__ and __ne__. However, in all but a few cases it suffices only to provide a "real" implementation for e.g. __lt__ and define all the other methods

Re: [Python-Dev] Deprecated __cmp__ and total ordering

2009-03-10 Thread Raymond Hettinger
[Mart Sõmermaa] To provide total ordering without __cmp__ one has to implement all of __lt__, __gt__, __le__, __ge__, __eq__ and __ne__. However, in all but a few cases it suffices only to provide a "real" implementation for e.g. __lt__ and define all the other methods in terms of it as follows

Re: [Python-Dev] Decimal in C status (was Re: draft 3.1 releaseschedule)

2009-03-10 Thread Raymond Hettinger
[Nick Coghlan] What about decimal-in-C, by the way? Is anyone still working on it? I'm seeking funding for the project. If it is forthcoming, I intend to do a pure C version that simply implements the spec and then adds wrappers for the pure python interface. That will save the cost of consta

[Python-Dev] Decimal in C status (was Re: draft 3.1 release schedule)

2009-03-10 Thread Nick Coghlan
Antoine Pitrou wrote: > Raymond Hettinger rcn.com> writes: > > You might also want to collect a list of serious changes that you > want in this release; >> I'm making minor updates to the decimal module to match the 1.68 version of > the spec. > > What about decimal-in-C, by the way? Is

Re: [Python-Dev] Deprecated __cmp__ and total ordering

2009-03-10 Thread Michael Foord
Hello Mart, This has been discussed before. Guido was against automatically filling in these methods based I think on the fact that this may not be what you want - worth searching the archives for. See here for a class decorator that provides all rich comparison methods for classes that only

[Python-Dev] Deprecated __cmp__ and total ordering

2009-03-10 Thread Mart Sõmermaa
__cmp__ used to provide a convenient way to make all ordering operators work by defining a single method. For better or worse, it's gone in 3.0. To provide total ordering without __cmp__ one has to implement all of __lt__, __gt__, __le__, __ge__, __eq__ and __ne__. However, in all but a few cases

Re: [Python-Dev] Addition of further status options to tracker

2009-03-10 Thread Antoine Pitrou
Tennessee Leeuwenburg gmail.com> writes: > > Hi all,I am beginning reviewing some more issues in the tracker. I think it would be useful to have the following status options (new status options marked with a '+'): I have to point out that the more alternatives there are to choose from, the more

Re: [Python-Dev] draft 3.1 release schedule

2009-03-10 Thread Antoine Pitrou
Raymond Hettinger rcn.com> writes: > > >>> You might also want to collect a list of serious changes that you > >>> want in this release; > > I'm making minor updates to the decimal module to match the 1.68 version of the spec. What about decimal-in-C, by the way? Is anyone still working on it?

Re: [Python-Dev] Integrate lxml into the stdlib?

2009-03-10 Thread Amaury Forgeot d'Arc
On Fri, Mar 6, 2009 at 22:10, "Martin v. Löwis" wrote: >>> libs/_sqlite3.lib 2K >> >> I think this is a summary of the entry points into one of the above >> DLLs for the benefit of other code wanting to link against it, but I'm >> not sure. > > Correct. I don't know why I include them in the MSI -

Re: [Python-Dev] Tracker cleanup - Roundup hacking report :)

2009-03-10 Thread Ben Finney
"Daniel (ajax) Diniz" writes: > Feedback on meta-tracker open issues, as well as new RFEs and > replies to tracker-discuss threads should make the tracker meeting > your needs a bit more likely :) Thank you for http://issues.roundup-tracker.org/issue2550523>. I have wanted to participate on the