Skip to content

Commit

Permalink
Mark msvc*compiler modules as deprecated.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 16, 2022
1 parent 49116a3 commit c802880
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions distutils/msvc9compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import subprocess
import sys
import re
import warnings

from distutils.errors import (
DistutilsExecError,
Expand All @@ -30,6 +31,13 @@

import winreg

warnings.warn(
"msvc9compiler is deprecated and slated to be removed "
"in the future. Please discontinue use or file an issue "
"with pypa/distutils describing your use case.",
DeprecationWarning,
)

RegOpenKeyEx = winreg.OpenKeyEx
RegEnumKey = winreg.EnumKey
RegEnumValue = winreg.EnumValue
Expand Down
9 changes: 9 additions & 0 deletions distutils/msvccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import sys
import os
import warnings
from distutils.errors import (
DistutilsExecError,
DistutilsPlatformError,
Expand Down Expand Up @@ -62,6 +63,14 @@
)


warnings.warn(
"msvccompiler is deprecated and slated to be removed "
"in the future. Please discontinue use or file an issue "
"with pypa/distutils describing your use case.",
DeprecationWarning,
)


def read_keys(base, key):
"""Return list of registry keys."""
try:
Expand Down

0 comments on commit c802880

Please sign in to comment.