summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2023-03-06 20:59:09 +0000
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2023-03-07 21:06:29 +0000
commit27cfcd126e05b1e5c8413aa57d06df81cebfdeb5 (patch)
treece7b7dc5f0ee20b5268f045eb54e28960f5d6af2
parentb776e31badf591abab9cc7110383e830fe40ba5d (diff)
downloadpython-setuptools-git-27cfcd126e05b1e5c8413aa57d06df81cebfdeb5.tar.gz
Use new warnings in setuptools/config/expand.py
-rw-r--r--setuptools/config/expand.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/setuptools/config/expand.py b/setuptools/config/expand.py
index c8db2c4b..30988843 100644
--- a/setuptools/config/expand.py
+++ b/setuptools/config/expand.py
@@ -23,7 +23,6 @@ import io
import os
import pathlib
import sys
-import warnings
from glob import iglob
from configparser import ConfigParser
from importlib.machinery import ModuleSpec
@@ -48,6 +47,7 @@ from types import ModuleType
from distutils.errors import DistutilsOptionError
from .._path import same_path as _same_path
+from ..warnings import SetuptoolsWarning
if TYPE_CHECKING:
from setuptools.dist import Distribution # noqa
@@ -141,7 +141,7 @@ def _filter_existing_files(filepaths: Iterable[_Path]) -> Iterator[_Path]:
if os.path.isfile(path):
yield path
else:
- warnings.warn(f"File {path!r} cannot be found")
+ SetuptoolsWarning.emit(f"File {path!r} cannot be found")
def _read_file(filepath: Union[bytes, _Path]) -> str: