MatrixSynapse/tests/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
__init__.py
test_async_helpers.py
test_batching_queue.py
test_check_dependencies.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
test_dict_cache.py
test_expiring_cache.py
test_file_consumer.py
test_itertools.py
test_linearizer.py
test_logcontext.py
test_logformatter.py
test_lrucache.py
test_ratelimitutils.py
test_retryutils.py
test_rwlock.py
test_stream_change_cache.py
test_stringutils.py
test_threepids.py
test_treecache.py
test_wheel_timer.py