[issue13739] os.fdlistdir() is not idempotent

2012-01-09 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___

[issue13739] os.fdlistdir() is not idempotent

2012-01-08 Thread Charles-François Natali
Charles-François Natali added the comment: > For some reason, the second changeset broke the OpenIndiana buildbots: > I have absolutely no idea of why this doesn't work. I suspect rewinddir() is a noop on OpenIndiana if readdir() hasn't been called. I'll revert this commit. > Also, wouldn't it

[issue13739] os.fdlistdir() is not idempotent

2012-01-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: For some reason, the second changeset broke the OpenIndiana buildbots: http://www.python.org/dev/buildbot/all/builders/AMD64%20OpenIndiana%203.x/builds/2485 Also, wouldn't it be better to call rewinddir with the GIL released? (although I agree rewinddir shouldn

[issue13739] os.fdlistdir() is not idempotent

2012-01-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 36f2e236c601 by Charles-François Natali in branch 'default': Issue #13739: It's simpler and more direct to call rewinddir() at the http://hg.python.org/cpython/rev/36f2e236c601 -- ___ Python tracker

[issue13739] os.fdlistdir() is not idempotent

2012-01-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7b2a178c028b by Charles-François Natali in branch 'default': Issue #13739: In os.listdir(), rewind the directory stream (so that listdir() http://hg.python.org/cpython/rev/7b2a178c028b -- nosy: +python-dev _

[issue13739] os.fdlistdir() is not idempotent

2012-01-08 Thread Ross Lagerwall
Ross Lagerwall added the comment: > I see two options: > 1. rewind the directory stream in fdlistdir() > 2. document this > > Here's a patch for option 1. Yeah, looks good. -- ___ Python tracker

[issue13739] os.fdlistdir() is not idempotent

2012-01-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I see two options: > 1. rewind the directory stream in fdlistdir() > 2. document this > > Here's a patch for option 1. Agreed with that, and ok with the patch :) -- ___ Python tracker

[issue13739] os.fdlistdir() is not idempotent

2012-01-08 Thread Charles-François Natali
New submission from Charles-François Natali : After a call to fdlistdir(), another call to fdlistdir() on the same file handle (but using a different FD, since the FD passed to fdlistdir() is closed) will return an empty list: """ $ cat ~/test_fdlistdir.py import os import sys fd = os.open(