Ned Deily <n...@acm.org> added the comment:

Actually the flags do already exist: note "(as defined in the stat module)" 
(http://docs.python.org/py3k/library/os.html#os.chflags).  Other than the new 
UF_HIDDEN, it looks like they are all hardwired there in Lib/stat.py.  There is 
something to be said for the approach in your patch in that it guarantees that 
the flags match the build OS definitions; the downside is some lack of 
portability and cross-testing.  Considering that there are other stat flags in 
there and have been for a long time, I'd be inclined to not change things other 
than throwing in UF_HIDDEN.

Regarding testing, perhaps the single most important thing would be to add a 
test that os.chflags is in fact present on systems where it is expected (to 
catch any future build problems like the one in this issue).  As you say, these 
are relatively transparent wrappers and we have to accept the OS's 
implementation.  Testing for the presence of os.lchflags is a bit trickier in 
that on OS X it should only be present if Python was built with a 
MACOSX_DEPLOYMENT_TARGET of 10.5 or higher.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8746>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to