Skip to content

Commit

Permalink
Since we've dropped support for Python 3.7, we don't need the importl…
Browse files Browse the repository at this point in the history
…ib_metadata dependency.
  • Loading branch information
tristanlatr committed Nov 28, 2024
1 parent edee929 commit fc1ec21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
11 changes: 1 addition & 10 deletions pydoctor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,8 @@
Warning: PyDoctor's API isn't stable YET, custom builds are prone to break!
"""

from typing import TYPE_CHECKING

# On Python 3.8+, use importlib.metadata from the standard library.
# On older versions, a compatibility package can be installed from PyPI.
try:
import importlib.metadata as importlib_metadata
except ImportError:
if not TYPE_CHECKING:
import importlib_metadata

import importlib.metadata as importlib_metadata

__version__ = importlib_metadata.version('pydoctor')

Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ install_requires =
Twisted
urllib3>=2.0
requests
astor; python_version < "3.9"
attrs
docutils>=0.17
lunr>=0.6.2,<0.8.0
configargparse

toml; python_version < "3.11"
importlib_metadata; python_version < "3.8"
astor; python_version < "3.9"
importlib_resources; python_version < "3.9"

[options.extras_require]
Expand Down

0 comments on commit fc1ec21

Please sign in to comment.