Skip to content

Commit efa2eb2

Browse files
committed
Restore access to _get_vc_env with a warning.
Fixes #4874
1 parent d2cf96a commit efa2eb2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

distutils/_msvccompiler.py

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1+
import warnings
2+
13
from .compilers.C import msvc
24

35
__all__ = ["MSVCCompiler"]
46

57
MSVCCompiler = msvc.Compiler
8+
9+
10+
def __getattr__(name):
11+
if name == '_get_vc_env':
12+
warnings.warn(
13+
"_get_vc_env is private; find an alternative (pypa/distutils#340)"
14+
)
15+
return msvc._get_vc_env
16+
raise AttributeError(name)

newsfragments/4874.feature.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Restore access to _get_vc_env with a warning.

0 commit comments

Comments
 (0)