Skip to content

Commit

Permalink
Merge pull request #243 from hugovk/temp-rm-warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Nov 29, 2021
2 parents ab605ba + b7c7952 commit 429e3d8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/humanize/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ class _UnitMeta(EnumMeta):
"""Metaclass for an enum that emits deprecation warnings when accessed."""

def __getattribute__(self, name):
warnings.warn(
"`Unit` has been deprecated. "
"The enum is still available as the private member `_Unit`.",
DeprecationWarning,
)
# Temporarily comment out to avoid warning during 'import humanize'
# warnings.warn(
# "`Unit` has been deprecated. "
# "The enum is still available as the private member `_Unit`.",
# DeprecationWarning,
# )
return EnumMeta.__getattribute__(_Unit, name)

def __getitem__(cls, name):
Expand Down

0 comments on commit 429e3d8

Please sign in to comment.