diff --git a/docs/conf.py b/docs/conf.py index 6f1ccba..f2225c5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -67,7 +67,7 @@ # Monkey patch to disable nonlocal image warning import sphinx -if hasattr(sphinx, 'environment'): +try: original_warn_mode = sphinx.environment.BuildEnvironment.warn_node def allow_nonlocal_image_warn_node(self, msg, *args, **kwargs): @@ -76,6 +76,8 @@ def allow_nonlocal_image_warn_node(self, msg, *args, **kwargs): sphinx.environment.BuildEnvironment.warn_node = \ allow_nonlocal_image_warn_node +except AttributeError: + pass suppress_warnings = [ 'image.nonlocal_uri', diff --git a/tox.ini b/tox.ini index 33b165c..b588f0a 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,7 @@ deps = flake8 commands = flake8 --ignore=W391 python_utils {posargs} [testenv:docs] -basepython = python2.7 +basepython = python3 whitelist_externals = rm cd