From a74b355ca666dc850557c99bebce65df4abc06a1 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 6 Mar 2023 20:52:55 +0000 Subject: Use new warnings in setuptools/command/upload_docs.py --- setuptools/command/upload_docs.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 63eb28c7..dddde609 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -16,10 +16,9 @@ import itertools import functools import http.client import urllib.parse -import warnings from .._importlib import metadata -from .. import SetuptoolsDeprecationWarning +from ..warnings import SetuptoolsDeprecationWarning from .upload import upload @@ -91,10 +90,14 @@ class upload_docs(upload): zip_file.close() def run(self): - warnings.warn( - "upload_docs is deprecated and will be removed in a future " - "version. Use tools like httpie or curl instead.", - SetuptoolsDeprecationWarning, + SetuptoolsDeprecationWarning.emit( + "Deprecated command", + """ + upload_docs is deprecated and will be removed in a future version. + Instead, use tools like devpi and Read the Docs; or lower level tools like + httpie and curl to interact directly with your hosting service API. + """, + due_date=(2023, 9, 27), # warning introduced in 27 Jul 2022 ) # Run sub commands -- cgit v1.2.1