René's URL Explorer Experiment


Title: bug: relative cross-references in inherited members still depend on the consumer's `relative_crossrefs` setting · Issue #345 · mkdocstrings/python · GitHub

Open Graph Title: bug: relative cross-references in inherited members still depend on the consumer's `relative_crossrefs` setting · Issue #345 · mkdocstrings/python

X Title: bug: relative cross-references in inherited members still depend on the consumer's `relative_crossrefs` setting · Issue #345 · mkdocstrings/python

Description: Description of the bug #342 (released in 2.0.9) fixed half of #341: relative cross-references in inherited members now expand against the object the docstring was written on, instead of the inheriting class. The other half is still there...

Open Graph Description: Description of the bug #342 (released in 2.0.9) fixed half of #341: relative cross-references in inherited members now expand against the object the docstring was written on, instead of the inherit...

X Description: Description of the bug #342 (released in 2.0.9) fixed half of #341: relative cross-references in inherited members now expand against the object the docstring was written on, instead of the inherit...

Opengraph URL: https://github.com/mkdocstrings/python/issues/345

X: @github

direct link

Domain: redirect.github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: relative cross-references in inherited members still depend on the consumer's `relative_crossrefs` setting","articleBody":"### Description of the bug\n\n#342 (released in 2.0.9) fixed half of #341: relative cross-references in inherited members now expand against the object the docstring was written on, instead of the inheriting class. The other half is still there. The expansion is still [gated on the consumer's own `relative_crossrefs` setting](https://github.com/mkdocstrings/python/blob/c888dc294f4c8305479d358e976fd8cbb2e0c62c/src/mkdocstrings_handlers/python/_internal/rendering.py#L808), so when a package without that option renders an inherited member whose docstring comes from a dependency that uses relative cross-references, the raw dotted identifier is still handed to autorefs and a strict build fails. #342 left this out of scope explicitly, but #341 was closed as fixed, so I'm opening this to keep track of it.\n\nThis means the consumer's configuration still decides whether a dependency's docstrings resolve. A library author can't tell whether all their downstream users enabled `relative_crossrefs`, and a downstream user shouldn't have to adopt a docstring style just because a base class they inherit from uses it.\n\n### To Reproduce\n\nThe reproducer in #341 still applies unchanged. With `mkdocstrings-python==2.0.9`, its case 2 (`pkgb` built without `relative_crossrefs`) fails exactly as before:\n\n```\n### 2. pkgb's docs, without relative_crossrefs: the raw dotted string leaks\nWARNING -  mkdocs_autorefs: index.md: from /path/to/repro/pkga/sub.py:10: (pkgb.Derived.MAPPING) Could not find cross-reference target '....Thing'\n\nAborted with 1 warnings in strict mode!\n```\n\nCase 3 now expands to `pkga.Thing`, which is correct. In that toy setup it still fails in strict mode, but only because `docs-b` neither renders `pkga` nor loads an inventory for it, so that part is expected and not a bug.\n\n### Full traceback\n\nNo traceback, only the `mkdocs_autorefs` warning above, which aborts the build in strict mode.\n\n### Expected behavior\n\nA leading-dot identifier written in a docstring should be expanded whether or not the package rendering it enabled `relative_crossrefs`, at least when the docstring was written on an object other than the one being rendered (as is the case for inherited members). As far as I can tell, an identifier starting with a dot can never resolve as an absolute one, so expanding it wouldn't break any reference that works today.\n\n### Environment information\n\n- __System__: Linux-6.12.107+deb13-amd64-x86_64-with-glibc2.42\n- __Python__: cpython 3.12.14\n- __Environment variables__:\n- __Installed packages__:\n  - `mkdocs` v1.6.1\n  - `mkdocstrings` v1.0.6\n  - `mkdocstrings-python` v2.0.9\n  - `mkdocs-autorefs` v1.4.4\n  - `griffelib` v2.3.0\n\n### Additional context\n\nThis is the same real-world case described in #341. [frequenz-quantities](https://github.com/frequenz-floss/frequenz-quantities-python) had to turn the relative cross-references in `frequenz.quantities.experimental.marshmallow` into absolute ones (frequenz-floss/frequenz-quantities-python#170), because [frequenz-sdk-python](https://github.com/frequenz-floss/frequenz-sdk-python) subclasses `QuantitySchema` and builds its docs with `inherited_members: true` and `strict: true`, but [without `relative_crossrefs`](https://github.com/frequenz-floss/frequenz-sdk-python/blob/8616b9ac2a40a3c41f2a824aaa79e108e3edcf35/mkdocs.yml#L105-L116). With 2.0.9 we wanted to restore the relative references, but after reverting that change locally, the SDK docs still fail with 2.0.9 unless the SDK also enables `relative_crossrefs`:\n\n```\nWARNING -  mkdocs_autorefs: reference/frequenz/sdk/config/index.md: from .../frequenz/quantities/experimental/marshmallow.py:330: (frequenz.sdk.config.BaseConfigSchema.TYPE_MAPPING) Could not find cross-reference target '.....Quantity'\n```\n\nWith `relative_crossrefs: true` in the SDK, 2.0.9 builds cleanly and links to `frequenz.quantities.Quantity` through the quantities inventory, so the #342 fix itself works as intended.\n","author":{"url":"https://github.com/llucax","@type":"Person","name":"llucax"},"datePublished":"2026-09-24T07:55:31Z","url":"https://github.com/mkdocstrings/python/issues/345"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d12243b2-18fb-fca0-1052-97c857abe5e0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBFAA:8C112:73CFCE:98FCD8:6AF84428
html-safe-nonced4db1e49849d5c2e3d4cc1dac2f8cbc7fb081e1d76e4c619c5383777d8428b19
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkFBOjhDMTEyOjczQ0ZDRTo5OEZDRDg6NkFGODQ0MjgiLCJ2aXNpdG9yX2lkIjoiMzk1NzY2NTk0OTYyMzUzNDYzMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb65084069ecfdd16606744f45d0b58b2bb9ae06b12442be9e3e490d70130623d
hovercard-subject-tagissue:5565118731
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/mkdocstrings/python/345/issue_layout
twitter:imagehttps://opengraph.githubassets.com/df9a17b3441fb290750d91b5f73439ad2a2876190554bc0fba295fda6132576c/mkdocstrings/python/issues/345
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/df9a17b3441fb290750d91b5f73439ad2a2876190554bc0fba295fda6132576c/mkdocstrings/python/issues/345
og:image:altDescription of the bug #342 (released in 2.0.9) fixed half of #341: relative cross-references in inherited members now expand against the object the docstring was written on, instead of the inherit...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamellucax
hostnamegithub.com
expected-hostnamegithub.com
None5713ecd83001b2f55c3509fb7a292bf7d66d0f167c7ae87a9f7eaec5a52bf8db
turbo-cache-controlno-preview
go-importgithub.com/mkdocstrings/python git https://github.com/mkdocstrings/python.git
octolytics-dimension-user_id75664361
octolytics-dimension-user_loginmkdocstrings
octolytics-dimension-repository_id422878404
octolytics-dimension-repository_nwomkdocstrings/python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id422878404
octolytics-dimension-repository_network_root_nwomkdocstrings/python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release653be32ff5c755082a4db662491bfbbcfc9112c1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://redirect.github.com/mkdocstrings/python/issues/345#start-of-content
https://redirect.github.com/
Sign inhttps://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmkdocstrings%2Fpython%2Fissues%2F345
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmkdocstrings%2Fpython%2Fissues%2F345
Sign uphttps://redirect.github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=mkdocstrings%2Fpython
Reloadhttps://redirect.github.com/mkdocstrings/python/issues/345
Reloadhttps://redirect.github.com/mkdocstrings/python/issues/345
Reloadhttps://redirect.github.com/mkdocstrings/python/issues/345
mkdocstringshttps://redirect.github.com/mkdocstrings
pythonhttps://redirect.github.com/mkdocstrings/python
Codehttps://redirect.github.com/mkdocstrings/python
Issues6 (6)https://redirect.github.com/mkdocstrings/python/issues
Pull requestshttps://redirect.github.com/mkdocstrings/python/pulls
Discussionshttps://redirect.github.com/mkdocstrings/python/discussions
Actionshttps://redirect.github.com/mkdocstrings/python/actions
Security and qualityhttps://redirect.github.com/mkdocstrings/python/security
Insightshttps://redirect.github.com/mkdocstrings/python/pulse
https://redirect.github.com/mkdocstrings/python
New issuehttps://redirect.github.com/login?return_to=https://github.com/mkdocstrings/python/issues/345
New issuehttps://redirect.github.com/login?return_to=https://github.com/mkdocstrings/python/issues/345
bug: relative cross-references in inherited members still depend on the consumer's relative_crossrefs settinghttps://redirect.github.com/mkdocstrings/python/issues/345#top
https://github.com/llucax
llucaxhttps://github.com/llucax
on Sep 24, 2026https://github.com/mkdocstrings/python/issues/345#issue-5565118731
#342https://github.com/mkdocstrings/python/pull/342
#341https://github.com/mkdocstrings/python/issues/341
gated on the consumer's own relative_crossrefs settinghttps://github.com/mkdocstrings/python/blob/c888dc294f4c8305479d358e976fd8cbb2e0c62c/src/mkdocstrings_handlers/python/_internal/rendering.py#L808
#342https://github.com/mkdocstrings/python/pull/342
#341https://github.com/mkdocstrings/python/issues/341
#341https://github.com/mkdocstrings/python/issues/341
#341https://github.com/mkdocstrings/python/issues/341
frequenz-quantitieshttps://github.com/frequenz-floss/frequenz-quantities-python
frequenz-floss/frequenz-quantities-python#170https://github.com/frequenz-floss/frequenz-quantities-python/pull/170
frequenz-sdk-pythonhttps://github.com/frequenz-floss/frequenz-sdk-python
without relative_crossrefshttps://github.com/frequenz-floss/frequenz-sdk-python/blob/8616b9ac2a40a3c41f2a824aaa79e108e3edcf35/mkdocs.yml#L105-L116
#342https://github.com/mkdocstrings/python/pull/342
llucaxhttps://redirect.github.com/llucax
duplicatehttps://redirect.github.com/mkdocstrings/python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Aduplicate
bug: relative cross-references in inherited members still depend on the consumer's relative_crossrefs setting #344https://redirect.github.com/mkdocstrings/python/issues/344
on Sep 24, 2026https://github.com/mkdocstrings/python/issues/345#event-31738378857
Sign up for freehttps://redirect.github.com/signup?return_to=https://github.com/mkdocstrings/python/issues/345
Sign in to commenthttps://redirect.github.com/login?return_to=https://github.com/mkdocstrings/python/issues/345
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.