From c8e0a9aa38b308798110a06f307379c3ead41dba Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Thu, 19 Mar 2026 21:33:13 +0100 Subject: [PATCH 1/2] Change the environment variable that is used to suppress the nag message The commit https://github.com/squidfunk/mkdocs-material/commit/51d9b76636431814df924bcda27485b16023978b made this environment ununsable - it's always set and there's no reasonable way to detect whether it was actually set on the command line. Users will unfortunately run into a new nuisance even if they previously set our variable. --- properdocs/replacement_warning.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/properdocs/replacement_warning.py b/properdocs/replacement_warning.py index 30a42236..9f2731b9 100644 --- a/properdocs/replacement_warning.py +++ b/properdocs/replacement_warning.py @@ -44,14 +44,10 @@ def setup(): return if is_running_from_mkdocs(): - # Allow to silence this warning with NO_MKDOCS_2_WARNING=true - if os.environ.get('NO_MKDOCS_2_WARNING', '').lower() != 'true': + # Allow to silence this warning with DISABLE_MKDOCS_2_WARNING=true + if os.environ.get('DISABLE_MKDOCS_2_WARNING', '').lower() != 'true': print(colorize_message(_warning_message), file=sys.stderr) # noqa: T201 - # Prevent warnings from the theme that already uses this environment variable. - # That warning does not apply to ProperDocs. - os.environ['NO_MKDOCS_2_WARNING'] = 'true' - _warning_message = '' # Disable all activations other than the first one. From 545eca22ea6ac692edf902345f988beb777f4596 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Fri, 20 Mar 2026 08:17:44 +0100 Subject: [PATCH 2/2] Add a direct mention how to suppress the warning Now that we've had to change this variable once, it's nice to give users a direct way to get rid of this. --- properdocs/replacement_warning.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/properdocs/replacement_warning.py b/properdocs/replacement_warning.py index 9f2731b9..609e691e 100644 --- a/properdocs/replacement_warning.py +++ b/properdocs/replacement_warning.py @@ -31,6 +31,8 @@ To avoid these risks, switch to *ProperDocs*, a continuation of MkDocs 1.x and a drop-in replacement that supports your current MkDocs setup. Simply install it with `pip install properdocs` and build your site with `properdocs build` instead of the MkDocs equivalents. +Alternatively, to just skip this warning in the future, you can set the environment variable `DISABLE_MKDOCS_2_WARNING=true`. + For more info visit https://github.com/ProperDocs/properdocs/discussions/33 and https://properdocs.org/ (This warning was initiated by one of the plugins that you depend on.)