mirror of
https://github.com/python/cpython.git
synced 2025-10-14 02:43:49 +00:00
Issue #14693: Under non-Windows platforms, hashlib's fallback modules are always compiled, even if OpenSSL is present at build time.
This commit is contained in:
parent
26fd8feb5e
commit
019ff19c39
3 changed files with 17 additions and 15 deletions
|
@ -9,6 +9,7 @@
|
|||
import array
|
||||
import hashlib
|
||||
import itertools
|
||||
import os
|
||||
import sys
|
||||
try:
|
||||
import threading
|
||||
|
@ -37,7 +38,8 @@ class HashLibTestCase(unittest.TestCase):
|
|||
'sha224', 'SHA224', 'sha256', 'SHA256',
|
||||
'sha384', 'SHA384', 'sha512', 'SHA512' )
|
||||
|
||||
_warn_on_extension_import = COMPILED_WITH_PYDEBUG
|
||||
# Issue #14693: fallback modules are always compiled under POSIX
|
||||
_warn_on_extension_import = os.name == 'posix' or COMPILED_WITH_PYDEBUG
|
||||
|
||||
def _conditional_import_module(self, module_name):
|
||||
"""Import a module and return a reference to it or None on failure."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue