From 986db8a4aec6bffd36c8ccde7f8acbf69443341f Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Sat, 28 Mar 2026 11:55:54 +0100 Subject: [PATCH 1/2] Warn when this plugin is being used from the mkdocs executable And prevent possible future versions of MkDocs. As described in https://github.com/ProperDocs/properdocs/discussions/33 --- mkdocs_redirects/plugin.py | 9 +++++++++ pyproject.toml | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mkdocs_redirects/plugin.py b/mkdocs_redirects/plugin.py index 9500852..b4efa99 100644 --- a/mkdocs_redirects/plugin.py +++ b/mkdocs_redirects/plugin.py @@ -12,6 +12,15 @@ from mkdocs.plugins import BasePlugin from mkdocs.structure.files import File +try: + import properdocs.replacement_warning + + # Warn when this plugin is being used from the mkdocs executable. + properdocs.replacement_warning.setup() +except ImportError: + pass + + log = logging.getLogger("mkdocs.plugin.redirects") diff --git a/pyproject.toml b/pyproject.toml index f347aef..2c57da4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,8 @@ classifiers = [ dynamic = ["version"] requires-python = ">=3.10" dependencies = [ - "mkdocs >=1.2", + "mkdocs >=1.2, <=1.6.1", + "properdocs >=1.6.5", #min "jinja2 >=2.10.2", #min "markupsafe >=2.0.1", ] From 57258c83568e4de8c65c6a38483d32c124842672 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Sat, 28 Mar 2026 12:04:29 +0100 Subject: [PATCH 2/2] Fix for min-deps --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6924008..3cab428 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: - name: Pin to lowest versions if: matrix.versions == 'minimal' run: | - sed -i -E 's/#min //; s/\b >=([0-9])/ ==\1/' pyproject.toml + sed -i -E -e '/properdocs >=/d' -e 's/#min //; s/\b >=([0-9])/ ==\1/' pyproject.toml - name: Install Hatch run: | pip install hatch