Skip to content

Commit

Permalink
Remove __version__.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jul 27, 2020
1 parent aad217d commit cfc3377
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 23 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v15.0.0
-------

- Removed ``__version__`` property. To determine the version,
use ``importlib.metadata.version('path')``.

v14.0.1
-------

Expand Down
14 changes: 0 additions & 14 deletions path/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,6 @@
U_NL_END = re.compile(r'(?:{0})$'.format(U_NEWLINE.pattern))


try:
from importlib import metadata # type: ignore
except ImportError:
try:
import importlib_metadata as metadata # type: ignore
except ImportError:
pass

try:
__version__ = metadata.version('path') # type: ignore
except Exception:
__version__ = 'unknown'


class TreeWalkWarning(Warning):
pass

Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ packages = find:
include_package_data = true
python_requires = >=3.6
install_requires =
importlib_metadata >= 0.5; python_version < "3.8"
setup_requires = setuptools_scm[toml] >= 3.4.1

[options.extras_require]
Expand Down
8 changes: 0 additions & 8 deletions test_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -1232,11 +1232,3 @@ def test_no_dependencies():
"""
cmd = [sys.executable, '-S', '-c', 'import path']
subprocess.check_call(cmd)


def test_version():
"""
Under normal circumstances, path should present a
__version__.
"""
assert re.match(r'\d+\.\d+.*', path.__version__)

0 comments on commit cfc3377

Please sign in to comment.