diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f4c774ef..937fd7b5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,14 +6,14 @@ pool: strategy: matrix: - Python38: - python.version: '3.8' Python39: python.version: '3.9' Python310: python.version: '3.10' Python311: python.version: '3.11' + Python312: + python.version: '3.12' steps: - task: UsePythonVersion@0 diff --git a/tagreader/web_handlers.py b/tagreader/web_handlers.py index 2f8010f6..aea8c01e 100644 --- a/tagreader/web_handlers.py +++ b/tagreader/web_handlers.py @@ -42,12 +42,7 @@ def patched_hashlib_new(name, data=b"", usedforsecurity=True): if name.lower() == "md4": return MD4(data) else: - # Try / Catch easier than detecting python version - try: - return hashlib_new_method(name, data=data, usedforsecurity=usedforsecurity) - except TypeError: - # Required for python 3.8 - return hashlib_new_method(name, data=data) + return hashlib_new_method(name, data=data, usedforsecurity=usedforsecurity) # Monkey-patch md4 in hashlib.new due to missing support for md4 in later releases of Python: