MatrixSynapse/synapse/util
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
..
caches Fix 'Unhandled error in Deferred' (#12089) 2022-03-01 09:51:38 +00:00
__init__.py Improve exception handling for concurrent execution (#12109) 2022-03-01 09:34:30 +00:00
async_helpers.py Fix rare error in `ReadWriteLock` when writers complete immediately (#12105) 2022-03-01 15:27:15 +00:00
batching_queue.py
check_dependencies.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
daemonize.py Upgrade mypy to version 0.931 (#12030) 2022-02-18 15:57:26 +00:00
distributor.py
file_consumer.py
frozenutils.py
gai_resolver.py
hash.py
httpresourcetree.py
iterutils.py
linked_list.py
logcontext.py
logformatter.py
macaroons.py
manhole.py
metrics.py
module_loader.py
msisdn.py
patch_inline_callbacks.py Upgrade mypy to version 0.931 (#12030) 2022-02-18 15:57:26 +00:00
ratelimitutils.py
retryutils.py
rlimit.py
stringutils.py Add missing type hints to synapse.replication. (#11938) 2022-02-08 11:03:08 -05:00
templates.py
threepids.py
wheel_timer.py