Page MenuHomeSoftware Heritage

Move systemd-python to an optional logging subpackage
ClosedPublic

Authored by olasd on Oct 17 2019, 3:35 PM.

Details

Diff Detail

Repository
rDCORE Foundations and core functionalities
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

olasd created this revision.Oct 17 2019, 3:35 PM
vlorentz accepted this revision.Oct 17 2019, 3:47 PM
This revision is now accepted and ready to land.Oct 17 2019, 3:47 PM
ardumont accepted this revision.Oct 17 2019, 5:42 PM

BUILD has failed

jenkins reports:

==================================== ERRORS ====================================
_ ERROR collecting .tox/py3-core/lib/python3.5/site-packages/swh/core/tests/test_logger.py _
.tox/py3-core/lib/python3.5/site-packages/swh/core/tests/test_logger.py:13: in <module>
    from swh.core import logger
.tox/py3-core/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:142: in exec_module
    exec(co, module.__dict__)
.tox/py3-core/lib/python3.5/site-packages/swh/core/logger.py:9: in <module>
    from systemd.journal import JournalHandler as _JournalHandler, send
E   ImportError: No module named 'systemd'
_ ERROR collecting .tox/py3-core/lib/python3.5/site-packages/swh/core/tests/test_logger.py _
ImportError while importing test module '/home/jenkins/workspace/DCORE/tox/.tox/py3-core/lib/python3.5/site-packages/swh/core/tests/test_logger.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.tox/py3-core/lib/python3.5/site-packages/swh/core/tests/test_logger.py:13: in <module>
    from swh.core import logger
.tox/py3-core/lib/python3.5/site-packages/swh/core/logger.py:9: in <module>
    from systemd.journal import JournalHandler as _JournalHandler, send
E   ImportError: No module named 'systemd'

I guess, we need to try except the tests for the test_logger module if the import fails (or something?)

Thanks for that btw.

olasd updated this revision to Diff 7333.Oct 18 2019, 10:13 AM
  • Move systemd-python to an optional logging subpackage
  • Add missing requirements-test in sdist
  • Move Click to base requirements
ardumont accepted this revision.Oct 18 2019, 10:15 AM