[proxy] bugs.python.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

Message 259559 - Python tracker

Message259559

Author takluyver
Recipients BreamoreBoy, eryksun, georg.brandl, ncoghlan, paul.moore, python-dev, rupole, serhiy.storchaka, steve.dower, takluyver, tim.golden, zach.ware
Date 2016-02-04.12:48:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1454590134.6.0.969117544273.issue22107@psf.upfronthosting.co.za>
In-reply-to
Content
This issue was closed, but I believe the original bug reported was not fixed: trying to create a temporary file in a directory where you don't have write permissions hangs for a long time before failing with a misleading FileExistsError, rather than failing immediately with PermissionError.

I've just run into this on Python 3.5.1 while trying to use tempfile to check if a directory is writable - which I'm doing precisely because os.access() isn't useful on Windows!

I find it hard to believe that there is no way to distinguish a failure because the name is already used for a subdirectory from a failure because we don't have permission to create a file.
History
Date User Action Args
2016-02-04 12:48:54takluyversetrecipients: + takluyver, georg.brandl, paul.moore, ncoghlan, rupole, tim.golden, BreamoreBoy, python-dev, zach.ware, serhiy.storchaka, eryksun, steve.dower
2016-02-04 12:48:54takluyversetmessageid: <1454590134.6.0.969117544273.issue22107@psf.upfronthosting.co.za>
2016-02-04 12:48:54takluyverlinkissue22107 messages
2016-02-04 12:48:54takluyvercreate