summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/hashlib.py4
-rw-r--r--Lib/test/test_hashlib.py2
-rw-r--r--Misc/NEWS3
3 files changed, 6 insertions, 3 deletions
diff --git a/Lib/hashlib.py b/Lib/hashlib.py
index 9d860c4..0d7e325 100644
--- a/Lib/hashlib.py
+++ b/Lib/hashlib.py
@@ -56,8 +56,8 @@ More condensed:
# always available algorithm is added.
__always_supported = ('md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512')
-algorithms_guaranteed = __always_supported
-algorithms_available = frozenset(__always_supported)
+algorithms_guaranteed = set(__always_supported)
+algorithms_available = set(__always_supported)
__all__ = __always_supported + ('new', 'algorithms_guaranteed',
'algorithms_available')
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py
index 1f5a8be..fe316fd 100644
--- a/Lib/test/test_hashlib.py
+++ b/Lib/test/test_hashlib.py
@@ -103,7 +103,7 @@ class HashLibTestCase(unittest.TestCase):
def test_algorithms_guaranteed(self):
self.assertEqual(hashlib.algorithms_guaranteed,
- tuple(_algo for _algo in self.supported_hash_names
+ set(_algo for _algo in self.supported_hash_names
if _algo.islower()))
def test_algorithms_available(self):
diff --git a/Misc/NEWS b/Misc/NEWS
index 54a647a..036e562 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -16,6 +16,9 @@ Core and Builtins
Library
-------
+- Have hashlib.algorithms_available and hashlib.algorithms_guaranteed both
+ return sets instead of one returning a tuple and the other a frozenset.
+
- Issue #10987: Fix the recursion limit handling in the _pickle module.
- Issue #10983: Fix several bugs making tunnel requests in http.client.