Skip to content

Commit

Permalink
refactor: Add user warning about mkdocstrings extra
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Feb 3, 2022
1 parent cd7009c commit 71ea2d8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/mkdocstrings/handlers/python/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""This module implements a handler for the Python language."""

import posixpath
import warnings
from typing import Any, BinaryIO, Iterator, List, Optional, Tuple

from mkdocstrings.handlers.base import BaseHandler
Expand All @@ -9,6 +10,16 @@
from mkdocstrings.inventory import Inventory
from mkdocstrings.loggers import get_logger

warnings.warn(
"The 'python-legacy' extra of mkdocstrings will become mandatory in the next release. "
"We have no way to detect if you already specify it, so if you do, please ignore "
"this warning. You can globally disable it with the PYTHONWARNINGS environment variable: "
"PYTHONWARNINGS=ignore::UserWarning:mkdocstrings.handlers.python",
UserWarning,
)

# TODO: add a deprecation warning once the new handler handles 95% of use-cases

log = get_logger(__name__)


Expand Down

0 comments on commit 71ea2d8

Please sign in to comment.