Skip to content

Commit

Permalink
Merge branch 'bugfix/100-remove-dunder-version' into 'master'
Browse files Browse the repository at this point in the history
Remove __version__

Closes python#100

See merge request python-devs/importlib_resources!105
  • Loading branch information
jaraco committed Jun 30, 2020
2 parents 6b7e858 + 526b264 commit 7e873b8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
10 changes: 9 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
importlib_resources NEWS
==========================

v2.0.2
v3.0.0
======

* Package no longer exposes ``importlib_resources.__version__``.
Users that wish to inspect the version of ``importlib_resources``
should instead invoke ``.version('importlib_resources')`` from
``importlib-metadata`` (
`stdlib <https://docs.python.org/3/library/importlib.metadata.html>`_
or `backport <https://pypi.org/project/importlib-metadata>`_)
directly. This change eliminates the dependency on
``importlib_metadata``. Closes #100.
* Package now always includes its data. Closes #93.
* Declare hidden imports for PyInstaller. Closes #101.

Expand Down
4 changes: 0 additions & 4 deletions importlib_resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import sys

from ._compat import metadata
from ._common import (
as_file, files,
)
Expand Down Expand Up @@ -52,6 +51,3 @@
read_text,
)
del __all__[:3]


__version__ = metadata.version('importlib_resources')
6 changes: 0 additions & 6 deletions importlib_resources/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ class ABC(object): # type: ignore
FileNotFoundError = OSError # type: ignore


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


try:
from zipfile import Path as ZipPath # type: ignore
except ImportError:
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ install_requires =
typing; python_version < '3.5'
zipp >= 0.4; python_version < '3.8'
singledispatch; python_version < '3.4'
importlib_metadata; python_version < '3.8'
contextlib2; python_version < '3'
setup_requires = setuptools_scm[toml] >= 3.4.1

Expand Down

0 comments on commit 7e873b8

Please sign in to comment.