Skip to content

python32.3

 1 min A bulk shebang rewrite left gprof2html.py asking for an interpreter that never existed. Arch was patching it with sed, so I sent the report upstream.
Published

Apr 20, 2013

In April 2013 I noticed that Arch Linux’s Python package was repairing a shebang line with sed at build time, without the customary link to an upstream report. The line was the first line of Tools/scripts/gprof2html.py:

#! /usr/bin/env python32.3

There is no python32.3. I had not run into it myself; nobody runs gprof2html by accident. But the repair was living in a package script, where it would be applied again on every release until somebody told upstream. So I told upstream, with a link to the line and one sentence: it should be self-explanatory.

The line had a history. Guido van Rossum added the script in 2002 with #! /usr/bin/env python2.3, when 2.3 was the version in development. In 2010 a bulk conversion rewrote the shebang lines of a couple of hundred files from python to python3, and inside python2.3 that substitution produced python32.3. In 2012 the script was made to run under Python 3, a change that did not look at the first line. The 2.7 branch still carried the original python2.3, by then just as wrong.

Ned Deily fixed it the same day on the 3.3 and default branches, and on 2.7 the line became plain python. Then: “Thanks for the report!”

The downstream fix was working and would have kept working. The report took a few minutes and removed the reason for it.