diff --git a/doc/conf.py b/doc/conf.py index 1fec5f632d4e..fba30148a133 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -134,7 +134,6 @@ def _parse_skip_subdirs_file(): 'sphinxext.mock_gui_toolkits', 'sphinxext.rcparams', 'sphinxext.redirect_from', - 'sphinxext.skip_deprecated', 'sphinx_copybutton', 'sphinx_design', 'sphinx_tags', diff --git a/doc/sphinxext/skip_deprecated.py b/doc/sphinxext/skip_deprecated.py deleted file mode 100644 index d4ef795e9ab1..000000000000 --- a/doc/sphinxext/skip_deprecated.py +++ /dev/null @@ -1,17 +0,0 @@ -# Skip deprecated members - - -def skip_deprecated(app, what, name, obj, skip, options): - if skip: - return skip - skipped = {"matplotlib.colors": ["ColorConverter", "hex2color", "rgb2hex"]} - skip_list = skipped.get(getattr(obj, "__module__", None)) - if skip_list is not None: - return getattr(obj, "__name__", None) in skip_list - - -def setup(app): - app.connect('autodoc-skip-member', skip_deprecated) - - metadata = {'parallel_read_safe': True, 'parallel_write_safe': True} - return metadata diff --git a/lib/matplotlib/colors.py b/lib/matplotlib/colors.py index 23db1031ffef..b04b8c6ca7a3 100644 --- a/lib/matplotlib/colors.py +++ b/lib/matplotlib/colors.py @@ -579,10 +579,10 @@ def to_hex(c, keep_alpha=False): ### Backwards-compatible color-conversion API -cnames = CSS4_COLORS -hexColorPattern = re.compile(r"\A#[a-fA-F0-9]{6}\Z") -rgb2hex = to_hex -hex2color = to_rgb +cnames = CSS4_COLORS #: :meta private: +hexColorPattern = re.compile(r"\A#[a-fA-F0-9]{6}\Z") #: :meta private: +rgb2hex = to_hex #: :meta private: +hex2color = to_rgb #: :meta private: class ColorConverter: @@ -590,6 +590,8 @@ class ColorConverter: A class only kept for backwards compatibility. Its functionality is entirely provided by module-level functions. + + :meta private: """ colors = _colors_full_map cache = _colors_full_map.cache