From ee6f511126eb600bf5dfdfc4ba62e0e2b0fcc604 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Thu, 20 Jun 2019 20:55:47 -0400 Subject: [PATCH] moved lbrynet -> lbry --- lbry/{lbrynet => lbry}/__init__.py | 0 lbry/{lbrynet => lbry}/blob/__init__.py | 2 +- lbry/{lbrynet => lbry}/blob/blob_file.py | 10 ++-- lbry/{lbrynet => lbry}/blob/blob_info.py | 0 lbry/{lbrynet => lbry}/blob/blob_manager.py | 14 ++--- lbry/{lbrynet => lbry}/blob/writer.py | 4 +- .../blob_exchange/__init__.py | 0 .../{lbrynet => lbry}/blob_exchange/client.py | 12 ++-- .../blob_exchange/downloader.py | 14 ++--- .../blob_exchange/serialization.py | 0 .../{lbrynet => lbry}/blob_exchange/server.py | 6 +- lbry/{lbrynet => lbry}/build_type.py | 0 lbry/{lbrynet => lbry}/conf.py | 6 +- lbry/{lbrynet => lbry}/connection_manager.py | 0 lbry/{lbrynet => lbry}/cryptoutils.py | 0 lbry/{lbrynet => lbry}/dht/__init__.py | 0 lbry/{lbrynet => lbry}/dht/blob_announcer.py | 4 +- lbry/{lbrynet => lbry}/dht/constants.py | 0 lbry/{lbrynet => lbry}/dht/error.py | 0 lbry/{lbrynet => lbry}/dht/node.py | 14 ++--- lbry/{lbrynet => lbry}/dht/peer.py | 4 +- .../dht/protocol/__init__.py | 0 .../dht/protocol/data_store.py | 4 +- .../dht/protocol/distance.py | 2 +- .../dht/protocol/iterative_find.py | 12 ++-- .../dht/protocol/protocol.py | 14 ++--- .../dht/protocol/routing_table.py | 6 +- .../dht/serialization/__init__.py | 0 .../dht/serialization/bencoding.py | 2 +- .../dht/serialization/datagram.py | 4 +- lbry/{lbrynet => lbry}/error.py | 0 lbry/{lbrynet => lbry}/extras/__init__.py | 0 lbry/{lbrynet => lbry}/extras/cli.py | 8 +-- .../extras/daemon/Component.py | 4 +- .../extras/daemon/ComponentManager.py | 6 +- .../extras/daemon/Components.py | 26 ++++----- .../{lbrynet => lbry}/extras/daemon/Daemon.py | 58 +++++++++---------- lbry/lbry/extras/daemon/__init__.py | 1 + .../extras/daemon/analytics.py | 6 +- .../{lbrynet => lbry}/extras/daemon/client.py | 4 +- .../extras/daemon/comment_client.py | 2 +- .../extras/daemon/exchange_rate_manager.py | 4 +- .../extras/daemon/json_response_encoder.py | 10 ++-- .../extras/daemon/loggly_handler.py | 2 +- .../extras/daemon/migrator/__init__.py | 0 .../extras/daemon/migrator/dbmigrator.py | 0 .../extras/daemon/migrator/migrate10to11.py | 0 .../extras/daemon/migrator/migrate1to2.py | 0 .../extras/daemon/migrator/migrate2to3.py | 0 .../extras/daemon/migrator/migrate3to4.py | 0 .../extras/daemon/migrator/migrate4to5.py | 0 .../extras/daemon/migrator/migrate5to6.py | 2 +- .../extras/daemon/migrator/migrate6to7.py | 0 .../extras/daemon/migrator/migrate7to8.py | 0 .../extras/daemon/migrator/migrate8to9.py | 4 +- .../extras/daemon/migrator/migrate9to10.py | 0 .../extras/daemon/storage.py | 16 ++--- .../extras/daemon/undecorated.py | 0 lbry/{lbrynet => lbry}/extras/system_info.py | 2 +- lbry/{lbrynet => lbry}/schema/Makefile | 0 lbry/{lbrynet => lbry}/schema/__init__.py | 0 lbry/{lbrynet => lbry}/schema/attrs.py | 6 +- lbry/{lbrynet => lbry}/schema/base.py | 0 lbry/{lbrynet => lbry}/schema/claim.py | 10 ++-- lbry/{lbrynet => lbry}/schema/compat.py | 6 +- lbry/{lbrynet => lbry}/schema/mime_types.py | 0 lbry/{lbrynet => lbry}/schema/result.py | 2 +- lbry/{lbrynet => lbry}/schema/support.py | 2 +- .../schema/types/__init__.py | 0 .../schema/types/v1/__init__.py | 0 .../schema/types/v1/certificate_pb2.py | 0 .../schema/types/v1/fee_pb2.py | 0 .../schema/types/v1/legacy_claim_pb2.py | 0 .../schema/types/v1/metadata_pb2.py | 0 .../schema/types/v1/signature_pb2.py | 0 .../schema/types/v1/source_pb2.py | 0 .../schema/types/v1/stream_pb2.py | 0 .../schema/types/v2/__init__.py | 0 .../schema/types/v2/claim_pb2.py | 0 .../schema/types/v2/result_pb2.py | 0 lbry/{lbrynet => lbry}/schema/url.py | 0 lbry/{lbrynet => lbry}/stream/__init__.py | 0 lbry/{lbrynet => lbry}/stream/descriptor.py | 10 ++-- lbry/{lbrynet => lbry}/stream/downloader.py | 20 +++---- .../stream/managed_stream.py | 28 ++++----- .../stream/reflector/__init__.py | 0 .../stream/reflector/client.py | 4 +- .../stream/reflector/server.py | 8 +-- .../stream/stream_manager.py | 34 +++++------ lbry/{lbrynet => lbry}/testcase.py | 24 ++++---- lbry/{lbrynet => lbry}/utils.py | 4 +- lbry/{lbrynet => lbry}/wallet/__init__.py | 6 +- lbry/{lbrynet => lbry}/wallet/account.py | 0 lbry/{lbrynet => lbry}/wallet/claim_proofs.py | 0 lbry/{lbrynet => lbry}/wallet/database.py | 2 +- lbry/{lbrynet => lbry}/wallet/dewies.py | 0 lbry/{lbrynet => lbry}/wallet/header.py | 0 lbry/{lbrynet => lbry}/wallet/ledger.py | 18 +++--- lbry/{lbrynet => lbry}/wallet/manager.py | 10 ++-- lbry/{lbrynet => lbry}/wallet/network.py | 0 lbry/{lbrynet => lbry}/wallet/resolve.py | 14 ++--- lbry/{lbrynet => lbry}/wallet/script.py | 0 .../wallet/server/__init__.py | 0 .../wallet/server/block_processor.py | 4 +- .../wallet/server/canonical.py | 0 lbry/{lbrynet => lbry}/wallet/server/coin.py | 2 +- .../{lbrynet => lbry}/wallet/server/daemon.py | 0 lbry/{lbrynet => lbry}/wallet/server/db.py | 12 ++-- .../wallet/server/session.py | 8 +-- .../wallet/server/trending.py | 0 lbry/{lbrynet => lbry}/wallet/transaction.py | 8 +-- lbry/{lbrynet => lbry}/winpaths.py | 0 lbry/lbrynet/extras/daemon/__init__.py | 1 - 113 files changed, 266 insertions(+), 266 deletions(-) rename lbry/{lbrynet => lbry}/__init__.py (100%) rename lbry/{lbrynet => lbry}/blob/__init__.py (74%) rename lbry/{lbrynet => lbry}/blob/blob_file.py (97%) rename lbry/{lbrynet => lbry}/blob/blob_info.py (100%) rename lbry/{lbrynet => lbry}/blob/blob_manager.py (93%) rename lbry/{lbrynet => lbry}/blob/writer.py (95%) rename lbry/{lbrynet => lbry}/blob_exchange/__init__.py (100%) rename lbry/{lbrynet => lbry}/blob_exchange/client.py (97%) rename lbry/{lbrynet => lbry}/blob_exchange/downloader.py (94%) rename lbry/{lbrynet => lbry}/blob_exchange/serialization.py (100%) rename lbry/{lbrynet => lbry}/blob_exchange/server.py (95%) rename lbry/{lbrynet => lbry}/build_type.py (100%) rename lbry/{lbrynet => lbry}/conf.py (99%) rename lbry/{lbrynet => lbry}/connection_manager.py (100%) rename lbry/{lbrynet => lbry}/cryptoutils.py (100%) rename lbry/{lbrynet => lbry}/dht/__init__.py (100%) rename lbry/{lbrynet => lbry}/dht/blob_announcer.py (96%) rename lbry/{lbrynet => lbry}/dht/constants.py (100%) rename lbry/{lbrynet => lbry}/dht/error.py (100%) rename lbry/{lbrynet => lbry}/dht/node.py (96%) rename lbry/{lbrynet => lbry}/dht/peer.py (98%) rename lbry/{lbrynet => lbry}/dht/protocol/__init__.py (100%) rename lbry/{lbrynet => lbry}/dht/protocol/data_store.py (96%) rename lbry/{lbrynet => lbry}/dht/protocol/distance.py (96%) rename lbry/{lbrynet => lbry}/dht/protocol/iterative_find.py (97%) rename lbry/{lbrynet => lbry}/dht/protocol/protocol.py (98%) rename lbry/{lbrynet => lbry}/dht/protocol/routing_table.py (98%) rename lbry/{lbrynet => lbry}/dht/serialization/__init__.py (100%) rename lbry/{lbrynet => lbry}/dht/serialization/bencoding.py (98%) rename lbry/{lbrynet => lbry}/dht/serialization/datagram.py (98%) rename lbry/{lbrynet => lbry}/error.py (100%) rename lbry/{lbrynet => lbry}/extras/__init__.py (100%) rename lbry/{lbrynet => lbry}/extras/cli.py (97%) rename lbry/{lbrynet => lbry}/extras/daemon/Component.py (94%) rename lbry/{lbrynet => lbry}/extras/daemon/ComponentManager.py (97%) rename lbry/{lbrynet => lbry}/extras/daemon/Components.py (97%) rename lbry/{lbrynet => lbry}/extras/daemon/Daemon.py (98%) create mode 100644 lbry/lbry/extras/daemon/__init__.py rename lbry/{lbrynet => lbry}/extras/daemon/analytics.py (98%) rename lbry/{lbrynet => lbry}/extras/daemon/client.py (62%) rename lbry/{lbrynet => lbry}/extras/daemon/comment_client.py (97%) rename lbry/{lbrynet => lbry}/extras/daemon/exchange_rate_manager.py (98%) rename lbry/{lbrynet => lbry}/extras/daemon/json_response_encoder.py (97%) rename lbry/{lbrynet => lbry}/extras/daemon/loggly_handler.py (98%) rename lbry/{lbrynet => lbry}/extras/daemon/migrator/__init__.py (100%) rename lbry/{lbrynet => lbry}/extras/daemon/migrator/dbmigrator.py (100%) rename lbry/{lbrynet => lbry}/extras/daemon/migrator/migrate10to11.py (100%) rename lbry/{lbrynet => lbry}/extras/daemon/migrator/migrate1to2.py (100%) rename lbry/{lbrynet => lbry}/extras/daemon/migrator/migrate2to3.py (100%) rename lbry/{lbrynet => lbry}/extras/daemon/migrator/migrate3to4.py (100%) rename lbry/{lbrynet => lbry}/extras/daemon/migrator/migrate4to5.py (100%) rename lbry/{lbrynet => lbry}/extras/daemon/migrator/migrate5to6.py (99%) rename lbry/{lbrynet => lbry}/extras/daemon/migrator/migrate6to7.py (100%) rename lbry/{lbrynet => lbry}/extras/daemon/migrator/migrate7to8.py (100%) rename lbry/{lbrynet => lbry}/extras/daemon/migrator/migrate8to9.py (95%) rename lbry/{lbrynet => lbry}/extras/daemon/migrator/migrate9to10.py (100%) rename lbry/{lbrynet => lbry}/extras/daemon/storage.py (99%) rename lbry/{lbrynet => lbry}/extras/daemon/undecorated.py (100%) rename lbry/{lbrynet => lbry}/extras/system_info.py (93%) rename lbry/{lbrynet => lbry}/schema/Makefile (100%) rename lbry/{lbrynet => lbry}/schema/__init__.py (100%) rename lbry/{lbrynet => lbry}/schema/attrs.py (98%) rename lbry/{lbrynet => lbry}/schema/base.py (100%) rename lbry/{lbrynet => lbry}/schema/claim.py (97%) rename lbry/{lbrynet => lbry}/schema/compat.py (94%) rename lbry/{lbrynet => lbry}/schema/mime_types.py (100%) rename lbry/{lbrynet => lbry}/schema/result.py (98%) rename lbry/{lbrynet => lbry}/schema/support.py (71%) rename lbry/{lbrynet => lbry}/schema/types/__init__.py (100%) rename lbry/{lbrynet => lbry}/schema/types/v1/__init__.py (100%) rename lbry/{lbrynet => lbry}/schema/types/v1/certificate_pb2.py (100%) rename lbry/{lbrynet => lbry}/schema/types/v1/fee_pb2.py (100%) rename lbry/{lbrynet => lbry}/schema/types/v1/legacy_claim_pb2.py (100%) rename lbry/{lbrynet => lbry}/schema/types/v1/metadata_pb2.py (100%) rename lbry/{lbrynet => lbry}/schema/types/v1/signature_pb2.py (100%) rename lbry/{lbrynet => lbry}/schema/types/v1/source_pb2.py (100%) rename lbry/{lbrynet => lbry}/schema/types/v1/stream_pb2.py (100%) rename lbry/{lbrynet => lbry}/schema/types/v2/__init__.py (100%) rename lbry/{lbrynet => lbry}/schema/types/v2/claim_pb2.py (100%) rename lbry/{lbrynet => lbry}/schema/types/v2/result_pb2.py (100%) rename lbry/{lbrynet => lbry}/schema/url.py (100%) rename lbry/{lbrynet => lbry}/stream/__init__.py (100%) rename lbry/{lbrynet => lbry}/stream/descriptor.py (97%) rename lbry/{lbrynet => lbry}/stream/downloader.py (92%) rename lbry/{lbrynet => lbry}/stream/managed_stream.py (97%) rename lbry/{lbrynet => lbry}/stream/reflector/__init__.py (100%) rename lbry/{lbrynet => lbry}/stream/reflector/client.py (97%) rename lbry/{lbrynet => lbry}/stream/reflector/server.py (96%) rename lbry/{lbrynet => lbry}/stream/stream_manager.py (95%) rename lbry/{lbrynet => lbry}/testcase.py (94%) rename lbry/{lbrynet => lbry}/utils.py (98%) rename lbry/{lbrynet => lbry}/wallet/__init__.py (57%) rename lbry/{lbrynet => lbry}/wallet/account.py (100%) rename lbry/{lbrynet => lbry}/wallet/claim_proofs.py (100%) rename lbry/{lbrynet => lbry}/wallet/database.py (99%) rename lbry/{lbrynet => lbry}/wallet/dewies.py (100%) rename lbry/{lbrynet => lbry}/wallet/header.py (100%) rename lbry/{lbrynet => lbry}/wallet/ledger.py (92%) rename lbry/{lbrynet => lbry}/wallet/manager.py (98%) rename lbry/{lbrynet => lbry}/wallet/network.py (100%) rename lbry/{lbrynet => lbry}/wallet/resolve.py (98%) rename lbry/{lbrynet => lbry}/wallet/script.py (100%) rename lbry/{lbrynet => lbry}/wallet/server/__init__.py (100%) rename lbry/{lbrynet => lbry}/wallet/server/block_processor.py (97%) rename lbry/{lbrynet => lbry}/wallet/server/canonical.py (100%) rename lbry/{lbrynet => lbry}/wallet/server/coin.py (98%) rename lbry/{lbrynet => lbry}/wallet/server/daemon.py (100%) rename lbry/{lbrynet => lbry}/wallet/server/db.py (99%) rename lbry/{lbrynet => lbry}/wallet/server/session.py (98%) rename lbry/{lbrynet => lbry}/wallet/server/trending.py (100%) rename lbry/{lbrynet => lbry}/wallet/transaction.py (98%) rename lbry/{lbrynet => lbry}/winpaths.py (100%) delete mode 100644 lbry/lbrynet/extras/daemon/__init__.py diff --git a/lbry/lbrynet/__init__.py b/lbry/lbry/__init__.py similarity index 100% rename from lbry/lbrynet/__init__.py rename to lbry/lbry/__init__.py diff --git a/lbry/lbrynet/blob/__init__.py b/lbry/lbry/blob/__init__.py similarity index 74% rename from lbry/lbrynet/blob/__init__.py rename to lbry/lbry/blob/__init__.py index b1f41917d..e2fcdfd70 100644 --- a/lbry/lbrynet/blob/__init__.py +++ b/lbry/lbry/blob/__init__.py @@ -1,4 +1,4 @@ -from lbrynet.cryptoutils import get_lbry_hash_obj +from lbry.cryptoutils import get_lbry_hash_obj MAX_BLOB_SIZE = 2 * 2 ** 20 diff --git a/lbry/lbrynet/blob/blob_file.py b/lbry/lbry/blob/blob_file.py similarity index 97% rename from lbry/lbrynet/blob/blob_file.py rename to lbry/lbry/blob/blob_file.py index b8a3e4796..6b1218bd9 100644 --- a/lbry/lbrynet/blob/blob_file.py +++ b/lbry/lbry/blob/blob_file.py @@ -10,12 +10,12 @@ from cryptography.hazmat.primitives.ciphers import Cipher, modes from cryptography.hazmat.primitives.ciphers.algorithms import AES from cryptography.hazmat.primitives.padding import PKCS7 -from lbrynet.cryptoutils import backend, get_lbry_hash_obj -from lbrynet.error import DownloadCancelledError, InvalidBlobHashError, InvalidDataError +from lbry.cryptoutils import backend, get_lbry_hash_obj +from lbry.error import DownloadCancelledError, InvalidBlobHashError, InvalidDataError -from lbrynet.blob import MAX_BLOB_SIZE, blobhash_length -from lbrynet.blob.blob_info import BlobInfo -from lbrynet.blob.writer import HashBlobWriter +from lbry.blob import MAX_BLOB_SIZE, blobhash_length +from lbry.blob.blob_info import BlobInfo +from lbry.blob.writer import HashBlobWriter log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/blob/blob_info.py b/lbry/lbry/blob/blob_info.py similarity index 100% rename from lbry/lbrynet/blob/blob_info.py rename to lbry/lbry/blob/blob_info.py diff --git a/lbry/lbrynet/blob/blob_manager.py b/lbry/lbry/blob/blob_manager.py similarity index 93% rename from lbry/lbrynet/blob/blob_manager.py rename to lbry/lbry/blob/blob_manager.py index 793a4d9d1..f8ed9c3e3 100644 --- a/lbry/lbrynet/blob/blob_manager.py +++ b/lbry/lbry/blob/blob_manager.py @@ -2,15 +2,15 @@ import os import typing import asyncio import logging -from lbrynet.utils import LRUCache -from lbrynet.blob.blob_file import is_valid_blobhash, BlobFile, BlobBuffer, AbstractBlob -from lbrynet.stream.descriptor import StreamDescriptor -from lbrynet.connection_manager import ConnectionManager +from lbry.utils import LRUCache +from lbry.blob.blob_file import is_valid_blobhash, BlobFile, BlobBuffer, AbstractBlob +from lbry.stream.descriptor import StreamDescriptor +from lbry.connection_manager import ConnectionManager if typing.TYPE_CHECKING: - from lbrynet.conf import Config - from lbrynet.dht.protocol.data_store import DictDataStore - from lbrynet.extras.daemon.storage import SQLiteStorage + from lbry.conf import Config + from lbry.dht.protocol.data_store import DictDataStore + from lbry.extras.daemon.storage import SQLiteStorage log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/blob/writer.py b/lbry/lbry/blob/writer.py similarity index 95% rename from lbry/lbrynet/blob/writer.py rename to lbry/lbry/blob/writer.py index b4b2902a8..608abf83f 100644 --- a/lbry/lbrynet/blob/writer.py +++ b/lbry/lbry/blob/writer.py @@ -2,8 +2,8 @@ import typing import logging import asyncio from io import BytesIO -from lbrynet.error import InvalidBlobHashError, InvalidDataError -from lbrynet.cryptoutils import get_lbry_hash_obj +from lbry.error import InvalidBlobHashError, InvalidDataError +from lbry.cryptoutils import get_lbry_hash_obj log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/blob_exchange/__init__.py b/lbry/lbry/blob_exchange/__init__.py similarity index 100% rename from lbry/lbrynet/blob_exchange/__init__.py rename to lbry/lbry/blob_exchange/__init__.py diff --git a/lbry/lbrynet/blob_exchange/client.py b/lbry/lbry/blob_exchange/client.py similarity index 97% rename from lbry/lbrynet/blob_exchange/client.py rename to lbry/lbry/blob_exchange/client.py index 7a67b2e39..e9efb3ac6 100644 --- a/lbry/lbrynet/blob_exchange/client.py +++ b/lbry/lbry/blob_exchange/client.py @@ -2,13 +2,13 @@ import asyncio import logging import typing import binascii -from lbrynet.error import InvalidBlobHashError, InvalidDataError -from lbrynet.blob_exchange.serialization import BlobResponse, BlobRequest -from lbrynet.utils import cache_concurrent +from lbry.error import InvalidBlobHashError, InvalidDataError +from lbry.blob_exchange.serialization import BlobResponse, BlobRequest +from lbry.utils import cache_concurrent if typing.TYPE_CHECKING: - from lbrynet.blob.blob_file import AbstractBlob - from lbrynet.blob.writer import HashBlobWriter - from lbrynet.connection_manager import ConnectionManager + from lbry.blob.blob_file import AbstractBlob + from lbry.blob.writer import HashBlobWriter + from lbry.connection_manager import ConnectionManager log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/blob_exchange/downloader.py b/lbry/lbry/blob_exchange/downloader.py similarity index 94% rename from lbry/lbrynet/blob_exchange/downloader.py rename to lbry/lbry/blob_exchange/downloader.py index 87723e5db..02943749b 100644 --- a/lbry/lbrynet/blob_exchange/downloader.py +++ b/lbry/lbry/blob_exchange/downloader.py @@ -1,14 +1,14 @@ import asyncio import typing import logging -from lbrynet.utils import cache_concurrent -from lbrynet.blob_exchange.client import request_blob +from lbry.utils import cache_concurrent +from lbry.blob_exchange.client import request_blob if typing.TYPE_CHECKING: - from lbrynet.conf import Config - from lbrynet.dht.node import Node - from lbrynet.dht.peer import KademliaPeer - from lbrynet.blob.blob_manager import BlobManager - from lbrynet.blob.blob_file import AbstractBlob + from lbry.conf import Config + from lbry.dht.node import Node + from lbry.dht.peer import KademliaPeer + from lbry.blob.blob_manager import BlobManager + from lbry.blob.blob_file import AbstractBlob log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/blob_exchange/serialization.py b/lbry/lbry/blob_exchange/serialization.py similarity index 100% rename from lbry/lbrynet/blob_exchange/serialization.py rename to lbry/lbry/blob_exchange/serialization.py diff --git a/lbry/lbrynet/blob_exchange/server.py b/lbry/lbry/blob_exchange/server.py similarity index 95% rename from lbry/lbrynet/blob_exchange/server.py rename to lbry/lbry/blob_exchange/server.py index d7b0c49bb..07ee0ce39 100644 --- a/lbry/lbrynet/blob_exchange/server.py +++ b/lbry/lbry/blob_exchange/server.py @@ -3,12 +3,12 @@ import binascii import logging import typing from json.decoder import JSONDecodeError -from lbrynet.blob_exchange.serialization import BlobResponse, BlobRequest, blob_response_types -from lbrynet.blob_exchange.serialization import BlobAvailabilityResponse, BlobPriceResponse, BlobDownloadResponse, \ +from lbry.blob_exchange.serialization import BlobResponse, BlobRequest, blob_response_types +from lbry.blob_exchange.serialization import BlobAvailabilityResponse, BlobPriceResponse, BlobDownloadResponse, \ BlobPaymentAddressResponse if typing.TYPE_CHECKING: - from lbrynet.blob.blob_manager import BlobManager + from lbry.blob.blob_manager import BlobManager log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/build_type.py b/lbry/lbry/build_type.py similarity index 100% rename from lbry/lbrynet/build_type.py rename to lbry/lbry/build_type.py diff --git a/lbry/lbrynet/conf.py b/lbry/lbry/conf.py similarity index 99% rename from lbry/lbrynet/conf.py rename to lbry/lbry/conf.py index ee73b36bd..916d57807 100644 --- a/lbry/lbrynet/conf.py +++ b/lbry/lbry/conf.py @@ -7,8 +7,8 @@ import yaml from argparse import ArgumentParser from contextlib import contextmanager from appdirs import user_data_dir, user_config_dir -from lbrynet.error import InvalidCurrencyError -from lbrynet.dht import constants +from lbry.error import InvalidCurrencyError +from lbry.dht import constants log = logging.getLogger(__name__) @@ -595,7 +595,7 @@ class Config(CLIConfig): def get_windows_directories() -> typing.Tuple[str, str, str]: - from lbrynet.winpaths import get_path, FOLDERID, UserHandle + from lbry.winpaths import get_path, FOLDERID, UserHandle download_dir = get_path(FOLDERID.Downloads, UserHandle.current) diff --git a/lbry/lbrynet/connection_manager.py b/lbry/lbry/connection_manager.py similarity index 100% rename from lbry/lbrynet/connection_manager.py rename to lbry/lbry/connection_manager.py diff --git a/lbry/lbrynet/cryptoutils.py b/lbry/lbry/cryptoutils.py similarity index 100% rename from lbry/lbrynet/cryptoutils.py rename to lbry/lbry/cryptoutils.py diff --git a/lbry/lbrynet/dht/__init__.py b/lbry/lbry/dht/__init__.py similarity index 100% rename from lbry/lbrynet/dht/__init__.py rename to lbry/lbry/dht/__init__.py diff --git a/lbry/lbrynet/dht/blob_announcer.py b/lbry/lbry/dht/blob_announcer.py similarity index 96% rename from lbry/lbrynet/dht/blob_announcer.py rename to lbry/lbry/dht/blob_announcer.py index 1fc3bc069..d9d3a8233 100644 --- a/lbry/lbrynet/dht/blob_announcer.py +++ b/lbry/lbry/dht/blob_announcer.py @@ -2,8 +2,8 @@ import asyncio import typing import logging if typing.TYPE_CHECKING: - from lbrynet.dht.node import Node - from lbrynet.extras.daemon.storage import SQLiteStorage + from lbry.dht.node import Node + from lbry.extras.daemon.storage import SQLiteStorage log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/dht/constants.py b/lbry/lbry/dht/constants.py similarity index 100% rename from lbry/lbrynet/dht/constants.py rename to lbry/lbry/dht/constants.py diff --git a/lbry/lbrynet/dht/error.py b/lbry/lbry/dht/error.py similarity index 100% rename from lbry/lbrynet/dht/error.py rename to lbry/lbry/dht/error.py diff --git a/lbry/lbrynet/dht/node.py b/lbry/lbry/dht/node.py similarity index 96% rename from lbry/lbrynet/dht/node.py rename to lbry/lbry/dht/node.py index dfc60b0a6..1fba74863 100644 --- a/lbry/lbrynet/dht/node.py +++ b/lbry/lbry/dht/node.py @@ -2,15 +2,15 @@ import logging import asyncio import typing import binascii -from lbrynet.utils import resolve_host -from lbrynet.dht import constants -from lbrynet.dht.protocol.distance import Distance -from lbrynet.dht.protocol.iterative_find import IterativeNodeFinder, IterativeValueFinder -from lbrynet.dht.protocol.protocol import KademliaProtocol -from lbrynet.dht.peer import KademliaPeer +from lbry.utils import resolve_host +from lbry.dht import constants +from lbry.dht.protocol.distance import Distance +from lbry.dht.protocol.iterative_find import IterativeNodeFinder, IterativeValueFinder +from lbry.dht.protocol.protocol import KademliaProtocol +from lbry.dht.peer import KademliaPeer if typing.TYPE_CHECKING: - from lbrynet.dht.peer import PeerManager + from lbry.dht.peer import PeerManager log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/dht/peer.py b/lbry/lbry/dht/peer.py similarity index 98% rename from lbry/lbrynet/dht/peer.py rename to lbry/lbry/dht/peer.py index c4fb5a9ba..5e6d1925b 100644 --- a/lbry/lbrynet/dht/peer.py +++ b/lbry/lbry/dht/peer.py @@ -5,8 +5,8 @@ import ipaddress from binascii import hexlify from functools import lru_cache -from lbrynet.dht import constants -from lbrynet.dht.serialization.datagram import make_compact_address, make_compact_ip, decode_compact_address +from lbry.dht import constants +from lbry.dht.serialization.datagram import make_compact_address, make_compact_ip, decode_compact_address log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/dht/protocol/__init__.py b/lbry/lbry/dht/protocol/__init__.py similarity index 100% rename from lbry/lbrynet/dht/protocol/__init__.py rename to lbry/lbry/dht/protocol/__init__.py diff --git a/lbry/lbrynet/dht/protocol/data_store.py b/lbry/lbry/dht/protocol/data_store.py similarity index 96% rename from lbry/lbrynet/dht/protocol/data_store.py rename to lbry/lbry/dht/protocol/data_store.py index 874a8da60..d4678b0e3 100644 --- a/lbry/lbrynet/dht/protocol/data_store.py +++ b/lbry/lbry/dht/protocol/data_store.py @@ -1,9 +1,9 @@ import asyncio import typing -from lbrynet.dht import constants +from lbry.dht import constants if typing.TYPE_CHECKING: - from lbrynet.dht.peer import KademliaPeer, PeerManager + from lbry.dht.peer import KademliaPeer, PeerManager class DictDataStore: diff --git a/lbry/lbrynet/dht/protocol/distance.py b/lbry/lbry/dht/protocol/distance.py similarity index 96% rename from lbry/lbrynet/dht/protocol/distance.py rename to lbry/lbry/dht/protocol/distance.py index 2b2577fa3..6834d9d5e 100644 --- a/lbry/lbrynet/dht/protocol/distance.py +++ b/lbry/lbry/dht/protocol/distance.py @@ -1,4 +1,4 @@ -from lbrynet.dht import constants +from lbry.dht import constants class Distance: diff --git a/lbry/lbrynet/dht/protocol/iterative_find.py b/lbry/lbry/dht/protocol/iterative_find.py similarity index 97% rename from lbry/lbrynet/dht/protocol/iterative_find.py rename to lbry/lbry/dht/protocol/iterative_find.py index e5480887c..0d36cdd5c 100644 --- a/lbry/lbrynet/dht/protocol/iterative_find.py +++ b/lbry/lbry/dht/protocol/iterative_find.py @@ -4,15 +4,15 @@ from itertools import chain import typing import logging -from lbrynet.dht import constants -from lbrynet.dht.error import RemoteException, TransportNotConnected -from lbrynet.dht.protocol.distance import Distance +from lbry.dht import constants +from lbry.dht.error import RemoteException, TransportNotConnected +from lbry.dht.protocol.distance import Distance from typing import TYPE_CHECKING if TYPE_CHECKING: - from lbrynet.dht.protocol.routing_table import TreeRoutingTable - from lbrynet.dht.protocol.protocol import KademliaProtocol - from lbrynet.dht.peer import PeerManager, KademliaPeer + from lbry.dht.protocol.routing_table import TreeRoutingTable + from lbry.dht.protocol.protocol import KademliaProtocol + from lbry.dht.peer import PeerManager, KademliaPeer log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/dht/protocol/protocol.py b/lbry/lbry/dht/protocol/protocol.py similarity index 98% rename from lbry/lbrynet/dht/protocol/protocol.py rename to lbry/lbry/dht/protocol/protocol.py index 2de36c00a..a60e8424b 100644 --- a/lbry/lbrynet/dht/protocol/protocol.py +++ b/lbry/lbry/dht/protocol/protocol.py @@ -9,15 +9,15 @@ import random from asyncio.protocols import DatagramProtocol from asyncio.transports import DatagramTransport -from lbrynet.dht import constants -from lbrynet.dht.serialization.datagram import decode_datagram, ErrorDatagram, ResponseDatagram, RequestDatagram -from lbrynet.dht.serialization.datagram import RESPONSE_TYPE, ERROR_TYPE, PAGE_KEY -from lbrynet.dht.error import RemoteException, TransportNotConnected -from lbrynet.dht.protocol.routing_table import TreeRoutingTable -from lbrynet.dht.protocol.data_store import DictDataStore +from lbry.dht import constants +from lbry.dht.serialization.datagram import decode_datagram, ErrorDatagram, ResponseDatagram, RequestDatagram +from lbry.dht.serialization.datagram import RESPONSE_TYPE, ERROR_TYPE, PAGE_KEY +from lbry.dht.error import RemoteException, TransportNotConnected +from lbry.dht.protocol.routing_table import TreeRoutingTable +from lbry.dht.protocol.data_store import DictDataStore if typing.TYPE_CHECKING: - from lbrynet.dht.peer import PeerManager, KademliaPeer + from lbry.dht.peer import PeerManager, KademliaPeer log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/dht/protocol/routing_table.py b/lbry/lbry/dht/protocol/routing_table.py similarity index 98% rename from lbry/lbrynet/dht/protocol/routing_table.py rename to lbry/lbry/dht/protocol/routing_table.py index 3653f453f..8775ae22f 100644 --- a/lbry/lbrynet/dht/protocol/routing_table.py +++ b/lbry/lbry/dht/protocol/routing_table.py @@ -4,10 +4,10 @@ import logging import typing import itertools -from lbrynet.dht import constants -from lbrynet.dht.protocol.distance import Distance +from lbry.dht import constants +from lbry.dht.protocol.distance import Distance if typing.TYPE_CHECKING: - from lbrynet.dht.peer import KademliaPeer, PeerManager + from lbry.dht.peer import KademliaPeer, PeerManager log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/dht/serialization/__init__.py b/lbry/lbry/dht/serialization/__init__.py similarity index 100% rename from lbry/lbrynet/dht/serialization/__init__.py rename to lbry/lbry/dht/serialization/__init__.py diff --git a/lbry/lbrynet/dht/serialization/bencoding.py b/lbry/lbry/dht/serialization/bencoding.py similarity index 98% rename from lbry/lbrynet/dht/serialization/bencoding.py rename to lbry/lbry/dht/serialization/bencoding.py index dbb6895ee..4f4c952d5 100644 --- a/lbry/lbrynet/dht/serialization/bencoding.py +++ b/lbry/lbry/dht/serialization/bencoding.py @@ -1,5 +1,5 @@ import typing -from lbrynet.dht.error import DecodeError +from lbry.dht.error import DecodeError def _bencode(data: typing.Union[int, bytes, bytearray, str, list, tuple, dict]) -> bytes: diff --git a/lbry/lbrynet/dht/serialization/datagram.py b/lbry/lbry/dht/serialization/datagram.py similarity index 98% rename from lbry/lbrynet/dht/serialization/datagram.py rename to lbry/lbry/dht/serialization/datagram.py index 70c84fbd0..5550f86cc 100644 --- a/lbry/lbrynet/dht/serialization/datagram.py +++ b/lbry/lbry/dht/serialization/datagram.py @@ -1,7 +1,7 @@ import typing from functools import reduce -from lbrynet.dht import constants -from lbrynet.dht.serialization.bencoding import bencode, bdecode +from lbry.dht import constants +from lbry.dht.serialization.bencoding import bencode, bdecode REQUEST_TYPE = 0 RESPONSE_TYPE = 1 diff --git a/lbry/lbrynet/error.py b/lbry/lbry/error.py similarity index 100% rename from lbry/lbrynet/error.py rename to lbry/lbry/error.py diff --git a/lbry/lbrynet/extras/__init__.py b/lbry/lbry/extras/__init__.py similarity index 100% rename from lbry/lbrynet/extras/__init__.py rename to lbry/lbry/extras/__init__.py diff --git a/lbry/lbrynet/extras/cli.py b/lbry/lbry/extras/cli.py similarity index 97% rename from lbry/lbrynet/extras/cli.py rename to lbry/lbry/extras/cli.py index a6e0623eb..efecd3ca7 100644 --- a/lbry/lbrynet/extras/cli.py +++ b/lbry/lbry/extras/cli.py @@ -12,10 +12,10 @@ from docopt import docopt import aiohttp from aiohttp.web import GracefulExit -from lbrynet import __name__ as lbrynet_name, __version__ as lbrynet_version -from lbrynet.extras.daemon.loggly_handler import get_loggly_handler -from lbrynet.conf import Config, CLIConfig -from lbrynet.extras.daemon.Daemon import Daemon +from lbry import __name__ as lbrynet_name, __version__ as lbrynet_version +from lbry.extras.daemon.loggly_handler import get_loggly_handler +from lbry.conf import Config, CLIConfig +from lbry.extras.daemon.Daemon import Daemon log = logging.getLogger(lbrynet_name) log.addHandler(logging.NullHandler()) diff --git a/lbry/lbrynet/extras/daemon/Component.py b/lbry/lbry/extras/daemon/Component.py similarity index 94% rename from lbry/lbrynet/extras/daemon/Component.py rename to lbry/lbry/extras/daemon/Component.py index 7b55c2766..665efb694 100644 --- a/lbry/lbrynet/extras/daemon/Component.py +++ b/lbry/lbry/extras/daemon/Component.py @@ -1,7 +1,7 @@ import asyncio import logging -from lbrynet.conf import Config -from lbrynet.extras.daemon.ComponentManager import ComponentManager +from lbry.conf import Config +from lbry.extras.daemon.ComponentManager import ComponentManager log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/extras/daemon/ComponentManager.py b/lbry/lbry/extras/daemon/ComponentManager.py similarity index 97% rename from lbry/lbrynet/extras/daemon/ComponentManager.py rename to lbry/lbry/extras/daemon/ComponentManager.py index 78ff16fc0..3206de83d 100644 --- a/lbry/lbrynet/extras/daemon/ComponentManager.py +++ b/lbry/lbry/extras/daemon/ComponentManager.py @@ -1,8 +1,8 @@ import logging import asyncio -from lbrynet.conf import Config -from lbrynet.error import ComponentStartConditionNotMet -from lbrynet.dht.peer import PeerManager +from lbry.conf import Config +from lbry.error import ComponentStartConditionNotMet +from lbry.dht.peer import PeerManager log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/extras/daemon/Components.py b/lbry/lbry/extras/daemon/Components.py similarity index 97% rename from lbry/lbrynet/extras/daemon/Components.py rename to lbry/lbry/extras/daemon/Components.py index 6a08fdd1a..7710fecd0 100644 --- a/lbry/lbrynet/extras/daemon/Components.py +++ b/lbry/lbry/extras/daemon/Components.py @@ -12,18 +12,18 @@ from aioupnp import __version__ as aioupnp_version from aioupnp.upnp import UPnP from aioupnp.fault import UPnPError -from lbrynet import utils -from lbrynet.conf import HEADERS_FILE_SHA256_CHECKSUM -from lbrynet.dht.node import Node -from lbrynet.dht.blob_announcer import BlobAnnouncer -from lbrynet.blob.blob_manager import BlobManager -from lbrynet.blob_exchange.server import BlobServer -from lbrynet.stream.stream_manager import StreamManager -from lbrynet.extras.daemon.Component import Component -from lbrynet.extras.daemon.exchange_rate_manager import ExchangeRateManager -from lbrynet.extras.daemon.storage import SQLiteStorage -from lbrynet.wallet import LbryWalletManager -from lbrynet.wallet import Network +from lbry import utils +from lbry.conf import HEADERS_FILE_SHA256_CHECKSUM +from lbry.dht.node import Node +from lbry.dht.blob_announcer import BlobAnnouncer +from lbry.blob.blob_manager import BlobManager +from lbry.blob_exchange.server import BlobServer +from lbry.stream.stream_manager import StreamManager +from lbry.extras.daemon.Component import Component +from lbry.extras.daemon.exchange_rate_manager import ExchangeRateManager +from lbry.extras.daemon.storage import SQLiteStorage +from lbry.wallet import LbryWalletManager +from lbry.wallet import Network log = logging.getLogger(__name__) @@ -90,7 +90,7 @@ class DatabaseComponent(Component): 'Your database is revision %i, expected %i' % (old_revision, self.get_current_db_revision())) if old_revision < self.get_current_db_revision(): - from lbrynet.extras.daemon.migrator import dbmigrator + from lbry.extras.daemon.migrator import dbmigrator log.info("Upgrading your databases (revision %i to %i)", old_revision, self.get_current_db_revision()) await asyncio.get_event_loop().run_in_executor( None, dbmigrator.migrate_db, self.conf, old_revision, self.get_current_db_revision() diff --git a/lbry/lbrynet/extras/daemon/Daemon.py b/lbry/lbry/extras/daemon/Daemon.py similarity index 98% rename from lbry/lbrynet/extras/daemon/Daemon.py rename to lbry/lbry/extras/daemon/Daemon.py index 00bd2a3c8..1a0487156 100644 --- a/lbry/lbrynet/extras/daemon/Daemon.py +++ b/lbry/lbry/extras/daemon/Daemon.py @@ -19,38 +19,38 @@ from google.protobuf.message import DecodeError from torba.client.wallet import Wallet from torba.client.baseaccount import SingleKey, HierarchicalDeterministic -from lbrynet import utils -from lbrynet.conf import Config, Setting -from lbrynet.blob.blob_file import is_valid_blobhash, BlobBuffer -from lbrynet.blob_exchange.downloader import download_blob -from lbrynet.error import DownloadSDTimeout, ComponentsNotStarted -from lbrynet.error import NullFundsError, NegativeFundsError, ComponentStartConditionNotMet -from lbrynet.extras import system_info -from lbrynet.extras.daemon import analytics -from lbrynet.extras.daemon.Components import WALLET_COMPONENT, DATABASE_COMPONENT, DHT_COMPONENT, BLOB_COMPONENT -from lbrynet.extras.daemon.Components import STREAM_MANAGER_COMPONENT -from lbrynet.extras.daemon.Components import EXCHANGE_RATE_MANAGER_COMPONENT, UPNP_COMPONENT -from lbrynet.extras.daemon.ComponentManager import RequiredCondition -from lbrynet.extras.daemon.ComponentManager import ComponentManager -from lbrynet.extras.daemon.json_response_encoder import JSONResponseEncoder -from lbrynet.extras.daemon.comment_client import jsonrpc_post, sign_comment, is_comment_signed_by_channel -from lbrynet.extras.daemon.undecorated import undecorated -from lbrynet.wallet.transaction import Transaction, Output, Input -from lbrynet.wallet.account import Account as LBCAccount -from lbrynet.wallet.dewies import dewies_to_lbc, lbc_to_dewies -from lbrynet.schema.claim import Claim -from lbrynet.schema.url import URL +from lbry import utils +from lbry.conf import Config, Setting +from lbry.blob.blob_file import is_valid_blobhash, BlobBuffer +from lbry.blob_exchange.downloader import download_blob +from lbry.error import DownloadSDTimeout, ComponentsNotStarted +from lbry.error import NullFundsError, NegativeFundsError, ComponentStartConditionNotMet +from lbry.extras import system_info +from lbry.extras.daemon import analytics +from lbry.extras.daemon.Components import WALLET_COMPONENT, DATABASE_COMPONENT, DHT_COMPONENT, BLOB_COMPONENT +from lbry.extras.daemon.Components import STREAM_MANAGER_COMPONENT +from lbry.extras.daemon.Components import EXCHANGE_RATE_MANAGER_COMPONENT, UPNP_COMPONENT +from lbry.extras.daemon.ComponentManager import RequiredCondition +from lbry.extras.daemon.ComponentManager import ComponentManager +from lbry.extras.daemon.json_response_encoder import JSONResponseEncoder +from lbry.extras.daemon.comment_client import jsonrpc_post, sign_comment, is_comment_signed_by_channel +from lbry.extras.daemon.undecorated import undecorated +from lbry.wallet.transaction import Transaction, Output, Input +from lbry.wallet.account import Account as LBCAccount +from lbry.wallet.dewies import dewies_to_lbc, lbc_to_dewies +from lbry.schema.claim import Claim +from lbry.schema.url import URL if typing.TYPE_CHECKING: - from lbrynet.blob.blob_manager import BlobManager - from lbrynet.dht.node import Node - from lbrynet.extras.daemon.Components import UPnPComponent - from lbrynet.extras.daemon.exchange_rate_manager import ExchangeRateManager - from lbrynet.extras.daemon.storage import SQLiteStorage - from lbrynet.wallet.manager import LbryWalletManager - from lbrynet.wallet.ledger import MainNetLedger - from lbrynet.stream.stream_manager import StreamManager + from lbry.blob.blob_manager import BlobManager + from lbry.dht.node import Node + from lbry.extras.daemon.Components import UPnPComponent + from lbry.extras.daemon.exchange_rate_manager import ExchangeRateManager + from lbry.extras.daemon.storage import SQLiteStorage + from lbry.wallet.manager import LbryWalletManager + from lbry.wallet.ledger import MainNetLedger + from lbry.stream.stream_manager import StreamManager log = logging.getLogger(__name__) diff --git a/lbry/lbry/extras/daemon/__init__.py b/lbry/lbry/extras/daemon/__init__.py new file mode 100644 index 000000000..e3c55f014 --- /dev/null +++ b/lbry/lbry/extras/daemon/__init__.py @@ -0,0 +1 @@ +from lbry.extras.daemon import Components # register Component classes diff --git a/lbry/lbrynet/extras/daemon/analytics.py b/lbry/lbry/extras/daemon/analytics.py similarity index 98% rename from lbry/lbrynet/extras/daemon/analytics.py rename to lbry/lbry/extras/daemon/analytics.py index 0d4c7de0a..18bfac0f0 100644 --- a/lbry/lbrynet/extras/daemon/analytics.py +++ b/lbry/lbry/extras/daemon/analytics.py @@ -3,9 +3,9 @@ import collections import logging import aiohttp import typing -from lbrynet import utils -from lbrynet.conf import Config -from lbrynet.extras import system_info +from lbry import utils +from lbry.conf import Config +from lbry.extras import system_info ANALYTICS_ENDPOINT = 'https://api.segment.io/v1' ANALYTICS_TOKEN = 'Ax5LZzR1o3q3Z3WjATASDwR5rKyHH0qOIRIbLmMXn2H=' diff --git a/lbry/lbrynet/extras/daemon/client.py b/lbry/lbry/extras/daemon/client.py similarity index 62% rename from lbry/lbrynet/extras/daemon/client.py rename to lbry/lbry/extras/daemon/client.py index 8cac31482..7f0997320 100644 --- a/lbry/lbrynet/extras/daemon/client.py +++ b/lbry/lbry/extras/daemon/client.py @@ -1,5 +1,5 @@ -from lbrynet.conf import Config -from lbrynet.extras.cli import execute_command +from lbry.conf import Config +from lbry.extras.cli import execute_command def daemon_rpc(conf: Config, method: str, **kwargs): diff --git a/lbry/lbrynet/extras/daemon/comment_client.py b/lbry/lbry/extras/daemon/comment_client.py similarity index 97% rename from lbry/lbrynet/extras/daemon/comment_client.py rename to lbry/lbry/extras/daemon/comment_client.py index 49d87aa6b..9d1c7f2a4 100644 --- a/lbry/lbrynet/extras/daemon/comment_client.py +++ b/lbry/lbry/extras/daemon/comment_client.py @@ -6,7 +6,7 @@ import binascii import aiohttp import ecdsa from torba.client.hash import sha256 -from lbrynet.wallet.transaction import Output +from lbry.wallet.transaction import Output log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/extras/daemon/exchange_rate_manager.py b/lbry/lbry/extras/daemon/exchange_rate_manager.py similarity index 98% rename from lbry/lbrynet/extras/daemon/exchange_rate_manager.py rename to lbry/lbry/extras/daemon/exchange_rate_manager.py index 31ddfc1a4..f15d14478 100644 --- a/lbry/lbrynet/extras/daemon/exchange_rate_manager.py +++ b/lbry/lbry/extras/daemon/exchange_rate_manager.py @@ -4,8 +4,8 @@ import logging import json from decimal import Decimal -from lbrynet.error import InvalidExchangeRateResponse, CurrencyConversionError -from lbrynet.utils import aiohttp_request +from lbry.error import InvalidExchangeRateResponse, CurrencyConversionError +from lbry.utils import aiohttp_request log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/extras/daemon/json_response_encoder.py b/lbry/lbry/extras/daemon/json_response_encoder.py similarity index 97% rename from lbry/lbrynet/extras/daemon/json_response_encoder.py rename to lbry/lbry/extras/daemon/json_response_encoder.py index b9c634db0..e7bbe1e79 100644 --- a/lbry/lbrynet/extras/daemon/json_response_encoder.py +++ b/lbry/lbry/extras/daemon/json_response_encoder.py @@ -6,11 +6,11 @@ from json import JSONEncoder from google.protobuf.message import DecodeError -from lbrynet.schema.claim import Claim -from lbrynet.wallet.ledger import MainNetLedger, Account -from lbrynet.wallet.transaction import Transaction, Output -from lbrynet.wallet.dewies import dewies_to_lbc -from lbrynet.stream.managed_stream import ManagedStream +from lbry.schema.claim import Claim +from lbry.wallet.ledger import MainNetLedger, Account +from lbry.wallet.transaction import Transaction, Output +from lbry.wallet.dewies import dewies_to_lbc +from lbry.stream.managed_stream import ManagedStream log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/extras/daemon/loggly_handler.py b/lbry/lbry/extras/daemon/loggly_handler.py similarity index 98% rename from lbry/lbrynet/extras/daemon/loggly_handler.py rename to lbry/lbry/extras/daemon/loggly_handler.py index 99fdff040..121d5454a 100644 --- a/lbry/lbrynet/extras/daemon/loggly_handler.py +++ b/lbry/lbry/extras/daemon/loggly_handler.py @@ -2,7 +2,7 @@ import asyncio import json import logging.handlers import traceback -from lbrynet import utils, __version__ +from lbry import utils, __version__ LOGGLY_TOKEN = 'BQEzZmMzLJHgAGxkBF00LGD0YGuyATVgAmqxAQEuAQZ2BQH4' diff --git a/lbry/lbrynet/extras/daemon/migrator/__init__.py b/lbry/lbry/extras/daemon/migrator/__init__.py similarity index 100% rename from lbry/lbrynet/extras/daemon/migrator/__init__.py rename to lbry/lbry/extras/daemon/migrator/__init__.py diff --git a/lbry/lbrynet/extras/daemon/migrator/dbmigrator.py b/lbry/lbry/extras/daemon/migrator/dbmigrator.py similarity index 100% rename from lbry/lbrynet/extras/daemon/migrator/dbmigrator.py rename to lbry/lbry/extras/daemon/migrator/dbmigrator.py diff --git a/lbry/lbrynet/extras/daemon/migrator/migrate10to11.py b/lbry/lbry/extras/daemon/migrator/migrate10to11.py similarity index 100% rename from lbry/lbrynet/extras/daemon/migrator/migrate10to11.py rename to lbry/lbry/extras/daemon/migrator/migrate10to11.py diff --git a/lbry/lbrynet/extras/daemon/migrator/migrate1to2.py b/lbry/lbry/extras/daemon/migrator/migrate1to2.py similarity index 100% rename from lbry/lbrynet/extras/daemon/migrator/migrate1to2.py rename to lbry/lbry/extras/daemon/migrator/migrate1to2.py diff --git a/lbry/lbrynet/extras/daemon/migrator/migrate2to3.py b/lbry/lbry/extras/daemon/migrator/migrate2to3.py similarity index 100% rename from lbry/lbrynet/extras/daemon/migrator/migrate2to3.py rename to lbry/lbry/extras/daemon/migrator/migrate2to3.py diff --git a/lbry/lbrynet/extras/daemon/migrator/migrate3to4.py b/lbry/lbry/extras/daemon/migrator/migrate3to4.py similarity index 100% rename from lbry/lbrynet/extras/daemon/migrator/migrate3to4.py rename to lbry/lbry/extras/daemon/migrator/migrate3to4.py diff --git a/lbry/lbrynet/extras/daemon/migrator/migrate4to5.py b/lbry/lbry/extras/daemon/migrator/migrate4to5.py similarity index 100% rename from lbry/lbrynet/extras/daemon/migrator/migrate4to5.py rename to lbry/lbry/extras/daemon/migrator/migrate4to5.py diff --git a/lbry/lbrynet/extras/daemon/migrator/migrate5to6.py b/lbry/lbry/extras/daemon/migrator/migrate5to6.py similarity index 99% rename from lbry/lbrynet/extras/daemon/migrator/migrate5to6.py rename to lbry/lbry/extras/daemon/migrator/migrate5to6.py index 118d0e3fa..add03801e 100644 --- a/lbry/lbrynet/extras/daemon/migrator/migrate5to6.py +++ b/lbry/lbry/extras/daemon/migrator/migrate5to6.py @@ -3,7 +3,7 @@ import os import json import logging from binascii import hexlify -from lbrynet.schema.claim import Claim +from lbry.schema.claim import Claim log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/extras/daemon/migrator/migrate6to7.py b/lbry/lbry/extras/daemon/migrator/migrate6to7.py similarity index 100% rename from lbry/lbrynet/extras/daemon/migrator/migrate6to7.py rename to lbry/lbry/extras/daemon/migrator/migrate6to7.py diff --git a/lbry/lbrynet/extras/daemon/migrator/migrate7to8.py b/lbry/lbry/extras/daemon/migrator/migrate7to8.py similarity index 100% rename from lbry/lbrynet/extras/daemon/migrator/migrate7to8.py rename to lbry/lbry/extras/daemon/migrator/migrate7to8.py diff --git a/lbry/lbrynet/extras/daemon/migrator/migrate8to9.py b/lbry/lbry/extras/daemon/migrator/migrate8to9.py similarity index 95% rename from lbry/lbrynet/extras/daemon/migrator/migrate8to9.py rename to lbry/lbry/extras/daemon/migrator/migrate8to9.py index 316edee20..ee3510dd9 100644 --- a/lbry/lbrynet/extras/daemon/migrator/migrate8to9.py +++ b/lbry/lbry/extras/daemon/migrator/migrate8to9.py @@ -2,8 +2,8 @@ import sqlite3 import logging import os import asyncio -from lbrynet.blob.blob_info import BlobInfo -from lbrynet.stream.descriptor import StreamDescriptor +from lbry.blob.blob_info import BlobInfo +from lbry.stream.descriptor import StreamDescriptor log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/extras/daemon/migrator/migrate9to10.py b/lbry/lbry/extras/daemon/migrator/migrate9to10.py similarity index 100% rename from lbry/lbrynet/extras/daemon/migrator/migrate9to10.py rename to lbry/lbry/extras/daemon/migrator/migrate9to10.py diff --git a/lbry/lbrynet/extras/daemon/storage.py b/lbry/lbry/extras/daemon/storage.py similarity index 99% rename from lbry/lbrynet/extras/daemon/storage.py rename to lbry/lbry/extras/daemon/storage.py index e68ba8af1..83d8b9d51 100644 --- a/lbry/lbrynet/extras/daemon/storage.py +++ b/lbry/lbry/extras/daemon/storage.py @@ -6,16 +6,16 @@ import asyncio import binascii import time from torba.client.basedatabase import SQLiteMixin -from lbrynet.conf import Config -from lbrynet.wallet.dewies import dewies_to_lbc, lbc_to_dewies -from lbrynet.wallet.transaction import Transaction -from lbrynet.schema.claim import Claim -from lbrynet.dht.constants import data_expiration -from lbrynet.blob.blob_info import BlobInfo +from lbry.conf import Config +from lbry.wallet.dewies import dewies_to_lbc, lbc_to_dewies +from lbry.wallet.transaction import Transaction +from lbry.schema.claim import Claim +from lbry.dht.constants import data_expiration +from lbry.blob.blob_info import BlobInfo if typing.TYPE_CHECKING: - from lbrynet.blob.blob_file import BlobFile - from lbrynet.stream.descriptor import StreamDescriptor + from lbry.blob.blob_file import BlobFile + from lbry.stream.descriptor import StreamDescriptor log = logging.getLogger(__name__) opt_str = typing.Optional[str] diff --git a/lbry/lbrynet/extras/daemon/undecorated.py b/lbry/lbry/extras/daemon/undecorated.py similarity index 100% rename from lbry/lbrynet/extras/daemon/undecorated.py rename to lbry/lbry/extras/daemon/undecorated.py diff --git a/lbry/lbrynet/extras/system_info.py b/lbry/lbry/extras/system_info.py similarity index 93% rename from lbry/lbrynet/extras/system_info.py rename to lbry/lbry/extras/system_info.py index 9c651f491..81810c1b3 100644 --- a/lbry/lbrynet/extras/system_info.py +++ b/lbry/lbry/extras/system_info.py @@ -2,7 +2,7 @@ import platform import os import logging.handlers -from lbrynet import build_type, __version__ as lbrynet_version +from lbry import build_type, __version__ as lbrynet_version from torba import __version__ as torba_version log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/schema/Makefile b/lbry/lbry/schema/Makefile similarity index 100% rename from lbry/lbrynet/schema/Makefile rename to lbry/lbry/schema/Makefile diff --git a/lbry/lbrynet/schema/__init__.py b/lbry/lbry/schema/__init__.py similarity index 100% rename from lbry/lbrynet/schema/__init__.py rename to lbry/lbry/schema/__init__.py diff --git a/lbry/lbrynet/schema/attrs.py b/lbry/lbry/schema/attrs.py similarity index 98% rename from lbry/lbrynet/schema/attrs.py rename to lbry/lbry/schema/attrs.py index be59e5993..b1ebe2caa 100644 --- a/lbry/lbrynet/schema/attrs.py +++ b/lbry/lbry/schema/attrs.py @@ -11,9 +11,9 @@ from google.protobuf.json_format import MessageToDict from torba.client.hash import Base58 from torba.client.constants import COIN -from lbrynet.schema.mime_types import guess_media_type -from lbrynet.schema.base import Metadata, BaseMessageList -from lbrynet.schema.types.v2.claim_pb2 import ( +from lbry.schema.mime_types import guess_media_type +from lbry.schema.base import Metadata, BaseMessageList +from lbry.schema.types.v2.claim_pb2 import ( Fee as FeeMessage, Location as LocationMessage, Language as LanguageMessage diff --git a/lbry/lbrynet/schema/base.py b/lbry/lbry/schema/base.py similarity index 100% rename from lbry/lbrynet/schema/base.py rename to lbry/lbry/schema/base.py diff --git a/lbry/lbrynet/schema/claim.py b/lbry/lbry/schema/claim.py similarity index 97% rename from lbry/lbrynet/schema/claim.py rename to lbry/lbry/schema/claim.py index 9fa304f37..4a74fafc7 100644 --- a/lbry/lbrynet/schema/claim.py +++ b/lbry/lbry/schema/claim.py @@ -8,14 +8,14 @@ from hachoir.core.log import log as hachoir_log from hachoir.parser import createParser as binary_file_parser from hachoir.metadata import extractMetadata as binary_file_metadata -from lbrynet.schema import compat -from lbrynet.schema.base import Signable -from lbrynet.schema.mime_types import guess_media_type, guess_stream_type -from lbrynet.schema.attrs import ( +from lbry.schema import compat +from lbry.schema.base import Signable +from lbry.schema.mime_types import guess_media_type, guess_stream_type +from lbry.schema.attrs import ( Source, Playable, Dimmensional, Fee, Image, Video, Audio, LanguageList, LocationList, ClaimList, ClaimReference ) -from lbrynet.schema.types.v2.claim_pb2 import Claim as ClaimMessage +from lbry.schema.types.v2.claim_pb2 import Claim as ClaimMessage hachoir_log.use_print = False diff --git a/lbry/lbrynet/schema/compat.py b/lbry/lbry/schema/compat.py similarity index 94% rename from lbry/lbrynet/schema/compat.py rename to lbry/lbry/schema/compat.py index 69402a745..7546d6881 100644 --- a/lbry/lbrynet/schema/compat.py +++ b/lbry/lbry/schema/compat.py @@ -3,9 +3,9 @@ from decimal import Decimal from google.protobuf.message import DecodeError -from lbrynet.schema.types.v1.legacy_claim_pb2 import Claim as OldClaimMessage -from lbrynet.schema.types.v1.certificate_pb2 import KeyType -from lbrynet.schema.types.v1.fee_pb2 import Fee as FeeMessage +from lbry.schema.types.v1.legacy_claim_pb2 import Claim as OldClaimMessage +from lbry.schema.types.v1.certificate_pb2 import KeyType +from lbry.schema.types.v1.fee_pb2 import Fee as FeeMessage def from_old_json_schema(claim, payload: bytes): diff --git a/lbry/lbrynet/schema/mime_types.py b/lbry/lbry/schema/mime_types.py similarity index 100% rename from lbry/lbrynet/schema/mime_types.py rename to lbry/lbry/schema/mime_types.py diff --git a/lbry/lbrynet/schema/result.py b/lbry/lbry/schema/result.py similarity index 98% rename from lbry/lbrynet/schema/result.py rename to lbry/lbry/schema/result.py index f33931991..17bec03a7 100644 --- a/lbry/lbrynet/schema/result.py +++ b/lbry/lbry/schema/result.py @@ -4,7 +4,7 @@ from typing import List from binascii import hexlify from itertools import chain -from lbrynet.schema.types.v2.result_pb2 import Outputs as OutputsMessage +from lbry.schema.types.v2.result_pb2 import Outputs as OutputsMessage class Outputs: diff --git a/lbry/lbrynet/schema/support.py b/lbry/lbry/schema/support.py similarity index 71% rename from lbry/lbrynet/schema/support.py rename to lbry/lbry/schema/support.py index 30403729e..00ae226b8 100644 --- a/lbry/lbrynet/schema/support.py +++ b/lbry/lbry/schema/support.py @@ -1,4 +1,4 @@ -from lbrynet.schema.base import Signable +from lbry.schema.base import Signable class Support(Signable): diff --git a/lbry/lbrynet/schema/types/__init__.py b/lbry/lbry/schema/types/__init__.py similarity index 100% rename from lbry/lbrynet/schema/types/__init__.py rename to lbry/lbry/schema/types/__init__.py diff --git a/lbry/lbrynet/schema/types/v1/__init__.py b/lbry/lbry/schema/types/v1/__init__.py similarity index 100% rename from lbry/lbrynet/schema/types/v1/__init__.py rename to lbry/lbry/schema/types/v1/__init__.py diff --git a/lbry/lbrynet/schema/types/v1/certificate_pb2.py b/lbry/lbry/schema/types/v1/certificate_pb2.py similarity index 100% rename from lbry/lbrynet/schema/types/v1/certificate_pb2.py rename to lbry/lbry/schema/types/v1/certificate_pb2.py diff --git a/lbry/lbrynet/schema/types/v1/fee_pb2.py b/lbry/lbry/schema/types/v1/fee_pb2.py similarity index 100% rename from lbry/lbrynet/schema/types/v1/fee_pb2.py rename to lbry/lbry/schema/types/v1/fee_pb2.py diff --git a/lbry/lbrynet/schema/types/v1/legacy_claim_pb2.py b/lbry/lbry/schema/types/v1/legacy_claim_pb2.py similarity index 100% rename from lbry/lbrynet/schema/types/v1/legacy_claim_pb2.py rename to lbry/lbry/schema/types/v1/legacy_claim_pb2.py diff --git a/lbry/lbrynet/schema/types/v1/metadata_pb2.py b/lbry/lbry/schema/types/v1/metadata_pb2.py similarity index 100% rename from lbry/lbrynet/schema/types/v1/metadata_pb2.py rename to lbry/lbry/schema/types/v1/metadata_pb2.py diff --git a/lbry/lbrynet/schema/types/v1/signature_pb2.py b/lbry/lbry/schema/types/v1/signature_pb2.py similarity index 100% rename from lbry/lbrynet/schema/types/v1/signature_pb2.py rename to lbry/lbry/schema/types/v1/signature_pb2.py diff --git a/lbry/lbrynet/schema/types/v1/source_pb2.py b/lbry/lbry/schema/types/v1/source_pb2.py similarity index 100% rename from lbry/lbrynet/schema/types/v1/source_pb2.py rename to lbry/lbry/schema/types/v1/source_pb2.py diff --git a/lbry/lbrynet/schema/types/v1/stream_pb2.py b/lbry/lbry/schema/types/v1/stream_pb2.py similarity index 100% rename from lbry/lbrynet/schema/types/v1/stream_pb2.py rename to lbry/lbry/schema/types/v1/stream_pb2.py diff --git a/lbry/lbrynet/schema/types/v2/__init__.py b/lbry/lbry/schema/types/v2/__init__.py similarity index 100% rename from lbry/lbrynet/schema/types/v2/__init__.py rename to lbry/lbry/schema/types/v2/__init__.py diff --git a/lbry/lbrynet/schema/types/v2/claim_pb2.py b/lbry/lbry/schema/types/v2/claim_pb2.py similarity index 100% rename from lbry/lbrynet/schema/types/v2/claim_pb2.py rename to lbry/lbry/schema/types/v2/claim_pb2.py diff --git a/lbry/lbrynet/schema/types/v2/result_pb2.py b/lbry/lbry/schema/types/v2/result_pb2.py similarity index 100% rename from lbry/lbrynet/schema/types/v2/result_pb2.py rename to lbry/lbry/schema/types/v2/result_pb2.py diff --git a/lbry/lbrynet/schema/url.py b/lbry/lbry/schema/url.py similarity index 100% rename from lbry/lbrynet/schema/url.py rename to lbry/lbry/schema/url.py diff --git a/lbry/lbrynet/stream/__init__.py b/lbry/lbry/stream/__init__.py similarity index 100% rename from lbry/lbrynet/stream/__init__.py rename to lbry/lbry/stream/__init__.py diff --git a/lbry/lbrynet/stream/descriptor.py b/lbry/lbry/stream/descriptor.py similarity index 97% rename from lbry/lbrynet/stream/descriptor.py rename to lbry/lbry/stream/descriptor.py index 2b0527d35..5c8a9861d 100644 --- a/lbry/lbrynet/stream/descriptor.py +++ b/lbry/lbry/stream/descriptor.py @@ -6,11 +6,11 @@ import typing import asyncio from collections import OrderedDict from cryptography.hazmat.primitives.ciphers.algorithms import AES -from lbrynet.blob import MAX_BLOB_SIZE -from lbrynet.blob.blob_info import BlobInfo -from lbrynet.blob.blob_file import AbstractBlob, BlobFile -from lbrynet.cryptoutils import get_lbry_hash_obj -from lbrynet.error import InvalidStreamDescriptorError +from lbry.blob import MAX_BLOB_SIZE +from lbry.blob.blob_info import BlobInfo +from lbry.blob.blob_file import AbstractBlob, BlobFile +from lbry.cryptoutils import get_lbry_hash_obj +from lbry.error import InvalidStreamDescriptorError log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/stream/downloader.py b/lbry/lbry/stream/downloader.py similarity index 92% rename from lbry/lbrynet/stream/downloader.py rename to lbry/lbry/stream/downloader.py index df10fe539..717299a77 100644 --- a/lbry/lbrynet/stream/downloader.py +++ b/lbry/lbry/stream/downloader.py @@ -2,17 +2,17 @@ import asyncio import typing import logging import binascii -from lbrynet.error import DownloadSDTimeout -from lbrynet.utils import resolve_host, lru_cache_concurrent -from lbrynet.stream.descriptor import StreamDescriptor -from lbrynet.blob_exchange.downloader import BlobDownloader -from lbrynet.dht.peer import KademliaPeer +from lbry.error import DownloadSDTimeout +from lbry.utils import resolve_host, lru_cache_concurrent +from lbry.stream.descriptor import StreamDescriptor +from lbry.blob_exchange.downloader import BlobDownloader +from lbry.dht.peer import KademliaPeer if typing.TYPE_CHECKING: - from lbrynet.conf import Config - from lbrynet.dht.node import Node - from lbrynet.blob.blob_manager import BlobManager - from lbrynet.blob.blob_file import AbstractBlob - from lbrynet.blob.blob_info import BlobInfo + from lbry.conf import Config + from lbry.dht.node import Node + from lbry.blob.blob_manager import BlobManager + from lbry.blob.blob_file import AbstractBlob + from lbry.blob.blob_info import BlobInfo log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/stream/managed_stream.py b/lbry/lbry/stream/managed_stream.py similarity index 97% rename from lbry/lbrynet/stream/managed_stream.py rename to lbry/lbry/stream/managed_stream.py index d1f66603e..b7c842c3e 100644 --- a/lbry/lbrynet/stream/managed_stream.py +++ b/lbry/lbry/stream/managed_stream.py @@ -4,21 +4,21 @@ import typing import logging import binascii from aiohttp.web import Request, StreamResponse, HTTPRequestRangeNotSatisfiable -from lbrynet.utils import generate_id -from lbrynet.error import DownloadSDTimeout -from lbrynet.schema.mime_types import guess_media_type -from lbrynet.stream.downloader import StreamDownloader -from lbrynet.stream.descriptor import StreamDescriptor -from lbrynet.stream.reflector.client import StreamReflectorClient -from lbrynet.extras.daemon.storage import StoredStreamClaim +from lbry.utils import generate_id +from lbry.error import DownloadSDTimeout +from lbry.schema.mime_types import guess_media_type +from lbry.stream.downloader import StreamDownloader +from lbry.stream.descriptor import StreamDescriptor +from lbry.stream.reflector.client import StreamReflectorClient +from lbry.extras.daemon.storage import StoredStreamClaim if typing.TYPE_CHECKING: - from lbrynet.conf import Config - from lbrynet.schema.claim import Claim - from lbrynet.blob.blob_manager import BlobManager - from lbrynet.blob.blob_info import BlobInfo - from lbrynet.dht.node import Node - from lbrynet.extras.daemon.analytics import AnalyticsManager - from lbrynet.wallet.transaction import Transaction + from lbry.conf import Config + from lbry.schema.claim import Claim + from lbry.blob.blob_manager import BlobManager + from lbry.blob.blob_info import BlobInfo + from lbry.dht.node import Node + from lbry.extras.daemon.analytics import AnalyticsManager + from lbry.wallet.transaction import Transaction log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/stream/reflector/__init__.py b/lbry/lbry/stream/reflector/__init__.py similarity index 100% rename from lbry/lbrynet/stream/reflector/__init__.py rename to lbry/lbry/stream/reflector/__init__.py diff --git a/lbry/lbrynet/stream/reflector/client.py b/lbry/lbry/stream/reflector/client.py similarity index 97% rename from lbry/lbrynet/stream/reflector/client.py rename to lbry/lbry/stream/reflector/client.py index 364011058..c8ff840a7 100644 --- a/lbry/lbrynet/stream/reflector/client.py +++ b/lbry/lbry/stream/reflector/client.py @@ -4,8 +4,8 @@ import logging import typing if typing.TYPE_CHECKING: - from lbrynet.blob.blob_manager import BlobManager - from lbrynet.stream.descriptor import StreamDescriptor + from lbry.blob.blob_manager import BlobManager + from lbry.stream.descriptor import StreamDescriptor REFLECTOR_V1 = 0 REFLECTOR_V2 = 1 diff --git a/lbry/lbrynet/stream/reflector/server.py b/lbry/lbry/stream/reflector/server.py similarity index 96% rename from lbry/lbrynet/stream/reflector/server.py rename to lbry/lbry/stream/reflector/server.py index 0a01f397e..daadbbcd9 100644 --- a/lbry/lbrynet/stream/reflector/server.py +++ b/lbry/lbry/stream/reflector/server.py @@ -3,12 +3,12 @@ import logging import typing import json from json.decoder import JSONDecodeError -from lbrynet.stream.descriptor import StreamDescriptor +from lbry.stream.descriptor import StreamDescriptor if typing.TYPE_CHECKING: - from lbrynet.blob.blob_file import BlobFile - from lbrynet.blob.blob_manager import BlobManager - from lbrynet.blob.writer import HashBlobWriter + from lbry.blob.blob_file import BlobFile + from lbry.blob.blob_manager import BlobManager + from lbry.blob.writer import HashBlobWriter log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/stream/stream_manager.py b/lbry/lbry/stream/stream_manager.py similarity index 95% rename from lbry/lbrynet/stream/stream_manager.py rename to lbry/lbry/stream/stream_manager.py index 63802da59..93237ee93 100644 --- a/lbry/lbrynet/stream/stream_manager.py +++ b/lbry/lbry/stream/stream_manager.py @@ -6,24 +6,24 @@ import logging import random from decimal import Decimal from aiohttp.web import Request -from lbrynet.error import ResolveError, InvalidStreamDescriptorError, KeyFeeAboveMaxAllowed, InsufficientFundsError -from lbrynet.error import ResolveTimeout, DownloadDataTimeout -from lbrynet.utils import cache_concurrent -from lbrynet.stream.descriptor import StreamDescriptor -from lbrynet.stream.managed_stream import ManagedStream -from lbrynet.schema.claim import Claim -from lbrynet.schema.url import URL -from lbrynet.extras.daemon.storage import lbc_to_dewies, dewies_to_lbc -from lbrynet.wallet.transaction import Output +from lbry.error import ResolveError, InvalidStreamDescriptorError, KeyFeeAboveMaxAllowed, InsufficientFundsError +from lbry.error import ResolveTimeout, DownloadDataTimeout +from lbry.utils import cache_concurrent +from lbry.stream.descriptor import StreamDescriptor +from lbry.stream.managed_stream import ManagedStream +from lbry.schema.claim import Claim +from lbry.schema.url import URL +from lbry.extras.daemon.storage import lbc_to_dewies, dewies_to_lbc +from lbry.wallet.transaction import Output if typing.TYPE_CHECKING: - from lbrynet.conf import Config - from lbrynet.blob.blob_manager import BlobManager - from lbrynet.dht.node import Node - from lbrynet.extras.daemon.analytics import AnalyticsManager - from lbrynet.extras.daemon.storage import SQLiteStorage, StoredStreamClaim - from lbrynet.wallet import LbryWalletManager - from lbrynet.wallet.transaction import Transaction - from lbrynet.extras.daemon.exchange_rate_manager import ExchangeRateManager + from lbry.conf import Config + from lbry.blob.blob_manager import BlobManager + from lbry.dht.node import Node + from lbry.extras.daemon.analytics import AnalyticsManager + from lbry.extras.daemon.storage import SQLiteStorage, StoredStreamClaim + from lbry.wallet import LbryWalletManager + from lbry.wallet.transaction import Transaction + from lbry.extras.daemon.exchange_rate_manager import ExchangeRateManager log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/testcase.py b/lbry/lbry/testcase.py similarity index 94% rename from lbry/lbrynet/testcase.py rename to lbry/lbry/testcase.py index 17f8e7e23..ef8d4cca2 100644 --- a/lbry/lbrynet/testcase.py +++ b/lbry/lbry/testcase.py @@ -6,21 +6,21 @@ from binascii import unhexlify from torba.testcase import IntegrationTestCase, WalletNode -import lbrynet.wallet +import lbry.wallet -from lbrynet.conf import Config -from lbrynet.extras.daemon.Daemon import Daemon, jsonrpc_dumps_pretty -from lbrynet.wallet import LbryWalletManager -from lbrynet.extras.daemon.Components import Component, WalletComponent -from lbrynet.extras.daemon.Components import ( +from lbry.conf import Config +from lbry.extras.daemon.Daemon import Daemon, jsonrpc_dumps_pretty +from lbry.wallet import LbryWalletManager +from lbry.extras.daemon.Components import Component, 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 lbrynet.extras.daemon.storage import SQLiteStorage -from lbrynet.blob.blob_manager import BlobManager -from lbrynet.stream.reflector.server import ReflectorServer -from lbrynet.blob_exchange.server import BlobServer +from lbry.extras.daemon.ComponentManager import ComponentManager +from lbry.extras.daemon.storage import SQLiteStorage +from lbry.blob.blob_manager import BlobManager +from lbry.stream.reflector.server import ReflectorServer +from lbry.blob_exchange.server import BlobServer class ExchangeRateManager: @@ -58,7 +58,7 @@ class ExchangeRateManagerComponent(Component): class CommandTestCase(IntegrationTestCase): - LEDGER = lbrynet.wallet + LEDGER = lbry.wallet MANAGER = LbryWalletManager VERBOSITY = logging.WARN blob_lru_cache_size = 0 diff --git a/lbry/lbrynet/utils.py b/lbry/lbry/utils.py similarity index 98% rename from lbry/lbrynet/utils.py rename to lbry/lbry/utils.py index e8ec4083b..3bd9f5c2e 100644 --- a/lbry/lbrynet/utils.py +++ b/lbry/lbry/utils.py @@ -16,8 +16,8 @@ import certifi import aiohttp import functools import collections -from lbrynet.schema.claim import Claim -from lbrynet.cryptoutils import get_lbry_hash_obj +from lbry.schema.claim import Claim +from lbry.cryptoutils import get_lbry_hash_obj log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/wallet/__init__.py b/lbry/lbry/wallet/__init__.py similarity index 57% rename from lbry/lbrynet/wallet/__init__.py rename to lbry/lbry/wallet/__init__.py index e196f2706..8f1809b2d 100644 --- a/lbry/lbrynet/wallet/__init__.py +++ b/lbry/lbry/wallet/__init__.py @@ -6,6 +6,6 @@ __node_url__ = ( ) __spvserver__ = 'lbrynet.wallet.server.coin.LBCRegTest' -from lbrynet.wallet.manager import LbryWalletManager -from lbrynet.wallet.network import Network -from lbrynet.wallet.ledger import MainNetLedger, RegTestLedger, TestNetLedger +from lbry.wallet.manager import LbryWalletManager +from lbry.wallet.network import Network +from lbry.wallet.ledger import MainNetLedger, RegTestLedger, TestNetLedger diff --git a/lbry/lbrynet/wallet/account.py b/lbry/lbry/wallet/account.py similarity index 100% rename from lbry/lbrynet/wallet/account.py rename to lbry/lbry/wallet/account.py diff --git a/lbry/lbrynet/wallet/claim_proofs.py b/lbry/lbry/wallet/claim_proofs.py similarity index 100% rename from lbry/lbrynet/wallet/claim_proofs.py rename to lbry/lbry/wallet/claim_proofs.py diff --git a/lbry/lbrynet/wallet/database.py b/lbry/lbry/wallet/database.py similarity index 99% rename from lbry/lbrynet/wallet/database.py rename to lbry/lbry/wallet/database.py index ee887d53d..ed6417ce0 100644 --- a/lbry/lbrynet/wallet/database.py +++ b/lbry/lbry/wallet/database.py @@ -2,7 +2,7 @@ from typing import List from torba.client.basedatabase import BaseDatabase -from lbrynet.wallet.transaction import Output +from lbry.wallet.transaction import Output class WalletDatabase(BaseDatabase): diff --git a/lbry/lbrynet/wallet/dewies.py b/lbry/lbry/wallet/dewies.py similarity index 100% rename from lbry/lbrynet/wallet/dewies.py rename to lbry/lbry/wallet/dewies.py diff --git a/lbry/lbrynet/wallet/header.py b/lbry/lbry/wallet/header.py similarity index 100% rename from lbry/lbrynet/wallet/header.py rename to lbry/lbry/wallet/header.py diff --git a/lbry/lbrynet/wallet/ledger.py b/lbry/lbry/wallet/ledger.py similarity index 92% rename from lbry/lbrynet/wallet/ledger.py rename to lbry/lbry/wallet/ledger.py index 2b2962473..6a964c15d 100644 --- a/lbry/lbrynet/wallet/ledger.py +++ b/lbry/lbry/wallet/ledger.py @@ -5,15 +5,15 @@ from typing import Tuple, List, Dict from torba.client.baseledger import BaseLedger from torba.client.baseaccount import SingleKey -from lbrynet.schema.result import Outputs -from lbrynet.schema.url import URL -from lbrynet.wallet.dewies import dewies_to_lbc -from lbrynet.wallet.resolve import Resolver -from lbrynet.wallet.account import Account -from lbrynet.wallet.network import Network -from lbrynet.wallet.database import WalletDatabase -from lbrynet.wallet.transaction import Transaction, Output -from lbrynet.wallet.header import Headers, UnvalidatedHeaders +from lbry.schema.result import Outputs +from lbry.schema.url import URL +from lbry.wallet.dewies import dewies_to_lbc +from lbry.wallet.resolve import Resolver +from lbry.wallet.account import Account +from lbry.wallet.network import Network +from lbry.wallet.database import WalletDatabase +from lbry.wallet.transaction import Transaction, Output +from lbry.wallet.header import Headers, UnvalidatedHeaders log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/wallet/manager.py b/lbry/lbry/wallet/manager.py similarity index 98% rename from lbry/lbrynet/wallet/manager.py rename to lbry/lbry/wallet/manager.py index d9627ead9..593d5fb53 100644 --- a/lbry/lbrynet/wallet/manager.py +++ b/lbry/lbry/wallet/manager.py @@ -8,11 +8,11 @@ from datetime import datetime from torba.client.basemanager import BaseWalletManager from torba.rpc.jsonrpc import CodeMessageError -from lbrynet.wallet.ledger import MainNetLedger -from lbrynet.wallet.account import BaseAccount -from lbrynet.wallet.transaction import Transaction -from lbrynet.wallet.database import WalletDatabase -from lbrynet.wallet.dewies import dewies_to_lbc +from lbry.wallet.ledger import MainNetLedger +from lbry.wallet.account import BaseAccount +from lbry.wallet.transaction import Transaction +from lbry.wallet.database import WalletDatabase +from lbry.wallet.dewies import dewies_to_lbc log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/wallet/network.py b/lbry/lbry/wallet/network.py similarity index 100% rename from lbry/lbrynet/wallet/network.py rename to lbry/lbry/wallet/network.py diff --git a/lbry/lbrynet/wallet/resolve.py b/lbry/lbry/wallet/resolve.py similarity index 98% rename from lbry/lbrynet/wallet/resolve.py rename to lbry/lbry/wallet/resolve.py index d7cdcf135..10e884be2 100644 --- a/lbry/lbrynet/wallet/resolve.py +++ b/lbry/lbry/wallet/resolve.py @@ -3,14 +3,14 @@ import logging import asyncio from binascii import unhexlify, hexlify -from lbrynet.utils import lru_cache_concurrent -from lbrynet.wallet.account import validate_claim_id -from lbrynet.wallet.dewies import dewies_to_lbc -from lbrynet.error import UnknownNameError, UnknownClaimID, UnknownURI, UnknownOutpoint -from lbrynet.schema.claim import Claim +from lbry.utils import lru_cache_concurrent +from lbry.wallet.account import validate_claim_id +from lbry.wallet.dewies import dewies_to_lbc +from lbry.error import UnknownNameError, UnknownClaimID, UnknownURI, UnknownOutpoint +from lbry.schema.claim import Claim from google.protobuf.message import DecodeError -from lbrynet.schema.url import URL -from lbrynet.wallet.claim_proofs import verify_proof, InvalidProofError +from lbry.schema.url import URL +from lbry.wallet.claim_proofs import verify_proof, InvalidProofError log = logging.getLogger(__name__) diff --git a/lbry/lbrynet/wallet/script.py b/lbry/lbry/wallet/script.py similarity index 100% rename from lbry/lbrynet/wallet/script.py rename to lbry/lbry/wallet/script.py diff --git a/lbry/lbrynet/wallet/server/__init__.py b/lbry/lbry/wallet/server/__init__.py similarity index 100% rename from lbry/lbrynet/wallet/server/__init__.py rename to lbry/lbry/wallet/server/__init__.py diff --git a/lbry/lbrynet/wallet/server/block_processor.py b/lbry/lbry/wallet/server/block_processor.py similarity index 97% rename from lbry/lbrynet/wallet/server/block_processor.py rename to lbry/lbry/wallet/server/block_processor.py index 4db440402..f6bd6ae54 100644 --- a/lbry/lbrynet/wallet/server/block_processor.py +++ b/lbry/lbry/wallet/server/block_processor.py @@ -2,8 +2,8 @@ import time from torba.server.block_processor import BlockProcessor -from lbrynet.schema.claim import Claim -from lbrynet.wallet.server.db import SQLDB +from lbry.schema.claim import Claim +from lbry.wallet.server.db import SQLDB class Timer: diff --git a/lbry/lbrynet/wallet/server/canonical.py b/lbry/lbry/wallet/server/canonical.py similarity index 100% rename from lbry/lbrynet/wallet/server/canonical.py rename to lbry/lbry/wallet/server/canonical.py diff --git a/lbry/lbrynet/wallet/server/coin.py b/lbry/lbry/wallet/server/coin.py similarity index 98% rename from lbry/lbrynet/wallet/server/coin.py rename to lbry/lbry/wallet/server/coin.py index a99c68819..1e3fcccfc 100644 --- a/lbry/lbrynet/wallet/server/coin.py +++ b/lbry/lbry/wallet/server/coin.py @@ -1,6 +1,6 @@ import struct -from lbrynet.wallet.script import OutputScript +from lbry.wallet.script import OutputScript from torba.server.script import ScriptPubKey, OpCodes from torba.server.util import cachedproperty from torba.server.hash import hash_to_hex_str, HASHX_LEN diff --git a/lbry/lbrynet/wallet/server/daemon.py b/lbry/lbry/wallet/server/daemon.py similarity index 100% rename from lbry/lbrynet/wallet/server/daemon.py rename to lbry/lbry/wallet/server/daemon.py diff --git a/lbry/lbrynet/wallet/server/db.py b/lbry/lbry/wallet/server/db.py similarity index 99% rename from lbry/lbrynet/wallet/server/db.py rename to lbry/lbry/wallet/server/db.py index b45e9be4f..0a3861cf9 100644 --- a/lbry/lbrynet/wallet/server/db.py +++ b/lbry/lbry/wallet/server/db.py @@ -9,12 +9,12 @@ from torba.server.db import DB from torba.server.util import class_logger from torba.client.basedatabase import query, constraints_to_sql -from lbrynet.schema.url import URL, normalize_name -from lbrynet.schema.mime_types import guess_stream_type -from lbrynet.wallet.ledger import MainNetLedger, RegTestLedger -from lbrynet.wallet.transaction import Transaction, Output -from lbrynet.wallet.server.canonical import register_canonical_functions -from lbrynet.wallet.server.trending import ( +from lbry.schema.url import URL, normalize_name +from lbry.schema.mime_types import guess_stream_type +from lbry.wallet.ledger import MainNetLedger, RegTestLedger +from lbry.wallet.transaction import Transaction, Output +from lbry.wallet.server.canonical import register_canonical_functions +from lbry.wallet.server.trending import ( CREATE_TREND_TABLE, calculate_trending, register_trending_functions ) diff --git a/lbry/lbrynet/wallet/server/session.py b/lbry/lbry/wallet/server/session.py similarity index 98% rename from lbry/lbrynet/wallet/server/session.py rename to lbry/lbry/wallet/server/session.py index 81a8174f5..5c7e1bded 100644 --- a/lbry/lbrynet/wallet/server/session.py +++ b/lbry/lbry/wallet/server/session.py @@ -7,10 +7,10 @@ from torba.server.hash import hash_to_hex_str from torba.server.session import ElectrumX from torba.server import util -from lbrynet.schema.result import Outputs -from lbrynet.schema.url import URL -from lbrynet.wallet.server.block_processor import LBRYBlockProcessor -from lbrynet.wallet.server.db import LBRYDB +from lbry.schema.result import Outputs +from lbry.schema.url import URL +from lbry.wallet.server.block_processor import LBRYBlockProcessor +from lbry.wallet.server.db import LBRYDB class LBRYElectrumX(ElectrumX): diff --git a/lbry/lbrynet/wallet/server/trending.py b/lbry/lbry/wallet/server/trending.py similarity index 100% rename from lbry/lbrynet/wallet/server/trending.py rename to lbry/lbry/wallet/server/trending.py diff --git a/lbry/lbrynet/wallet/transaction.py b/lbry/lbry/wallet/transaction.py similarity index 98% rename from lbry/lbrynet/wallet/transaction.py rename to lbry/lbry/wallet/transaction.py index 5d7c9e8f2..f6046636e 100644 --- a/lbry/lbrynet/wallet/transaction.py +++ b/lbry/lbry/wallet/transaction.py @@ -13,10 +13,10 @@ from cryptography.exceptions import InvalidSignature from torba.client.basetransaction import BaseTransaction, BaseInput, BaseOutput, ReadOnlyList from torba.client.hash import hash160, sha256, Base58 -from lbrynet.schema.claim import Claim -from lbrynet.schema.url import normalize_name -from lbrynet.wallet.account import Account -from lbrynet.wallet.script import InputScript, OutputScript +from lbry.schema.claim import Claim +from lbry.schema.url import normalize_name +from lbry.wallet.account import Account +from lbry.wallet.script import InputScript, OutputScript class Input(BaseInput): diff --git a/lbry/lbrynet/winpaths.py b/lbry/lbry/winpaths.py similarity index 100% rename from lbry/lbrynet/winpaths.py rename to lbry/lbry/winpaths.py diff --git a/lbry/lbrynet/extras/daemon/__init__.py b/lbry/lbrynet/extras/daemon/__init__.py deleted file mode 100644 index 9fb57d0d9..000000000 --- a/lbry/lbrynet/extras/daemon/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from lbrynet.extras.daemon import Components # register Component classes