Skip to content

Commit 922be6e

Browse files
committed
Remove __version__ attribute.
1 parent af98f88 commit 922be6e

3 files changed

Lines changed: 11 additions & 13 deletions

File tree

CHANGES.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
v5.0.0
2+
======
3+
4+
* Module no longer exposes a ``__version__`` attribute. Instead
5+
to query the version installed, use
6+
`importlib.metadata <https://docs.python.org/3/library/importlib.metadata.html>`_
7+
or `its backport <https://pypi.org/project/importlib_metadata>`_
8+
to query::
9+
10+
importlib.metadata.version('inflect')
11+
112
v4.1.1
213
======
314

inflect.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@
5353
from typing import Dict, Union
5454

5555

56-
try:
57-
from importlib import metadata # type: ignore
58-
except ImportError:
59-
import importlib_metadata as metadata # type: ignore
60-
61-
6256
class UnknownClassicalModeError(Exception):
6357
pass
6458

@@ -87,12 +81,6 @@ class BadGenderError(Exception):
8781
pass
8882

8983

90-
try:
91-
__version__ = metadata.version("inflect") # type: ignore
92-
except Exception:
93-
__version__ = "unknown"
94-
95-
9684
STDOUT_ON = False
9785

9886

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ include_package_data = true
2525
py_modules = inflect
2626
python_requires = >=3.6
2727
install_requires =
28-
importlib_metadata; python_version < "3.8"
2928
setup_requires = setuptools_scm[toml] >= 3.4.1
3029
keywords = plural inflect participle
3130

0 commit comments

Comments
 (0)