From 190f2ed58cbaf88dc3cef67fdbd4fef045d10397 Mon Sep 17 00:00:00 2001 From: drew2a Date: Tue, 28 Sep 2021 19:35:15 +0200 Subject: [PATCH 1/4] Merge masterkey --- .../popularity_community/initial_filling.py | 2 +- .../tunnel_community/hidden_peer_discovery.py | 2 +- experiment/tunnel_community/speed_test_exit.py | 2 +- .../tests/test_bandwidth_accounting_component.py | 2 +- .../tests/test_gigachannel_component.py | 2 +- .../tests/test_gigachannel_manager_component.py | 2 +- src/tribler-core/tribler_core/components/ipv8.py | 5 +++-- .../tribler_core/components/libtorrent.py | 4 +++- .../components/masterkey/__init__.py | 0 .../masterkey_component.py} | 2 +- .../masterkey}/permid.py | 0 .../masterkey}/settings.py | 0 .../masterkey/tests/test_masterkey_component.py | 16 ++++++++++++++++ .../metadata_store/metadata_store_component.py | 6 +++++- .../tests/test_metadata_store_component.py | 2 +- .../tribler_core/components/reporter.py | 2 +- .../components/tests/test_tribler_components.py | 5 ++++- .../tribler_core/components/upgrade.py | 4 +++- .../config/tribler_config_sections.py | 2 +- .../modules/tunnel/tests/test_tunnel_settings.py | 2 +- src/tribler-core/tribler_core/start_core.py | 2 +- .../tribler_core/tests/test_permid.py | 2 +- .../tribler_core/upgrade/tests/test_upgrader.py | 2 +- 23 files changed, 48 insertions(+), 20 deletions(-) create mode 100644 src/tribler-core/tribler_core/components/masterkey/__init__.py rename src/tribler-core/tribler_core/components/{masterkey.py => masterkey/masterkey_component.py} (94%) rename src/tribler-core/tribler_core/{utilities => components/masterkey}/permid.py (100%) rename src/tribler-core/tribler_core/{modules => components/masterkey}/settings.py (100%) create mode 100644 src/tribler-core/tribler_core/components/masterkey/tests/test_masterkey_component.py diff --git a/experiment/popularity_community/initial_filling.py b/experiment/popularity_community/initial_filling.py index bc454716660..b5031b120ff 100644 --- a/experiment/popularity_community/initial_filling.py +++ b/experiment/popularity_community/initial_filling.py @@ -14,7 +14,7 @@ from ipv8_service import IPv8 from tribler_core.components.ipv8 import Ipv8Component from tribler_core.components.libtorrent import LibtorrentComponent -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent from tribler_core.components.metadata_store.metadata_store_component import MetadataStoreComponent from tribler_core.components.popularity import PopularityComponent from tribler_core.components.restapi import RESTComponent diff --git a/experiment/tunnel_community/hidden_peer_discovery.py b/experiment/tunnel_community/hidden_peer_discovery.py index 5c36311aa23..3a5cc7c9853 100644 --- a/experiment/tunnel_community/hidden_peer_discovery.py +++ b/experiment/tunnel_community/hidden_peer_discovery.py @@ -6,7 +6,7 @@ from ipv8.taskmanager import TaskManager from tribler_core.components.ipv8 import Ipv8Component -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent from tribler_core.components.restapi import RESTComponent from tribler_core.components.tunnels import TunnelsComponent from tribler_core.config.tribler_config import TriblerConfig diff --git a/experiment/tunnel_community/speed_test_exit.py b/experiment/tunnel_community/speed_test_exit.py index d9c91e8988b..fbe3a0a5ac3 100644 --- a/experiment/tunnel_community/speed_test_exit.py +++ b/experiment/tunnel_community/speed_test_exit.py @@ -6,7 +6,7 @@ from ipv8.messaging.anonymization.utils import run_speed_test from ipv8.taskmanager import TaskManager from tribler_core.components.ipv8 import Ipv8Component -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent from tribler_core.components.restapi import RESTComponent from tribler_core.components.tunnels import TunnelsComponent from tribler_core.config.tribler_config import TriblerConfig diff --git a/src/tribler-core/tribler_core/components/bandwidth_accounting/tests/test_bandwidth_accounting_component.py b/src/tribler-core/tribler_core/components/bandwidth_accounting/tests/test_bandwidth_accounting_component.py index f13b42ed2b7..916ef585eac 100644 --- a/src/tribler-core/tribler_core/components/bandwidth_accounting/tests/test_bandwidth_accounting_component.py +++ b/src/tribler-core/tribler_core/components/bandwidth_accounting/tests/test_bandwidth_accounting_component.py @@ -5,7 +5,7 @@ from tribler_core.components.bandwidth_accounting.bandwidth_accounting_component import BandwidthAccountingComponent from tribler_core.components.base import Session from tribler_core.components.ipv8 import Ipv8Component -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent from tribler_core.components.restapi import RESTComponent from tribler_core.restapi.rest_manager import RESTManager diff --git a/src/tribler-core/tribler_core/components/gigachannel/tests/test_gigachannel_component.py b/src/tribler-core/tribler_core/components/gigachannel/tests/test_gigachannel_component.py index 25a93807b09..4049b00b903 100644 --- a/src/tribler-core/tribler_core/components/gigachannel/tests/test_gigachannel_component.py +++ b/src/tribler-core/tribler_core/components/gigachannel/tests/test_gigachannel_component.py @@ -5,7 +5,7 @@ from tribler_core.components.base import Session from tribler_core.components.gigachannel.gigachannel_component import GigaChannelComponent from tribler_core.components.ipv8 import Ipv8Component -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent from tribler_core.components.metadata_store.metadata_store_component import MetadataStoreComponent from tribler_core.components.restapi import RESTComponent from tribler_core.restapi.rest_manager import RESTManager diff --git a/src/tribler-core/tribler_core/components/gigachannel_manager/tests/test_gigachannel_manager_component.py b/src/tribler-core/tribler_core/components/gigachannel_manager/tests/test_gigachannel_manager_component.py index 3bcd2006e9a..285ac90e02c 100644 --- a/src/tribler-core/tribler_core/components/gigachannel_manager/tests/test_gigachannel_manager_component.py +++ b/src/tribler-core/tribler_core/components/gigachannel_manager/tests/test_gigachannel_manager_component.py @@ -5,7 +5,7 @@ from tribler_core.components.base import Session from tribler_core.components.gigachannel_manager.gigachannel_manager_component import GigachannelManagerComponent from tribler_core.components.libtorrent import LibtorrentComponent -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent from tribler_core.components.metadata_store.metadata_store_component import MetadataStoreComponent from tribler_core.components.restapi import RESTComponent from tribler_core.components.socks_configurator import SocksServersComponent diff --git a/src/tribler-core/tribler_core/components/ipv8.py b/src/tribler-core/tribler_core/components/ipv8.py index 3c04697bded..b4bf1a2a09b 100644 --- a/src/tribler-core/tribler_core/components/ipv8.py +++ b/src/tribler-core/tribler_core/components/ipv8.py @@ -14,8 +14,9 @@ from ipv8.taskmanager import TaskManager from ipv8_service import IPv8 - -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.base import Component +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent +from tribler_core.components.reporter import ReporterComponent from tribler_core.components.restapi import RestfulComponent INFINITE = -1 diff --git a/src/tribler-core/tribler_core/components/libtorrent.py b/src/tribler-core/tribler_core/components/libtorrent.py index 22ea5b57115..58ca41faf19 100644 --- a/src/tribler-core/tribler_core/components/libtorrent.py +++ b/src/tribler-core/tribler_core/components/libtorrent.py @@ -1,6 +1,8 @@ from tribler_common.simpledefs import STATE_CHECKPOINTS_LOADED, STATE_LOAD_CHECKPOINTS, STATE_START_LIBTORRENT -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.base import Component +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent +from tribler_core.components.reporter import ReporterComponent from tribler_core.components.restapi import RestfulComponent from tribler_core.components.socks_configurator import SocksServersComponent from tribler_core.components.upgrade import UpgradeComponent diff --git a/src/tribler-core/tribler_core/components/masterkey/__init__.py b/src/tribler-core/tribler_core/components/masterkey/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/tribler-core/tribler_core/components/masterkey.py b/src/tribler-core/tribler_core/components/masterkey/masterkey_component.py similarity index 94% rename from src/tribler-core/tribler_core/components/masterkey.py rename to src/tribler-core/tribler_core/components/masterkey/masterkey_component.py index e9b7fe5df3e..0ea65c30754 100644 --- a/src/tribler-core/tribler_core/components/masterkey.py +++ b/src/tribler-core/tribler_core/components/masterkey/masterkey_component.py @@ -1,4 +1,4 @@ -import tribler_core.utilities.permid as permid_module +import tribler_core.components.masterkey.permid as permid_module from ipv8.keyvault.private.libnaclkey import LibNaCLSK from tribler_core.components.base import Component diff --git a/src/tribler-core/tribler_core/utilities/permid.py b/src/tribler-core/tribler_core/components/masterkey/permid.py similarity index 100% rename from src/tribler-core/tribler_core/utilities/permid.py rename to src/tribler-core/tribler_core/components/masterkey/permid.py diff --git a/src/tribler-core/tribler_core/modules/settings.py b/src/tribler-core/tribler_core/components/masterkey/settings.py similarity index 100% rename from src/tribler-core/tribler_core/modules/settings.py rename to src/tribler-core/tribler_core/components/masterkey/settings.py diff --git a/src/tribler-core/tribler_core/components/masterkey/tests/test_masterkey_component.py b/src/tribler-core/tribler_core/components/masterkey/tests/test_masterkey_component.py new file mode 100644 index 00000000000..4af5e141c95 --- /dev/null +++ b/src/tribler-core/tribler_core/components/masterkey/tests/test_masterkey_component.py @@ -0,0 +1,16 @@ +import pytest + +from tribler_core.components.base import Session +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent + + +@pytest.mark.asyncio +async def test_masterkey_component(tribler_config): + session = Session(tribler_config, [MasterKeyComponent()]) + with session: + comp = MasterKeyComponent.instance() + await session.start() + + assert comp.keypair + + await session.shutdown() diff --git a/src/tribler-core/tribler_core/components/metadata_store/metadata_store_component.py b/src/tribler-core/tribler_core/components/metadata_store/metadata_store_component.py index b2e6d8ebaba..1d73866ee7f 100644 --- a/src/tribler-core/tribler_core/components/metadata_store/metadata_store_component.py +++ b/src/tribler-core/tribler_core/components/metadata_store/metadata_store_component.py @@ -1,6 +1,10 @@ from tribler_common.simpledefs import NTFY, STATEDIR_DB_DIR -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.base import Component +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent +from tribler_core.components.reporter import ReporterComponent +from tribler_core.components.restapi import RestfulComponent +from tribler_core.components.upgrade import UpgradeComponent from tribler_core.components.metadata_store.db.store import MetadataStore from tribler_core.components.metadata_store.utils import generate_test_channels from tribler_core.components.restapi import RestfulComponent diff --git a/src/tribler-core/tribler_core/components/metadata_store/tests/test_metadata_store_component.py b/src/tribler-core/tribler_core/components/metadata_store/tests/test_metadata_store_component.py index 8345a8b8c0b..f429a8af12c 100644 --- a/src/tribler-core/tribler_core/components/metadata_store/tests/test_metadata_store_component.py +++ b/src/tribler-core/tribler_core/components/metadata_store/tests/test_metadata_store_component.py @@ -3,7 +3,7 @@ import pytest from tribler_core.components.base import Session -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent from tribler_core.components.metadata_store.metadata_store_component import MetadataStoreComponent from tribler_core.components.restapi import RESTComponent from tribler_core.restapi.rest_manager import RESTManager diff --git a/src/tribler-core/tribler_core/components/reporter.py b/src/tribler-core/tribler_core/components/reporter.py index a6190d4d72d..13532392482 100644 --- a/src/tribler-core/tribler_core/components/reporter.py +++ b/src/tribler-core/tribler_core/components/reporter.py @@ -1,6 +1,6 @@ from tribler_common.sentry_reporter.sentry_reporter import SentryReporter from tribler_core.components.base import Component -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent from tribler_core.utilities.unicode import hexlify diff --git a/src/tribler-core/tribler_core/components/tests/test_tribler_components.py b/src/tribler-core/tribler_core/components/tests/test_tribler_components.py index 1a7debf2b84..4ee466b918c 100644 --- a/src/tribler-core/tribler_core/components/tests/test_tribler_components.py +++ b/src/tribler-core/tribler_core/components/tests/test_tribler_components.py @@ -6,7 +6,7 @@ from tribler_core.components.base import Session, SessionError from tribler_core.components.ipv8 import Ipv8Component from tribler_core.components.libtorrent import LibtorrentComponent -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent from tribler_core.components.metadata_store.metadata_store_component import MetadataStoreComponent from tribler_core.components.payout import PayoutComponent from tribler_core.components.popularity import PopularityComponent @@ -50,6 +50,7 @@ def test_session_context_manager(loop, tribler_config): Session.current() +<<<<<<< main async def test_masterkey_component(tribler_config): session = Session(tribler_config, [MasterKeyComponent()]) with session: @@ -62,6 +63,8 @@ async def test_masterkey_component(tribler_config): await session.shutdown() +======= +>>>>>>> Merge masterkey async def test_ipv8_component(tribler_config): tribler_config.ipv8.enabled = True components = [MasterKeyComponent(), RESTComponent(), Ipv8Component()] diff --git a/src/tribler-core/tribler_core/components/upgrade.py b/src/tribler-core/tribler_core/components/upgrade.py index 626439693af..49e6181a62c 100644 --- a/src/tribler-core/tribler_core/components/upgrade.py +++ b/src/tribler-core/tribler_core/components/upgrade.py @@ -1,6 +1,8 @@ from tribler_common.simpledefs import STATE_UPGRADING_READABLE -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.base import Component +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent +from tribler_core.components.reporter import ReporterComponent from tribler_core.components.restapi import RestfulComponent from tribler_core.upgrade.upgrade import TriblerUpgrader diff --git a/src/tribler-core/tribler_core/config/tribler_config_sections.py b/src/tribler-core/tribler_core/config/tribler_config_sections.py index 56a80ba4cec..13497128257 100644 --- a/src/tribler-core/tribler_core/config/tribler_config_sections.py +++ b/src/tribler-core/tribler_core/config/tribler_config_sections.py @@ -6,7 +6,7 @@ from tribler_core.modules.popularity.settings import PopularityCommunitySettings from tribler_core.modules.remote_query_community.settings import RemoteQueryCommunitySettings from tribler_core.modules.resource_monitor.settings import ResourceMonitorSettings -from tribler_core.modules.settings import BootstrapSettings, DHTSettings, DiscoveryCommunitySettings, Ipv8Settings, \ +from tribler_core.components.masterkey.settings import BootstrapSettings, DHTSettings, DiscoveryCommunitySettings, Ipv8Settings, \ TrustchainSettings, WatchFolderSettings from tribler_core.modules.torrent_checker.settings import TorrentCheckerSettings from tribler_core.modules.tunnel.community.settings import TunnelCommunitySettings diff --git a/src/tribler-core/tribler_core/modules/tunnel/tests/test_tunnel_settings.py b/src/tribler-core/tribler_core/modules/tunnel/tests/test_tunnel_settings.py index eb83d146f59..d002f1bba00 100644 --- a/src/tribler-core/tribler_core/modules/tunnel/tests/test_tunnel_settings.py +++ b/src/tribler-core/tribler_core/modules/tunnel/tests/test_tunnel_settings.py @@ -1,7 +1,7 @@ import pytest from tribler_common.network_utils import NetworkUtils -from tribler_core.modules.settings import Ipv8Settings +from tribler_core.components.masterkey.settings import Ipv8Settings @pytest.mark.asyncio diff --git a/src/tribler-core/tribler_core/start_core.py b/src/tribler-core/tribler_core/start_core.py index c1672bcb99a..4b9f93997c2 100644 --- a/src/tribler-core/tribler_core/start_core.py +++ b/src/tribler-core/tribler_core/start_core.py @@ -19,7 +19,7 @@ from tribler_core.components.gigachannel_manager.gigachannel_manager_component import GigachannelManagerComponent from tribler_core.components.ipv8 import Ipv8Component from tribler_core.components.libtorrent import LibtorrentComponent -from tribler_core.components.masterkey import MasterKeyComponent +from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent from tribler_core.components.metadata_store.metadata_store_component import MetadataStoreComponent from tribler_core.components.payout import PayoutComponent from tribler_core.components.popularity import PopularityComponent diff --git a/src/tribler-core/tribler_core/tests/test_permid.py b/src/tribler-core/tribler_core/tests/test_permid.py index a77a7c4e227..8bb718d7c01 100644 --- a/src/tribler-core/tribler_core/tests/test_permid.py +++ b/src/tribler-core/tribler_core/tests/test_permid.py @@ -2,7 +2,7 @@ from ipv8.keyvault.private.libnaclkey import LibNaCLSK -from tribler_core.utilities import permid +from tribler_core.components.masterkey import permid def test_save_load_keypair_pubkey_trustchain(tmpdir): diff --git a/src/tribler-core/tribler_core/upgrade/tests/test_upgrader.py b/src/tribler-core/tribler_core/upgrade/tests/test_upgrader.py index 71880edbe71..11a3ce5fcf8 100644 --- a/src/tribler-core/tribler_core/upgrade/tests/test_upgrader.py +++ b/src/tribler-core/tribler_core/upgrade/tests/test_upgrader.py @@ -10,7 +10,7 @@ from tribler_common.simpledefs import NTFY -import tribler_core.utilities.permid as permid_module +import tribler_core.components.masterkey.permid as permid_module from tribler_core.components.bandwidth_accounting.db.database import BandwidthDatabase from tribler_core.components.metadata_store.db.orm_bindings.channel_metadata import CHANNEL_DIR_NAME_LENGTH from tribler_core.components.metadata_store.db.store import CURRENT_DB_VERSION, MetadataStore From b5004f6c74f7170ec125a4354783c37b24ed5b25 Mon Sep 17 00:00:00 2001 From: drew2a Date: Wed, 29 Sep 2021 11:49:08 +0200 Subject: [PATCH 2/4] PyLint --- .../tribler_core/config/tribler_config_sections.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tribler-core/tribler_core/config/tribler_config_sections.py b/src/tribler-core/tribler_core/config/tribler_config_sections.py index 13497128257..c82c0c3011f 100644 --- a/src/tribler-core/tribler_core/config/tribler_config_sections.py +++ b/src/tribler-core/tribler_core/config/tribler_config_sections.py @@ -1,13 +1,14 @@ from pydantic import BaseSettings, Extra from tribler_core.components.bandwidth_accounting.settings import BandwidthAccountingSettings -from tribler_core.modules.libtorrent.settings import DownloadDefaultsSettings, LibtorrentSettings from tribler_core.components.gigachannel.community.settings import ChantSettings +from tribler_core.components.masterkey.settings import BootstrapSettings, DHTSettings, DiscoveryCommunitySettings, \ + Ipv8Settings, \ + TrustchainSettings, WatchFolderSettings +from tribler_core.modules.libtorrent.settings import DownloadDefaultsSettings, LibtorrentSettings from tribler_core.modules.popularity.settings import PopularityCommunitySettings from tribler_core.modules.remote_query_community.settings import RemoteQueryCommunitySettings from tribler_core.modules.resource_monitor.settings import ResourceMonitorSettings -from tribler_core.components.masterkey.settings import BootstrapSettings, DHTSettings, DiscoveryCommunitySettings, Ipv8Settings, \ - TrustchainSettings, WatchFolderSettings from tribler_core.modules.torrent_checker.settings import TorrentCheckerSettings from tribler_core.modules.tunnel.community.settings import TunnelCommunitySettings from tribler_core.restapi.settings import APISettings From a652075c051f966c52d4f04dcf670fbe7df05212 Mon Sep 17 00:00:00 2001 From: drew2a Date: Wed, 29 Sep 2021 11:52:39 +0200 Subject: [PATCH 3/4] Fix Rebase --- .../tests/test_tribler_components.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/tribler-core/tribler_core/components/tests/test_tribler_components.py b/src/tribler-core/tribler_core/components/tests/test_tribler_components.py index 4ee466b918c..4dd78f8b375 100644 --- a/src/tribler-core/tribler_core/components/tests/test_tribler_components.py +++ b/src/tribler-core/tribler_core/components/tests/test_tribler_components.py @@ -1,5 +1,3 @@ -from unittest.mock import patch - import pytest from tribler_core.components.bandwidth_accounting.bandwidth_accounting_component import BandwidthAccountingComponent @@ -19,7 +17,6 @@ from tribler_core.components.upgrade import UpgradeComponent from tribler_core.components.version_check import VersionCheckComponent from tribler_core.components.watch_folder import WatchFolderComponent -from tribler_core.restapi.rest_manager import RESTManager pytestmark = pytest.mark.asyncio @@ -50,21 +47,6 @@ def test_session_context_manager(loop, tribler_config): Session.current() -<<<<<<< main -async def test_masterkey_component(tribler_config): - session = Session(tribler_config, [MasterKeyComponent()]) - with session: - await session.start() - - comp = MasterKeyComponent.instance() - assert comp.started.is_set() and not comp.failed - assert comp.keypair - - await session.shutdown() - - -======= ->>>>>>> Merge masterkey async def test_ipv8_component(tribler_config): tribler_config.ipv8.enabled = True components = [MasterKeyComponent(), RESTComponent(), Ipv8Component()] From 77eba4f387b4cc3d1ae4c55346a75a4eccf19bd6 Mon Sep 17 00:00:00 2001 From: drew2a Date: Thu, 30 Sep 2021 11:45:12 +0200 Subject: [PATCH 4/4] Fix Merge Conflicts --- src/tribler-core/tribler_core/components/ipv8.py | 3 --- src/tribler-core/tribler_core/components/libtorrent.py | 2 -- .../components/metadata_store/metadata_store_component.py | 4 ---- src/tribler-core/tribler_core/components/upgrade.py | 2 -- 4 files changed, 11 deletions(-) diff --git a/src/tribler-core/tribler_core/components/ipv8.py b/src/tribler-core/tribler_core/components/ipv8.py index b4bf1a2a09b..2e16af25055 100644 --- a/src/tribler-core/tribler_core/components/ipv8.py +++ b/src/tribler-core/tribler_core/components/ipv8.py @@ -12,11 +12,8 @@ from ipv8.peerdiscovery.community import DiscoveryCommunity, PeriodicSimilarity from ipv8.peerdiscovery.discovery import RandomWalk from ipv8.taskmanager import TaskManager - from ipv8_service import IPv8 -from tribler_core.components.base import Component from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent -from tribler_core.components.reporter import ReporterComponent from tribler_core.components.restapi import RestfulComponent INFINITE = -1 diff --git a/src/tribler-core/tribler_core/components/libtorrent.py b/src/tribler-core/tribler_core/components/libtorrent.py index 58ca41faf19..f9c4007380b 100644 --- a/src/tribler-core/tribler_core/components/libtorrent.py +++ b/src/tribler-core/tribler_core/components/libtorrent.py @@ -1,8 +1,6 @@ from tribler_common.simpledefs import STATE_CHECKPOINTS_LOADED, STATE_LOAD_CHECKPOINTS, STATE_START_LIBTORRENT -from tribler_core.components.base import Component from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent -from tribler_core.components.reporter import ReporterComponent from tribler_core.components.restapi import RestfulComponent from tribler_core.components.socks_configurator import SocksServersComponent from tribler_core.components.upgrade import UpgradeComponent diff --git a/src/tribler-core/tribler_core/components/metadata_store/metadata_store_component.py b/src/tribler-core/tribler_core/components/metadata_store/metadata_store_component.py index 1d73866ee7f..901d1c08450 100644 --- a/src/tribler-core/tribler_core/components/metadata_store/metadata_store_component.py +++ b/src/tribler-core/tribler_core/components/metadata_store/metadata_store_component.py @@ -1,10 +1,6 @@ from tribler_common.simpledefs import NTFY, STATEDIR_DB_DIR -from tribler_core.components.base import Component from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent -from tribler_core.components.reporter import ReporterComponent -from tribler_core.components.restapi import RestfulComponent -from tribler_core.components.upgrade import UpgradeComponent from tribler_core.components.metadata_store.db.store import MetadataStore from tribler_core.components.metadata_store.utils import generate_test_channels from tribler_core.components.restapi import RestfulComponent diff --git a/src/tribler-core/tribler_core/components/upgrade.py b/src/tribler-core/tribler_core/components/upgrade.py index 49e6181a62c..9469e3eef3c 100644 --- a/src/tribler-core/tribler_core/components/upgrade.py +++ b/src/tribler-core/tribler_core/components/upgrade.py @@ -1,8 +1,6 @@ from tribler_common.simpledefs import STATE_UPGRADING_READABLE -from tribler_core.components.base import Component from tribler_core.components.masterkey.masterkey_component import MasterKeyComponent -from tribler_core.components.reporter import ReporterComponent from tribler_core.components.restapi import RestfulComponent from tribler_core.upgrade.upgrade import TriblerUpgrader