Skip to content

Commit ffe4bcf

Browse files
committed
Remove deprecated VERSION, use __version__ instead
1 parent 309e7fd commit ffe4bcf

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

src/humanize/__init__.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
"""Main package for humanize."""
22

3-
import sys
4-
import warnings
5-
63
from humanize.filesize import naturalsize
74
from humanize.i18n import activate, deactivate, thousands_separator
85
from humanize.number import (
@@ -32,25 +29,6 @@
3229
__version__ = importlib_metadata.version(__name__)
3330

3431

35-
if sys.version_info >= (3, 7):
36-
# This technique isn't available for 3.6 but we don't need to warn for 3.6
37-
# because we'll drop 3.6 at the same time as removing this
38-
def __getattr__(name):
39-
if name == "VERSION":
40-
warnings.warn(
41-
"VERSION is deprecated and will be removed in humanize 4.0. "
42-
"Use __version__ instead, available since humanize 1.0 (Feb 2020).",
43-
DeprecationWarning,
44-
stacklevel=2,
45-
)
46-
return __version__
47-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
48-
49-
50-
else:
51-
VERSION = __version__
52-
53-
5432
__all__ = [
5533
"__version__",
5634
"activate",

tests/test_humanize.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)