René's URL Explorer Experiment


Title: bug: `docstring_style: sphinx` + any explicit `docstring_options` crashes: `parse_sphinx() got an unexpected keyword argument 'warn_missing_types'` · Issue #337 · mkdocstrings/python · GitHub

Open Graph Title: bug: `docstring_style: sphinx` + any explicit `docstring_options` crashes: `parse_sphinx() got an unexpected keyword argument 'warn_missing_types'` · Issue #337 · mkdocstrings/python

X Title: bug: `docstring_style: sphinx` + any explicit `docstring_options` crashes: `parse_sphinx() got an unexpected keyword argument 'warn_missing_types'` · Issue #337 · mkdocstrings/python

Description: Description With mkdocstrings-python 2.0.5 on griffelib 2.1.0, any configuration that uses docstring_style: sphinx and sets at least one key under docstring_options crashes on the first rendered docstring: TypeError: parse_sphinx() got a...

Open Graph Description: Description With mkdocstrings-python 2.0.5 on griffelib 2.1.0, any configuration that uses docstring_style: sphinx and sets at least one key under docstring_options crashes on the first rendered do...

X Description: Description With mkdocstrings-python 2.0.5 on griffelib 2.1.0, any configuration that uses docstring_style: sphinx and sets at least one key under docstring_options crashes on the first rendered do...

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

X: @github

direct link

