mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-21 22:07:51 +00:00
replaced StringIO imports with six.moves
This commit is contained in:
parent
664bd2dec8
commit
dbfcf8ae00
@ -5,7 +5,7 @@ import time
|
||||
import shutil
|
||||
from os import mkdir, unlink, listdir
|
||||
from os.path import join, exists
|
||||
from StringIO import StringIO
|
||||
from six.moves import StringIO
|
||||
|
||||
from twisted.internet.protocol import ProcessProtocol
|
||||
from twisted.internet.error import ProcessExitedAlready, ProcessDone
|
||||
|
@ -2,7 +2,7 @@ import sys
|
||||
import time
|
||||
from os import mkdir
|
||||
from os.path import exists, join
|
||||
from StringIO import StringIO
|
||||
from six.moves import StringIO
|
||||
from functools import partial
|
||||
|
||||
from twisted.internet.defer import Deferred, succeed
|
||||
|
@ -22,9 +22,10 @@
|
||||
# wheels can be built with py3.
|
||||
|
||||
from __future__ import unicode_literals, print_function
|
||||
import os, sys, subprocess, json, tempfile, zipfile, io, re, itertools
|
||||
import os, sys, subprocess, json, tempfile, zipfile, re, itertools
|
||||
import email.parser
|
||||
from pprint import pprint
|
||||
from six.moves import StringIO
|
||||
import click
|
||||
|
||||
all_packages = {} # name -> version
|
||||
@ -218,7 +219,7 @@ def scan(name, extra=None, path=""):
|
||||
path=path+"->%s[%s]" % (dep_name, dep_extra))
|
||||
|
||||
def generate_dot():
|
||||
f = io.StringIO()
|
||||
f = StringIO()
|
||||
f.write("digraph {\n")
|
||||
for name, extra in extras_to_show.keys():
|
||||
version = all_packages[name]
|
||||
|
1
newsfragments/3011.other
Normal file
1
newsfragments/3011.other
Normal file
@ -0,0 +1 @@
|
||||
Replace StringIO imports with six.moves.
|
@ -1,4 +1,4 @@
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
from zope.interface import implementer
|
||||
from twisted.internet import defer
|
||||
from twisted.internet.interfaces import IPushProducer
|
||||
|
@ -25,7 +25,7 @@ from allmydata.interfaces import IUploadable, IUploader, IUploadResults, \
|
||||
from allmydata.immutable import layout
|
||||
from pycryptopp.cipher.aes import AES
|
||||
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
from happiness_upload import share_placement, calculate_happiness
|
||||
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
|
||||
|
||||
import os, time
|
||||
from StringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
from itertools import count
|
||||
from zope.interface import implementer
|
||||
from twisted.internet import defer
|
||||
|
@ -1,7 +1,7 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
import urlparse, httplib
|
||||
import allmydata # for __full_version__
|
||||
|
||||
|
@ -3,7 +3,7 @@ from __future__ import print_function
|
||||
import os
|
||||
import urllib
|
||||
from types import NoneType
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
from datetime import datetime
|
||||
import json
|
||||
|
||||
|
@ -4,7 +4,7 @@ import os.path
|
||||
import urllib
|
||||
import json
|
||||
from collections import defaultdict
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
from twisted.python.failure import Failure
|
||||
from allmydata.scripts.common import get_alias, escape_path, \
|
||||
DefaultAliasMarker, TahoeError
|
||||
|
@ -1,6 +1,6 @@
|
||||
from __future__ import print_function
|
||||
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
import urllib
|
||||
|
||||
from allmydata.scripts.common_http import do_http, format_http_success, format_http_error
|
||||
|
@ -1,7 +1,7 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import os, shutil, sys, urllib, time, stat, urlparse
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
from twisted.internet import defer, reactor, protocol, error
|
||||
from twisted.application import service, internet
|
||||
from twisted.web import client as tw_client
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
import os.path
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
from datetime import timedelta
|
||||
import re
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import os.path
|
||||
import json
|
||||
from twisted.trial import unittest
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
|
||||
from allmydata import uri
|
||||
from allmydata.util import base32
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
import os.path
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
import urllib, sys
|
||||
import re
|
||||
from mock import patch
|
||||
|
@ -1,4 +1,4 @@
|
||||
from StringIO import StringIO
|
||||
from six.moves import StringIO
|
||||
import os.path
|
||||
from twisted.trial import unittest
|
||||
import urllib
|
||||
|
@ -1,7 +1,7 @@
|
||||
import os
|
||||
from os.path import dirname, join
|
||||
from mock import patch, Mock
|
||||
from StringIO import StringIO
|
||||
from six.moves import StringIO
|
||||
from sys import getfilesystemencoding
|
||||
from twisted.trial import unittest
|
||||
from allmydata.scripts import runner
|
||||
|
@ -4,7 +4,7 @@ import shutil
|
||||
import subprocess
|
||||
from os.path import join
|
||||
from mock import patch
|
||||
from StringIO import StringIO
|
||||
from six.moves import StringIO
|
||||
from functools import partial
|
||||
|
||||
from twisted.trial import unittest
|
||||
|
@ -2,7 +2,7 @@ import os
|
||||
import mock
|
||||
import json
|
||||
import tempfile
|
||||
from StringIO import StringIO
|
||||
from six.moves import StringIO
|
||||
from os.path import join
|
||||
from UserDict import UserDict
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import os
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
from twisted.trial import unittest
|
||||
from allmydata.mutable.publish import MutableFileHandle
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
from twisted.internet import defer, reactor
|
||||
from twisted.trial import unittest
|
||||
from allmydata import uri, client
|
||||
|
@ -1,7 +1,6 @@
|
||||
from __future__ import print_function
|
||||
|
||||
from cStringIO import StringIO
|
||||
|
||||
from six.moves import cStringIO as StringIO
|
||||
from twisted.trial import unittest
|
||||
from twisted.internet import defer
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
from twisted.internet import defer
|
||||
from twisted.trial import unittest
|
||||
from allmydata import uri
|
||||
|
@ -1,4 +1,4 @@
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
from twisted.internet import defer, reactor
|
||||
from foolscap.api import eventually, fireEventually
|
||||
from allmydata import client
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
import os.path, time
|
||||
from StringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
from twisted.trial import unittest
|
||||
|
||||
from allmydata.util import fileutil
|
||||
|
@ -2,7 +2,7 @@ import os
|
||||
from twisted.trial import unittest
|
||||
from twisted.internet import defer, error
|
||||
from twisted.python.usage import UsageError
|
||||
from StringIO import StringIO
|
||||
from six.moves import StringIO
|
||||
import mock
|
||||
from ..util import i2p_provider
|
||||
from ..scripts import create_node, runner
|
||||
|
@ -1,7 +1,7 @@
|
||||
import os
|
||||
from twisted.trial import unittest
|
||||
from twisted.internet import defer, error
|
||||
from StringIO import StringIO
|
||||
from six.moves import StringIO
|
||||
import mock
|
||||
from ..util import tor_provider
|
||||
from ..scripts import create_node, runner
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os, shutil
|
||||
from cStringIO import StringIO
|
||||
from six.moves import cStringIO as StringIO
|
||||
from twisted.trial import unittest
|
||||
from twisted.python.failure import Failure
|
||||
from twisted.internet import defer, task
|
||||
|
@ -5,7 +5,7 @@ def foo(): pass # keep the line number constant
|
||||
|
||||
import os, time, sys
|
||||
import yaml
|
||||
from StringIO import StringIO
|
||||
from six.moves import StringIO
|
||||
from datetime import timedelta
|
||||
from twisted.trial import unittest
|
||||
from twisted.internet import defer, reactor
|
||||
|
@ -2,7 +2,7 @@ from __future__ import print_function
|
||||
|
||||
import os.path, re, urllib
|
||||
import json
|
||||
from StringIO import StringIO
|
||||
from six.moves import StringIO
|
||||
from nevow import rend
|
||||
from twisted.trial import unittest
|
||||
from allmydata import uri, dirnode
|
||||
|
Loading…
Reference in New Issue
Block a user