cleanup: be consistent about importing StringIO #1917

Open
opened 2013-02-11 00:29:30 +00:00 by davidsarah · 2 comments
davidsarah commented 2013-02-11 00:29:30 +00:00
Owner
$ 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
``` $ 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 ```
tahoe-lafs added the
code
minor
defect
1.9.2
labels 2013-02-11 00:29:30 +00:00
tahoe-lafs added this to the undecided milestone 2013-02-11 00:29:30 +00:00

Maybe we should avoid using cStringIO everywhere since StringIO is more portable (e.g. more likely to work on PyPy?).

Maybe we should avoid using cStringIO everywhere since StringIO is more portable (e.g. more likely to work on PyPy?).
davidsarah commented 2013-02-12 03:07:12 +00:00
Author
Owner
[PyPy supports cStringIO.](http://pypy.org/compat.html)
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#1917
No description provided.