From c597102bcb74762ceb5c358433e3f666a87738fb Mon Sep 17 00:00:00 2001 From: Matthias Kestenholz Date: Wed, 22 Jan 2025 09:00:45 +0100 Subject: [PATCH] Drop the fallback --- CHANGELOG.rst | 2 ++ imagefield/fields.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bef9fb7..ee4815e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,8 @@ Next version hopefully improves compatibility on macOS. - Introduced a ``--no-parallel`` argument to ``process_imagefields``. - Added Django 5.2a1. +- Dropped the Python 2 fallback from the code. We don't support Python 2 + anymore. 0.21 (2024-12-09) diff --git a/imagefield/fields.py b/imagefield/fields.py index 108b6d0..480a98c 100644 --- a/imagefield/fields.py +++ b/imagefield/fields.py @@ -2,7 +2,6 @@ import io import logging import os -import re import warnings from collections import namedtuple from random import randint @@ -186,7 +185,6 @@ def _process_context(self, processors): spec = ( "|".join(str(p) for p in context.processors) + "|" + str(context.ppoi) ) - spec = re.sub(r"\bu('|\")", "\\1", spec) # Strip u"" prefixes on PY2 p2 = hashdigest(spec) context.name = f"{base.path}/{base.basename}{p2[:12]}{context.extension}" context.seal()