Replace deprecated load_module in docs conf - #4043
Merged
Merged
Conversation
SourceFileLoader.load_module is deprecated since 3.10 and gone in 3.15, which the test matrix already covers. ty 0.0.75 started flagging it, and the type environment runs with --error-on-warning, so main went red.
gaborbernat
force-pushed
the
fix/docs-conf-exec-module
branch
from
August 27, 2026 14:53
d04bf01 to
44c7858
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mainis red ontox env type:Nothing in the tree changed. ty 0.0.75 landed a
deprecatedlint,tyis unpinned at>=0.0.19, and the type environment runs with--error-on-warning, so the new diagnostic became a failure.The deprecation is worth acting on rather than silencing:
load_moduleis gone in 3.15, and the test matrix already runs 3.15.docs/conf.pynow builds the module and executes it through the loader instead.Verified with
tox -e type(ty 0.0.75, mypy, pyrefly all clean) andtox -e docs, which builds with-W. Theconfdirective still registers and renders -reference/config.htmlcomes out at 389 KB with every setting in place.