summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2023-03-06 21:13:51 +0000
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2023-03-07 21:48:38 +0000
commit7fd2e7450b8b9bc4e9a5b04ea43b558bedd03517 (patch)
tree3da47c942f2f51a136ab3cc708dd7799ffa9d304
parent18347fb2cbe534b6d82e0b6972a1d1c7db593892 (diff)
downloadpython-setuptools-git-7fd2e7450b8b9bc4e9a5b04ea43b558bedd03517.tar.gz
Use new warnings in setuptools/package_index.py
-rw-r--r--setuptools/package_index.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index bec41835..d6ba207a 100644
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -9,7 +9,6 @@ import socket
import base64
import hashlib
import itertools
-import warnings
import configparser
import html
import http.client
@@ -40,6 +39,7 @@ from distutils.errors import DistutilsError
from fnmatch import translate
from setuptools.wheel import Wheel
from setuptools.extern.more_itertools import unique_everseen
+from setuptools.warnings import SetuptoolsDeprecationWarning
EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$')
@@ -868,7 +868,11 @@ class PackageIndex(Environment):
raise DistutilsError("Unexpected HTML page found at " + url)
def _download_svn(self, url, filename):
- warnings.warn("SVN download support is deprecated", UserWarning)
+ SetuptoolsDeprecationWarning.emit(
+ "Invalid config",
+ f"SVN download support is deprecated: {url}",
+ due_date=(2023, 10, 23), # Initially introduced in 23 Sept 2018
+ )
url = url.split('#', 1)[0] # remove any fragment for svn's sake
creds = ''
if url.lower().startswith('svn:') and '@' in url: