Bonifacio <bonifacio.segu...@gmail.com> added the comment:

I just read this issue's history and it looks like it is out of date. The docs 
now match the behaviour.

> If the file exists but the mode is different than that specified (or 
> defaulted) after applying the umask, then an error is raised regardless of 
> the value of exist_ok.

This isn’t true anymore.

> The above wording also implies that if the directory exists but has a 
> different mode, that the mode will be changed.  Again, this is not what the 
> code does.

The docs now state the behaviour explicitly: “The file permission bits of 
existing parent directories are not changed.”

This means the reported issue no longer exists. But somewhere along the 
discussion it became one about adding a new flag to control the behaviour when 
there are mode mismatches. I tried applying Hynek’s patch locally, but it 
doesn’t work anymore. If we want to go ahead with adding this new flag we would 
have to create a new patch. If we want to drop the change then this issue can 
be closed.

If we decide to go with the flag addition I’m glad to help fixing Hynek’s 
patch’s incompatibilities if he is ok with that.

----------
nosy: +Bonifacio2

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

Reply via email to