File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change 10
10
import pathlib
11
11
import re
12
12
import sys
13
+ import warnings
13
14
from collections .abc import Iterable
14
15
from email import message_from_file
15
16
16
- from ._vendor .packaging .utils import canonicalize_name , canonicalize_version
17
-
18
- try :
19
- import warnings
20
- except ImportError :
21
- warnings = None
22
-
23
17
from ._log import log
18
+ from ._vendor .packaging .utils import canonicalize_name , canonicalize_version
24
19
from .debug import DEBUG
25
20
from .errors import (
26
21
DistutilsArgError ,
@@ -249,10 +244,7 @@ def __init__(self, attrs=None): # noqa: C901
249
244
attrs ['license' ] = attrs ['licence' ]
250
245
del attrs ['licence' ]
251
246
msg = "'licence' distribution option is deprecated; use 'license'"
252
- if warnings is not None :
253
- warnings .warn (msg )
254
- else :
255
- sys .stderr .write (msg + "\n " )
247
+ warnings .warn (msg )
256
248
257
249
# Now work on the rest of the attributes. Any attribute that's
258
250
# not already defined is invalid!
You can’t perform that action at this time.
0 commit comments