diff options
author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2023-03-06 19:56:23 +0000 |
---|---|---|
committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2023-03-06 23:39:33 +0000 |
commit | 3fcee5f4533e53b4424de4413420272e35b3797a (patch) | |
tree | f7d9ae871f436a711d9b1945a2ce9eb0488a929b | |
parent | 62be049045fad723cd6f4834ea63e47aafc7a716 (diff) | |
download | python-setuptools-git-3fcee5f4533e53b4424de4413420272e35b3797a.tar.gz |
Use new warnings in setuptools/__init__.py
-rw-r--r-- | setuptools/__init__.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/setuptools/__init__.py b/setuptools/__init__.py index cf233a32..6dceab5b 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -3,7 +3,6 @@ import functools import os import re -import warnings import _distutils_hack.override # noqa: F401 @@ -249,14 +248,17 @@ def findall(dir=os.curdir): @functools.wraps(_convert_path) def convert_path(pathname): - from inspect import cleandoc + SetuptoolsDeprecationWarning.emit( + "Access to implementation detail", + """ + The function `convert_path` is not provided by setuptools itself, + and therefore not part of the public API. - msg = """ - The function `convert_path` is considered internal and not part of the public API. - Its direct usage by 3rd-party packages is considered deprecated and the function - may be removed in the future. - """ - warnings.warn(cleandoc(msg), SetuptoolsDeprecationWarning) + Its direct usage by 3rd-party packages is considered improper and the function + may be removed in the future. + """, + due_date=(2023, 11, 25) # initial deprecation 2022-03-25, see #3201 + ) return _convert_path(pathname) |