Re: [Python-Dev] PEP 428: Pathlib -> stat caching

2013-09-18 Thread Antoine Pitrou
Le Tue, 17 Sep 2013 18:10:53 -0700, Philip Jenvey a écrit : > > On Sep 16, 2013, at 1:05 PM, Antoine Pitrou wrote: > > > On Mon, 16 Sep 2013 15:48:54 -0400 > > Brett Cannon wrote: > >>> > >>> So I would like to propose the following API change: > >>> > >>> - Path.stat() (and stat-accessing me

Re: [Python-Dev] PEP 428: Pathlib -> stat caching

2013-09-17 Thread Nick Coghlan
On 18 September 2013 11:10, Philip Jenvey wrote: > > On Sep 16, 2013, at 1:05 PM, Antoine Pitrou wrote: > >> On Mon, 16 Sep 2013 15:48:54 -0400 >> Brett Cannon wrote: So I would like to propose the following API change: - Path.stat() (and stat-accessing methods such as get_mti

Re: [Python-Dev] PEP 428: Pathlib -> stat caching

2013-09-17 Thread Philip Jenvey
On Sep 16, 2013, at 1:05 PM, Antoine Pitrou wrote: > On Mon, 16 Sep 2013 15:48:54 -0400 > Brett Cannon wrote: >>> >>> So I would like to propose the following API change: >>> >>> - Path.stat() (and stat-accessing methods such as get_mtime()...) >>> returns an uncached stat object by default >

Re: [Python-Dev] PEP 428: Pathlib -> stat caching

2013-09-16 Thread Stephen J. Turnbull
Terry Reedy writes: > On 9/16/2013 4:14 PM, R. David Murray wrote: > > > Well, we tend to avoid single boolean arguments in favor of differently > > named functions. > > The stdlib has lots of boolean arguments. My impression is that they are > to be avoided when they would change the ret

Re: [Python-Dev] PEP 428: Pathlib -> stat caching

2013-09-16 Thread Nick Coghlan
On 17 Sep 2013 06:45, "Antoine Pitrou" wrote: > > On Mon, 16 Sep 2013 16:14:43 -0400 > "R. David Murray" wrote: > > On Mon, 16 Sep 2013 15:48:54 -0400, Brett Cannon wrote: > > > On Mon, Sep 16, 2013 at 3:45 PM, Antoine Pitrou wrote: > > > > So I would like to propose the following API change: >

Re: [Python-Dev] PEP 428: Pathlib -> stat caching

2013-09-16 Thread Antoine Pitrou
On Mon, 16 Sep 2013 16:14:43 -0400 "R. David Murray" wrote: > On Mon, 16 Sep 2013 15:48:54 -0400, Brett Cannon wrote: > > On Mon, Sep 16, 2013 at 3:45 PM, Antoine Pitrou wrote: > > > So I would like to propose the following API change: > > > > > > - Path.stat() (and stat-accessing methods such a

Re: [Python-Dev] PEP 428: Pathlib -> stat caching

2013-09-16 Thread Terry Reedy
On 9/16/2013 4:14 PM, R. David Murray wrote: Well, we tend to avoid single boolean arguments in favor of differently named functions. The stdlib has lots of boolean arguments. My impression is that they are to be avoided when they would change the return type or otherwise do something disjoi

Re: [Python-Dev] PEP 428: Pathlib -> stat caching

2013-09-16 Thread R. David Murray
On Mon, 16 Sep 2013 15:48:54 -0400, Brett Cannon wrote: > On Mon, Sep 16, 2013 at 3:45 PM, Antoine Pitrou wrote: > > So I would like to propose the following API change: > > > > - Path.stat() (and stat-accessing methods such as get_mtime()...) > > returns an uncached stat object by default > >

Re: [Python-Dev] PEP 428: Pathlib -> stat caching

2013-09-16 Thread Brett Cannon
On Mon, Sep 16, 2013 at 3:45 PM, Antoine Pitrou wrote: > On Mon, 16 Sep 2013 19:06:37 +0200 > Charles-François Natali wrote: > > 2013/9/16 Antoine Pitrou : > > > Le Sun, 15 Sep 2013 06:46:08 -0700, > > > Ethan Furman a écrit : > > >> I see PEP 428 is both targeted at 3.4 and still in draft stat

Re: [Python-Dev] PEP 428: Pathlib -> stat caching

2013-09-16 Thread Victor Stinner
2013/9/16 Brett Cannon : > Any reason why stat() can't get a keyword-only cached=True argument instead? > Or have stat() never cache() but stat_cache() always so that people can > choose if they want fresh or cached based on API and not whether some > library happened to make a decision for them?

Re: [Python-Dev] PEP 428: Pathlib -> stat caching

2013-09-16 Thread Antoine Pitrou
On Mon, 16 Sep 2013 15:48:54 -0400 Brett Cannon wrote: > > > > So I would like to propose the following API change: > > > > - Path.stat() (and stat-accessing methods such as get_mtime()...) > > returns an uncached stat object by default > > > > - Path.cache_stat() can be called to return the sta

Re: [Python-Dev] PEP 428: Pathlib -> stat caching

2013-09-16 Thread Antoine Pitrou
On Mon, 16 Sep 2013 19:06:37 +0200 Charles-François Natali wrote: > 2013/9/16 Antoine Pitrou : > > Le Sun, 15 Sep 2013 06:46:08 -0700, > > Ethan Furman a écrit : > >> I see PEP 428 is both targeted at 3.4 and still in draft status. > >> > >> What remains to be done to ask for pronouncement? > > >