From 1ec3218f181e80b68f67a9b7ccc748975d14bfa0 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Sun, 25 Jun 2017 21:03:37 -0400 Subject: [PATCH] rename lbrynet.lbryfile to lbrynet.lbry_file --- .../EncryptedFileMetadataManager.py | 0 lbrynet/{lbryfile => lbry_file}/StreamDescriptor.py | 0 lbrynet/lbry_file/__init__.py | 2 ++ .../client/EncryptedFileDownloader.py | 4 ++-- .../client/EncryptedFileMetadataHandler.py | 0 .../client/EncryptedFileOptions.py | 4 ++-- lbrynet/{lbryfile => lbry_file}/client/__init__.py | 0 lbrynet/lbryfile/__init__.py | 2 -- lbrynet/lbryfilemanager/EncryptedFileCreator.py | 2 +- lbrynet/lbryfilemanager/EncryptedFileDownloader.py | 6 +++--- lbrynet/lbryfilemanager/EncryptedFileManager.py | 2 +- lbrynet/lbrynet_daemon/Daemon.py | 10 +++++----- lbrynet/lbrynet_daemon/Publisher.py | 2 +- tests/functional/test_misc.py | 8 ++++---- tests/functional/test_reflector.py | 10 +++++----- tests/functional/test_streamify.py | 10 +++++----- .../lbryfile/client/test_EncryptedFileDownloader.py | 2 +- .../unit/lbryfile/test_EncryptedFileMetadataManager.py | 2 +- tests/unit/lbrynet_daemon/test_Downloader.py | 2 +- 19 files changed, 34 insertions(+), 34 deletions(-) rename lbrynet/{lbryfile => lbry_file}/EncryptedFileMetadataManager.py (100%) rename lbrynet/{lbryfile => lbry_file}/StreamDescriptor.py (100%) create mode 100644 lbrynet/lbry_file/__init__.py rename lbrynet/{lbryfile => lbry_file}/client/EncryptedFileDownloader.py (98%) rename lbrynet/{lbryfile => lbry_file}/client/EncryptedFileMetadataHandler.py (100%) rename lbrynet/{lbryfile => lbry_file}/client/EncryptedFileOptions.py (92%) rename lbrynet/{lbryfile => lbry_file}/client/__init__.py (100%) delete mode 100644 lbrynet/lbryfile/__init__.py diff --git a/lbrynet/lbryfile/EncryptedFileMetadataManager.py b/lbrynet/lbry_file/EncryptedFileMetadataManager.py similarity index 100% rename from lbrynet/lbryfile/EncryptedFileMetadataManager.py rename to lbrynet/lbry_file/EncryptedFileMetadataManager.py diff --git a/lbrynet/lbryfile/StreamDescriptor.py b/lbrynet/lbry_file/StreamDescriptor.py similarity index 100% rename from lbrynet/lbryfile/StreamDescriptor.py rename to lbrynet/lbry_file/StreamDescriptor.py diff --git a/lbrynet/lbry_file/__init__.py b/lbrynet/lbry_file/__init__.py new file mode 100644 index 000000000..a073d3403 --- /dev/null +++ b/lbrynet/lbry_file/__init__.py @@ -0,0 +1,2 @@ +from lbrynet.lbry_file.StreamDescriptor import get_sd_info +from lbrynet.lbry_file.StreamDescriptor import publish_sd_blob diff --git a/lbrynet/lbryfile/client/EncryptedFileDownloader.py b/lbrynet/lbry_file/client/EncryptedFileDownloader.py similarity index 98% rename from lbrynet/lbryfile/client/EncryptedFileDownloader.py rename to lbrynet/lbry_file/client/EncryptedFileDownloader.py index fba1c0461..e18c6f2cf 100644 --- a/lbrynet/lbryfile/client/EncryptedFileDownloader.py +++ b/lbrynet/lbry_file/client/EncryptedFileDownloader.py @@ -3,12 +3,12 @@ import binascii from zope.interface import implements -from lbrynet.lbryfile.StreamDescriptor import save_sd_info +from lbrynet.lbry_file.StreamDescriptor import save_sd_info from lbrynet.cryptstream.client.CryptStreamDownloader import CryptStreamDownloader from lbrynet.core.client.StreamProgressManager import FullStreamProgressManager from lbrynet.core.StreamDescriptor import StreamMetadata from lbrynet.interfaces import IStreamDownloaderFactory -from lbrynet.lbryfile.client.EncryptedFileMetadataHandler import EncryptedFileMetadataHandler +from lbrynet.lbry_file.client.EncryptedFileMetadataHandler import EncryptedFileMetadataHandler import os from twisted.internet import defer, threads, reactor from twisted.python.procutils import which diff --git a/lbrynet/lbryfile/client/EncryptedFileMetadataHandler.py b/lbrynet/lbry_file/client/EncryptedFileMetadataHandler.py similarity index 100% rename from lbrynet/lbryfile/client/EncryptedFileMetadataHandler.py rename to lbrynet/lbry_file/client/EncryptedFileMetadataHandler.py diff --git a/lbrynet/lbryfile/client/EncryptedFileOptions.py b/lbrynet/lbry_file/client/EncryptedFileOptions.py similarity index 92% rename from lbrynet/lbryfile/client/EncryptedFileOptions.py rename to lbrynet/lbry_file/client/EncryptedFileOptions.py index bc1d4ad99..5ee2e86d1 100644 --- a/lbrynet/lbryfile/client/EncryptedFileOptions.py +++ b/lbrynet/lbry_file/client/EncryptedFileOptions.py @@ -1,5 +1,5 @@ -from lbrynet.lbryfile.StreamDescriptor import EncryptedFileStreamType -from lbrynet.lbryfile.StreamDescriptor import EncryptedFileStreamDescriptorValidator +from lbrynet.lbry_file.StreamDescriptor import EncryptedFileStreamType +from lbrynet.lbry_file.StreamDescriptor import EncryptedFileStreamDescriptorValidator from lbrynet.core.DownloadOption import DownloadOption, DownloadOptionChoice diff --git a/lbrynet/lbryfile/client/__init__.py b/lbrynet/lbry_file/client/__init__.py similarity index 100% rename from lbrynet/lbryfile/client/__init__.py rename to lbrynet/lbry_file/client/__init__.py diff --git a/lbrynet/lbryfile/__init__.py b/lbrynet/lbryfile/__init__.py deleted file mode 100644 index 8cd10066a..000000000 --- a/lbrynet/lbryfile/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from lbrynet.lbryfile.StreamDescriptor import get_sd_info -from lbrynet.lbryfile.StreamDescriptor import publish_sd_blob diff --git a/lbrynet/lbryfilemanager/EncryptedFileCreator.py b/lbrynet/lbryfilemanager/EncryptedFileCreator.py index 69ae82fd0..99d15e5e4 100644 --- a/lbrynet/lbryfilemanager/EncryptedFileCreator.py +++ b/lbrynet/lbryfilemanager/EncryptedFileCreator.py @@ -8,7 +8,7 @@ import os from lbrynet.core.StreamDescriptor import PlainStreamDescriptorWriter from lbrynet.cryptstream.CryptStreamCreator import CryptStreamCreator from lbrynet import conf -from lbrynet.lbryfile.StreamDescriptor import get_sd_info +from lbrynet.lbry_file.StreamDescriptor import get_sd_info from lbrynet.core.cryptoutils import get_lbry_hash_obj from twisted.protocols.basic import FileSender diff --git a/lbrynet/lbryfilemanager/EncryptedFileDownloader.py b/lbrynet/lbryfilemanager/EncryptedFileDownloader.py index d6d83c019..754f700fd 100644 --- a/lbrynet/lbryfilemanager/EncryptedFileDownloader.py +++ b/lbrynet/lbryfilemanager/EncryptedFileDownloader.py @@ -10,11 +10,11 @@ from lbrynet.core.client.StreamProgressManager import FullStreamProgressManager from lbrynet.core.Error import NoSuchSDHash, NoSuchStreamHash from lbrynet.core.utils import short_hash from lbrynet.core.StreamDescriptor import StreamMetadata -from lbrynet.lbryfile.client.EncryptedFileDownloader import EncryptedFileSaver -from lbrynet.lbryfile.client.EncryptedFileDownloader import EncryptedFileDownloader +from lbrynet.lbry_file.client.EncryptedFileDownloader import EncryptedFileSaver +from lbrynet.lbry_file.client.EncryptedFileDownloader import EncryptedFileDownloader from lbrynet.lbryfilemanager.EncryptedFileStatusReport import EncryptedFileStatusReport from lbrynet.interfaces import IStreamDownloaderFactory -from lbrynet.lbryfile.StreamDescriptor import save_sd_info +from lbrynet.lbry_file.StreamDescriptor import save_sd_info from lbrynet.core.Wallet import ClaimOutpoint log = logging.getLogger(__name__) diff --git a/lbrynet/lbryfilemanager/EncryptedFileManager.py b/lbrynet/lbryfilemanager/EncryptedFileManager.py index b5d05acdd..ca5b5e350 100644 --- a/lbrynet/lbryfilemanager/EncryptedFileManager.py +++ b/lbrynet/lbryfilemanager/EncryptedFileManager.py @@ -13,7 +13,7 @@ from lbrynet.reflector.reupload import reflect_stream from lbrynet.core.PaymentRateManager import NegotiatedPaymentRateManager from lbrynet.lbryfilemanager.EncryptedFileDownloader import ManagedEncryptedFileDownloader from lbrynet.lbryfilemanager.EncryptedFileDownloader import ManagedEncryptedFileDownloaderFactory -from lbrynet.lbryfile.StreamDescriptor import EncryptedFileStreamType +from lbrynet.lbry_file.StreamDescriptor import EncryptedFileStreamType from lbrynet.cryptstream.client.CryptStreamDownloader import AlreadyStoppedError from lbrynet.cryptstream.client.CryptStreamDownloader import CurrentlyStoppingError from lbrynet.core.sqlite_helpers import rerun_if_locked diff --git a/lbrynet/lbrynet_daemon/Daemon.py b/lbrynet/lbrynet_daemon/Daemon.py index b79646cf9..2f4421c0b 100644 --- a/lbrynet/lbrynet_daemon/Daemon.py +++ b/lbrynet/lbrynet_daemon/Daemon.py @@ -25,11 +25,11 @@ from lbrynet.conf import LBRYCRD_WALLET, LBRYUM_WALLET, PTC_WALLET from lbrynet.reflector import reupload from lbrynet.reflector import ServerFactory as reflector_server_factory -from lbrynet.lbryfile.client.EncryptedFileDownloader import EncryptedFileSaverFactory -from lbrynet.lbryfile.client.EncryptedFileDownloader import EncryptedFileOpenerFactory -from lbrynet.lbryfile.client.EncryptedFileOptions import add_lbry_file_to_sd_identifier -from lbrynet.lbryfile.EncryptedFileMetadataManager import DBEncryptedFileMetadataManager -from lbrynet.lbryfile.StreamDescriptor import EncryptedFileStreamType +from lbrynet.lbry_file.client.EncryptedFileDownloader import EncryptedFileSaverFactory +from lbrynet.lbry_file.client.EncryptedFileDownloader import EncryptedFileOpenerFactory +from lbrynet.lbry_file.client.EncryptedFileOptions import add_lbry_file_to_sd_identifier +from lbrynet.lbry_file.EncryptedFileMetadataManager import DBEncryptedFileMetadataManager +from lbrynet.lbry_file.StreamDescriptor import EncryptedFileStreamType from lbrynet.lbryfilemanager.EncryptedFileManager import EncryptedFileManager from lbrynet.lbrynet_daemon.Downloader import GetStream from lbrynet.lbrynet_daemon.Publisher import Publisher diff --git a/lbrynet/lbrynet_daemon/Publisher.py b/lbrynet/lbrynet_daemon/Publisher.py index 5c7ebe4e6..24fa85f27 100644 --- a/lbrynet/lbrynet_daemon/Publisher.py +++ b/lbrynet/lbrynet_daemon/Publisher.py @@ -6,7 +6,7 @@ from twisted.internet import defer from lbrynet.core import file_utils from lbrynet.lbryfilemanager.EncryptedFileCreator import create_lbry_file -from lbrynet.lbryfile.StreamDescriptor import publish_sd_blob +from lbrynet.lbry_file.StreamDescriptor import publish_sd_blob log = logging.getLogger(__name__) diff --git a/tests/functional/test_misc.py b/tests/functional/test_misc.py index bd1919aa5..43b78bd70 100644 --- a/tests/functional/test_misc.py +++ b/tests/functional/test_misc.py @@ -10,8 +10,8 @@ import unittest from Crypto import Random from Crypto.Hash import MD5 from lbrynet import conf -from lbrynet.lbryfile.EncryptedFileMetadataManager import TempEncryptedFileMetadataManager -from lbrynet.lbryfile.EncryptedFileMetadataManager import DBEncryptedFileMetadataManager +from lbrynet.lbry_file.EncryptedFileMetadataManager import TempEncryptedFileMetadataManager +from lbrynet.lbry_file.EncryptedFileMetadataManager import DBEncryptedFileMetadataManager from lbrynet.lbryfilemanager.EncryptedFileManager import EncryptedFileManager from lbrynet.core.Session import Session from lbrynet.core.server.BlobAvailabilityHandler import BlobAvailabilityHandlerFactory @@ -20,8 +20,8 @@ from lbrynet.core.StreamDescriptor import BlobStreamDescriptorWriter from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier from lbrynet.core.StreamDescriptor import download_sd_blob from lbrynet.lbryfilemanager.EncryptedFileCreator import create_lbry_file -from lbrynet.lbryfile.client.EncryptedFileOptions import add_lbry_file_to_sd_identifier -from lbrynet.lbryfile.StreamDescriptor import get_sd_info +from lbrynet.lbry_file.client.EncryptedFileOptions import add_lbry_file_to_sd_identifier +from lbrynet.lbry_file.StreamDescriptor import get_sd_info from twisted.internet import defer, threads, task from twisted.trial.unittest import TestCase from twisted.python.failure import Failure diff --git a/tests/functional/test_reflector.py b/tests/functional/test_reflector.py index 2ed14f214..c15e17c13 100644 --- a/tests/functional/test_reflector.py +++ b/tests/functional/test_reflector.py @@ -5,7 +5,7 @@ from twisted.internet import defer, threads, error from twisted.trial import unittest from lbrynet import conf -from lbrynet import lbryfile +from lbrynet import lbry_file from lbrynet import reflector from lbrynet.core import BlobManager from lbrynet.core import PeerManager @@ -13,8 +13,8 @@ from lbrynet.core import RateLimiter from lbrynet.core import Session from lbrynet.core import StreamDescriptor from lbrynet.dht.node import Node -from lbrynet.lbryfile import EncryptedFileMetadataManager -from lbrynet.lbryfile.client import EncryptedFileOptions +from lbrynet.lbry_file import EncryptedFileMetadataManager +from lbrynet.lbry_file.client import EncryptedFileOptions from lbrynet.lbryfilemanager import EncryptedFileCreator from lbrynet.lbryfilemanager import EncryptedFileManager @@ -95,10 +95,10 @@ class TestReflector(unittest.TestCase): def verify_stream_descriptor_file(stream_hash): self.stream_hash = stream_hash - d = lbryfile.get_sd_info(self.lbry_file_manager.stream_info_manager, stream_hash, True) + d = lbry_file.get_sd_info(self.lbry_file_manager.stream_info_manager, stream_hash, True) d.addCallback(verify_equal) d.addCallback( - lambda _: lbryfile.publish_sd_blob( + lambda _: lbry_file.publish_sd_blob( self.lbry_file_manager.stream_info_manager, self.session.blob_manager, stream_hash ) diff --git a/tests/functional/test_streamify.py b/tests/functional/test_streamify.py index 4543459ea..2dfadebff 100644 --- a/tests/functional/test_streamify.py +++ b/tests/functional/test_streamify.py @@ -7,15 +7,15 @@ from twisted.trial.unittest import TestCase from twisted.internet import defer, threads from lbrynet import conf -from lbrynet.lbryfile.EncryptedFileMetadataManager import TempEncryptedFileMetadataManager -from lbrynet.lbryfile.EncryptedFileMetadataManager import DBEncryptedFileMetadataManager +from lbrynet.lbry_file.EncryptedFileMetadataManager import TempEncryptedFileMetadataManager +from lbrynet.lbry_file.EncryptedFileMetadataManager import DBEncryptedFileMetadataManager from lbrynet.lbryfilemanager.EncryptedFileManager import EncryptedFileManager from lbrynet.core.Session import Session from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier -from lbrynet.lbryfile import publish_sd_blob +from lbrynet.lbry_file import publish_sd_blob from lbrynet.lbryfilemanager.EncryptedFileCreator import create_lbry_file -from lbrynet.lbryfile.client.EncryptedFileOptions import add_lbry_file_to_sd_identifier -from lbrynet.lbryfile.StreamDescriptor import get_sd_info +from lbrynet.lbry_file.client.EncryptedFileOptions import add_lbry_file_to_sd_identifier +from lbrynet.lbry_file.StreamDescriptor import get_sd_info from lbrynet.core.PeerManager import PeerManager from lbrynet.core.RateLimiter import DummyRateLimiter, RateLimiter diff --git a/tests/unit/lbryfile/client/test_EncryptedFileDownloader.py b/tests/unit/lbryfile/client/test_EncryptedFileDownloader.py index 2c911f090..6272564b7 100644 --- a/tests/unit/lbryfile/client/test_EncryptedFileDownloader.py +++ b/tests/unit/lbryfile/client/test_EncryptedFileDownloader.py @@ -1,7 +1,7 @@ import os.path from twisted.trial import unittest from twisted.internet import defer -from lbrynet.lbryfile.client.EncryptedFileDownloader import EncryptedFileSaver +from lbrynet.lbry_file.client.EncryptedFileDownloader import EncryptedFileSaver diff --git a/tests/unit/lbryfile/test_EncryptedFileMetadataManager.py b/tests/unit/lbryfile/test_EncryptedFileMetadataManager.py index af6ba92b8..f598aaa72 100644 --- a/tests/unit/lbryfile/test_EncryptedFileMetadataManager.py +++ b/tests/unit/lbryfile/test_EncryptedFileMetadataManager.py @@ -2,7 +2,7 @@ import tempfile import shutil from twisted.trial import unittest from twisted.internet import defer -from lbrynet.lbryfile.EncryptedFileMetadataManager import DBEncryptedFileMetadataManager +from lbrynet.lbry_file.EncryptedFileMetadataManager import DBEncryptedFileMetadataManager from lbrynet.core import utils from lbrynet.cryptstream.CryptBlob import CryptBlobInfo from lbrynet.core.Error import NoSuchStreamHash diff --git a/tests/unit/lbrynet_daemon/test_Downloader.py b/tests/unit/lbrynet_daemon/test_Downloader.py index e5ab7fff2..7ead14280 100644 --- a/tests/unit/lbrynet_daemon/test_Downloader.py +++ b/tests/unit/lbrynet_daemon/test_Downloader.py @@ -9,7 +9,7 @@ from lbryschema.claim import ClaimDict from lbrynet.core import Session, PaymentRateManager, Wallet from lbrynet.lbrynet_daemon import Downloader from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier,StreamMetadata -from lbrynet.lbryfile.client.EncryptedFileOptions import add_lbry_file_to_sd_identifier +from lbrynet.lbry_file.client.EncryptedFileOptions import add_lbry_file_to_sd_identifier from lbrynet.core.HashBlob import TempBlob from lbrynet.core.BlobManager import TempBlobManager from lbrynet.lbryfilemanager.EncryptedFileDownloader import ManagedEncryptedFileDownloaderFactory