[New-bugs-announce] [issue16765] Superfluous import in cgi module

Michiel Holtkamp report at bugs.python.org
Mon Dec 24 13:53:37 CET 2012


New submission from Michiel Holtkamp:

The standard module cgi.py from Python 2.x imports urllib, but urllib is not used. This causes a little bit of extra memory usage and a small increase in load time. It's not much, but it was enough for me to notice when I was profiling my program.

I think the urllib import can be safely removed in 2.6 and 2.7. I've tested without the import and it works as expected in my case.

In Python 3.2 (other 3.x versions not checked), urllib.parse is imported but here it is actually used, so no problem there.

PS. first time submitting a bug here, so if I'm doing something wrong, please be gentle :)

----------
components: Library (Lib)
messages: 178055
nosy: mjholtkamp
priority: normal
severity: normal
status: open
title: Superfluous import in cgi module
type: performance
versions: Python 2.6, Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16765>
_______________________________________


More information about the New-bugs-announce mailing list