Skip to content

Commit c597102

Browse files
committed
Drop the fallback
1 parent bb6f408 commit c597102

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Next version
1010
hopefully improves compatibility on macOS.
1111
- Introduced a ``--no-parallel`` argument to ``process_imagefields``.
1212
- Added Django 5.2a1.
13+
- Dropped the Python 2 fallback from the code. We don't support Python 2
14+
anymore.
1315

1416

1517
0.21 (2024-12-09)

imagefield/fields.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import io
33
import logging
44
import os
5-
import re
65
import warnings
76
from collections import namedtuple
87
from random import randint
@@ -186,7 +185,6 @@ def _process_context(self, processors):
186185
spec = (
187186
"|".join(str(p) for p in context.processors) + "|" + str(context.ppoi)
188187
)
189-
spec = re.sub(r"\bu('|\")", "\\1", spec) # Strip u"" prefixes on PY2
190188
p2 = hashdigest(spec)
191189
context.name = f"{base.path}/{base.basename}{p2[:12]}{context.extension}"
192190
context.seal()

0 commit comments

Comments
 (0)