From 02ea98bc2ff972f7705bfffb24843494086d011f Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Tue, 23 Jun 2020 11:14:27 +0200 Subject: [PATCH] Refs #31692 -- Fixed compilemessages crash on Windows with Python < 3.8. Regression in ed0a040773f5bad187170ab4e3b094fe3108d702. See https://bugs.python.org/issue31961 --- django/core/management/commands/compilemessages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django/core/management/commands/compilemessages.py b/django/core/management/commands/compilemessages.py index 308fa8831b..cad24f8140 100644 --- a/django/core/management/commands/compilemessages.py +++ b/django/core/management/commands/compilemessages.py @@ -154,7 +154,9 @@ class Command(BaseCommand): self.has_errors = True return - args = [self.program, *self.program_options, '-o', mo_path, po_path] + # PY37: Remove str() when dropping support for PY37. + # https://bugs.python.org/issue31961 + args = [self.program, *self.program_options, '-o', str(mo_path), str(po_path)] futures.append(executor.submit(popen_wrapper, args)) for future in concurrent.futures.as_completed(futures):