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 eli.bendersky
Recipients eli.bendersky, georg.brandl, ncoghlan, serhiy.storchaka, vlad
Date 2013-09-03.13:32:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378215124.09.0.174952667897.issue18849@psf.upfronthosting.co.za>
In-reply-to
Content
The fix looks good to me, in general. Could you create a test that goes along?

My only (minor) doubt is whether this should be generalized, in two dimensions:

1. PermissionError is mapped from both EACCES and EPERM. So to make the 2.7 patch equivalent with 3.x, EPERM should also be checked. That said, Windows documents it doesn't really use EPERM (http://msdn.microsoft.com/en-us/library/5814770t.aspx).
2. Should this be restricted to Windows? Could there be other platforms that exhibit the same behavior? On the other hand, say on Linux, EACCES should not happen in a temp dir and so it's good to re-raise it. 

For (2) I don't think doing anything is necessary at this point - the added test may help because it can fail for some strange platform at some point and then the solution should be obvious. As for (1), adding EPERM into the condition probably can't hurt and it will make Python 2.7 behave more consistently with 3.x in case of some undocumented Windows behavior.
History
Date User Action Args
2013-09-03 13:32:04eli.benderskysetrecipients: + eli.bendersky, georg.brandl, ncoghlan, serhiy.storchaka, vlad
2013-09-03 13:32:04eli.benderskysetmessageid: <1378215124.09.0.174952667897.issue18849@psf.upfronthosting.co.za>
2013-09-03 13:32:04eli.benderskylinkissue18849 messages
2013-09-03 13:32:03eli.benderskycreate