Roundup Tracker - Issues

Message6531

Author rouilj
Recipients rouilj
Date 2019-06-07.01:38:43
Message-id <1559871524.04.0.946577350176.issue2551046@roundup.psfhosted.org>
In-reply-to
Hi Joseph,

Sorry to bother you but I bisected the code and it looks like the 
commit rev5671:f60c44563c3a makes image file uploads and large (967 
works, 1303 fails) messages fail when running under python2:

====
changeset:   5671:f60c44563c3a
user:        Joseph Myers <jsm@polyomino.org.uk>
date:        Sun Mar 24 21:49:17 2019 +0000
files:       roundup/cgi/client.py
description:
Adjust make_file override to use binary files only when needed.

Previous version would produce errors for large text fields in form
submissions with Python 3, so inherit from the default make_file
implementation and only force binary files in the specific case
(self.length >= 0) identified in <https://bugs.python.org/issue27777>.
====

So it looks like this error is now happening under python2 post commit.

Running python2 demo.py nuke and attaching a file or adding a largish 
message while creating a new issue (or adding to an existing issue) 
causes the following crash:

EXCEPTION AT Fri Jun  7 01:26:07 2019
Traceback (most recent call last):
  File "roundup.hg/roundup/scripts/roundup_server.py", line 222, in 
run_cgi
    self.inner_run_cgi()
  File "roundup.hg/roundup/scripts/roundup_server.py", line 459, in 
inner_run_cgi
    tracker.Client(tracker, self, env).main()
  File "roundup.hg/roundup/cgi/client.py", line 395, in __init__
    self.form = BinaryFieldStorage(fp=request.rfile, environ=env)
  File "/usr/lib/python2.7/cgi.py", line 507, in __init__
    self.read_multi(environ, keep_blank_values, strict_parsing)
  File "/usr/lib/python2.7/cgi.py", line 636, in read_multi
    environ, keep_blank_values, strict_parsing)
  File "/usr/lib/python2.7/cgi.py", line 509, in __init__
    self.read_single()
  File "/usr/lib/python2.7/cgi.py", line 646, in read_single
    self.read_lines()
  File "/usr/lib/python2.7/cgi.py", line 668, in read_lines
    self.read_lines_to_outerboundary()
  File "/usr/lib/python2.7/cgi.py", line 728, in 
read_lines_to_outerboundary
    self.__write(odelim + line)
  File "/usr/lib/python2.7/cgi.py", line 675, in __write
    self.file = self.make_file('')
  File "roundup.hg/roundup/cgi/client.py", line 246, in make_file
    return super().make_file()
TypeError: super() takes at least 1 argument (0 given)

Not sure what to do here. Should it be super().make_file(self)?

At the very least it looks like we have no test for this code path.

Ideas?
History
Date User Action Args
2019-06-07 01:38:44rouiljsetrecipients: + rouilj
2019-06-07 01:38:44rouiljsetmessageid: <1559871524.04.0.946577350176.issue2551046@roundup.psfhosted.org>
2019-06-07 01:38:43rouiljlinkissue2551046 messages
2019-06-07 01:38:43rouiljcreate