diff --git a/lbrynet/extras/wallet/manager.py b/lbrynet/extras/wallet/manager.py index b0c6d2236..d8638671c 100644 --- a/lbrynet/extras/wallet/manager.py +++ b/lbrynet/extras/wallet/manager.py @@ -6,7 +6,7 @@ from binascii import unhexlify from datetime import datetime from typing import Optional -from lbrynet.schema.schema import SECP256k1 +from lbrynet.schema.legacy_schema_v1 import SECP256k1 from torba.client.basemanager import BaseWalletManager from torba.rpc.jsonrpc import CodeMessageError diff --git a/lbrynet/schema/address.py b/lbrynet/schema/address.py index d6c1c4aac..5017122ff 100644 --- a/lbrynet/schema/address.py +++ b/lbrynet/schema/address.py @@ -2,7 +2,7 @@ import lbrynet.schema from lbrynet.schema.base import b58encode, b58decode, validate_b58_checksum from lbrynet.schema.hashing import double_sha256, hash160 from lbrynet.schema.error import InvalidAddress -from lbrynet.schema.schema import ADDRESS_LENGTH, ADDRESS_PREFIXES, PUBKEY_ADDRESS, SCRIPT_ADDRESS +from lbrynet.schema.legacy_schema_v1 import ADDRESS_LENGTH, ADDRESS_PREFIXES, PUBKEY_ADDRESS, SCRIPT_ADDRESS def validate_address_length(addr_bytes): diff --git a/lbrynet/schema/base.py b/lbrynet/schema/base.py index 1a87d4e97..e39aefdf5 100644 --- a/lbrynet/schema/base.py +++ b/lbrynet/schema/base.py @@ -1,4 +1,4 @@ -from lbrynet.schema.schema import ADDRESS_CHECKSUM_LENGTH +from lbrynet.schema.legacy_schema_v1 import ADDRESS_CHECKSUM_LENGTH from lbrynet.schema.hashing import double_sha256 from lbrynet.schema.error import InvalidAddress diff --git a/lbrynet/schema/claim.py b/lbrynet/schema/claim.py index b2884d6f5..17b5b0354 100644 --- a/lbrynet/schema/claim.py +++ b/lbrynet/schema/claim.py @@ -5,12 +5,12 @@ from google.protobuf.message import DecodeError as DecodeError_pb # pylint: dis from collections import OrderedDict -from lbrynet.schema.schema.claim import Claim from lbrynet.schema.proto2 import claim_pb2 from lbrynet.schema.signature import Signature from lbrynet.schema.validator import get_validator from lbrynet.schema.signer import get_signer -from lbrynet.schema.schema import CURVE_NAMES, CLAIM_TYPE_NAMES, SECP256k1 +from lbrynet.schema.legacy_schema_v1.claim import Claim +from lbrynet.schema.legacy_schema_v1 import CURVE_NAMES, CLAIM_TYPE_NAMES, SECP256k1 from lbrynet.schema.encoding import decode_fields, decode_b64_fields, encode_fields from lbrynet.schema.error import DecodeError from lbrynet.schema.fee import Fee diff --git a/lbrynet/schema/encoding.py b/lbrynet/schema/encoding.py index 33c3eb30d..91b0f0b6c 100644 --- a/lbrynet/schema/encoding.py +++ b/lbrynet/schema/encoding.py @@ -1,8 +1,8 @@ import base64, binascii from copy import deepcopy from lbrynet.schema.address import decode_address, encode_address -from lbrynet.schema.schema import CLAIM_TYPES, CLAIM_TYPE, STREAM_TYPE, CERTIFICATE_TYPE -from lbrynet.schema.schema import SIGNATURE +from lbrynet.schema.legacy_schema_v1 import CLAIM_TYPES, CLAIM_TYPE, STREAM_TYPE, CERTIFICATE_TYPE +from lbrynet.schema.legacy_schema_v1 import SIGNATURE from lbrynet.schema.error import DecodeError, InvalidAddress from lbrynet.schema.signature import Signature diff --git a/lbrynet/schema/fee.py b/lbrynet/schema/fee.py index a0bd45c03..8cfafadbb 100644 --- a/lbrynet/schema/fee.py +++ b/lbrynet/schema/fee.py @@ -1,8 +1,8 @@ from collections import OrderedDict from lbrynet.schema.address import encode_address, decode_address -from lbrynet.schema.schema import CURRENCY_NAMES, CURRENCY_MAP -from lbrynet.schema.schema.fee import Fee as FeeHelper +from lbrynet.schema.legacy_schema_v1 import CURRENCY_NAMES, CURRENCY_MAP +from lbrynet.schema.legacy_schema_v1.fee import Fee as FeeHelper from lbrynet.schema.proto2 import fee_pb2 diff --git a/lbrynet/schema/legacy_schema_v1/certificate.py b/lbrynet/schema/legacy_schema_v1/certificate.py index a16153e83..0ab8540ea 100644 --- a/lbrynet/schema/legacy_schema_v1/certificate.py +++ b/lbrynet/schema/legacy_schema_v1/certificate.py @@ -1,8 +1,8 @@ from copy import deepcopy from lbrynet.schema.proto2 import certificate_pb2 as cert_pb -from lbrynet.schema.schema.schema import Schema -from lbrynet.schema.schema import VERSION_MAP, V_0_0_1, ECDSA_CURVES, CURVE_NAMES +from lbrynet.schema.legacy_schema_v1.schema import Schema +from lbrynet.schema.legacy_schema_v1 import VERSION_MAP, V_0_0_1, ECDSA_CURVES, CURVE_NAMES from lbrynet.schema.validator import get_key_type_from_dem diff --git a/lbrynet/schema/legacy_schema_v1/claim.py b/lbrynet/schema/legacy_schema_v1/claim.py index 4ad278378..2d7fe04ec 100644 --- a/lbrynet/schema/legacy_schema_v1/claim.py +++ b/lbrynet/schema/legacy_schema_v1/claim.py @@ -1,11 +1,11 @@ from copy import deepcopy from lbrynet.schema.proto2 import claim_pb2 as claim_pb -from lbrynet.schema.schema import VERSION_MAP -from lbrynet.schema.schema.signature import Signature -from lbrynet.schema.schema.certificate import Certificate -from lbrynet.schema.schema.schema import Schema -from lbrynet.schema.schema.stream import Stream +from lbrynet.schema.legacy_schema_v1 import VERSION_MAP +from lbrynet.schema.legacy_schema_v1.signature import Signature +from lbrynet.schema.legacy_schema_v1.certificate import Certificate +from lbrynet.schema.legacy_schema_v1.schema import Schema +from lbrynet.schema.legacy_schema_v1.stream import Stream class Claim(Schema): diff --git a/lbrynet/schema/legacy_schema_v1/fee.py b/lbrynet/schema/legacy_schema_v1/fee.py index 6dc02daff..e098492f6 100644 --- a/lbrynet/schema/legacy_schema_v1/fee.py +++ b/lbrynet/schema/legacy_schema_v1/fee.py @@ -1,8 +1,8 @@ from copy import deepcopy -from lbrynet.schema.schema.schema import Schema from lbrynet.schema.proto2 import fee_pb2 as fee_pb -from lbrynet.schema.schema import VERSION_MAP, CURRENCY_MAP +from lbrynet.schema.legacy_schema_v1.schema import Schema +from lbrynet.schema.legacy_schema_v1 import VERSION_MAP, CURRENCY_MAP class Fee(Schema): diff --git a/lbrynet/schema/legacy_schema_v1/metadata.py b/lbrynet/schema/legacy_schema_v1/metadata.py index f33d8725d..79ac14aa8 100644 --- a/lbrynet/schema/legacy_schema_v1/metadata.py +++ b/lbrynet/schema/legacy_schema_v1/metadata.py @@ -1,8 +1,8 @@ from copy import deepcopy from lbrynet.schema.proto2 import metadata_pb2 as metadata_pb -from lbrynet.schema.schema.fee import Fee -from lbrynet.schema.schema.schema import Schema -from lbrynet.schema.schema import VERSION_MAP +from lbrynet.schema.legacy_schema_v1.fee import Fee +from lbrynet.schema.legacy_schema_v1.schema import Schema +from lbrynet.schema.legacy_schema_v1 import VERSION_MAP class Metadata(Schema): diff --git a/lbrynet/schema/legacy_schema_v1/signature.py b/lbrynet/schema/legacy_schema_v1/signature.py index 14d428108..20a3ed192 100644 --- a/lbrynet/schema/legacy_schema_v1/signature.py +++ b/lbrynet/schema/legacy_schema_v1/signature.py @@ -1,8 +1,8 @@ from copy import deepcopy from lbrynet.schema.proto2 import signature_pb2 as signature_pb -from lbrynet.schema.schema import VERSION_MAP, ECDSA_CURVES -from lbrynet.schema.schema.schema import Schema +from lbrynet.schema.legacy_schema_v1 import VERSION_MAP, ECDSA_CURVES +from lbrynet.schema.legacy_schema_v1.schema import Schema class Signature(Schema): diff --git a/lbrynet/schema/legacy_schema_v1/source.py b/lbrynet/schema/legacy_schema_v1/source.py index c7aeee729..c6033f9ff 100644 --- a/lbrynet/schema/legacy_schema_v1/source.py +++ b/lbrynet/schema/legacy_schema_v1/source.py @@ -1,7 +1,7 @@ from copy import deepcopy from lbrynet.schema.proto2 import source_pb2 as source_pb -from lbrynet.schema.schema import SOURCE_TYPES, LBRY_SD_HASH_LENGTH, VERSION_MAP -from lbrynet.schema.schema.schema import Schema +from lbrynet.schema.legacy_schema_v1 import SOURCE_TYPES, LBRY_SD_HASH_LENGTH, VERSION_MAP +from lbrynet.schema.legacy_schema_v1.schema import Schema from lbrynet.schema.error import InvalidSourceHashLength diff --git a/lbrynet/schema/legacy_schema_v1/stream.py b/lbrynet/schema/legacy_schema_v1/stream.py index 732503226..c3df6219b 100644 --- a/lbrynet/schema/legacy_schema_v1/stream.py +++ b/lbrynet/schema/legacy_schema_v1/stream.py @@ -1,10 +1,10 @@ from copy import deepcopy -from lbrynet.schema.schema.source import Source from lbrynet.schema.proto2 import stream_pb2 as stream_pb -from lbrynet.schema.schema import VERSION_MAP -from lbrynet.schema.schema.metadata import Metadata -from lbrynet.schema.schema.schema import Schema +from lbrynet.schema.legacy_schema_v1.source import Source +from lbrynet.schema.legacy_schema_v1 import VERSION_MAP +from lbrynet.schema.legacy_schema_v1.metadata import Metadata +from lbrynet.schema.legacy_schema_v1.schema import Schema class Stream(Schema): diff --git a/lbrynet/schema/signer.py b/lbrynet/schema/signer.py index 2daac0dbd..c3b07548d 100644 --- a/lbrynet/schema/signer.py +++ b/lbrynet/schema/signer.py @@ -3,12 +3,12 @@ import hashlib import binascii from lbrynet.schema.address import decode_address from lbrynet.schema.encoding import decode_b64_fields -from lbrynet.schema.schema.certificate import Certificate -from lbrynet.schema.schema.claim import Claim from lbrynet.schema.signature import Signature, NAMED_SECP256K1 from lbrynet.schema.validator import validate_claim_id -from lbrynet.schema.schema import V_0_0_1, CLAIM_TYPE, CLAIM_TYPES, CERTIFICATE_TYPE, VERSION -from lbrynet.schema.schema import NIST256p, NIST384p, SECP256k1, SHA256, SHA384 +from lbrynet.schema.legacy_schema_v1.certificate import Certificate +from lbrynet.schema.legacy_schema_v1.claim import Claim +from lbrynet.schema.legacy_schema_v1 import V_0_0_1, CLAIM_TYPE, CLAIM_TYPES, CERTIFICATE_TYPE, VERSION +from lbrynet.schema.legacy_schema_v1 import NIST256p, NIST384p, SECP256k1, SHA256, SHA384 class NIST_ECDSASigner(object): diff --git a/lbrynet/schema/validator.py b/lbrynet/schema/validator.py index 751f2a052..8a37bf974 100644 --- a/lbrynet/schema/validator.py +++ b/lbrynet/schema/validator.py @@ -13,7 +13,7 @@ from cryptography.exceptions import InvalidSignature from ecdsa.util import sigencode_der from lbrynet.schema.address import decode_address -from lbrynet.schema.schema import NIST256p, NIST384p, SECP256k1, ECDSA_CURVES, CURVE_NAMES +from lbrynet.schema.legacy_schema_v1 import NIST256p, NIST384p, SECP256k1, ECDSA_CURVES, CURVE_NAMES def validate_claim_id(claim_id): diff --git a/tests/unit/schema/test_lbryschema.py b/tests/unit/schema/test_lbryschema.py index b96ef29c5..75a92a11c 100644 --- a/tests/unit/schema/test_lbryschema.py +++ b/tests/unit/schema/test_lbryschema.py @@ -16,7 +16,7 @@ from .test_data import secp256k1_private_key, claim_010_signed_secp256k1, secp25 from .test_data import hex_encoded_003, decoded_hex_encoded_003, malformed_secp256k1_cert from lbrynet import schema from lbrynet.schema.claim import ClaimDict -from lbrynet.schema.schema import NIST256p, NIST384p, SECP256k1 +from lbrynet.schema.legacy_schema_v1 import NIST256p, NIST384p, SECP256k1 from lbrynet.schema.legacy.migrate import migrate from lbrynet.schema.signer import get_signer from lbrynet.schema.uri import URI, URIParseError