classification
Title: missing HAVE_FCHOWNAT
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.4, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: larry Nosy List: doko, georg.brandl, larry, python-dev, salinger
Priority: normal Keywords:

Created on 2013-08-06 06:54 by salinger, last changed 2013-08-12 17:55 by larry. This issue is now closed.

Files
File name Uploaded Description Edit
larry.have_fchownat.trunk.patch.1.txt larry, 2013-08-10 15:54 review
larry.have_fchownat.3.3.patch.1.txt larry, 2013-08-10 15:55 review
Messages (9)
msg194529 - (view) Author: (salinger) Date: 2013-08-06 06:54
During test on kfreebsd:

test_chown_dir_fd (test.test_posix.PosixTester) ... skipped 'test needs dir_fd support in os.chown()'

But all *AT syscalls are supported.
It looks like posixmodule.c misses propagation of that fact.

--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -12004,6 +12004,10 @@
     "HAVE_FCHOWN",
 #endif
 
+#ifdef HAVE_FCHOWNAT
+    "HAVE_FCHOWNAT",
+#endif
+
 #ifdef HAVE_FEXECVE
     "HAVE_FEXECVE",
 #endif
msg194585 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-08-06 21:51
Yup, that's a bug.  My fault too.  I think it should go in to the next 3.3 as well.

I worry that this may be a similar situation to fchmodat--see the comment in Lib/os.py--but for now let's be brave and add HAVE_FCHOWNAT to have_functions as salinger suggests.
msg194809 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-08-10 15:54
Here's a patch for trunk.  It's essentially what salinger wrote, but as a patch file so it works for "review".

I poked around a little to make sure we weren't going to have another baffling situation like fchmodat.  AFAICT, nope, it's fine, it's as simple as the four-line patch before.
msg194810 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-08-10 15:55
And here's a patch for 3.3.  I should have mentioned--both these patches pass the same tests as an unmodified trunk.  So I think it's just ready to go in.
msg194862 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-08-11 04:21
Georg, I'm gonna commit this for 3.4.  You want it in 3.3 as well?  I claim it's 100% a bugfix.
msg194863 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2013-08-11 05:48
Well, since you're a RM now you should know :D
msg194975 - (view) Author: Roundup Robot (python-dev) Date: 2013-08-12 17:50
New changeset a89226508a04 by Larry Hastings in branch '3.3':
Issue #18667: Add missing "HAVE_FCHOWNAT" symbol to posix._have_functions.
http://hg.python.org/cpython/rev/a89226508a04
msg194976 - (view) Author: Roundup Robot (python-dev) Date: 2013-08-12 17:53
New changeset 92de1a5dc3ea by Larry Hastings in branch 'default':
Issue #18667: Add missing "HAVE_FCHOWNAT" symbol to posix._have_functions.
http://hg.python.org/cpython/rev/92de1a5dc3ea
msg194977 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-08-12 17:55
Fixed in 3.3 and trunk.  Thanks for the report!
History
Date User Action Args
2013-08-12 17:55:12larrysetstatus: open -> closed
type: behavior
messages: + msg194977

assignee: larry
resolution: fixed
stage: resolved
2013-08-12 17:53:36python-devsetmessages: + msg194976
2013-08-12 17:50:03python-devsetnosy: + python-dev
messages: + msg194975
2013-08-11 05:48:50georg.brandlsetmessages: + msg194863
2013-08-11 04:21:14larrysetnosy: + georg.brandl
messages: + msg194862
2013-08-10 15:55:48larrysetfiles: + larry.have_fchownat.3.3.patch.1.txt

messages: + msg194810
2013-08-10 15:54:33larrysetfiles: + larry.have_fchownat.trunk.patch.1.txt

messages: + msg194809
2013-08-06 21:51:05larrysetmessages: + msg194585
versions: + Python 3.3
2013-08-06 21:39:35pitrousetnosy: + larry
2013-08-06 08:23:57salingersetnosy: + doko
2013-08-06 06:54:46salingercreate