summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2023-04-20 17:20:40 +0100
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2023-05-03 14:09:16 +0100
commit67652aa0e1b6c0811985bbfe93ec46e25ab1deeb (patch)
treed2ecfe973cce2b53f47a1a9cc27f8a346ce63c3d
parent71635355281283b85784539011baea6d679df29e (diff)
downloadpython-setuptools-git-67652aa0e1b6c0811985bbfe93ec46e25ab1deeb.tar.gz
Fix merge problems
-rw-r--r--setuptools/_core_metadata.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/setuptools/_core_metadata.py b/setuptools/_core_metadata.py
index c164fed3..55856ff9 100644
--- a/setuptools/_core_metadata.py
+++ b/setuptools/_core_metadata.py
@@ -11,7 +11,6 @@ from typing import Optional, List
from distutils.util import rfc822_escape
from . import _normalization
-from ._deprecation_warning import SetuptoolsDeprecationWarning
from .extern.packaging.markers import Marker
from .extern.packaging.requirements import Requirement
from .extern.packaging.version import Version
@@ -227,14 +226,15 @@ def _include_extra(req: str, extra: str, condition: str) -> Requirement:
def _write_provides_extra(file, processed_extras, safe, unsafe):
previous = processed_extras.get(safe)
if previous == unsafe:
- msg = f"""Ambiguity during "extra" normalization for dependencies.\n\n
- ********************************************************************
- {previous!r} and {unsafe!r} normalize to the same value:\n
- {safe!r}\n
- In future versions, setuptools might halt the build process.
- ********************************************************************\n\n
- """
- warnings.warn(msg, SetuptoolsDeprecationWarning, stacklevel=3)
+ SetuptoolsDeprecationWarning.emit(
+ 'Ambiguity during "extra" normalization for dependencies.',
+ f"""
+ {previous!r} and {unsafe!r} normalize to the same value:\n
+ {safe!r}\n
+ In future versions, setuptools might halt the build process.
+ """,
+ see_url="https://peps.python.org/pep-0685/",
+ )
else:
processed_extras[safe] = unsafe
file.write(f"Provides-Extra: {safe}\n")