This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients Douglas.Leeder, Nick.Dowell, alexandre.vassalotti, doko, gregory.p.smith, ned.deily, ngie
Date 2010-09-12.07:07:09
SpamBayes Score 1.3751238e-05
Marked as misclassified No
Message-id <1284275233.51.0.15112642111.issue8746@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-09-12 07:07:13ned.deilysetrecipients: + ned.deily, doko, gregory.p.smith, alexandre.vassalotti, ngie, Nick.Dowell, Douglas.Leeder
2010-09-12 07:07:13ned.deilysetmessageid: <1284275233.51.0.15112642111.issue8746@psf.upfronthosting.co.za>
2010-09-12 07:07:11ned.deilylinkissue8746 messages
2010-09-12 07:07:09ned.deilycreate