python-trio / purerpc

Native, async Python gRPC client and server implementation supporting asyncio, uvloop, and trio
Apache License 2.0
217 stars 15 forks source link

test_util requires forge dependency #28

Closed belm0 closed 2 years ago

belm0 commented 3 years ago

if purerpc.test_utils is part of the public API, then it's dependencies need to be represented in setup.py install_requires.

test_utils depends on forge package:

    from purerpc.test_utils import run_purerpc_service_in_process, purerpc_channel
.venv/lib/python3.7/site-packages/purerpc/test_utils.py:21: in <module>
    import forge
E   ModuleNotFoundError: No module named 'forge'

yet forge is only listed in tests_require: https://github.com/standy66/purerpc/blob/5faa35f2cdf5b36d1398a1aa6a9e681c5344060f/setup.py#L76-L84

(tests_require is deprecated, and in any case was only for specifying the dependencies needed to run the package's tests)

If test_utils is rarely used or has heavy dependencies, then perhaps add a corresponding "test_utils" build variant using the extras_require option of setuptools.