Skip to content

Commit

Permalink
Remove deprecated VERSION, use __version__ instead
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Jan 30, 2022
1 parent 309e7fd commit ffe4bcf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
22 changes: 0 additions & 22 deletions src/humanize/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
"""Main package for humanize."""

import sys
import warnings

from humanize.filesize import naturalsize
from humanize.i18n import activate, deactivate, thousands_separator
from humanize.number import (
Expand Down Expand Up @@ -32,25 +29,6 @@
__version__ = importlib_metadata.version(__name__)


if sys.version_info >= (3, 7):
# This technique isn't available for 3.6 but we don't need to warn for 3.6
# because we'll drop 3.6 at the same time as removing this
def __getattr__(name):
if name == "VERSION":
warnings.warn(
"VERSION is deprecated and will be removed in humanize 4.0. "
"Use __version__ instead, available since humanize 1.0 (Feb 2020).",
DeprecationWarning,
stacklevel=2,
)
return __version__
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")


else:
VERSION = __version__


__all__ = [
"__version__",
"activate",
Expand Down
16 changes: 0 additions & 16 deletions tests/test_humanize.py

This file was deleted.

0 comments on commit ffe4bcf

Please sign in to comment.