Domain: redirect.github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: `docstring_style: sphinx` + any explicit `docstring_options` crashes: `parse_sphinx() got an unexpected keyword argument 'warn_missing_types'`","articleBody":"## Description\n\nWith mkdocstrings-python 2.0.5 on griffelib 2.1.0, any configuration that uses `docstring_style: sphinx` **and sets at least one key under `docstring_options`** crashes on the first rendered docstring:\n\n```\nTypeError: parse_sphinx() got an unexpected keyword argument 'warn_missing_types'\n```\n\nConfigurations with no `docstring_options` at all build cleanly, which makes this easy to miss in minimal testing: the empty case short-circuits before the bad kwarg is ever produced.\n\n## Mechanism\n\n- `SphinxStyleOptions` still declares `warn_missing_types: bool = True` as a defaulted field (`mkdocstrings_handlers/python/_internal/config.py:252`, class at `:240`).\n- `PythonHandler.render` builds the parser options via `parser_options = options.docstring_options and asdict(options.docstring_options)` (`handler.py:198`). `asdict()` materializes **every** field of the dataclass — defaults included — so `warn_missing_types=True` is emitted as soon as `docstring_options` is non-empty.\n- The dict is assigned to `doc_object.docstring.parser_options` (`handler.py:246`) and forwarded by griffe (`griffe/_internal/models.py:183`: `parse(self, parser or self.parser, **(options or self.parser_options))`).\n- griffelib 2.1.0's `parse_sphinx` signature is `parse_sphinx(docstring, *, warn_unknown_params=True, warnings=True)` (`griffe/_internal/docstrings/sphinx.py:98`) — it no longer accepts `warn_missing_types`, so the call raises `TypeError`.\n\nNote the asymmetry: `parse_google` (`google.py:881`) **still accepts** `warn_missing_types`, so google-style configs are unaffected. Only the sphinx parser dropped the parameter, while `SphinxStyleOptions` still declares it. (griffelib's internal `_read_return` helper in `sphinx.py` still implements the `warn_missing_types` behavior — the kwarg was dropped from the public parser signature only.)\n\n## Minimal reproducer (no mkdocs needed)\n\n```python\n# venv: griffelib==2.1.0\nfrom griffe import Docstring, Parser\n\nd = Docstring(\n    \":param x: foo\",\n    parser=Parser.sphinx,\n    parser_options={\"warn_unknown_params\": False, \"warn_missing_types\": True, \"warnings\": True},\n)\nd.parsed\n# TypeError: parse_sphinx() got an unexpected keyword argument 'warn_missing_types'\n```\n\nThat `parser_options` dict is byte-for-byte what mkdocstrings-python 2.0.5 produces from the mkdocs config below. The same `Docstring` with `parser_options={}` parses fine — the false-negative path.\n\n## mkdocs config that triggers it\n\n```yaml\nplugins:\n  - mkdocstrings:\n      handlers:\n        python:\n          options:\n            docstring_style: sphinx\n            docstring_options:\n              warn_unknown_params: false   # any single key here is enough\n```\n\n## Full-build traceback (excerpt)\n\n```\nTypeError: parse_sphinx() got an unexpected keyword argument 'warn_missing_types'\n  ...\n  mkdocstrings/_internal/extension.py:194, in _process_block\n    rendered = render(data, options)\n  mkdocstrings_handlers/python/_internal/handler.py:264, in render\n    return template.render(\n  ...templates/material/_base/module.html.jinja:94, in block 'docstring'\n  griffe/_internal/models.py:163, in parsed\n    return self.parse()\n  griffe/_internal/models.py:183, in parse\n    return parse(self, parser or self.parser, **(options or self.parser_options))\n  griffe/_internal/docstrings/parsers.py:53, in parse\n    return parsers(docstring, **options)\n```\n\nThe failure is content-independent — it fires on the first docstring rendered, regardless of what the docstring contains, and regardless of any griffe extensions in use.\n\n## Environment\n\n- mkdocstrings-python 2.0.5\n- griffelib 2.1.0 (sole provider of the `griffe` import; the legacy `griffe` 1.x distribution is **not** installed)\n- mkdocstrings 1.0.6\n- Python 3.12.13\n\n## Suggested fix directions\n\nAny of:\n1. Drop `warn_missing_types` from `SphinxStyleOptions` in mkdocstrings-python (align the options schema with `parse_sphinx`'s actual signature), or\n2. Filter forwarded kwargs per parser signature before assigning `parser_options`, or\n3. Re-accept `warn_missing_types` in griffelib's `parse_sphinx` and thread it through — the internal `_read_return` helper still implements it, so this restores documented behavior rather than adding new surface.\n\nThank you.","author":{"url":"https://github.com/selbs","@type":"Person","name":"selbs"},"datePublished":"2026-08-07T15:17:41Z","url":"https://github.com/mkdocstrings/python/issues/337"}

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:26626506-010d-8ab7-43bd-acea651d8d25
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB4D2:CDDBE:6E458A:986DBF:6AF855E5
html-safe-noncec359a8fd050b83dea147fd88a0137e424d4b699febd623dc2347014746061ee5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNEQyOkNEREJFOjZFNDU4QTo5ODZEQkY6NkFGODU1RTUiLCJ2aXNpdG9yX2lkIjoiNzg1OTk0OTcxMTUwOTcwNjIxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0e684cfdf1a040b9348c40618c74f372a12c5e9a36b1c5cfa8f960d5f63e70c7
hovercard-subject-tagissue:5091510852
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/337/issue_layout
twitter:imagehttps://opengraph.githubassets.com/faded1954107340992db31f5151eed8b18cfb43ce4a5dab3deb04965a3f142c5/mkdocstrings/python/issues/337
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/faded1954107340992db31f5151eed8b18cfb43ce4a5dab3deb04965a3f142c5/mkdocstrings/python/issues/337
og:image:altDescription With mkdocstrings-python 2.0.5 on griffelib 2.1.0, any configuration that uses docstring_style: sphinx and sets at least one key under docstring_options crashes on the first rendered do...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameselbs
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/337#start-of-content
https://redirect.github.com/
Sign inhttps://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmkdocstrings%2Fpython%2Fissues%2F337
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%2F337
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/337
Reloadhttps://redirect.github.com/mkdocstrings/python/issues/337
Reloadhttps://redirect.github.com/mkdocstrings/python/issues/337
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/337
New issuehttps://redirect.github.com/login?return_to=https://github.com/mkdocstrings/python/issues/337
bug: docstring_style: sphinx + any explicit docstring_options crashes: parse_sphinx() got an unexpected keyword argument 'warn_missing_types'https://redirect.github.com/mkdocstrings/python/issues/337#top
https://redirect.github.com/pawamoy
bugSomething isn't workinghttps://github.com/mkdocstrings/python/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/selbs
selbshttps://github.com/selbs
on Aug 7, 2026https://github.com/mkdocstrings/python/issues/337#issue-5091510852
selbshttps://redirect.github.com/selbs
pawamoyhttps://redirect.github.com/pawamoy
on Aug 7, 2026https://github.com/mkdocstrings/python/issues/337#event-29126162269
selbshttps://redirect.github.com/selbs
unconfirmedThis bug was not reproduced yethttps://redirect.github.com/mkdocstrings/python/issues?q=state%3Aopen%20label%3A%22unconfirmed%22
on Aug 7, 2026https://github.com/mkdocstrings/python/issues/337#event-29126163601
pawamoyhttps://redirect.github.com/pawamoy
bugSomething isn't workinghttps://redirect.github.com/mkdocstrings/python/issues?q=state%3Aopen%20label%3A%22bug%22
unconfirmedThis bug was not reproduced yethttps://redirect.github.com/mkdocstrings/python/issues?q=state%3Aopen%20label%3A%22unconfirmed%22
on Aug 7, 2026https://github.com/mkdocstrings/python/issues/337#event-29131016045
https://redirect.github.com/pawamoy
pawamoyhttps://redirect.github.com/pawamoy
on Aug 7, 2026https://github.com/mkdocstrings/python/issues/337#issuecomment-5219896426
@selbshttps://github.com/selbs
pawamoyhttps://redirect.github.com/pawamoy
on Aug 16, 2026https://github.com/mkdocstrings/python/issues/337#event-29522829742
fix: Don't pass unsupported options to Griffe parsershttps://github.com/mkdocstrings/python/commit/4b38b6ba6c3d1e09339cd5eb2c43145be84bda66
4b38b6bhttps://github.com/mkdocstrings/python/commit/4b38b6ba6c3d1e09339cd5eb2c43145be84bda66
fix: Forward `warn_missing_types` to Sphinx return section readerhttps://github.com/mkdocstrings/griffe/commit/a15e782ed0793e06d22105beb016c10cfe0ed4b0
a15e782https://github.com/mkdocstrings/griffe/commit/a15e782ed0793e06d22105beb016c10cfe0ed4b0
https://redirect.github.com/pawamoy
pawamoyhttps://redirect.github.com/pawamoy
on Aug 16, 2026https://github.com/mkdocstrings/python/issues/337#issuecomment-5307658420
4b38b6bhttps://github.com/mkdocstrings/python/commit/4b38b6ba6c3d1e09339cd5eb2c43145be84bda66
mkdocstrings/griffe@a15e782https://github.com/mkdocstrings/griffe/commit/a15e782ed0793e06d22105beb016c10cfe0ed4b0
https://redirect.github.com/pawamoy
pawamoyhttps://redirect.github.com/pawamoy
on Aug 16, 2026https://github.com/mkdocstrings/python/issues/337#issuecomment-5307819416
pawamoyhttps://redirect.github.com/pawamoy
completedhttps://redirect.github.com/mkdocstrings/python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 16, 2026https://github.com/mkdocstrings/python/issues/337#event-29523811760
Sign up for freehttps://redirect.github.com/signup?return_to=https://github.com/mkdocstrings/python/issues/337
Sign in to commenthttps://redirect.github.com/login?return_to=https://github.com/mkdocstrings/python/issues/337
pawamoyhttps://redirect.github.com/pawamoy
bugSomething isn't workinghttps://github.com/mkdocstrings/python/issues?q=state%3Aopen%20label%3A%22bug%22
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.