Path: blob/main/test/lib/python3.9/site-packages/setuptools/config/__init__.py
4799 views
"""For backward compatibility, expose main functions from1``setuptools.config.setupcfg``2"""3import warnings4from functools import wraps5from textwrap import dedent6from typing import Callable, TypeVar, cast78from .._deprecation_warning import SetuptoolsDeprecationWarning9from . import setupcfg1011Fn = TypeVar("Fn", bound=Callable)1213__all__ = ('parse_configuration', 'read_configuration')141516def _deprecation_notice(fn: Fn) -> Fn:17@wraps(fn)18def _wrapper(*args, **kwargs):19msg = f"""\20As setuptools moves its configuration towards `pyproject.toml`,21`{__name__}.{fn.__name__}` became deprecated.2223For the time being, you can use the `{setupcfg.__name__}` module24to access a backward compatible API, but this module is provisional25and might be removed in the future.26"""27warnings.warn(dedent(msg), SetuptoolsDeprecationWarning)28return fn(*args, **kwargs)2930return cast(Fn, _wrapper)313233read_configuration = _deprecation_notice(setupcfg.read_configuration)34parse_configuration = _deprecation_notice(setupcfg.parse_configuration)353637