File tree Expand file tree Collapse file tree 2 files changed +0
-38
lines changed
Expand file tree Collapse file tree 2 files changed +0
-38
lines changed Original file line number Diff line number Diff line change 11"""Main package for humanize."""
22
3- import sys
4- import warnings
5-
63from humanize .filesize import naturalsize
74from humanize .i18n import activate , deactivate , thousands_separator
85from humanize .number import (
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" ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments