Re: [Python-Dev] PEP 435 - ref impl disc 2

2013-05-11 Thread Glenn Linderman
On 5/10/2013 11:02 PM, Ethan Furman wrote: On 05/10/2013 10:15 PM, Glenn Linderman wrote: But the last few lines of demo1 demonstrate that NIE doesn't like, somehow, remember that its values, deep down under the covers, are really int. And doesn't even like them when they are wrapped into In

Re: [Python-Dev] Issue 11406: adding os.scandir(), a directory iterator returning stat-like info

2013-05-11 Thread Nick Coghlan
On Sat, May 11, 2013 at 2:24 PM, Ben Hoyt wrote: > In all the *practical* examples I've seen (and written myself), I > iterate over a directory and I just need to know whether it's a file > or directory (or maybe a link). Occassionally you need the size as > well, but that would just mean a simila

Re: [Python-Dev] Issue 11406: adding os.scandir(), a directory iterator returning stat-like info

2013-05-11 Thread Christian Heimes
Am 11.05.2013 16:34, schrieb Nick Coghlan: > Here's the full set of fields on a current stat object: > > st_atime > st_atime_ns > st_blksize > st_blocks > st_ctime > st_ctime_ns > st_dev > st_gid > st_ino > st_mode > st_mtime > st_mtime_ns > st_nlink > st_rdev > st_size > st_uid And there are mor

Re: [Python-Dev] Issue 11406: adding os.scandir(), a directory iterator returning stat-like info

2013-05-11 Thread Nick Coghlan
On Sun, May 12, 2013 at 1:42 AM, Christian Heimes wrote: > I suggest that we call it .lstat() and .cached_lstat to make clear that > we are talking about no-follow stat() here. Fair point. > On platforms that support > fstatat() it should use fstatat(dir_fd, name, &buf, AT_SYMLINK_NOFOLLOW) > wh

Re: [Python-Dev] Issue 11406: adding os.scandir(), a directory iterator returning stat-like info

2013-05-11 Thread Nick Coghlan
On Sun, May 12, 2013 at 2:30 AM, Nick Coghlan wrote: > Once that core functionality is in place, *then* start debating what > other use cases to optimise based on which platforms would support > those optimisations and which would require dropping back to the full > stat implementation anyway. Al

Re: [Python-Dev] PEP 435 - ref impl disc 2

2013-05-11 Thread Glenn Linderman
On 5/11/2013 12:11 AM, Glenn Linderman wrote: * I'm playing with adding another keyword parameter to Enum, but it is presently giving me an error about unknown keyword parameter passed to __prepare__ even though I added **kwds to the list of its parameters. I'll learn something by doing this.

Re: [Python-Dev] PEP 435 - ref impl disc 2

2013-05-11 Thread Glenn Linderman
On 5/11/2013 12:11 AM, Glenn Linderman wrote: Oh, newest code posted. That'll give me some practice pulling from your repository into mine :) Well, I had to bring your changes to my local repository, and then push them up to my bitbucket repo... not sure if there is a way to merge from your

[Python-Dev] 2.7.5 baking

2013-05-11 Thread Benjamin Peterson
The long anticipated "emergency" 2.7.5 release has now been tagged. It will be publicly announced as binaries arrive. Originally, I was just going to cherrypick regression fixes onto the 2.7.4 release and release those as 2.7.5. I started to this but ran into some conflicts. Since we don't have bu