Make the dependency of 'pytest_plugin' on 'requests' optional.
Closed
requested to merge generated-differential-D4756-source into generated-differential-D4756-target
Else, running 'pytest' always crashes if 'swh.core' is installed but 'requests' isn't.
Migrated from D4756 (view on Phabricator)
Merge request reports
Activity
Build is green
Patch application report for D4756 (id=16838)
Rebasing onto 777ea186...
Current branch diff-target is up to date.
Changes applied before test
commit 27707fa51c65c9390042b8c88e6ec1174cc40b33 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Dec 17 10:39:38 2020 +0100 Make the dependency of 'pytest_plugin' on 'requests' optional. Else, running 'pytest' always crashes if 'swh.core' is installed but 'requests' isn't.
See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/187/ for more details.
I'd prefer if we made this pytest plugin opt-in; AFAICT that means adding it in the swh.storage, swh.scheduler and swh.indexer conftest.py.
In the meantime, I think you should make swh.clearlydefined depend on swh.core[http] (which is a dependency it'll need at some point anyway, to interact with rpc services?)
mentioned in merge request swh-py-template!14 (closed)
Please register or sign in to reply