From e605219106239b7bd57f3d5f4d91b082447b22c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85smund=20V=C3=A5ge=20Fannemel?= <34712686+asmfstatoil@users.noreply.github.com> Date: Mon, 25 Aug 2025 12:59:44 +0200 Subject: [PATCH 1/2] refact: remove python 3.8 specific code --- tagreader/web_handlers.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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: From 470d59ea8ce230e2a7d12cdbf7b132a96f484e80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85smund=20V=C3=A5ge=20Fannemel?= <34712686+asmfstatoil@users.noreply.github.com> Date: Mon, 25 Aug 2025 13:00:42 +0200 Subject: [PATCH 2/2] chore: replace 3.8 with 3.12 in pipeline matrix --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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