forked-synapse/synapse/app
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 Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
_base.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
admin_cmd.py Use version string helper from matrix-common (#11979) 2022-02-14 13:12:22 +00:00
appservice.py Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
client_reader.py Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
event_creator.py Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
federation_reader.py Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
federation_sender.py Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
frontend_proxy.py Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
generic_worker.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
homeserver.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
media_repository.py Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
phone_stats_home.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
pusher.py Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
synchrotron.py Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
user_dir.py Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00