Fix Python version compatibility tests for vermin 0.10.0 (#14632)
This commit is contained in:
parent
0e86961b84
commit
eb79c82cba
@ -23,7 +23,7 @@
|
|||||||
from spack.version import VersionList
|
from spack.version import VersionList
|
||||||
|
|
||||||
if sys.version_info > (3, 1):
|
if sys.version_info > (3, 1):
|
||||||
from html import escape
|
from html import escape # novm
|
||||||
else:
|
else:
|
||||||
from cgi import escape
|
from cgi import escape
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# Python 2 had these in the HTMLParser package.
|
# Python 2 had these in the HTMLParser package.
|
||||||
from HTMLParser import HTMLParser, HTMLParseError
|
from HTMLParser import HTMLParser, HTMLParseError # novm
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# In Python 3, things moved to html.parser
|
# In Python 3, things moved to html.parser
|
||||||
from html.parser import HTMLParser
|
from html.parser import HTMLParser
|
||||||
@ -80,7 +80,7 @@ class NonDaemonPool(multiprocessing.pool.Pool):
|
|||||||
Process = NonDaemonProcess
|
Process = NonDaemonProcess
|
||||||
else:
|
else:
|
||||||
|
|
||||||
class NonDaemonContext(type(multiprocessing.get_context())):
|
class NonDaemonContext(type(multiprocessing.get_context())): # novm
|
||||||
Process = NonDaemonProcess
|
Process = NonDaemonProcess
|
||||||
|
|
||||||
class NonDaemonPool(multiprocessing.pool.Pool):
|
class NonDaemonPool(multiprocessing.pool.Pool):
|
||||||
@ -128,7 +128,7 @@ def read_from_url(url, accept_content_type=None):
|
|||||||
warn_no_ssl_cert_checking()
|
warn_no_ssl_cert_checking()
|
||||||
else:
|
else:
|
||||||
# User wants SSL verification, and it *can* be provided.
|
# User wants SSL verification, and it *can* be provided.
|
||||||
context = ssl.create_default_context()
|
context = ssl.create_default_context() # novm
|
||||||
else:
|
else:
|
||||||
# User has explicitly indicated that they do not want SSL
|
# User has explicitly indicated that they do not want SSL
|
||||||
# verification.
|
# verification.
|
||||||
|
Loading…
Reference in New Issue
Block a user