Skip to content

Commit

Permalink
Mark Version classes as deprecated.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Dec 12, 2021
1 parent 45a280c commit 1701579
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions distutils/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"""

import re
import warnings


class Version:
"""Abstract base class for version numbering classes. Just provides
Expand All @@ -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)

Expand Down

0 comments on commit 1701579

Please sign in to comment.