Skip to content

Commit

Permalink
Remove bson dev dependency
Browse files Browse the repository at this point in the history
This dependency is conflicting with pymongo and resulting in the
following exception:

----
ImportError while importing test module '/var/lib/jenkins/workspace/cmk_master/unit_tests/check_mk/tests/unit/agents/plugins/test_mk_mongodb.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../virtual-envs/2.7/.venv/local/lib/python2.7/site-packages/_pytest/python.py:507: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
../virtual-envs/2.7/.venv/local/lib/python2.7/site-packages/py/_path/local.py:701: in pyimport
    __import__(modname)
../virtual-envs/2.7/.venv/local/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:304: in load_module
    exec(co, mod.__dict__)
unit/agents/plugins/test_mk_mongodb.py:5: in <module>
    from bson.json_util import loads
../virtual-envs/2.7/.venv/local/lib/python2.7/site-packages/bson/json_util.py:116: in <module>
    from pymongo.errors import ConfigurationError
../virtual-envs/2.7/.venv/local/lib/python2.7/site-packages/pymongo/__init__.py:77: in <module>
    from pymongo.collection import ReturnDocument
../virtual-envs/2.7/.venv/local/lib/python2.7/site-packages/pymongo/collection.py:20: in <module>
    from bson.code import Code
../virtual-envs/2.7/.venv/local/lib/python2.7/site-packages/bson/code.py:18: in <module>
    from bson.py3compat import abc, string_type, PY3, text_type
E   ImportError: cannot import name abc
---

According to py-bson/bson#82 both
packages are conflicting and bson needs to be cleaned up.

Change-Id: I82383157176ba3230408285c142d7fc92cedccae
  • Loading branch information
LarsMichelsen committed Jul 26, 2019
1 parent 2096f3f commit 5cf73b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
1 change: 0 additions & 1 deletion omd/packages/python-modules/python-modules.make
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ python-modules-dump-Pipfile:
@echo 'astroid = "*" # used by testlib.pylint_checker_localization'
@echo 'bandit = "*" # used by test/Makefile'"'"'s test-bandit target'
@echo '"beautifulsoup4" = "*" # used by the GUI crawler and various tests'
@echo 'bson = "*" # used by test_mk_mongodb unit test'
@echo 'compiledb = "*" # used by the Livestatus/CMC Makefiles for building compile_command.json'
@echo 'docker = "*" # used by test_docker test and mk_docker agent plugin'
@echo 'freezegun = "*" # used by various unit tests'
Expand Down
1 change: 0 additions & 1 deletion virtual-envs/2.7/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ name = "pypi"
astroid = "*" # used by testlib.pylint_checker_localization
bandit = "*" # used by test/Makefile's test-bandit target
"beautifulsoup4" = "*" # used by the GUI crawler and various tests
bson = "*" # used by test_mk_mongodb unit test
compiledb = "*" # used by the Livestatus/CMC Makefiles for building compile_command.json
docker = "*" # used by test_docker test and mk_docker agent plugin
freezegun = "*" # used by various unit tests
Expand Down
13 changes: 3 additions & 10 deletions virtual-envs/2.7/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5cf73b6

Please sign in to comment.