MatrixSynapse/synapse/config
David Robertson 313581e4e9
Use importlib.metadata to read requirements (#12088)
* Pull runtime dep checks into their own module
* Reimplement `check_requirements` using `importlib`

I've tried to make this clearer. We start by working out which of
Synapse's requirements we need to be installed here and now. I was
surprised that there wasn't an easier way to see which packages were
installed by a given extra.

I've pulled out the error messages into functions that deal with "is
this for an extra or not". And I've rearranged the loop over two
different sets of requirements into one loop with a "must be instaled"
flag.

I hope you agree that this is clearer.

* Test cases
2022-03-01 17:44:41 +00:00
..
__init__.py
__main__.py Additional type hints for config module. (#11465) 2021-12-01 07:28:23 -05:00
_base.py Add missing type hints to config base classes (#11377) 2021-11-23 15:21:19 +00:00
_base.pyi Add missing type hints to config base classes (#11377) 2021-11-23 15:21:19 +00:00
_util.py
account_validity.py
api.py Fix up docs for `track_puppeted_user_ips` (again) (#11757) 2022-01-17 14:55:30 +00:00
appservice.py Add support for MSC3202: sending one-time key counts and fallback key usage states to Application Services. (#11617) 2022-02-24 17:55:45 +00:00
auth.py
cache.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
captcha.py
cas.py Additional type hints for config module. (#11465) 2021-12-01 07:28:23 -05:00
consent.py
database.py Additional type hints for config module. (#11465) 2021-12-01 07:28:23 -05:00
emailconfig.py Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00
experimental.py Add support for MSC3202: sending one-time key counts and fallback key usage states to Application Services. (#11617) 2022-02-24 17:55:45 +00:00
federation.py
groups.py
homeserver.py
jwt.py Add config for customizing the claim used for JWT logins. (#11361) 2021-11-22 13:01:03 -05:00
key.py Additional type hints for the config module, part 2. (#11480) 2021-12-09 16:15:46 +00:00
logger.py Remove support for the legacy structured logging configuration. (#12008) 2022-02-17 13:32:18 +00:00
metrics.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
modules.py Fix some indentation inconsistencies in the sample config (modules) (#11838) 2022-01-27 10:06:29 +00:00
oembed.py
oidc.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
password_auth_providers.py
push.py
ratelimiting.py Add a ratelimiter for 3pid invite (#11892) 2022-02-03 14:28:15 +01:00
redis.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
registration.py Add a config flag to inhibit `M_USER_IN_USE` during registration (#11743) 2022-01-26 13:02:54 +01:00
repository.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
retention.py
room.py
room_directory.py Re-apply: Move glob_to_regex and re_word_boundary to matrix-python-common #11505 (#11687) 2022-01-05 11:41:49 +00:00
saml2.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
server.py Use room version 9 as the default room version (per MSC3589). (#12058) 2022-02-22 14:09:40 +00:00
server_notices.py
spam_checker.py
sso.py Additional type hints for config module. (#11465) 2021-12-01 07:28:23 -05:00
stats.py
third_party_event_rules.py
tls.py Re-apply: Move glob_to_regex and re_word_boundary to matrix-python-common #11505 (#11687) 2022-01-05 11:41:49 +00:00
tracer.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
user_directory.py
voip.py
workers.py Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00