diff --git a/CHANGELOG.md b/CHANGELOG.md index 795a2e6d..8e51a6a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,10 @@ ## Unreleased: pdoc next -- Remove support for Python 3.8, which has reached end-of-life on 2024-10-07 . +- Remove support for Python 3.8, which has reached end-of-life on 2024-10-07. ([#747](https://github.com/mitmproxy/pdoc/pull/747), @mhils) +- Python 3.13: `@deprecated` decorators are now rendered with visual emphasis. + ([#750](https://github.com/mitmproxy/pdoc/pull/750), @mhils) - Inherited members are now hidden by default if the base class is not part of the documentation. Please make yourself heard in https://github.com/mitmproxy/pdoc/issues/715 if you relied on the old behavior. ([#748](https://github.com/mitmproxy/pdoc/pull/748), @mhils) diff --git a/pdoc/templates/content.css b/pdoc/templates/content.css index 34456fff..79baa58a 100644 --- a/pdoc/templates/content.css +++ b/pdoc/templates/content.css @@ -308,6 +308,13 @@ This makes sure that the pdoc styling doesn't leak to the rest of the page when margin-left: 2rem; } +.pdoc .decorator-deprecated { + color: #842029; +} +.pdoc .decorator-deprecated ~ span { + filter: grayscale(1) opacity(0.8); +} + .pdoc .name { color: var(--name); font-weight: bold; diff --git a/pdoc/templates/default/module.html.jinja2 b/pdoc/templates/default/module.html.jinja2 index 9c4b0153..555ebdc5 100644 --- a/pdoc/templates/default/module.html.jinja2 +++ b/pdoc/templates/default/module.html.jinja2 @@ -162,7 +162,7 @@ See https://pdoc.dev/docs/pdoc/render_helpers.html#DefaultMacroExtension for an {% enddefaultmacro %} {% defaultmacro decorators(doc) %} {% for d in doc.decorators if not d.startswith("@_") %} -
{{ d }}
+
{{ d }}
{% endfor %} {% enddefaultmacro %} {% defaultmacro function(fn) -%} diff --git a/test/testdata/ast_parsing.html b/test/testdata/ast_parsing.html index 4419f91e..face783a 100644 --- a/test/testdata/ast_parsing.html +++ b/test/testdata/ast_parsing.html @@ -10,7 +10,7 @@ - +