You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
remove "rmdir" argument from os.unlink, add "dir_fd" to os.rmdir #59359
As Antoine noted in bpo-14626, the "rmdir" argument to os.unlink doesn't really make sense since we already deviate from just mapping posix functionality one-on-one.
Attached is a patch removing "rmdir" from os.unlink, and instead adding "dir_fd" to os.rmdir.
I think it's a good idea, and I didn't spot anything on my first pass at reviewing the patch. But I'm on my way out the door and won't be back for a few hours.
Tell you what: once I'm back, if I don't spot anything out of place, I'll just check it in. If I have feedback I'll file a second patch. Work for you, Georg?
(p.s. Antoine, Georg, anybody, if you have any more bright ideas like this, I'd love to hear 'em. But... now's the time.)
Activity
birkenfeld commentedon Jun 23, 2012
As Antoine noted in bpo-14626, the "rmdir" argument to os.unlink doesn't really make sense since we already deviate from just mapping posix functionality one-on-one.
Attached is a patch removing "rmdir" from os.unlink, and instead adding "dir_fd" to os.rmdir.
pitrou commentedon Jun 23, 2012
Looks fine to me.
larryhastings commentedon Jun 23, 2012
I think it's a good idea, and I didn't spot anything on my first pass at reviewing the patch. But I'm on my way out the door and won't be back for a few hours.
Tell you what: once I'm back, if I don't spot anything out of place, I'll just check it in. If I have feedback I'll file a second patch. Work for you, Georg?
(p.s. Antoine, Georg, anybody, if you have any more bright ideas like this, I'd love to hear 'em. But... now's the time.)
birkenfeld commentedon Jun 23, 2012
Works for me.
python-dev commentedon Jun 23, 2012
New changeset 3b7230997425 by Larry Hastings in branch 'default':
Issue bpo-15154: Add "dir_fd" parameter to os.rmdir, remove "rmdir"
http://hg.python.org/cpython/rev/3b7230997425
larryhastings commentedon Jun 23, 2012
I made two documentation changes to the patch before committing it:
directories.
But I didn't have to touch the code--that looked dead-on to me. Proper job, Georg!