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 Bonifacio2
Recipients Arfrever, Axel.Wegen, Bonifacio2, Laurent.Mazuel, TheAdityaKedia, belopolsky, d0ugal, docs@python, draghuram, eric.araujo, georg.brandl, ggenellina, giampaolo.rodola, hynek, ijmorlan, jokoala, python-dev, r.david.murray, terry.reedy, ysj.ray, zooko
Date 2021-05-15.12:25:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621081529.84.0.355595557776.issue13498@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-05-15 12:25:30Bonifacio2setrecipients: + Bonifacio2, georg.brandl, terry.reedy, zooko, belopolsky, ggenellina, draghuram, giampaolo.rodola, ijmorlan, eric.araujo, Arfrever, r.david.murray, ysj.ray, docs@python, Laurent.Mazuel, python-dev, hynek, jokoala, Axel.Wegen, d0ugal, TheAdityaKedia
2021-05-15 12:25:29Bonifacio2setmessageid: <1621081529.84.0.355595557776.issue13498@roundup.psfhosted.org>
2021-05-15 12:25:29Bonifacio2linkissue13498 messages
2021-05-15 12:25:29Bonifacio2create