Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix import of HomeServer. #9665

Merged
merged 3 commits into from
Mar 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/9665.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Import `HomeServer` from the proper module.
2 changes: 1 addition & 1 deletion synapse/crypto/keyring.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
from synapse.util.retryutils import NotRetryingDestination

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/federation/federation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
from synapse.util.retryutils import NotRetryingDestination

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/groups/attestations.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
from synapse.types import JsonDict, get_domain_from_id

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/groups/groups_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from synapse.util.async_helpers import concurrently_execute

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from synapse.types import UserID

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/account_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from synapse.types import JsonDict, UserID

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer


class AccountDataHandler:
Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/account_validity.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from synapse.util import stringutils

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/acme.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from synapse.app import check_bind_error

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from ._base import BaseHandler

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/appservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from synapse.util.metrics import Measure

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
from synapse.util.threepids import canonicalise_email

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/cas_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from synapse.types import UserID, map_username_to_mxid_localpart

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/deactivate_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from ._base import BaseHandler

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from ._base import BaseHandler

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/devicemessage.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from synapse.util.stringutils import random_string

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer


logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/e2e_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from synapse.util.retryutils import NotRetryingDestination

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/e2e_room_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from synapse.util.async_helpers import Linearizer

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/groups_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from synapse.types import GroupID, JsonDict, get_domain_from_id

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/password_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from synapse.api.errors import Codes, PasswordRefusedError

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from ._base import BaseHandler

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/read_marker.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from ._base import BaseHandler

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/receipts.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from synapse.types import JsonDict, ReadReceipt, get_domain_from_id

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from ._base import BaseHandler

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/room_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from ._base import BaseHandler

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/room_member_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from synapse.types import Requester, UserID

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from ._base import BaseHandler

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/set_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from ._base import BaseHandler

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/state_deltas.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from typing import TYPE_CHECKING, Optional

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from synapse.types import JsonDict

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/user_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from synapse.util.metrics import Measure

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
from synapse.util.async_helpers import timeout_deferred

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/push/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from synapse.types import JsonDict, RoomStreamToken

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer


@attr.s(slots=True)
Expand Down
2 changes: 1 addition & 1 deletion synapse/push/action_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from synapse.util.metrics import Measure

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/push/bulk_push_rule_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from .push_rule_evaluator import PushRuleEvaluatorForEvent

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/push/emailpusher.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from synapse.push.mailer import Mailer

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/push/httppusher.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from . import push_rule_evaluator, push_tools

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/push/mailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from synapse.visibility import filter_events_for_client

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/push/pusher.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from synapse.push.mailer import Mailer

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/replication/slave/storage/pushers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from ._slaved_id_tracker import SlavedIdTracker

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer


class SlavedPusherStore(PusherWorkerStore, BaseSlavedStore):
Expand Down
2 changes: 1 addition & 1 deletion synapse/replication/tcp/streams/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from synapse.replication.http.streams import ReplicationGetStreamUpdates

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/rest/admin/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from synapse.types import JsonDict

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/rest/client/v1/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
from synapse.util.stringutils import parse_and_validate_server_name, random_string

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion synapse/rest/client/v2_alpha/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from ._base import client_patterns, interactive_auth_handler

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer


logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion synapse/rest/client/v2_alpha/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from ._base import client_patterns

if TYPE_CHECKING:
from synapse.app.homeserver import HomeServer
from synapse.server import HomeServer

logger = logging.getLogger(__name__)

Expand Down
Loading