File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
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
17
from ._vendor .packaging .utils import canonicalize_name , canonicalize_version
17
18
18
- try :
19
- import warnings
20
- except ImportError :
21
- warnings = None
22
-
23
19
from ._log import log
24
20
from .debug import DEBUG
25
21
from .errors import (
@@ -249,10 +245,7 @@ def __init__(self, attrs=None): # noqa: C901
249
245
attrs ['license' ] = attrs ['licence' ]
250
246
del attrs ['licence' ]
251
247
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 " )
248
+ warnings .warn (msg )
256
249
257
250
# Now work on the rest of the attributes. Any attribute that's
258
251
# not already defined is invalid!
You can’t perform that action at this time.
0 commit comments