rename encode_new.py to encode.py, now that there isn't an old one anymore

This commit is contained in:
Brian Warner 2007-04-05 21:17:42 -07:00
parent 070ebd00ab
commit 919ca3e902
3 changed files with 6 additions and 6 deletions

View File

@ -3,11 +3,11 @@
from twisted.trial import unittest
from twisted.internet import defer
from foolscap import eventual
from allmydata import encode_new, download
from allmydata import encode, download
from allmydata.uri import pack_uri
from cStringIO import StringIO
class MyEncoder(encode_new.Encoder):
class MyEncoder(encode.Encoder):
def send(self, share_num, methname, *args, **kwargs):
if False and share_num < 10:
print "send[%d].%s()" % (share_num, methname)
@ -92,7 +92,7 @@ class FakeBucketWriter:
class Encode(unittest.TestCase):
def test_send(self):
e = encode_new.Encoder()
e = encode.Encoder()
data = "happy happy joy joy" * 4
e.setup(StringIO(data))
NUM_SHARES = 100
@ -131,7 +131,7 @@ class Encode(unittest.TestCase):
class Roundtrip(unittest.TestCase):
def send_and_recover(self, NUM_SHARES, NUM_PEERS, NUM_SEGMENTS=4):
e = encode_new.Encoder()
e = encode.Encoder()
data = "happy happy joy joy" * 4
e.setup(StringIO(data))

View File

@ -5,7 +5,7 @@ from twisted.application import service
from foolscap import Referenceable
from allmydata.util import idlib
from allmydata import encode_new
from allmydata import encode
from allmydata.uri import pack_uri
from allmydata.interfaces import IUploadable, IUploader
@ -92,7 +92,7 @@ class FileUploader:
assert self.needed_shares
# create the encoder, so we can know how large the shares will be
self._encoder = encode_new.Encoder()
self._encoder = encode.Encoder()
self._encoder.setup(self._filehandle)
share_size = self._encoder.get_share_size()
block_size = self._encoder.get_block_size()