[issue5220] os.makedirs' mode argument has bad default value

Joshua Bronson report at bugs.python.org
Wed Feb 11 23:26:28 CET 2009


Joshua Bronson <jabronson at gmail.com> added the comment:

> My suspicion is that people setting explicit file permissions
> typically know what they are doing, and that you will find that
> your tickets get closed as invalid, explaining to you that this
> mode usage is fully intentional.

For what it's worth, I asked Mike Bayer (author of Beaker and Mako, the 
packages in question) what the intention was, and the 0750 seems to have 
been an error: Apparently HTML::Mason (what Myghty was based on) may 
have originally used 0750 but has since changed it to 0775 (search for 
"0775" in http://svn.urth.org/filedetails.php?
repname=Mason&path=%2Ftrunk%2Flib%2FHTML%2FMason%2FInterp.pm&rev=0&sc=0)
. The 0750 propagated from Myghty into Mako and Beaker, but has no 
apparent reason to be there.

For what else it's worth, I've run this by a few other programmers I 
consider quite smart and experienced (including Ian Bicking), and none 
of them realized the meaning of the mode parameter either. (If they had 
I never would have filed this ticket, as I checked with them first!)

I agree that knowledge of relative paths should be assumed, but I'm 
convinced that the mode behavior is widely misunderstood enough to 
warrant at least one-line "gotcha" in the docstring.
</$.02>

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5220>
_______________________________________


More information about the Python-bugs-list mailing list