diff --git a/.travis.yml b/.travis.yml index 3789780d1..59c92ef50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -112,7 +112,7 @@ jobs: working_dir: dist paths: - lbrynet-${OS}.zip - # artifact uploader thinks lbrynet is a directory, https://github.com/travis-ci/artifacts/issues/78 + # artifact uploader thinks lbry is a directory, https://github.com/travis-ci/artifacts/issues/78 target_paths: - /daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG}) diff --git a/lbry/lbry/__init__.py b/lbry/lbry/__init__.py index 249a01e46..ea3a1f63c 100644 --- a/lbry/lbry/__init__.py +++ b/lbry/lbry/__init__.py @@ -1,4 +1,4 @@ -__name__ = "lbrynet" +__name__ = "lbry" __version__ = "0.38.0rc7" version = tuple(__version__.split('.')) diff --git a/lbry/lbry/extras/daemon/Component.py b/lbry/lbry/extras/daemon/Component.py index 665efb694..b31d99871 100644 --- a/lbry/lbry/extras/daemon/Component.py +++ b/lbry/lbry/extras/daemon/Component.py @@ -16,7 +16,7 @@ class ComponentType(type): class Component(metaclass=ComponentType): """ - lbrynet-daemon component helper + lbry-daemon component helper Inheriting classes will be automatically registered with the ComponentManager and must implement setup and stop methods diff --git a/lbry/lbry/extras/daemon/Daemon.py b/lbry/lbry/extras/daemon/Daemon.py index 1a0487156..998ac802d 100644 --- a/lbry/lbry/extras/daemon/Daemon.py +++ b/lbry/lbry/extras/daemon/Daemon.py @@ -965,7 +965,7 @@ class Daemon(metaclass=JSONRPCServerType): Returns: (dict) Dictionary of daemon settings - See ADJUSTABLE_SETTINGS in lbrynet/conf.py for full list of settings + See ADJUSTABLE_SETTINGS in lbry/conf.py for full list of settings """ return self.conf.settings_dict diff --git a/lbry/lbry/testcase.py b/lbry/lbry/testcase.py index ef8d4cca2..9b3a77ba5 100644 --- a/lbry/lbry/testcase.py +++ b/lbry/lbry/testcase.py @@ -66,9 +66,9 @@ class CommandTestCase(IntegrationTestCase): async def asyncSetUp(self): await super().asyncSetUp() - logging.getLogger('lbrynet.blob_exchange').setLevel(self.VERBOSITY) - logging.getLogger('lbrynet.daemon').setLevel(self.VERBOSITY) - logging.getLogger('lbrynet.stream').setLevel(self.VERBOSITY) + logging.getLogger('lbry.blob_exchange').setLevel(self.VERBOSITY) + logging.getLogger('lbry.daemon').setLevel(self.VERBOSITY) + logging.getLogger('lbry.stream').setLevel(self.VERBOSITY) self.daemons = [] self.extra_wallet_nodes = [] diff --git a/lbry/lbry/wallet/__init__.py b/lbry/lbry/wallet/__init__.py index 8f1809b2d..09d86c8ab 100644 --- a/lbry/lbry/wallet/__init__.py +++ b/lbry/lbry/wallet/__init__.py @@ -4,7 +4,7 @@ __node_bin__ = '' __node_url__ = ( 'https://github.com/lbryio/lbrycrd/releases/download/v0.12.4.0/lbrycrd-linux.zip' ) -__spvserver__ = 'lbrynet.wallet.server.coin.LBCRegTest' +__spvserver__ = 'lbry.wallet.server.coin.LBCRegTest' from lbry.wallet.manager import LbryWalletManager from lbry.wallet.network import Network diff --git a/lbry/lbry/wallet/resolve.py b/lbry/lbry/wallet/resolve.py index 10e884be2..7d385d32d 100644 --- a/lbry/lbry/wallet/resolve.py +++ b/lbry/lbry/wallet/resolve.py @@ -232,7 +232,7 @@ class Resolver: # these results can include those where `signature_is_valid` is False. if they are skipped, # page indexing becomes tricky, as the number of results isn't known until after having # processed them. - # TODO: fix ^ in lbrynet.schema + # TODO: fix ^ in lbry.schema async def iter_validate_channel_claims(): formatted_claims = [] diff --git a/lbry/lbry/wallet/server/session.py b/lbry/lbry/wallet/server/session.py index 5c7e1bded..72ca37824 100644 --- a/lbry/lbry/wallet/server/session.py +++ b/lbry/lbry/wallet/server/session.py @@ -154,7 +154,7 @@ class LBRYElectrumX(ElectrumX): return result def format_claim_from_daemon(self, claim, name=None): - """Changes the returned claim data to the format expected by lbrynet and adds missing fields.""" + """Changes the returned claim data to the format expected by lbry and adds missing fields.""" if not claim: return {} diff --git a/lbry/scripts/checktrie.py b/lbry/scripts/checktrie.py index bf75cf7c3..4431f524c 100644 --- a/lbry/scripts/checktrie.py +++ b/lbry/scripts/checktrie.py @@ -2,9 +2,9 @@ import sys import asyncio from binascii import hexlify -from lbrynet.wallet.server.db import SQLDB -from lbrynet.wallet.server.coin import LBC -from lbrynet.wallet.server.daemon import Daemon +from lbry.wallet.server.db import SQLDB +from lbry.wallet.server.coin import LBC +from lbry.wallet.server.daemon import Daemon def hex_reverted(value: bytes) -> str: diff --git a/lbry/scripts/dht_monitor.py b/lbry/scripts/dht_monitor.py index 944f21dfe..c6040f8d9 100644 --- a/lbry/scripts/dht_monitor.py +++ b/lbry/scripts/dht_monitor.py @@ -1,8 +1,8 @@ import curses import time import asyncio -from lbrynet.conf import Config -from lbrynet.extras.daemon.client import daemon_rpc +from lbry.conf import Config +from lbry.extras.daemon.client import daemon_rpc stdscr = curses.initscr() diff --git a/lbry/scripts/download_blob_from_peer.py b/lbry/scripts/download_blob_from_peer.py index ab23883b5..a501edbbc 100644 --- a/lbry/scripts/download_blob_from_peer.py +++ b/lbry/scripts/download_blob_from_peer.py @@ -3,13 +3,13 @@ import os import asyncio import socket import ipaddress -from lbrynet.conf import Config -from lbrynet.extras.daemon.storage import SQLiteStorage -from lbrynet.blob.blob_manager import BlobManager -from lbrynet.blob_exchange.client import BlobExchangeClientProtocol, request_blob +from lbry.conf import Config +from lbry.extras.daemon.storage import SQLiteStorage +from lbry.blob.blob_manager import BlobManager +from lbry.blob_exchange.client import BlobExchangeClientProtocol, request_blob import logging -log = logging.getLogger("lbrynet") +log = logging.getLogger("lbry") log.addHandler(logging.StreamHandler()) log.setLevel(logging.DEBUG) diff --git a/lbry/scripts/generate_json_api.py b/lbry/scripts/generate_json_api.py index 16dcb3158..4f9491f33 100644 --- a/lbry/scripts/generate_json_api.py +++ b/lbry/scripts/generate_json_api.py @@ -8,14 +8,14 @@ import time from docopt import docopt from binascii import unhexlify from textwrap import indent -from lbrynet.extras.cli import set_kwargs, get_argument_parser -from lbrynet.extras.daemon.Daemon import ( +from lbry.extras.cli import set_kwargs, get_argument_parser +from lbry.extras.daemon.Daemon import ( Daemon, jsonrpc_dumps_pretty, encode_pagination_doc ) -from lbrynet.extras.daemon.json_response_encoder import ( +from lbry.extras.daemon.json_response_encoder import ( encode_tx_doc, encode_txo_doc, encode_account_doc, encode_file_doc ) -from lbrynet.testcase import CommandTestCase +from lbry.testcase import CommandTestCase RETURN_DOCS = { diff --git a/lbry/scripts/release.py b/lbry/scripts/release.py index d4906e193..943d0837f 100644 --- a/lbry/scripts/release.py +++ b/lbry/scripts/release.py @@ -137,7 +137,7 @@ class Version: def release(args): gh = get_github() repo = gh.repository('lbryio', 'lbry') - version_file = repo.file_contents('lbrynet/__init__.py') + version_file = repo.file_contents('lbry/__init__.py') current_version = Version.from_content(version_file) print(f'Current Version: {current_version}') diff --git a/lbry/scripts/repair_0_31_1_db.py b/lbry/scripts/repair_0_31_1_db.py index 5f05ca83f..93f56ba5a 100644 --- a/lbry/scripts/repair_0_31_1_db.py +++ b/lbry/scripts/repair_0_31_1_db.py @@ -1,7 +1,7 @@ import os import binascii import sqlite3 -from lbrynet.conf import Config +from lbry.conf import Config def main(): diff --git a/lbry/scripts/set_build.py b/lbry/scripts/set_build.py index 5e639d2ab..edd3bc9e8 100644 --- a/lbry/scripts/set_build.py +++ b/lbry/scripts/set_build.py @@ -23,7 +23,7 @@ def get_build_type(travis_tag=None): def main(): root_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) - build_type_path = os.path.join(root_dir, 'lbrynet', 'build_type.py') + build_type_path = os.path.join(root_dir, 'lbry', 'build_type.py') log.debug("configuring build type file: %s", build_type_path) travis_commit = os.environ['TRAVIS_COMMIT'][:6] build_type = get_build_type(os.environ.get('TRAVIS_TAG', None)) diff --git a/lbry/scripts/standalone_blob_server.py b/lbry/scripts/standalone_blob_server.py index c056e6c53..77436ba33 100644 --- a/lbry/scripts/standalone_blob_server.py +++ b/lbry/scripts/standalone_blob_server.py @@ -1,10 +1,10 @@ import sys import os import asyncio -from lbrynet.blob.blob_manager import BlobManager -from lbrynet.blob_exchange.server import BlobServer -from lbrynet.schema.address import decode_address -from lbrynet.extras.daemon.storage import SQLiteStorage +from lbry.blob.blob_manager import BlobManager +from lbry.blob_exchange.server import BlobServer +from lbry.schema.address import decode_address +from lbry.extras.daemon.storage import SQLiteStorage async def main(address: str): diff --git a/lbry/scripts/time_to_first_byte.py b/lbry/scripts/time_to_first_byte.py index d8f44b1e5..9abb9fdce 100644 --- a/lbry/scripts/time_to_first_byte.py +++ b/lbry/scripts/time_to_first_byte.py @@ -6,12 +6,12 @@ import aiohttp import time from aiohttp import ClientConnectorError -from lbrynet import __version__ -from lbrynet.blob.blob_file import MAX_BLOB_SIZE -from lbrynet.conf import Config -from lbrynet.schema.uri import parse_lbry_uri -from lbrynet.extras.daemon.client import daemon_rpc -from lbrynet.extras import system_info +from lbry import __version__ +from lbry.blob.blob_file import MAX_BLOB_SIZE +from lbry.conf import Config +from lbry.schema.uri import parse_lbry_uri +from lbry.extras.daemon.client import daemon_rpc +from lbry.extras import system_info def extract_uris(response): diff --git a/lbry/setup.py b/lbry/setup.py index 48ac601f1..6aad561e9 100644 --- a/lbry/setup.py +++ b/lbry/setup.py @@ -1,5 +1,5 @@ import os -from lbrynet import __name__, __version__ +from lbry import __name__, __version__ from setuptools import setup, find_packages BASE = os.path.dirname(__file__) @@ -20,7 +20,7 @@ setup( packages=find_packages(exclude=('tests',)), zip_safe=False, entry_points={ - 'console_scripts': 'lbrynet=lbrynet.extras.cli:main' + 'console_scripts': 'lbrynet=lbry.extras.cli:main' }, install_requires=[ 'torba', diff --git a/lbry/tests/dht_mocks.py b/lbry/tests/dht_mocks.py index 801175edf..f08a2cc57 100644 --- a/lbry/tests/dht_mocks.py +++ b/lbry/tests/dht_mocks.py @@ -5,7 +5,7 @@ from unittest import mock import functools import asyncio if typing.TYPE_CHECKING: - from lbrynet.dht.protocol.protocol import KademliaProtocol + from lbry.dht.protocol.protocol import KademliaProtocol def get_time_accelerator(loop: asyncio.BaseEventLoop, diff --git a/lbry/tests/integration/test_account_commands.py b/lbry/tests/integration/test_account_commands.py index 1e0b8ed95..999fdc352 100644 --- a/lbry/tests/integration/test_account_commands.py +++ b/lbry/tests/integration/test_account_commands.py @@ -1,4 +1,4 @@ -from lbrynet.testcase import CommandTestCase +from lbry.testcase import CommandTestCase class AccountManagement(CommandTestCase): diff --git a/lbry/tests/integration/test_chris45.py b/lbry/tests/integration/test_chris45.py index d2cc25994..f540451d1 100644 --- a/lbry/tests/integration/test_chris45.py +++ b/lbry/tests/integration/test_chris45.py @@ -1,4 +1,4 @@ -from lbrynet.testcase import CommandTestCase +from lbry.testcase import CommandTestCase class EpicAdventuresOfChris45(CommandTestCase): diff --git a/lbry/tests/integration/test_claim_commands.py b/lbry/tests/integration/test_claim_commands.py index bab42b8f3..02deb346d 100644 --- a/lbry/tests/integration/test_claim_commands.py +++ b/lbry/tests/integration/test_claim_commands.py @@ -7,8 +7,8 @@ from urllib.request import urlopen from torba.client.errors import InsufficientFundsError -from lbrynet.testcase import CommandTestCase -from lbrynet.wallet.transaction import Transaction +from lbry.testcase import CommandTestCase +from lbry.wallet.transaction import Transaction log = logging.getLogger(__name__) diff --git a/lbry/tests/integration/test_cli.py b/lbry/tests/integration/test_cli.py index b01cf54c0..d61b3ea1a 100644 --- a/lbry/tests/integration/test_cli.py +++ b/lbry/tests/integration/test_cli.py @@ -2,14 +2,14 @@ import contextlib from io import StringIO from torba.testcase import AsyncioTestCase -from lbrynet.conf import Config -from lbrynet.extras import cli -from lbrynet.extras.daemon.Components import ( +from lbry.conf import Config +from lbry.extras import cli +from lbry.extras.daemon.Components import ( DATABASE_COMPONENT, BLOB_COMPONENT, HEADERS_COMPONENT, WALLET_COMPONENT, DHT_COMPONENT, HASH_ANNOUNCER_COMPONENT, STREAM_MANAGER_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT, UPNP_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT ) -from lbrynet.extras.daemon.Daemon import Daemon +from lbry.extras.daemon.Daemon import Daemon class CLIIntegrationTest(AsyncioTestCase): diff --git a/lbry/tests/integration/test_comment_commands.py b/lbry/tests/integration/test_comment_commands.py index 81b124d73..d477f19ff 100644 --- a/lbry/tests/integration/test_comment_commands.py +++ b/lbry/tests/integration/test_comment_commands.py @@ -2,7 +2,7 @@ from math import ceil from aiohttp import web -from lbrynet.testcase import CommandTestCase +from lbry.testcase import CommandTestCase class MockedCommentServer: diff --git a/lbry/tests/integration/test_dht.py b/lbry/tests/integration/test_dht.py index ae8ad111f..71284fbe7 100644 --- a/lbry/tests/integration/test_dht.py +++ b/lbry/tests/integration/test_dht.py @@ -1,9 +1,9 @@ import asyncio from binascii import hexlify -from lbrynet.dht import constants -from lbrynet.dht.node import Node -from lbrynet.dht.peer import PeerManager, KademliaPeer +from lbry.dht import constants +from lbry.dht.node import Node +from lbry.dht.peer import PeerManager, KademliaPeer from torba.testcase import AsyncioTestCase @@ -12,7 +12,7 @@ class DHTIntegrationTest(AsyncioTestCase): async def asyncSetUp(self): import logging logging.getLogger('asyncio').setLevel(logging.ERROR) - logging.getLogger('lbrynet.dht').setLevel(logging.WARN) + logging.getLogger('lbry.dht').setLevel(logging.WARN) self.nodes = [] self.known_node_addresses = [] diff --git a/lbry/tests/integration/test_file_commands.py b/lbry/tests/integration/test_file_commands.py index a4249b768..a10b7e80d 100644 --- a/lbry/tests/integration/test_file_commands.py +++ b/lbry/tests/integration/test_file_commands.py @@ -3,8 +3,8 @@ import logging import os from binascii import hexlify -from lbrynet.testcase import CommandTestCase -from lbrynet.blob_exchange.downloader import BlobDownloader +from lbry.testcase import CommandTestCase +from lbry.blob_exchange.downloader import BlobDownloader class FileCommands(CommandTestCase): diff --git a/lbry/tests/integration/test_internal_transaction_api.py b/lbry/tests/integration/test_internal_transaction_api.py index 4b1cdd2c8..cb993a5c4 100644 --- a/lbry/tests/integration/test_internal_transaction_api.py +++ b/lbry/tests/integration/test_internal_transaction_api.py @@ -2,15 +2,15 @@ import asyncio from torba.testcase import IntegrationTestCase -import lbrynet.wallet -from lbrynet.schema.claim import Claim -from lbrynet.wallet.transaction import Transaction, Output, Input -from lbrynet.wallet.dewies import dewies_to_lbc as d2l, lbc_to_dewies as l2d +import lbry.wallet +from lbry.schema.claim import Claim +from lbry.wallet.transaction import Transaction, Output, Input +from lbry.wallet.dewies import dewies_to_lbc as d2l, lbc_to_dewies as l2d class BasicTransactionTest(IntegrationTestCase): - LEDGER = lbrynet.wallet + LEDGER = lbry.wallet async def test_creating_updating_and_abandoning_claim_with_channel(self): diff --git a/lbry/tests/integration/test_resolve_command.py b/lbry/tests/integration/test_resolve_command.py index c20388509..63af54778 100644 --- a/lbry/tests/integration/test_resolve_command.py +++ b/lbry/tests/integration/test_resolve_command.py @@ -3,9 +3,9 @@ import json import hashlib from unittest import skip from binascii import hexlify, unhexlify -from lbrynet.testcase import CommandTestCase -from lbrynet.wallet.transaction import Transaction, Output -from lbrynet.schema.compat import OldClaimMessage +from lbry.testcase import CommandTestCase +from lbry.wallet.transaction import Transaction, Output +from lbry.schema.compat import OldClaimMessage from torba.client.hash import sha256, Base58 diff --git a/lbry/tests/integration/test_streaming.py b/lbry/tests/integration/test_streaming.py index 29c2c7eca..806d24af2 100644 --- a/lbry/tests/integration/test_streaming.py +++ b/lbry/tests/integration/test_streaming.py @@ -4,9 +4,9 @@ import aiohttp import aiohttp.web import asyncio -from lbrynet.utils import aiohttp_request -from lbrynet.blob.blob_file import MAX_BLOB_SIZE -from lbrynet.testcase import CommandTestCase +from lbry.utils import aiohttp_request +from lbry.blob.blob_file import MAX_BLOB_SIZE +from lbry.testcase import CommandTestCase def get_random_bytes(n: int) -> bytes: diff --git a/lbry/tests/integration/test_sync.py b/lbry/tests/integration/test_sync.py index f59dd72bd..ddc240783 100644 --- a/lbry/tests/integration/test_sync.py +++ b/lbry/tests/integration/test_sync.py @@ -3,15 +3,15 @@ from unittest import mock from torba.orchstr8.node import WalletNode, SPVNode from torba.testcase import AsyncioTestCase -from lbrynet.conf import Config -from lbrynet.wallet import LbryWalletManager, RegTestLedger -from lbrynet.extras.daemon.Daemon import Daemon -from lbrynet.extras.daemon.Components import WalletComponent -from lbrynet.extras.daemon.Components import ( +from lbry.conf import Config +from lbry.wallet import LbryWalletManager, RegTestLedger +from lbry.extras.daemon.Daemon import Daemon +from lbry.extras.daemon.Components import WalletComponent +from lbry.extras.daemon.Components import ( DHT_COMPONENT, HASH_ANNOUNCER_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT, UPNP_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT ) -from lbrynet.extras.daemon.ComponentManager import ComponentManager +from lbry.extras.daemon.ComponentManager import ComponentManager class AccountSynchronization(AsyncioTestCase): diff --git a/lbry/tests/integration/test_transaction_commands.py b/lbry/tests/integration/test_transaction_commands.py index 4d22c07d6..a7f624650 100644 --- a/lbry/tests/integration/test_transaction_commands.py +++ b/lbry/tests/integration/test_transaction_commands.py @@ -1,4 +1,4 @@ -from lbrynet.testcase import CommandTestCase +from lbry.testcase import CommandTestCase class TransactionCommandsTestCase(CommandTestCase): diff --git a/lbry/tests/test_utils.py b/lbry/tests/test_utils.py index ffeaff9fd..0b6fce1fe 100644 --- a/lbry/tests/test_utils.py +++ b/lbry/tests/test_utils.py @@ -32,11 +32,11 @@ def reset_time(test_case, timestamp=DEFAULT_TIMESTAMP): patcher.start().return_value = iso_time test_case.addCleanup(patcher.stop) - patcher = mock.patch('lbrynet.utils.now') + patcher = mock.patch('lbry.utils.now') patcher.start().return_value = timestamp test_case.addCleanup(patcher.stop) - patcher = mock.patch('lbrynet.utils.utcnow') + patcher = mock.patch('lbry.utils.utcnow') patcher.start().return_value = timestamp test_case.addCleanup(patcher.stop) diff --git a/lbry/tests/unit/analytics/test_track.py b/lbry/tests/unit/analytics/test_track.py index bda9f0637..e5164e28c 100644 --- a/lbry/tests/unit/analytics/test_track.py +++ b/lbry/tests/unit/analytics/test_track.py @@ -1,4 +1,4 @@ -from lbrynet.extras.daemon import analytics +from lbry.extras.daemon import analytics import unittest diff --git a/lbry/tests/unit/blob/test_blob_file.py b/lbry/tests/unit/blob/test_blob_file.py index 664f7e75c..daadca847 100644 --- a/lbry/tests/unit/blob/test_blob_file.py +++ b/lbry/tests/unit/blob/test_blob_file.py @@ -3,11 +3,11 @@ import tempfile import shutil import os from torba.testcase import AsyncioTestCase -from lbrynet.error import InvalidDataError, InvalidBlobHashError -from lbrynet.conf import Config -from lbrynet.extras.daemon.storage import SQLiteStorage -from lbrynet.blob.blob_manager import BlobManager -from lbrynet.blob.blob_file import BlobFile, BlobBuffer, AbstractBlob +from lbry.error import InvalidDataError, InvalidBlobHashError +from lbry.conf import Config +from lbry.extras.daemon.storage import SQLiteStorage +from lbry.blob.blob_manager import BlobManager +from lbry.blob.blob_file import BlobFile, BlobBuffer, AbstractBlob class TestBlob(AsyncioTestCase): diff --git a/lbry/tests/unit/blob/test_blob_manager.py b/lbry/tests/unit/blob/test_blob_manager.py index 6dd1885dd..0c9a26cf1 100644 --- a/lbry/tests/unit/blob/test_blob_manager.py +++ b/lbry/tests/unit/blob/test_blob_manager.py @@ -3,9 +3,9 @@ import tempfile import shutil import os from torba.testcase import AsyncioTestCase -from lbrynet.conf import Config -from lbrynet.extras.daemon.storage import SQLiteStorage -from lbrynet.blob.blob_manager import BlobManager +from lbry.conf import Config +from lbry.extras.daemon.storage import SQLiteStorage +from lbry.blob.blob_manager import BlobManager class TestBlobManager(AsyncioTestCase): diff --git a/lbry/tests/unit/blob_exchange/test_transfer_blob.py b/lbry/tests/unit/blob_exchange/test_transfer_blob.py index 2cc2c18c8..02ecec07b 100644 --- a/lbry/tests/unit/blob_exchange/test_transfer_blob.py +++ b/lbry/tests/unit/blob_exchange/test_transfer_blob.py @@ -5,17 +5,17 @@ from io import BytesIO import shutil import os -from lbrynet.blob_exchange.serialization import BlobRequest +from lbry.blob_exchange.serialization import BlobRequest from torba.testcase import AsyncioTestCase -from lbrynet.conf import Config -from lbrynet.extras.daemon.storage import SQLiteStorage -from lbrynet.blob.blob_manager import BlobManager -from lbrynet.blob_exchange.server import BlobServer, BlobServerProtocol -from lbrynet.blob_exchange.client import request_blob -from lbrynet.dht.peer import KademliaPeer, PeerManager +from lbry.conf import Config +from lbry.extras.daemon.storage import SQLiteStorage +from lbry.blob.blob_manager import BlobManager +from lbry.blob_exchange.server import BlobServer, BlobServerProtocol +from lbry.blob_exchange.client import request_blob +from lbry.dht.peer import KademliaPeer, PeerManager # import logging -# logging.getLogger("lbrynet").setLevel(logging.DEBUG) +# logging.getLogger("lbry").setLevel(logging.DEBUG) def mock_config(): diff --git a/lbry/tests/unit/comments/test_comment_signing.py b/lbry/tests/unit/comments/test_comment_signing.py index 313cdb662..be99bf176 100644 --- a/lbry/tests/unit/comments/test_comment_signing.py +++ b/lbry/tests/unit/comments/test_comment_signing.py @@ -1,7 +1,7 @@ from torba.testcase import AsyncioTestCase -from lbrynet.extras.daemon.comment_client import sign_comment -from lbrynet.extras.daemon.comment_client import is_comment_signed_by_channel +from lbry.extras.daemon.comment_client import sign_comment +from lbry.extras.daemon.comment_client import is_comment_signed_by_channel from tests.unit.wallet.test_schema_signing import get_stream, get_channel diff --git a/lbry/tests/unit/components/test_component_manager.py b/lbry/tests/unit/components/test_component_manager.py index a46eca339..608e9b80d 100644 --- a/lbry/tests/unit/components/test_component_manager.py +++ b/lbry/tests/unit/components/test_component_manager.py @@ -1,13 +1,13 @@ import asyncio from torba.testcase import AsyncioTestCase, AdvanceTimeTestCase -from lbrynet.conf import Config -from lbrynet.extras.daemon.ComponentManager import ComponentManager -from lbrynet.extras.daemon.Components import DATABASE_COMPONENT, DHT_COMPONENT -from lbrynet.extras.daemon.Components import HASH_ANNOUNCER_COMPONENT, UPNP_COMPONENT -from lbrynet.extras.daemon.Components import PEER_PROTOCOL_SERVER_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT -from lbrynet.extras.daemon.Components import HEADERS_COMPONENT -from lbrynet.extras.daemon import Components +from lbry.conf import Config +from lbry.extras.daemon.ComponentManager import ComponentManager +from lbry.extras.daemon.Components import DATABASE_COMPONENT, DHT_COMPONENT +from lbry.extras.daemon.Components import HASH_ANNOUNCER_COMPONENT, UPNP_COMPONENT +from lbry.extras.daemon.Components import PEER_PROTOCOL_SERVER_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT +from lbry.extras.daemon.Components import HEADERS_COMPONENT +from lbry.extras.daemon import Components class TestComponentManager(AsyncioTestCase): diff --git a/lbry/tests/unit/core/test_utils.py b/lbry/tests/unit/core/test_utils.py index fb783628c..de6a16d36 100644 --- a/lbry/tests/unit/core/test_utils.py +++ b/lbry/tests/unit/core/test_utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import unittest import asyncio -from lbrynet import utils +from lbry import utils from torba.testcase import AsyncioTestCase diff --git a/lbry/tests/unit/database/test_SQLiteStorage.py b/lbry/tests/unit/database/test_SQLiteStorage.py index 3a7564faa..e0a11ad84 100644 --- a/lbry/tests/unit/database/test_SQLiteStorage.py +++ b/lbry/tests/unit/database/test_SQLiteStorage.py @@ -4,11 +4,11 @@ import unittest import asyncio import logging from torba.testcase import AsyncioTestCase -from lbrynet.conf import Config -from lbrynet.extras.daemon.storage import SQLiteStorage -from lbrynet.blob.blob_info import BlobInfo -from lbrynet.blob.blob_manager import BlobManager -from lbrynet.stream.descriptor import StreamDescriptor +from lbry.conf import Config +from lbry.extras.daemon.storage import SQLiteStorage +from lbry.blob.blob_info import BlobInfo +from lbry.blob.blob_manager import BlobManager +from lbry.stream.descriptor import StreamDescriptor from tests.test_utils import random_lbry_hash log = logging.getLogger() diff --git a/lbry/tests/unit/dht/protocol/test_data_store.py b/lbry/tests/unit/dht/protocol/test_data_store.py index 0fdaccba3..97d61e7ec 100644 --- a/lbry/tests/unit/dht/protocol/test_data_store.py +++ b/lbry/tests/unit/dht/protocol/test_data_store.py @@ -1,7 +1,7 @@ import asyncio from unittest import mock, TestCase -from lbrynet.dht.protocol.data_store import DictDataStore -from lbrynet.dht.peer import PeerManager +from lbry.dht.protocol.data_store import DictDataStore +from lbry.dht.peer import PeerManager class DataStoreTests(TestCase): diff --git a/lbry/tests/unit/dht/protocol/test_distance.py b/lbry/tests/unit/dht/protocol/test_distance.py index 829bcf3f9..2ba887e61 100644 --- a/lbry/tests/unit/dht/protocol/test_distance.py +++ b/lbry/tests/unit/dht/protocol/test_distance.py @@ -1,5 +1,5 @@ import unittest -from lbrynet.dht.protocol.distance import Distance +from lbry.dht.protocol.distance import Distance class DistanceTests(unittest.TestCase): diff --git a/lbry/tests/unit/dht/protocol/test_kbucket.py b/lbry/tests/unit/dht/protocol/test_kbucket.py index 9f1fda60a..eff936b42 100644 --- a/lbry/tests/unit/dht/protocol/test_kbucket.py +++ b/lbry/tests/unit/dht/protocol/test_kbucket.py @@ -1,9 +1,9 @@ import struct import asyncio -from lbrynet.utils import generate_id -from lbrynet.dht.protocol.routing_table import KBucket -from lbrynet.dht.peer import PeerManager, KademliaPeer -from lbrynet.dht import constants +from lbry.utils import generate_id +from lbry.dht.protocol.routing_table import KBucket +from lbry.dht.peer import PeerManager, KademliaPeer +from lbry.dht import constants from torba.testcase import AsyncioTestCase diff --git a/lbry/tests/unit/dht/protocol/test_protocol.py b/lbry/tests/unit/dht/protocol/test_protocol.py index 6669d955a..00c0078f4 100644 --- a/lbry/tests/unit/dht/protocol/test_protocol.py +++ b/lbry/tests/unit/dht/protocol/test_protocol.py @@ -2,10 +2,10 @@ import asyncio import binascii from torba.testcase import AsyncioTestCase from tests import dht_mocks -from lbrynet.dht.serialization.bencoding import bencode, bdecode -from lbrynet.dht import constants -from lbrynet.dht.protocol.protocol import KademliaProtocol -from lbrynet.dht.peer import PeerManager +from lbry.dht.serialization.bencoding import bencode, bdecode +from lbry.dht import constants +from lbry.dht.protocol.protocol import KademliaProtocol +from lbry.dht.peer import PeerManager class TestProtocol(AsyncioTestCase): diff --git a/lbry/tests/unit/dht/protocol/test_routing_table.py b/lbry/tests/unit/dht/protocol/test_routing_table.py index c5d832783..d380fdc90 100644 --- a/lbry/tests/unit/dht/protocol/test_routing_table.py +++ b/lbry/tests/unit/dht/protocol/test_routing_table.py @@ -1,9 +1,9 @@ import asyncio from torba.testcase import AsyncioTestCase from tests import dht_mocks -from lbrynet.dht import constants -from lbrynet.dht.node import Node -from lbrynet.dht.peer import PeerManager +from lbry.dht import constants +from lbry.dht.node import Node +from lbry.dht.peer import PeerManager expected_ranges = [ @@ -107,15 +107,15 @@ class TestRouting(AsyncioTestCase): # # from twisted.trial import unittest # from twisted.internet import defer -# from lbrynet.dht import constants -# from lbrynet.dht.routingtable import TreeRoutingTable -# from lbrynet.dht.contact import ContactManager -# from lbrynet.dht.distance import Distance -# from lbrynet.utils import generate_id +# from lbry.dht import constants +# from lbry.dht.routingtable import TreeRoutingTable +# from lbry.dht.contact import ContactManager +# from lbry.dht.distance import Distance +# from lbry.utils import generate_id # # # class FakeRPCProtocol: -# """ Fake RPC protocol; allows lbrynet.dht.contact.Contact objects to "send" RPCs """ +# """ Fake RPC protocol; allows lbry.dht.contact.Contact objects to "send" RPCs """ # def sendRPC(self, *args, **kwargs): # return defer.succeed(None) # @@ -270,18 +270,18 @@ class TestRouting(AsyncioTestCase): # # is not in bucket 0. so we put own_id at the end so we can keep splitting by adding to the # # end # -# self.table = lbrynet.dht.routingtable.OptimizedTreeRoutingTable(own_id) +# self.table = lbry.dht.routingtable.OptimizedTreeRoutingTable(own_id) # # def fill_bucket(self, bucket_min): -# bucket_size = lbrynet.dht.constants.k +# bucket_size = lbry.dht.constants.k # for i in range(bucket_min, bucket_min + bucket_size): -# self.table.addContact(lbrynet.dht.contact.Contact(long(i), '127.0.0.1', 9999, None)) +# self.table.addContact(lbry.dht.contact.Contact(long(i), '127.0.0.1', 9999, None)) # # def overflow_bucket(self, bucket_min): -# bucket_size = lbrynet.dht.constants.k +# bucket_size = lbry.dht.constants.k # self.fill_bucket(bucket_min) # self.table.addContact( -# lbrynet.dht.contact.Contact(long(bucket_min + bucket_size + 1), +# lbry.dht.contact.Contact(long(bucket_min + bucket_size + 1), # '127.0.0.1', 9999, None)) # # def testKeyError(self): @@ -290,19 +290,19 @@ class TestRouting(AsyncioTestCase): # bucket_middle = self.table._buckets[0].rangeMax / 2 # # # fill last bucket -# self.fill_bucket(self.table._buckets[0].rangeMax - lbrynet.dht.constants.k - 1) +# self.fill_bucket(self.table._buckets[0].rangeMax - lbry.dht.constants.k - 1) # # -1 in previous line because own_id is in last bucket # # # fill/overflow 7 more buckets # bucket_start = 0 -# for i in range(0, lbrynet.dht.constants.k): +# for i in range(0, lbry.dht.constants.k): # self.overflow_bucket(bucket_start) # bucket_start += bucket_middle / (2 ** i) # # # replacement cache now has k-1 entries. # # adding one more contact to bucket 0 used to cause a KeyError, but it should work # self.table.addContact( -# lbrynet.dht.contact.Contact(long(lbrynet.dht.constants.k + 2), '127.0.0.1', 9999, None)) +# lbry.dht.contact.Contact(long(lbry.dht.constants.k + 2), '127.0.0.1', 9999, None)) # # # import math # # print "" diff --git a/lbry/tests/unit/dht/serialization/test_bencoding.py b/lbry/tests/unit/dht/serialization/test_bencoding.py index 983ab224c..907166c6b 100644 --- a/lbry/tests/unit/dht/serialization/test_bencoding.py +++ b/lbry/tests/unit/dht/serialization/test_bencoding.py @@ -1,5 +1,5 @@ import unittest -from lbrynet.dht.serialization.bencoding import _bencode, bencode, bdecode, DecodeError +from lbry.dht.serialization.bencoding import _bencode, bencode, bdecode, DecodeError class EncodeDecodeTest(unittest.TestCase): diff --git a/lbry/tests/unit/dht/serialization/test_datagram.py b/lbry/tests/unit/dht/serialization/test_datagram.py index 565f7f1a5..5544f13cd 100644 --- a/lbry/tests/unit/dht/serialization/test_datagram.py +++ b/lbry/tests/unit/dht/serialization/test_datagram.py @@ -1,9 +1,9 @@ import unittest -from lbrynet.dht.error import DecodeError -from lbrynet.dht.serialization.bencoding import _bencode -from lbrynet.dht.serialization.datagram import RequestDatagram, ResponseDatagram, decode_datagram, ErrorDatagram -from lbrynet.dht.serialization.datagram import REQUEST_TYPE, RESPONSE_TYPE, ERROR_TYPE -from lbrynet.dht.serialization.datagram import make_compact_address, decode_compact_address +from lbry.dht.error import DecodeError +from lbry.dht.serialization.bencoding import _bencode +from lbry.dht.serialization.datagram import RequestDatagram, ResponseDatagram, decode_datagram, ErrorDatagram +from lbry.dht.serialization.datagram import REQUEST_TYPE, RESPONSE_TYPE, ERROR_TYPE +from lbry.dht.serialization.datagram import make_compact_address, decode_compact_address class TestDatagram(unittest.TestCase): diff --git a/lbry/tests/unit/dht/test_blob_announcer.py b/lbry/tests/unit/dht/test_blob_announcer.py index 49eb3c673..b3bdaaa41 100644 --- a/lbry/tests/unit/dht/test_blob_announcer.py +++ b/lbry/tests/unit/dht/test_blob_announcer.py @@ -5,12 +5,12 @@ import socket import asyncio from torba.testcase import AsyncioTestCase from tests import dht_mocks -from lbrynet.conf import Config -from lbrynet.dht import constants -from lbrynet.dht.node import Node -from lbrynet.dht.peer import PeerManager -from lbrynet.dht.blob_announcer import BlobAnnouncer -from lbrynet.extras.daemon.storage import SQLiteStorage +from lbry.conf import Config +from lbry.dht import constants +from lbry.dht.node import Node +from lbry.dht.peer import PeerManager +from lbry.dht.blob_announcer import BlobAnnouncer +from lbry.extras.daemon.storage import SQLiteStorage class TestBlobAnnouncer(AsyncioTestCase): diff --git a/lbry/tests/unit/dht/test_node.py b/lbry/tests/unit/dht/test_node.py index ca6af2827..8828c63f0 100644 --- a/lbry/tests/unit/dht/test_node.py +++ b/lbry/tests/unit/dht/test_node.py @@ -2,9 +2,9 @@ import asyncio import typing from torba.testcase import AsyncioTestCase from tests import dht_mocks -from lbrynet.dht import constants -from lbrynet.dht.node import Node -from lbrynet.dht.peer import PeerManager +from lbry.dht import constants +from lbry.dht.node import Node +from lbry.dht.peer import PeerManager class TestNodePingQueueDiscover(AsyncioTestCase): diff --git a/lbry/tests/unit/dht/test_peer.py b/lbry/tests/unit/dht/test_peer.py index e71d4d4da..51a0c15b7 100644 --- a/lbry/tests/unit/dht/test_peer.py +++ b/lbry/tests/unit/dht/test_peer.py @@ -1,7 +1,7 @@ import asyncio import unittest -from lbrynet.utils import generate_id -from lbrynet.dht.peer import PeerManager +from lbry.utils import generate_id +from lbry.dht.peer import PeerManager from torba.testcase import AsyncioTestCase diff --git a/lbry/tests/unit/lbrynet_daemon/test_Daemon.py b/lbry/tests/unit/lbrynet_daemon/test_Daemon.py index 33dfa3746..7e1f53a04 100644 --- a/lbry/tests/unit/lbrynet_daemon/test_Daemon.py +++ b/lbry/tests/unit/lbrynet_daemon/test_Daemon.py @@ -2,16 +2,16 @@ import unittest from unittest import mock import json -from lbrynet.conf import Config -from lbrynet.extras.daemon.storage import SQLiteStorage -from lbrynet.extras.daemon.ComponentManager import ComponentManager -from lbrynet.extras.daemon.Components import DATABASE_COMPONENT, DHT_COMPONENT, WALLET_COMPONENT -from lbrynet.extras.daemon.Components import HASH_ANNOUNCER_COMPONENT -from lbrynet.extras.daemon.Components import UPNP_COMPONENT, BLOB_COMPONENT -from lbrynet.extras.daemon.Components import PEER_PROTOCOL_SERVER_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT -from lbrynet.extras.daemon.Components import HEADERS_COMPONENT -from lbrynet.extras.daemon.Daemon import Daemon as LBRYDaemon -from lbrynet.wallet import LbryWalletManager +from lbry.conf import Config +from lbry.extras.daemon.storage import SQLiteStorage +from lbry.extras.daemon.ComponentManager import ComponentManager +from lbry.extras.daemon.Components import DATABASE_COMPONENT, DHT_COMPONENT, WALLET_COMPONENT +from lbry.extras.daemon.Components import HASH_ANNOUNCER_COMPONENT +from lbry.extras.daemon.Components import UPNP_COMPONENT, BLOB_COMPONENT +from lbry.extras.daemon.Components import PEER_PROTOCOL_SERVER_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT +from lbry.extras.daemon.Components import HEADERS_COMPONENT +from lbry.extras.daemon.Daemon import Daemon as LBRYDaemon +from lbry.wallet import LbryWalletManager from torba.client.wallet import Wallet from tests import test_utils diff --git a/lbry/tests/unit/lbrynet_daemon/test_ExchangeRateManager.py b/lbry/tests/unit/lbrynet_daemon/test_ExchangeRateManager.py index 7ee1f312e..83e276d0b 100644 --- a/lbry/tests/unit/lbrynet_daemon/test_ExchangeRateManager.py +++ b/lbry/tests/unit/lbrynet_daemon/test_ExchangeRateManager.py @@ -1,8 +1,8 @@ import unittest from decimal import Decimal -from lbrynet.schema.claim import Claim -from lbrynet.extras.daemon import exchange_rate_manager -from lbrynet.error import InvalidExchangeRateResponse +from lbry.schema.claim import Claim +from lbry.extras.daemon import exchange_rate_manager +from lbry.error import InvalidExchangeRateResponse from tests import test_utils diff --git a/lbry/tests/unit/lbrynet_daemon/test_claims_comparator.py b/lbry/tests/unit/lbrynet_daemon/test_claims_comparator.py index 2c8276855..03f846afb 100644 --- a/lbry/tests/unit/lbrynet_daemon/test_claims_comparator.py +++ b/lbry/tests/unit/lbrynet_daemon/test_claims_comparator.py @@ -1,6 +1,6 @@ import unittest -from lbrynet.extras.daemon.Daemon import sort_claim_results +from lbry.extras.daemon.Daemon import sort_claim_results class ClaimsComparatorTest(unittest.TestCase): diff --git a/lbry/tests/unit/lbrynet_daemon/test_mime_types.py b/lbry/tests/unit/lbrynet_daemon/test_mime_types.py index 8d7d8b772..8272e3dbc 100644 --- a/lbry/tests/unit/lbrynet_daemon/test_mime_types.py +++ b/lbry/tests/unit/lbrynet_daemon/test_mime_types.py @@ -1,5 +1,5 @@ import unittest -from lbrynet.schema import mime_types +from lbry.schema import mime_types class TestMimeTypes(unittest.TestCase): diff --git a/lbry/tests/unit/schema/test_claim_from_bytes.py b/lbry/tests/unit/schema/test_claim_from_bytes.py index 1eaa133e1..b405300d1 100644 --- a/lbry/tests/unit/schema/test_claim_from_bytes.py +++ b/lbry/tests/unit/schema/test_claim_from_bytes.py @@ -1,7 +1,7 @@ from unittest import TestCase from binascii import unhexlify -from lbrynet.schema import Claim +from lbry.schema import Claim class TestOldJSONSchemaCompatibility(TestCase): diff --git a/lbry/tests/unit/schema/test_models.py b/lbry/tests/unit/schema/test_models.py index 0ab8e1255..687b52d6b 100644 --- a/lbry/tests/unit/schema/test_models.py +++ b/lbry/tests/unit/schema/test_models.py @@ -1,7 +1,7 @@ from unittest import TestCase from decimal import Decimal -from lbrynet.schema.claim import Claim, Stream +from lbry.schema.claim import Claim, Stream class TestClaimContainerAwareness(TestCase): diff --git a/lbry/tests/unit/schema/test_url.py b/lbry/tests/unit/schema/test_url.py index 0fd535c68..83cc203fd 100644 --- a/lbry/tests/unit/schema/test_url.py +++ b/lbry/tests/unit/schema/test_url.py @@ -1,6 +1,6 @@ import unittest -from lbrynet.schema.url import URL +from lbry.schema.url import URL claim_id = "63f2da17b0d90042c559cc73b6b17f853945c43e" diff --git a/lbry/tests/unit/stream/test_managed_stream.py b/lbry/tests/unit/stream/test_managed_stream.py index d59281a80..3e5f56f4b 100644 --- a/lbry/tests/unit/stream/test_managed_stream.py +++ b/lbry/tests/unit/stream/test_managed_stream.py @@ -3,14 +3,14 @@ import shutil import unittest from unittest import mock import asyncio -from lbrynet.blob.blob_file import MAX_BLOB_SIZE -from lbrynet.blob_exchange.serialization import BlobResponse -from lbrynet.blob_exchange.server import BlobServerProtocol -from lbrynet.dht.node import Node -from lbrynet.dht.peer import KademliaPeer -from lbrynet.extras.daemon.storage import StoredStreamClaim -from lbrynet.stream.managed_stream import ManagedStream -from lbrynet.stream.descriptor import StreamDescriptor +from lbry.blob.blob_file import MAX_BLOB_SIZE +from lbry.blob_exchange.serialization import BlobResponse +from lbry.blob_exchange.server import BlobServerProtocol +from lbry.dht.node import Node +from lbry.dht.peer import KademliaPeer +from lbry.extras.daemon.storage import StoredStreamClaim +from lbry.stream.managed_stream import ManagedStream +from lbry.stream.descriptor import StreamDescriptor from tests.unit.blob_exchange.test_transfer_blob import BlobExchangeTestBase diff --git a/lbry/tests/unit/stream/test_reflector.py b/lbry/tests/unit/stream/test_reflector.py index 1d820f009..73ec39b47 100644 --- a/lbry/tests/unit/stream/test_reflector.py +++ b/lbry/tests/unit/stream/test_reflector.py @@ -3,11 +3,11 @@ import asyncio import tempfile import shutil from torba.testcase import AsyncioTestCase -from lbrynet.conf import Config -from lbrynet.extras.daemon.storage import SQLiteStorage -from lbrynet.blob.blob_manager import BlobManager -from lbrynet.stream.stream_manager import StreamManager -from lbrynet.stream.reflector.server import ReflectorServer +from lbry.conf import Config +from lbry.extras.daemon.storage import SQLiteStorage +from lbry.blob.blob_manager import BlobManager +from lbry.stream.stream_manager import StreamManager +from lbry.stream.reflector.server import ReflectorServer class TestStreamAssembler(AsyncioTestCase): diff --git a/lbry/tests/unit/stream/test_stream_descriptor.py b/lbry/tests/unit/stream/test_stream_descriptor.py index 479ab48ac..9889f606a 100644 --- a/lbry/tests/unit/stream/test_stream_descriptor.py +++ b/lbry/tests/unit/stream/test_stream_descriptor.py @@ -4,13 +4,13 @@ import tempfile import shutil import json -from lbrynet.blob.blob_file import BlobFile +from lbry.blob.blob_file import BlobFile from torba.testcase import AsyncioTestCase -from lbrynet.conf import Config -from lbrynet.error import InvalidStreamDescriptorError -from lbrynet.extras.daemon.storage import SQLiteStorage -from lbrynet.blob.blob_manager import BlobManager -from lbrynet.stream.descriptor import StreamDescriptor +from lbry.conf import Config +from lbry.error import InvalidStreamDescriptorError +from lbry.extras.daemon.storage import SQLiteStorage +from lbry.blob.blob_manager import BlobManager +from lbry.stream.descriptor import StreamDescriptor class TestStreamDescriptor(AsyncioTestCase): diff --git a/lbry/tests/unit/stream/test_stream_manager.py b/lbry/tests/unit/stream/test_stream_manager.py index 5079f3bf9..77aaef6d2 100644 --- a/lbry/tests/unit/stream/test_stream_manager.py +++ b/lbry/tests/unit/stream/test_stream_manager.py @@ -7,17 +7,17 @@ import json from decimal import Decimal from tests.unit.blob_exchange.test_transfer_blob import BlobExchangeTestBase from tests.unit.lbrynet_daemon.test_ExchangeRateManager import get_dummy_exchange_rate_manager -from lbrynet.utils import generate_id -from lbrynet.error import InsufficientFundsError, KeyFeeAboveMaxAllowed, ResolveError, DownloadSDTimeout, \ +from lbry.utils import generate_id +from lbry.error import InsufficientFundsError, KeyFeeAboveMaxAllowed, ResolveError, DownloadSDTimeout, \ DownloadDataTimeout -from lbrynet.wallet.manager import LbryWalletManager -from lbrynet.extras.daemon.analytics import AnalyticsManager -from lbrynet.stream.stream_manager import StreamManager -from lbrynet.stream.descriptor import StreamDescriptor -from lbrynet.dht.node import Node -from lbrynet.dht.protocol.protocol import KademliaProtocol -from lbrynet.dht.protocol.routing_table import TreeRoutingTable -from lbrynet.schema.claim import Claim +from lbry.wallet.manager import LbryWalletManager +from lbry.extras.daemon.analytics import AnalyticsManager +from lbry.stream.stream_manager import StreamManager +from lbry.stream.descriptor import StreamDescriptor +from lbry.dht.node import Node +from lbry.dht.protocol.protocol import KademliaProtocol +from lbry.dht.protocol.routing_table import TreeRoutingTable +from lbry.schema.claim import Claim def get_mock_node(peer=None): diff --git a/lbry/tests/unit/test_cli.py b/lbry/tests/unit/test_cli.py index d08d38564..208e08403 100644 --- a/lbry/tests/unit/test_cli.py +++ b/lbry/tests/unit/test_cli.py @@ -5,9 +5,9 @@ from unittest import TestCase import docopt from torba.testcase import AsyncioTestCase -from lbrynet.extras.cli import normalize_value, main -from lbrynet.extras.system_info import get_platform -from lbrynet.extras.daemon.Daemon import Daemon +from lbry.extras.cli import normalize_value, main +from lbry.extras.system_info import get_platform +from lbry.extras.daemon.Daemon import Daemon class CLITest(AsyncioTestCase): diff --git a/lbry/tests/unit/test_conf.py b/lbry/tests/unit/test_conf.py index 328705391..7af158bc8 100644 --- a/lbry/tests/unit/test_conf.py +++ b/lbry/tests/unit/test_conf.py @@ -4,8 +4,8 @@ import types import tempfile import unittest import argparse -from lbrynet.conf import Config, BaseConfig, String, Integer, Toggle, Servers, Strings, NOT_SET -from lbrynet.error import InvalidCurrencyError +from lbry.conf import Config, BaseConfig, String, Integer, Toggle, Servers, Strings, NOT_SET +from lbry.error import InvalidCurrencyError class TestConfig(BaseConfig): diff --git a/lbry/tests/unit/wallet/server/test_sqldb.py b/lbry/tests/unit/wallet/server/test_sqldb.py index c564f9e4c..7b6b59a2e 100644 --- a/lbry/tests/unit/wallet/server/test_sqldb.py +++ b/lbry/tests/unit/wallet/server/test_sqldb.py @@ -4,13 +4,13 @@ import hashlib from binascii import hexlify from torba.client.constants import COIN, NULL_HASH32 -from lbrynet.schema.claim import Claim -from lbrynet.wallet.server.db import SQLDB -from lbrynet.wallet.server.coin import LBCRegTest -from lbrynet.wallet.server.trending import TRENDING_WINDOW -from lbrynet.wallet.server.canonical import FindShortestID -from lbrynet.wallet.server.block_processor import Timer -from lbrynet.wallet.transaction import Transaction, Input, Output +from lbry.schema.claim import Claim +from lbry.wallet.server.db import SQLDB +from lbry.wallet.server.coin import LBCRegTest +from lbry.wallet.server.trending import TRENDING_WINDOW +from lbry.wallet.server.canonical import FindShortestID +from lbry.wallet.server.block_processor import Timer +from lbry.wallet.transaction import Transaction, Input, Output def get_output(amount=COIN, pubkey_hash=NULL_HASH32): diff --git a/lbry/tests/unit/wallet/test_account.py b/lbry/tests/unit/wallet/test_account.py index 70dd98f03..c589a3faa 100644 --- a/lbry/tests/unit/wallet/test_account.py +++ b/lbry/tests/unit/wallet/test_account.py @@ -1,9 +1,9 @@ from torba.testcase import AsyncioTestCase from torba.client.wallet import Wallet -from lbrynet.wallet.ledger import MainNetLedger, WalletDatabase -from lbrynet.wallet.header import Headers -from lbrynet.wallet.account import Account +from lbry.wallet.ledger import MainNetLedger, WalletDatabase +from lbry.wallet.header import Headers +from lbry.wallet.account import Account class TestAccount(AsyncioTestCase): diff --git a/lbry/tests/unit/wallet/test_claim_proofs.py b/lbry/tests/unit/wallet/test_claim_proofs.py index 7d35370cc..4485e41be 100644 --- a/lbry/tests/unit/wallet/test_claim_proofs.py +++ b/lbry/tests/unit/wallet/test_claim_proofs.py @@ -1,7 +1,7 @@ import unittest from binascii import hexlify, unhexlify -from lbrynet.wallet.claim_proofs import get_hash_for_outpoint, verify_proof +from lbry.wallet.claim_proofs import get_hash_for_outpoint, verify_proof from torba.client.hash import double_sha256 diff --git a/lbry/tests/unit/wallet/test_dewies.py b/lbry/tests/unit/wallet/test_dewies.py index a29a77680..7d1b7ba7d 100644 --- a/lbry/tests/unit/wallet/test_dewies.py +++ b/lbry/tests/unit/wallet/test_dewies.py @@ -1,6 +1,6 @@ import unittest -from lbrynet.wallet.dewies import lbc_to_dewies as l2d, dewies_to_lbc as d2l +from lbry.wallet.dewies import lbc_to_dewies as l2d, dewies_to_lbc as d2l class TestDeweyConversion(unittest.TestCase): diff --git a/lbry/tests/unit/wallet/test_headers.py b/lbry/tests/unit/wallet/test_headers.py index 1f39979ed..32fe40cbc 100644 --- a/lbry/tests/unit/wallet/test_headers.py +++ b/lbry/tests/unit/wallet/test_headers.py @@ -3,7 +3,7 @@ from binascii import unhexlify from torba.testcase import AsyncioTestCase from torba.client.util import ArithUint256 -from lbrynet.wallet.ledger import Headers +from lbry.wallet.ledger import Headers class TestHeaders(AsyncioTestCase): diff --git a/lbry/tests/unit/wallet/test_ledger.py b/lbry/tests/unit/wallet/test_ledger.py index cb41f94bf..ee0df08f4 100644 --- a/lbry/tests/unit/wallet/test_ledger.py +++ b/lbry/tests/unit/wallet/test_ledger.py @@ -1,9 +1,9 @@ from torba.testcase import AsyncioTestCase from torba.client.wallet import Wallet -from lbrynet.wallet.account import Account -from lbrynet.wallet.transaction import Transaction, Output, Input -from lbrynet.wallet.ledger import MainNetLedger +from lbry.wallet.account import Account +from lbry.wallet.transaction import Transaction, Output, Input +from lbry.wallet.ledger import MainNetLedger class LedgerTestCase(AsyncioTestCase): diff --git a/lbry/tests/unit/wallet/test_schema_signing.py b/lbry/tests/unit/wallet/test_schema_signing.py index 7211aa928..3d4cd5af4 100644 --- a/lbry/tests/unit/wallet/test_schema_signing.py +++ b/lbry/tests/unit/wallet/test_schema_signing.py @@ -5,10 +5,10 @@ from cryptography.exceptions import InvalidSignature from torba.testcase import AsyncioTestCase from torba.client.constants import CENT, NULL_HASH32 -from lbrynet.wallet.ledger import MainNetLedger -from lbrynet.wallet.transaction import Transaction, Input, Output +from lbry.wallet.ledger import MainNetLedger +from lbry.wallet.transaction import Transaction, Input, Output -from lbrynet.schema.claim import Claim +from lbry.schema.claim import Claim def get_output(amount=CENT, pubkey_hash=NULL_HASH32): diff --git a/lbry/tests/unit/wallet/test_script.py b/lbry/tests/unit/wallet/test_script.py index 5954d61e6..839925c87 100644 --- a/lbry/tests/unit/wallet/test_script.py +++ b/lbry/tests/unit/wallet/test_script.py @@ -1,7 +1,7 @@ import unittest from binascii import hexlify, unhexlify -from lbrynet.wallet.script import OutputScript +from lbry.wallet.script import OutputScript class TestPayClaimNamePubkeyHash(unittest.TestCase): diff --git a/lbry/tests/unit/wallet/test_transaction.py b/lbry/tests/unit/wallet/test_transaction.py index 4f3b1b96a..d3e4503cb 100644 --- a/lbry/tests/unit/wallet/test_transaction.py +++ b/lbry/tests/unit/wallet/test_transaction.py @@ -5,8 +5,8 @@ from torba.testcase import AsyncioTestCase from torba.client.constants import CENT, COIN, NULL_HASH32 from torba.client.wallet import Wallet -from lbrynet.wallet.ledger import MainNetLedger -from lbrynet.wallet.transaction import Transaction, Output, Input +from lbry.wallet.ledger import MainNetLedger +from lbry.wallet.transaction import Transaction, Output, Input FEE_PER_BYTE = 50