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

Fix cyclic imports in Synapse #11176

Open
squahtx opened this issue Oct 25, 2021 · 5 comments
Open

Fix cyclic imports in Synapse #11176

squahtx opened this issue Oct 25, 2021 · 5 comments
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. Z-Dev-Wishlist Makes developers' lives better, but doesn't have direct user impact

Comments

@squahtx
Copy link
Contributor

squahtx commented Oct 25, 2021

Cyclic imports can cause unit tests to fail when run in isolation, or CI for Synapse modules to fail:
https://github.com/matrix-org/synapse-email-account-validity/runs/3979337154?check_suite_focus=true

A full list can be obtained using pylint --disable=all --enable R0401 synapse (thanks to @DMRobertson)

As of 85a09f8, the current list of cyclic imports is:

************* Module synapse.rest.admin.media
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.crypto.event_signing -> synapse.events.utils -> synapse.events) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.crypto.event_signing -> synapse.events) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_directory -> synapse.storage.databases.main.state -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.storage.databases.main -> synapse.storage.databases.main.purge_events) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.transactions -> synapse.storage.databases.main.cache -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.databases -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.ui_auth -> synapse.handlers.ui_auth.checkers) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.event_auth -> synapse.events.builder -> synapse.state -> synapse.state.v1) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.notifier -> synapse.server) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.rest.media.v1.oembed -> synapse.rest.media.v1.preview_url_resource) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.storage.util.id_generators -> synapse.storage.util.sequence -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.databases -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.persist_events -> synapse.state -> synapse.state.v1 -> synapse.event_auth -> synapse.events.builder -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.state -> synapse.state.v2) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.api.urls -> synapse.config.homeserver -> synapse.config.logger -> synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.rest.client.login -> synapse.rest.client._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.api.ratelimiting -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger -> synapse.app._base -> synapse.handlers.auth) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.api.ratelimiting -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage.databases.main.events_worker -> synapse.storage.util.id_generators -> synapse.storage.util.sequence -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger -> synapse.app._base -> synapse.handlers.auth) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.api.ratelimiting -> synapse.storage.databases.main -> synapse.config.homeserver -> synapse.config.logger -> synapse.app._base -> synapse.handlers.auth) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.transactions -> synapse.storage.databases.main.cache -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.rest.admin -> synapse.rest.admin.server_notice_servlet) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_directory -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.purge_events -> synapse.storage.databases.main.state -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.persist_events -> synapse.state -> synapse.state.v2 -> synapse.event_auth -> synapse.events.builder -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.registration -> synapse.storage.databases.main.cache -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.api.ratelimiting -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger -> synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.rest.client.login) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.crypto.context_factory -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.directory -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.purge_events -> synapse.storage.databases -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.storage._base -> synapse.storage.database -> synapse.storage.background_updates) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.persist_events -> synapse.storage.databases -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.storage.engines -> synapse.storage.engines.sqlite) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.receipts -> synapse.replication.slave.storage._slaved_id_tracker -> synapse.storage.util.id_generators -> synapse.storage.util.sequence -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.events_bg_updates -> synapse.storage.databases.main.events -> synapse.storage.util.sequence -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.databases -> synapse.storage.databases.state -> synapse.storage.databases.state.store -> synapse.storage.databases.state.bg_updates -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.databases -> synapse.storage.databases.state -> synapse.storage.databases.state.store -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.stats -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.events_forward_extremities -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.ui_auth -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.events_bg_updates -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_erasure_store -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.room -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.deviceinbox -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_directory -> synapse.storage.databases.main.state -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.profile -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.relations -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.event_push_actions -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.push_rule -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.keys -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.databases -> synapse.storage.databases.state -> synapse.storage.databases.state.store -> synapse.storage.databases.state.bg_updates -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.room -> synapse.storage.databases.main.search -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.events_bg_updates -> synapse.storage.databases.main.events -> synapse.storage.databases.main.search -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.databases -> synapse.storage.databases.main.events -> synapse.storage.databases.main.search -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_directory -> synapse.storage.databases.main.state_deltas -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.lock -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.room_batch -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.transactions -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.cache -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.client_ips -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.relations -> synapse.storage.databases.main.stream -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.presence -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.room -> synapse.storage.databases.main.search -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_directory -> synapse.storage.databases.main.state -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_directory -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.push_rule -> synapse.storage.databases.main.pusher -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.profile -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.monthly_active_users -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.openid -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.filtering -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.media_repository -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.push_rule -> synapse.storage.databases.main.appservice -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.censor_events -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.devices -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.metrics -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage.databases.main.signatures -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.tags -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.e2e_room_keys -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.account_data -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.group_server -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.receipts -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.rejections -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.session -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.persist_events -> synapse.state -> synapse.state.v1 -> synapse.event_auth -> synapse.events.builder -> synapse.storage.databases.main -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.events_bg_updates -> synapse.storage.databases.main.events -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.end_to_end_keys -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.federation -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.receipts -> synapse.storage.util.id_generators -> synapse.storage.util.sequence -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.api.urls -> synapse.config.homeserver -> synapse.config.logger -> synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.rest.client.login) (cyclic-import)

------------------------------------------------------------------
Your code has been rated at 9.98/10 (previous run: 9.99/10, -0.00)

@squahtx squahtx added the T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. label Oct 25, 2021
@DMRobertson
Copy link
Contributor

Also suggest we make this a CI check, assuming it's not too expensive to run.

@richvdh
Copy link
Member

richvdh commented Jan 5, 2022

Really, we should have better rules about what is allowed to import from where. For example: synapse.handlers is not allowed to import from synapse.rest. Currently, it's all rather ad-hoc.

@DMRobertson DMRobertson added Z-Dev-Wishlist Makes developers' lives better, but doesn't have direct user impact S-Tolerable Minor significance, cosmetic issues, low or no impact to users. O-Uncommon Most users are unlikely to come across this or unexpected workflow and removed z-maintenance labels Aug 25, 2022
@dklimpel
Copy link
Contributor

I did a test today and got only failures in one file:
************* Module synapse.spam_checker_api.__init__
Your code has been rated at 9.99/10

@DMRobertson
Copy link
Contributor

Really, we should have better rules about what is allowed to import from where. For example: synapse.handlers is not allowed to import from synapse.rest. Currently, it's all rather ad-hoc.

Something like https://github.com/seddonym/import-linter/ might help enforce this sort of rule.

@DMRobertson
Copy link
Contributor

(I had https://sourcery.ai/blog/dependency-rules/ in mind having previously seen it on https://news.ycombinator.com/item?id=33999191, but this seems to be some kind of paid for product?)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. Z-Dev-Wishlist Makes developers' lives better, but doesn't have direct user impact
Projects
None yet
Development

No branches or pull requests

5 participants