Issue 15154: remove "rmdir" argument from os.unlink, add "dir_fd" to os.rmdir (original) (raw)

Issue15154

Created on 2012-06-23 17:15 by georg.brandl, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
move-dirfd-to-rmdir.patch georg.brandl,2012-06-23 17:15 review
Messages (6)
msg163647 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2012-06-23 17:15
As Antoine noted in #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.
msg163650 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-06-23 17:18
Looks fine to me.
msg163662 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2012-06-23 20:19
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.)
msg163668 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2012-06-23 20:37
Works for me.
msg163694 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-06-23 23:55
New changeset 3b7230997425 by Larry Hastings in branch 'default': Issue #15154: Add "dir_fd" parameter to os.rmdir, remove "rmdir" http://hg.python.org/cpython/rev/3b7230997425
msg163695 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2012-06-23 23:56
I made two documentation changes to the patch before committing it: * I restored the text under os.remove about how it doesn't handle directories. * I added a Misc/NEWS entry. But I didn't have to touch the code--that looked dead-on to me. Proper job, Georg!
History
Date User Action Args
2022-04-11 14:57:31 admin set github: 59359
2012-06-23 23:58:06 larry set status: open -> closedresolution: fixedstage: patch review -> resolved
2012-06-23 23:56:56 larry set messages: +
2012-06-23 23:55:46 python-dev set nosy: + python-devmessages: +
2012-06-23 20:37:05 georg.brandl set messages: +
2012-06-23 20:19:15 larry set messages: +
2012-06-23 18:04:32 hynek set nosy: + hynek
2012-06-23 17🔞57 pitrou set messages: +
2012-06-23 17:16:57 Arfrever set nosy: + Arfrever
2012-06-23 17:15:10 georg.brandl create