Issue 9313: distutils error on MSVC older than 8 (original) (raw)

Created on 2010-07-20 11:07 by ocean-city, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
py3k_distutils_on_old_msvc.patch ocean-city,2010-07-20 11:07
py3k_skip_in_distutils_test.patch ocean-city,2010-09-12 23:54 use skip functionality
Messages (15)
msg110886 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-07-20 11:07
I got an error while testing py3k on VC6. Here is a patch. ====================================================================== ERROR: test_remove_visual_c_ref (distutils.tests.test_msvc9compiler.msvc9compile rTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "e:\python-dev\py3k\lib\distutils\tests\test_msvc9compiler.py", line 112, in test_remove_visual_c_ref from distutils.msvc9compiler import MSVCCompiler File "e:\python-dev\py3k\lib\distutils\msvc9compiler.py", line 291, in <module > raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VE RSION) distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module ---------------------------------------------------------------------- Ran 170 tests in 49.070s FAILED (errors=1, skipped=4) Traceback (most recent call last): File "test_distutils.py", line 18, in test_main() File "test_distutils.py", line 13, in test_main test.support.run_unittest(distutils.tests.test_suite()) File "e:\python-dev\py3k\lib\test\support.py", line 1054, in run_unittest _run_suite(suite) File "e:\python-dev\py3k\lib\test\support.py", line 1037, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File "e:\python-dev\py3k\lib\distutils\tests\test_msvc9compiler.py", line 112, in test_remove_visual_c_ref from distutils.msvc9compiler import MSVCCompiler File "e:\python-dev\py3k\lib\distutils\msvc9compiler.py", line 291, in <module > raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VE RSION) distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
msg112244 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-08-01 01:05
I don’t know the details of MSVC versions, but the error message seems to mean that this version is not supported, so there is nothing to fix.
msg112265 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-08-01 05:01
Other test functions already have such skips. So I think another skip is acceptable here. But maybe it's better to skip entire msvc9compilerTestCase class (by class decorator).
msg116242 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-09-12 22:57
Fixed in r84753(py3k).
msg116249 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-09-12 23:21
Wouldn’t it be more accurate to skip the test instead of returning None (falsely indicating success)?
msg116250 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-09-12 23:21
(Adding distutils2 component so that forward-porting the patch is not forgotten.)
msg116254 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-09-12 23:54
How about attached patch? I confirmed this both on MSVC8 and MSVC6.
msg116259 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-09-13 00:26
Looks excellent, just import the function at the module scope instead of function scope (I’ve heard about import deadlock issues, and performance is not an issue in tests, so there is no reason to import in the function). Please backport to 3.1 and 2.7 if the bug applies to them.
msg116277 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-09-13 05:43
> I’ve heard about import deadlock issues, and performance is not an > issue in tests, so there is no reason to import in the function distutils.msvc9compiler imports winreg internally, and it only exists on windows, so importing distutils.msvc9..... compiler may raise ImportError on Linux. So I imported only when sys.platform == "win32". Committed in r84760(py3k). And will be merged into other branches.
msg120991 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-11-12 00:18
Re-opening to remind myself about the forward-port.
msg129901 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2011-03-02 15:09
Éric, what forward porting exactly needs to be done?
msg131383 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-19 02:43
Martin: Just applying the same changes to distutils2.
msg227766 - (view) Author: Francis MB (francismb) * Date: 2014-09-28 16:50
Hi Éric, are the changes to distutils2 applied? could the issue be closed (has resolution:fixed) or is something to be done?
msg227767 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-09-28 16:54
Distutils2 is dead.
msg227770 - (view) Author: Francis MB (francismb) * Date: 2014-09-28 17:19
> Distutils2 is dead. I wasn't aware of that and I'm sorry for that. In that case that issue can IMHO be closed.
History
Date User Action Args
2022-04-11 14:57:04 admin set github: 53559
2014-09-28 17:46:38 berker.peksag set status: open -> closed
2014-09-28 17:19:20 francismb set messages: +
2014-09-28 16:54:30 BreamoreBoy set nosy: + dstufft, BreamoreBoymessages: + components: - Distutils2
2014-09-28 16:50:19 francismb set nosy: + francismbmessages: +
2011-03-19 02:43:38 eric.araujo set nosy:loewis, ocean-city, tarek, eric.araujomessages: +
2011-03-02 15:09:52 loewis set nosy:loewis, ocean-city, tarek, eric.araujomessages: +
2010-11-12 00🔞20 eric.araujo set status: closed -> openversions: + 3rd partynosy:loewis, ocean-city, tarek, eric.araujomessages: + assignee: ocean-city -> eric.araujocomponents: - Tests
2010-09-13 05:43:56 ocean-city set messages: +
2010-09-13 00:26:15 eric.araujo set assignee: ocean-citymessages: +
2010-09-12 23:55:05 ocean-city set assignee: tarek -> (no value)
2010-09-12 23:54:26 ocean-city set files: + py3k_skip_in_distutils_test.patchassignee: tarekmessages: +
2010-09-12 23:22:14 eric.araujo set assignee: tarek -> (no value)
2010-09-12 23:21:51 eric.araujo set assignee: tarekmessages: + components: + Distutils2nosy:loewis, ocean-city, tarek, eric.araujo
2010-09-12 23:21:01 eric.araujo set messages: +
2010-09-12 22:57:16 ocean-city set status: open -> closedversions: + Python 2.7messages: + assignee: tarek -> (no value)resolution: fixedstage: resolved
2010-08-01 05:01:15 ocean-city set messages: +
2010-08-01 01:05:34 eric.araujo set nosy: + loewis, eric.araujomessages: +
2010-07-20 11:07:20 ocean-city create