Title: bug: Inventory config 'base_url' no longer works · Issue #268 · mkdocstrings/python · GitHub
Open Graph Title: bug: Inventory config 'base_url' no longer works · Issue #268 · mkdocstrings/python
X Title: bug: Inventory config 'base_url' no longer works · Issue #268 · mkdocstrings/python
Description: Description of the bug When specifying an inventory with a base_url that is different from the url, the base_url is ignored after the 0.28.0 rework. The rendered cross-reference URL uses the url value, not the base_url value. The issue i...
Open Graph Description: Description of the bug When specifying an inventory with a base_url that is different from the url, the base_url is ignored after the 0.28.0 rework. The rendered cross-reference URL uses the url va...
X Description: Description of the bug When specifying an inventory with a base_url that is different from the url, the base_url is ignored after the 0.28.0 rework. The rendered cross-reference URL uses the url va...
Opengraph URL: https://github.com/mkdocstrings/python/issues/268
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: Inventory config 'base_url' no longer works","articleBody":"### Description of the bug\nWhen specifying an inventory with a `base_url` that is different from the `url`, the `base_url` is ignored after the `0.28.0` rework. The rendered cross-reference URL uses the `url` value, not the `base_url` value.\n\nThe issue is that the new `Inventory` dataclass in https://github.com/mkdocstrings/python/blob/main/src/mkdocstrings_handlers/python/_internal/config.py#L963-L992 has a `base` attribute, which is also returned in the `_config` property as `base`, and not `base_url`. However, the `load_inventory` method still expects a `base_url` keyword, but now gets `base=...` which is put into `**kwargs` and ignored.\n\n### Environment information\n```bash\npython -m mkdocstrings_handlers.python._internal.debug # | xclip -selection clipboard\n```\n\n- __System__: Linux-6.11.0-21-generic-x86_64-with-glibc2.39\n- __Python__: cpython 3.12.3 (/home/stefan/salling/ml-utils-pipeline-new/.venv/bin/python)\n- __Environment variables__:\n- __Installed packages__:\n - `mkdocstrings-python` v1.16.8\n\n### Additional context\nI'll be happy to make a PR fixing this, but I could use some help in figuring out how to add test(s) 🙂 \n","author":{"url":"https://github.com/connesy","@type":"Person","name":"connesy"},"datePublished":"2025-04-03T11:08:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/268/python/issues/268"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f34908bf-545a-0dba-b4f1-af3ea8dfbbc9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE3C:319547:1E65650:278BDFB:696B4276 |
| html-safe-nonce | 186b63037a20731c4e1e449beafef161b62b99abbcc7b4bc50d1d923a295524e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTNDOjMxOTU0NzoxRTY1NjUwOjI3OEJERkI6Njk2QjQyNzYiLCJ2aXNpdG9yX2lkIjoiODQ4MzI3MTE4MTIxMTQ4NDc5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f405bed8b34c636e2893d0e05e0adc1ac536965286f4241f71b2d90e51ef071d |
| hovercard-subject-tag | issue:2969215658 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/mkdocstrings/python/268/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4bef0700f655ebb1133db5acef16ff5bfb38c6db0f079ed83af3f1efc6aa8db0/mkdocstrings/python/issues/268 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4bef0700f655ebb1133db5acef16ff5bfb38c6db0f079ed83af3f1efc6aa8db0/mkdocstrings/python/issues/268 |
| og:image:alt | Description of the bug When specifying an inventory with a base_url that is different from the url, the base_url is ignored after the 0.28.0 rework. The rendered cross-reference URL uses the url va... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | connesy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/mkdocstrings/python git https://github.com/mkdocstrings/python.git |
| octolytics-dimension-user_id | 75664361 |
| octolytics-dimension-user_login | mkdocstrings |
| octolytics-dimension-repository_id | 422878404 |
| octolytics-dimension-repository_nwo | mkdocstrings/python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 422878404 |
| octolytics-dimension-repository_network_root_nwo | mkdocstrings/python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width