NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1561 most downloaded on PyPI
Automatic documentation from sources, for MkDocs.
Last release 2 months ago
11 Jul 2026
Release timing varies
gaps range from 1 weeks to 4 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
77 releases · first in 2019
Stop propagating Zensical's zrelpath treeprocessor and its preview extension ( 4732798 by Timothée Mazzucotelli). Issue-zensical-818
zrelpath treeprocessor and its preview extension (4732798 by Timothée Mazzucotelli). Issue-zensical-818One column per quarter.
This tag was signed with the committer’s verified signature .
pawamoy Timothée Mazzucotelli
GPG key ID: 7F557506715E2F19
Verified Learn about vigilant mode .
ecbaa9a
This commit was signed with the committer’s verified signature .
pawamoy Timothée Mazzucotelli
GPG key ID: 7F557506715E2F19
Verified Learn about vigilant mode .
Add timeout when downloading inventories (10 seconds) ( 3d1969a by Simon Lloyd). Issue-819
Forward extension instances directly passed from Zensical ( 65b27ec by Timothée Mazzucotelli).
Use global instances for handlers and autorefs ( 9f79141 by Timothée Mazzucotelli).
Support manual cross-references in Zensical too ( d37d907 by Timothée Mazzucotelli).
Remove deprecated code before v1 ( de34044 by Timothée Mazzucotelli).
BaseHandler.name: Attribute value was changed: '' -> unsetBaseHandler.domain: Attribute value was changed: '' -> unsetBaseHandler.fallback_config: Public object was removedBaseHandler.__init__(args): Parameter was removedBaseHandler.__init__(kwargs): Parameter was removedBaseHandler.__init__(theme): Parameter was added as requiredBaseHandler.__init__(custom_templates): Parameter was added as requiredBaseHandler.__init__(mdx): Parameter was added as requiredBaseHandler.__init__(mdx_config): Parameter was added as requiredBaseHandler.update_env(args): Parameter was removedBaseHandler.update_env(kwargs): Parameter was removedBaseHandler.update_env(config): Parameter was added as requiredHandlers.get_anchors: Public object was removed (import from mkdocstrings directly)mkdocstrings.plugin: Public module was removed (import from mkdocstrings directly)mkdocstrings.loggers: Public module was removed (import from mkdocstrings directly)mkdocstrings.inventory: Public module was removed (import from mkdocstrings directly)mkdocstrings.extension: Public module was removed (import from mkdocstrings directly)mkdocstrings.handlers: Public module was removed (import from mkdocstrings directly)Create default SSL context in main thread before downloading inventories ( eec7fb4 by Çağlar Kutlu). Issue-796 , PR-797
Add data-skip-inventory boolean attribute for elements to skip registration in local inventory ( f856160 by Bartosz Sławecki). Issue-671 , PR-774
Remove unused typing-extensions dependency ( ba98661 by Timothée Mazzucotelli).
This is the last version before v1!
<small>Compare with 0.28.3</small>
This is the last version before v1!
All public objects must now be imported from the top-level mkdocstrings module. Importing from submodules is deprecated, and will raise errors startin…
<small>Compare with 0.28.2</small>
All public objects must now be imported from the top-level mkdocstrings module. Importing from submodules is deprecated, and will raise errors starting with v1. This should be the last deprecation before v1.
python extra depend on latest mkdocstrings-python (1.16.2) (ba9003e by Timothée Mazzucotelli).Depend on mkdocs-autorefs >= 1.4 (2c22bdc by Timothée Mazzucotelli).
<small>Compare with 0.28.1</small>
Renew MkDocs' relpath processor instead of using same instance (4ab180d by Timothée Mazzucotelli). Issue-mkdocs-3919
<small>Compare with 0.28.0</small>
relpath processor instead of using same instance (4ab180d by Timothée Mazzucotelli). Issue-mkdocs-3919For these reasons, and because we're still in v0, we do not bump to v1 yet. See following deprecations.
<small>Compare with 0.27.0</small>
Although the following changes are "breaking" in terms of public API, we didn't find any public use of these classes and methods on GitHub.
mkdocstrings.extension.AutoDocProcessor.__init__(parser): Parameter was removedmkdocstrings.extension.AutoDocProcessor.__init__(md): Positional parameter was movedmkdocstrings.extension.AutoDocProcessor.__init__(config): Parameter was removedmkdocstrings.extension.AutoDocProcessor.__init__(handlers): Parameter kind was changed: positional or keyword -> keyword-onlymkdocstrings.extension.AutoDocProcessor.__init__(autorefs): Parameter kind was changed: positional or keyword -> keyword-onlymkdocstrings.extension.MkdocstringsExtension.__init__(config): Parameter was removedmkdocstrings.extension.MkdocstringsExtension.__init__(handlers): Positional parameter was movedmkdocstrings.extension.MkdocstringsExtension.__init__(autorefs): Positional parameter was movedmkdocstrings.handlers.base.Handlers.__init__(config): Parameter was removedmkdocstrings.handlers.base.Handlers.__init__(theme): Parameter was added as requiredmkdocstrings.handlers.base.Handlers.__init__(default): Parameter was added as requiredmkdocstrings.handlers.base.Handlers.__init__(inventory_project): Parameter was added as requiredmkdocstrings.handlers.base.Handlers.__init__(tool_config): Parameter was added as requiredSimilarly, the following parameters were renamed, but the methods are only called from our own code, using positional arguments.
mkdocstrings.handlers.base.BaseHandler.collect(config): Parameter was renamed optionsmkdocstrings.handlers.base.BaseHandler.render(config): Parameter was renamed optionsFinally, the following method was removed, but this is again taken into account in our own code:
mkdocstrings.handlers.base.BaseHandler.get_anchors: Public object was removedFor these reasons, and because we're still in v0, we do not bump to v1 yet. See following deprecations.
mkdocstrings 0.28 will start emitting these deprecations warnings:
The
handlerargument is deprecated. The handler name must be specified as a class attribute.
Previously, the get_handler function would pass a handler (name) argument to the handler constructor. This name must now be set on the handler's class directly.
class MyHandler:
name = "myhandler"
The
domainattribute must be specified as a class attribute.
The domain class attribute on handlers is now mandatory and cannot be an empty string.
class MyHandler:
domain = "mh"
The
themeargument must be passed as a keyword argument.
This argument could previously be passed as a positional argument (from the get_handler function), and must now be passed as a keyword argument.
The
custom_templatesargument must be passed as a keyword argument.
Same as for theme, but with custom_templates.
The
mdxargument must be provided (as a keyword argument).
The get_handler function now receives a mdx argument, which it must forward to the handler constructor and then to the base handler, either explicitly or through **kwargs:
=== "Explicitly"
```python
def get_handler(..., mdx, ...):
return MyHandler(..., mdx=mdx, ...)
class MyHandler:
def __init__(self, ..., mdx, ...):
super().__init__(..., mdx=mdx, ...)
```
=== "Through **kwargs"
```python
def get_handler(..., **kwargs):
return MyHandler(..., **kwargs)
class MyHandler:
def __init__(self, ..., **kwargs):
super().__init__(**kwargs)
```
In the meantime we still retrieve this mdx value at a different moment, by reading it from the MkDocs configuration.
The
mdx_configargument must be provided (as a keyword argument).
Same as for mdx, but with mdx_config.
mkdocstrings v1 will stop handling 'import' in handlers configuration. Instead your handler must define a
get_inventory_urlsmethod that returns a list of URLs to download.
Previously, mkdocstrings would pop the import key from a handler's configuration to download each item (URLs). Items could be strings, or dictionaries with a url key. Now mkdocstrings gives back control to handlers, which must store this inventory configuration within them, and expose it again through a get_inventory_urls method. This method returns a list of tuples: an URL, and a dictionary of options that will be passed again to their load_inventory method. Handlers have now full control over the "inventory" setting.
from copy import deepcopy
def get_handler(..., handler_config, ...):
return MyHandler(..., config=handler_config, ...)
class MyHandler:
def __init__(self, ..., config, ...):
self.config = config
def get_inventory_urls(self):
config = deepcopy(self.config["import"])
return [(inv, {}) if isinstance(inv, str) else (inv.pop("url"), inv) for inv in config]
Changing the name of the key (for example from import to inventories) involves a change in user configuration, and both keys will have to be supported by your handler for some time.
def get_handler(..., handler_config, ...):
if "inventories" not in handler_config and "import" in handler_config:
warn("The 'import' key is renamed 'inventories'", FutureWarning)
handler_config["inventories"] = handler_config.pop("import")
return MyHandler(..., config=handler_config, ...)
Setting a fallback anchor function is deprecated and will be removed in a future release.
This comes from mkdocstrings and mkdocs-autorefs, and will disappear with mkdocstrings v0.28.
mkdocstrings v1 will start using your handler's
get_optionsmethod to build options instead of merging the global and local options (dictionaries).
Handlers must now store their own global options (in an instance attribute), and implement a get_options method that receives local_options (a dict) and returns combined options (dict or custom object). These combined options are then passed to collect and render, so that these methods can use them right away.
def get_handler(..., handler_config, ...):
return MyHandler(..., config=handler_config, ...)
class MyHandler:
def __init__(self, ..., config, ...):
self.config = config
def get_options(local_options):
return {**self.default_options, **self.config["options"], **local_options}
The
update_env(md)parameter is deprecated. Useself.mdinstead.
Handlers can remove the md parameter from their update_env method implementation, and use self.md instead, if they need it.
No need to call
super().update_env()anymore.
Handlers don't have to call the parent update_env method from their own implementation anymore, and can just drop the call.
The
get_anchorsmethod is deprecated. Declare aget_aliasesmethod instead, accepting a string (identifier) instead of a collected object.
Previously, handlers would implement a get_anchors method that received a data object (typed CollectorItem) to return aliases for this object. This forced mkdocstrings to collect this object through the handler's collect method, which then required some logic with "fallback config" as to prevent unwanted collection. mkdocstrings gives back control to handlers and now calls get_aliases instead, which accepts an identifier (string) and lets the handler decide how to return aliases for this identifier. For example, it can replicate previous behavior by calling its own collect method with its own "fallback config", or do something different (cache lookup, etc.).
class MyHandler:
def get_aliases(identifier):
try:
obj = self.collect(identifier, self.fallback_config)
# or obj = self._objects_cache[identifier]
except CollectionError: # or KeyError
return ()
return ... # previous logic in `get_anchors`
The
config_file_pathargument inget_handlerfunctions is deprecated. Usetool_config.get('config_file_path')instead.
The config_file_path argument is now deprecated and only passed to get_handler functions if they accept it. If you used it to compute a "base directory", you can now use the tool_config argument instead, which is the configuration of the SSG tool in use (here MkDocs):
base_dir = Path(tool_config.config_file_path or "./mkdocs.yml").parent
Most of these warnings will disappear with the next version of mkdocstrings-python.
config_file_path to get_handler if it expects it (8c476ee by Timothée Mazzucotelli).get_anchors method in favor of get_aliases method (7a668f0 by Timothée Mazzucotelli).Add support for authentication in inventory file URLs (1c23c1b by Stefan Mejlgaard). Issue-707, PR-710
<small>Compare with 0.26.2</small>
Drop support for Python 3.8 (f26edeb by Timothée Mazzucotelli).
<small>Compare with 0.26.1</small>
Instantiate config of the autorefs plugin when it is not enabled by the user (db2ab34 by Timothée Mazzucotelli). Issue-autorefs#57
<small>Compare with 0.26.0</small>
Upgrade Python-Markdown lower bound to 3.6 (28565f9 by Timothée Mazzucotelli).
<small>Compare with 0.25.2</small>
Give precedence to Markdown heading level (##) (2e5f89e by Timothée Mazzucotelli).
<small>Compare with 0.25.1</small>
##) (2e5f89e by Timothée Mazzucotelli).Always descend into sub-headings when re-applying their label (cb86e08 by Timothée Mazzucotelli). Issue-mkdocstrings/python-158
<small>Compare with 0.25.0</small>
Support once parameter in logging methods, allowing to log a message only once with a given logger (1532b59 by Timothée Mazzucotelli).
<small>Compare with 0.24.3</small>
once parameter in logging methods, allowing to log a message only once with a given logger (1532b59 by Timothée Mazzucotelli).::: path and YAML options (d799d2f by Timothée Mazzucotelli). Issue-450Support HTML toc labels with Python-Markdown 3.6+ (uncomment code...) (7fe3e5f by Timothée Mazzucotelli).
<small>Compare with 0.24.2</small>
Support HTML toc labels with Python-Markdown 3.6+ (c0d0090 by Timothée Mazzucotelli). Issue-mkdocstrings/python-143
<small>Compare with 0.24.1</small>
Support new pymdownx-highlight options (a7a2907 by Timothée Mazzucotelli).
<small>Compare with 0.24.0</small>
Cache downloaded inventories as local file (ce84dd5 by Oleh Prypin). PR #632
<small>Compare with 0.23.0</small>
custom_templates relative to the config file (370a61d by Waylan Limberg). Issue #477, PR #627Remove deprecated parts (0a90a47 by Timothée Mazzucotelli).
<small>Compare with 0.22.0</small>
BaseCollector and BaseRenderer classes: they were merged into the BaseHandler class.selection and rendering keys in YAML blocks: use options instead.mkdocstrings.handler namespace.
Handlers must now be packaged under the mkdocstrings_handlers namespace.codehilite CSS class to inline code (7690d41 by Timothée Mazzucotelli).get_anchors (only tuples), to preserve order (2e10374 by Timothée Mazzucotelli).Inventory.register method (433c6e0 by Timothée Mazzucotelli).Allow extensions to add templates (cf0af05 by Timothée Mazzucotelli). PR #569
<small>Compare with 0.21.2</small>
Fix regression with LRU cached method (85efbd2 by Timothée Mazzucotelli). Issue #549
<small>Compare with 0.21.1</small>
Fix missing typing-extensions dependency on Python less than 3.10 (bff760b by Timothée Mazzucotelli). Issue #548
<small>Compare with 0.21.0</small>
Expose the full config to handlers (15dacf6 by David Patterson). Issue #501, PR #509
<small>Compare with 0.20.0</small>
Add enabled configuration option (8cf117d by StefanBRas). Issue #478, PR #504
<small>Compare with 0.19.1</small>
enabled configuration option (8cf117d by StefanBRas). Issue #478, PR #504_load_inventory accept lists as arguments (105ed82 by Sorin Sbarnea). Needed by PR mkdocstrings/python#49, PR #511Fix regular expression for Sphinx inventory parsing (348bdd5 by Luis Michaelis). Issue #496, PR #497
<small>Compare with 0.19.0</small>
We decided to deprecate a few things to pave the way towards a more stable code base, bringing us closer to a v1.
<small>Compare with 0.18.1</small>
We decided to deprecate a few things to pave the way towards a more stable code base, bringing us closer to a v1.
options key. Using the old keys will emit a deprecation warning.BaseCollector and BaseRenderer classes are deprecated in favor
of BaseHandler, which merges their functionality. Using the old
classes will emit a deprecation warning.New versions of the Python handler and the legacy Python handler
were also released in coordination with mkdocstrings 0.19.
See their respective changelogs:
python,
python-legacy.
Most notably, the Python handler gained the members and filters options
that prevented many users to switch to it.
mkdocstrings stopped depending directly on the legacy Python handler. It means you now have to explicitely depend on it, directly or through the extra provided by mkdocstrings, if you want to continue using it.
selection and rendering YAML keys (3335310 by Timothée Mazzucotelli). PR #420BaseCollector and BaseRenderer (eb822cb by Timothée Mazzucotelli). PR #413Don't preemptively register identifiers as anchors (c7ac043 by Timothée Mazzucotelli).
<small>Compare with 0.18.0</small>
Find templates in new and deprecated namespaces (d5d5f18 by Timothée Mazzucotelli). PR #367
<small>Compare with 0.17.0</small>
mkdocs.yml.
See migration notes in the documentation.<p> tag in convert_markdown filter (5351fc8 by Oleh Prypin). PR #369mkdocstrings_handlers namespace (5c22c6c by Timothée Mazzucotelli). PR #367Add show_signature rendering option (024ee82 by Will Da Silva). Issue #341, PR #342
<small>Compare with 0.16.2</small>
show_signature rendering option (024ee82 by Will Da Silva). Issue #341, PR #342Support pymdown-extensions v9.x (0831343 by Ofek Lev and 38b22ec by Timothée Mazzucotelli).
<small>Compare with 0.16.1</small>
Fix ReadTheDocs "return" template (598621b by Timothée Mazzucotelli).
<small>Compare with 0.16.0</small>
Add a rendering option to change the sorting of members (b1fff8b by Joe Rickerby). Issue #114, PR #274
<small>Compare with 0.15.0</small>
setup_commands errors (92418c4 by Gabriel Vîjială). PR #258MkDocs default schema needs to be obtained differently now (b3e122b by Oleh Prypin). PR #273
<small>Compare with 0.15.1</small>
Prevent error during parallel installations (fac2c71 by Timothée Mazzucotelli).
<small>Compare with 0.15.0</small>
The following items are *possible* breaking changes:
<small>Compare with 0.14.0</small>
The following items are possible breaking changes:
.highlight CSS class in the rendered HTML will become .codehilite.
So make sure to adapt your extra CSS accordingly. Or just switch to using pymdownx.highlight, it's better supported by mkdocstrings anyway.
See Syntax highlighting.extra_css, similarly to this diff.handlers to handlers.rendering (7533852 by Oleh Prypin). PR #233Special thanks to Oleh @oprypin Prypin who did an amazing job (this is a euphemism) at improving *mkdocstrings*, fixing hard-to-fix bugs with clever s
<small>Compare with 0.13.6</small>
Special thanks to Oleh @oprypin Prypin who did an amazing job (this is a euphemism) at improving mkdocstrings, fixing hard-to-fix bugs with clever solutions, implementing great new features and refactoring the code for better performance and readability! Thanks Oleh!
href attributes from headings in templates (d5602ff by Oleh Prypin). PR #204toc extension append its permalink twice (a154f5c by Oleh Prypin). PR #203¶ (2c29211 by Timothée Mazzucotelli).heading_level (13f41ae by Oleh Prypin). Issue #192, PR #195heading_level as a Markdown heading (10efc28 by Oleh Prypin). PR #170pytkdocs up to 0.10.x (see changelog).Nothing published for this version
Fix rendering when clicking on hidden toc entries (2af4d31 by Timothée Mazzucotelli). Issue #60.
<small>Compare with 0.13.5</small>
Compare with 0.13.4
<small>Compare with 0.13.4</small>
Bring back arbitrary config to Python handler (fca7d4c by Florimond Manca). Issue #154, PR #155
<small>Compare with 0.13.3</small>
Accept pytkdocs version up to 0.8.x (changelog).
Fix relative URLs when use_directory_urls is false (421d189 by Timothée Mazzucotelli). References: #149
<small>Compare with 0.13.1</small>
Use relative links for cross-references (9c77f1f by Timothée Mazzucotelli). References: #144, #147
<small>Compare with 0.13.0</small>
Accept dashes in module names (fcf79d0 by Timothée Mazzucotelli). References: #140
<small>Compare with 0.12.2</small>
pymdown-extensions versions up to 0.8.x (see release notes) (178d48d by Hugo van Kemenade). PR #146Accept pytkdocs version up to 0.7.x (changelog).
Fix HTML-escaped sequence parsing as XML (db297f1 by Timothée Mazzucotelli).
<small>Compare with 0.12.0</small>
Support attributes section in Google-style docstrings (8300253 by Timothée Mazzucotelli). References: #88
<small>Compare with 0.11.4</small>
pytkdocs version up to 0.6.x (changelog).Accept pytkdocs version up to 0.5.x (changelog). If it breaks your docs, please open issues on `pytkdocs`' bug-tracker, or pin pytkdocs version to whi
<small>Compare with 0.11.3</small>
pytkdocs version up to 0.5.x (changelog).
If it breaks your docs, please open issues on pytkdocs' bug-tracker,
or pin pytkdocs version to while waiting for bug fixes <0.5.0 :clown:.Support custom theme directory configuration (1243cf6 by Abhishek Thakur). References: #120, #121
<small>Compare with 0.11.2</small>
Increase pytkdocs version range to accept 0.4.0 (changelog).
<small>Compare with 0.11.1</small>
pytkdocs version range to accept 0.4.0
(changelog).Fix integration with mkdocs logging *une bonne fois pour toute* (3293cbf by Timothée Mazzucotelli).
<small>Compare with 0.11.0</small>
Properly raise on errors (respect strict mode) (2097208 by Timothée Mazzucotelli). Related issues/PRs: #86
<small>Compare with 0.10.3</small>
Your coding agent can read these notes before it upgrades. Set up the MCP server →