From 6c21d2f616bd77fa2a319eb5b9fb09866987999a Mon Sep 17 00:00:00 2001 From: Tomas Roun Date: Sun, 18 Aug 2024 13:14:13 +0200 Subject: [PATCH] Fix for python3.9 --- babel/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/babel/util.py b/babel/util.py index 916501c29..bff9bd6dd 100644 --- a/babel/util.py +++ b/babel/util.py @@ -218,8 +218,9 @@ def _split(self, text): # There are no file names which contain spaces, fallback to the default implementation return super()._split(text) + super_ = super() # Python 3.9 fix, super() does not work in list comprehension chunks = re.split(self._enclosed_filename_re, text) - chunks = [[c] if c.startswith(enclosed_filename_start) else super()._split(c) for c in chunks] + chunks = [[c] if c.startswith(enclosed_filename_start) else super_._split(c) for c in chunks] chunks = [c for c in chain.from_iterable(chunks) if c] return chunks