File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 7
7
import subprocess
8
8
from copy import deepcopy
9
9
import os , sys , importlib .util
10
+ from packaging .version import Version
10
11
11
12
from termcolor import colored
13
+ import mkdocs
12
14
13
15
# ------------------------------------------
14
16
# Trace and debug
17
19
TRACE_PREFIX = 'macros'
18
20
19
21
import logging
20
- from mkdocs .utils import warning_filter
21
22
LOG = logging .getLogger ("mkdocs.plugins." + __name__ )
22
- LOG .addFilter (warning_filter )
23
+
24
+ MKDOCS_LOG_VERSION = '1.2'
25
+ if Version (mkdocs .__version__ ) < Version (MKDOCS_LOG_VERSION ):
26
+ # filter doesn't do anything since that version
27
+ from mkdocs .utils import warning_filter
28
+ LOG .addFilter (warning_filter )
23
29
24
30
25
31
def format_trace (* args ):
Original file line number Diff line number Diff line change 12
12
# Initialization
13
13
# --------------------
14
14
15
- VERSION_NUMBER = '1.0.3 '
15
+ VERSION_NUMBER = '1.0.4 '
16
16
17
17
# required if you want to run document/test
18
18
# pip install 'mkdocs-macros-plugin[test]'
You can’t perform that action at this time.
0 commit comments