# HG changeset patch # User John Rouillard # Date 1775453259 14400 # Node ID 98fb176224fc73f09f5a4d2797dbcb6d284034fa # Parent 92aecf6c5c09de3f28789b08de0eeb919cd53878 bug(perf): move import tempfile to top of file diff -r 92aecf6c5c09 -r 98fb176224fc roundup/cgi/client.py --- a/roundup/cgi/client.py Sun Apr 05 17:49:21 2026 -0400 +++ b/roundup/cgi/client.py Mon Apr 06 01:27:39 2026 -0400 @@ -14,6 +14,7 @@ import socket import stat import sys +import tempfile import time from email.mime.multipart import MIMEMultipart from traceback import format_exc @@ -279,7 +280,6 @@ ''' def make_file(self, mode=None): ''' work around https://bugs.python.org/issue27777 ''' - import tempfile if self.length >= 0: return tempfile.TemporaryFile("wb+") return super(BinaryFieldStorage, self).make_file()