Skip to content

Commit

Permalink
Merge pull request #3194 from A5rocks/use-importlib-metadata-for-docs
Browse files Browse the repository at this point in the history
Use importlib.metadata in docs build
  • Loading branch information
CoolCat467 authored Jan 30, 2025
2 parents d7cb2fc + ad2d101 commit 3b94a1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ build:
python:
install:
- requirements: docs-requirements.txt
- path: .

sphinx:
fail_on_warning: true
Expand Down
6 changes: 2 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

# For our local_customization module
sys.path.insert(0, os.path.abspath("."))
# For trio itself
sys.path.insert(0, os.path.abspath("../../src"))

# Enable reloading with `typing.TYPE_CHECKING` being True
os.environ["SPHINX_AUTODOC_RELOAD_MODULES"] = "1"
Expand Down Expand Up @@ -315,9 +313,9 @@ def add_mapping(
# built documents.
#
# The short X.Y version.
import trio
import importlib.metadata

version = trio.__version__
version = importlib.metadata.version("trio")
# The full version, including alpha/beta/rc tags.
release = version

Expand Down

0 comments on commit 3b94a1a

Please sign in to comment.