Opened at 2013-02-11T00:29:30Z
Last modified at 2013-02-12T03:07:12Z
#1917 new defect
cleanup: be consistent about importing StringIO
Reported by: | davidsarah | Owned by: | davidsarah |
---|---|---|---|
Priority: | minor | Milestone: | undecided |
Component: | code | Version: | 1.9.2 |
Keywords: | cleanup StringIO | Cc: | |
Launchpad Bug: |
Description
$ grep -Rn --include='*.py' 'import StringIO' src src/allmydata/immutable/literal.py:1:from cStringIO import StringIO src/allmydata/immutable/upload.py:28:from cStringIO import StringIO src/allmydata/scripts/common_http.py:3:from cStringIO import StringIO src/allmydata/scripts/tahoe_put.py:3:from cStringIO import StringIO src/allmydata/scripts/tahoe_cp.py:5:from cStringIO import StringIO src/allmydata/scripts/runner.py:3:from cStringIO import StringIO src/allmydata/storage/backends/cloud/immutable.py:4:from cStringIO import StringIO src/allmydata/mutable/publish.py:4:from StringIO import StringIO src/allmydata/test/test_util.py:5:from StringIO import StringIO src/allmydata/test/test_deepcheck.py:3:from cStringIO import StringIO src/allmydata/test/test_web.py:3:from StringIO import StringIO src/allmydata/test/test_mutable.py:2:from cStringIO import StringIO src/allmydata/test/test_upload.py:4:from cStringIO import StringIO src/allmydata/test/check_memory.py:2:from cStringIO import StringIO src/allmydata/test/test_runner.py:7:from cStringIO import StringIO src/allmydata/test/test_system.py:3:from cStringIO import StringIO src/allmydata/test/test_cli.py:4:from cStringIO import StringIO src/allmydata/test/test_backupdb.py:3:from StringIO import StringIO
Notice that four of these import from StringIO rather than cStringIO:
$ grep -Rn --include='*.py' 'from StringIO' src src/allmydata/mutable/publish.py:4:from StringIO import StringIO src/allmydata/test/test_util.py:5:from StringIO import StringIO src/allmydata/test/test_web.py:3:from StringIO import StringIO src/allmydata/test/test_backupdb.py:3:from StringIO import StringIO
Change History (2)
comment:1 Changed at 2013-02-11T22:39:49Z by zooko
Version 0, edited at 2013-02-11T22:39:49Z
by zooko
(next)
comment:2 Changed at 2013-02-12T03:07:12Z by davidsarah
Note: See
TracTickets for help on using
tickets.
Maybe we should avoid using cStringIO everywhere since !StringIO is more portable (e.g. more likely to work on PyPy?).