Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 526b264

Browse filesBrowse files
committed
Remove __version__. Closes python#100.
1 parent 6b7e858 commit 526b264
Copy full SHA for 526b264

File tree

Expand file treeCollapse file tree

4 files changed

+9
-12
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+9
-12
lines changed

‎docs/changelog.rst

Copy file name to clipboardExpand all lines: docs/changelog.rst
+9-1Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22
importlib_resources NEWS
33
==========================
44

5-
v2.0.2
5+
v3.0.0
66
======
77

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

‎importlib_resources/__init__.py

Copy file name to clipboardExpand all lines: importlib_resources/__init__.py
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import sys
44

5-
from ._compat import metadata
65
from ._common import (
76
as_file, files,
87
)
@@ -52,6 +51,3 @@
5251
read_text,
5352
)
5453
del __all__[:3]
55-
56-
57-
__version__ = metadata.version('importlib_resources')

‎importlib_resources/_compat.py

Copy file name to clipboardExpand all lines: importlib_resources/_compat.py
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ class ABC(object): # type: ignore
3636
FileNotFoundError = OSError # type: ignore
3737

3838

39-
try:
40-
from importlib import metadata
41-
except ImportError:
42-
import importlib_metadata as metadata # type: ignore
43-
44-
4539
try:
4640
from zipfile import Path as ZipPath # type: ignore
4741
except ImportError:

‎setup.cfg

Copy file name to clipboardExpand all lines: setup.cfg
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ install_requires =
2323
typing; python_version < '3.5'
2424
zipp >= 0.4; python_version < '3.8'
2525
singledispatch; python_version < '3.4'
26-
importlib_metadata; python_version < '3.8'
2726
contextlib2; python_version < '3'
2827
setup_requires = setuptools_scm[toml] >= 3.4.1
2928

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.