diff --git a/distutils/version.py b/distutils/version.py index f09889ac43..47d88917c4 100644 --- a/distutils/version.py +++ b/distutils/version.py @@ -27,6 +27,8 @@ """ import re +import warnings + class Version: """Abstract base class for version numbering classes. Just provides @@ -36,6 +38,12 @@ class Version: """ def __init__ (self, vstring=None): + warnings.warn( + "distutils Version classes are deprecated. " + "Use packaging.version instead.", + DeprecationWarning, + stacklevel=2, + ) if vstring: self.parse(vstring)