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.

classification
Title: [PATCH] msvc9compiler raises IOError when no compiler found instead of DistutilsError
Type: behavior Stage: patch review
Components: Distutils Versions: Python 3.0, Python 3.1, Python 2.7, Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: tarek Nosy List: amaury.forgeotdarc, pjenvey, tarek
Priority: normal Keywords: patch

Created on 2008-12-19 21:33 by pjenvey, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
msvc9_ioerror.diff pjenvey, 2008-12-19 21:33
Messages (3)
msg78070 - (view) Author: Philip Jenvey (pjenvey) * (Python committer) Date: 2008-12-19 21:33
Python 2.6's new msvc9compiler misbehaves when it can't find a compiler 
(actually a utility of the missing compiler) in its query_vcvarsall() -- 
it raises an IOError instead of a typical distutils error

build tools expect a consistent set of potential exceptions from the 
compiler suites, such as CCompilerError, DistutilsExecError, 
DistutilsPlatformError, etc. Distributions like simplejson, Genshi, etc. 
look for these errors when compiling their optional C extension speedups 
as an indication that there's no compiler, and to fallback to their pure 
python counterparts

An IOError in this case just doesn't make sense

This patch changes them to DistutilsExecErrors. Maybe it should be 
DistutilsPlatformError -- whatever, just not IOError

I think this should be included in 2.6.2
msg78075 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-12-19 23:07
I agree with the patch, except that DistutilsPlatformError seems more 
appropriate - this function is called when the compiler object is 
configured, before it is used to actually compile files.
msg78565 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2008-12-30 23:11
Fixed, thanks for the patch Philip,
History
Date User Action Args
2022-04-11 14:56:43adminsetgithub: 48952
2008-12-30 23:11:44tareksetstatus: open -> closed
messages: + msg78565
versions: + Python 3.1, Python 2.7
2008-12-30 12:58:50tareksetassignee: tarek
nosy: + tarek
2008-12-19 23:07:46amaury.forgeotdarcsetresolution: accepted
stage: patch review
messages: + msg78075
nosy: + amaury.forgeotdarc
versions: + Python 3.0
2008-12-19 21:33:08pjenveycreate