From 5cf73b6e2c15b3c5192e1233695843f719d1c096 Mon Sep 17 00:00:00 2001 From: Lars Michelsen Date: Fri, 26 Jul 2019 19:43:07 +0200 Subject: [PATCH] Remove bson dev dependency 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 from bson.json_util import loads ../virtual-envs/2.7/.venv/local/lib/python2.7/site-packages/bson/json_util.py:116: in from pymongo.errors import ConfigurationError ../virtual-envs/2.7/.venv/local/lib/python2.7/site-packages/pymongo/__init__.py:77: in from pymongo.collection import ReturnDocument ../virtual-envs/2.7/.venv/local/lib/python2.7/site-packages/pymongo/collection.py:20: in from bson.code import Code ../virtual-envs/2.7/.venv/local/lib/python2.7/site-packages/bson/code.py:18: in from bson.py3compat import abc, string_type, PY3, text_type E ImportError: cannot import name abc --- According to https://github.com/py-bson/bson/issues/82 both packages are conflicting and bson needs to be cleaned up. Change-Id: I82383157176ba3230408285c142d7fc92cedccae --- omd/packages/python-modules/python-modules.make | 1 - virtual-envs/2.7/Pipfile | 1 - virtual-envs/2.7/Pipfile.lock | 13 +++---------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/omd/packages/python-modules/python-modules.make b/omd/packages/python-modules/python-modules.make index c6dd09ba257..5ba806d6467 100644 --- a/omd/packages/python-modules/python-modules.make +++ b/omd/packages/python-modules/python-modules.make @@ -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' diff --git a/virtual-envs/2.7/Pipfile b/virtual-envs/2.7/Pipfile index f6f80047d89..672d7c68558 100644 --- a/virtual-envs/2.7/Pipfile +++ b/virtual-envs/2.7/Pipfile @@ -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 diff --git a/virtual-envs/2.7/Pipfile.lock b/virtual-envs/2.7/Pipfile.lock index ee6cda06d33..77cd7d4c501 100644 --- a/virtual-envs/2.7/Pipfile.lock +++ b/virtual-envs/2.7/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "730067925e8e00e7fe704f78600f69096a0c7f3fab115e7c9b195499eb122dd0" + "sha256": "d4512cd0bf1a756aeb2461b1028edcabccfbe380a70f111c4f07af48853493e9" }, "pipfile-spec": 6, "requires": { @@ -994,7 +994,7 @@ "sha256:9d98697f088eb1b0fa451391f91afb5e3ebde16bbdb272819fd091151fda4f1a", "sha256:f0b0e4eba956de51238e17573b7087e852dfe9854afd2e9c873f73fc0ca0a6dd" ], - "markers": "python_version < '3.4'", + "markers": "python_version < '3.2'", "version": "==1.5" }, "backports.ssl-match-hostname": { @@ -1027,13 +1027,6 @@ "index": "pypi", "version": "==4.8.0" }, - "bson": { - "hashes": [ - "sha256:13fb1e5486a611374a06177663c2ab878f0c192c8fc8765a63dfef86859006c9" - ], - "index": "pypi", - "version": "==0.5.8" - }, "certifi": { "hashes": [ "sha256:339dc09518b07e2fa7eda5450740925974815557727d6bd35d319c1524a04a4c", @@ -1156,7 +1149,7 @@ "sha256:330cc27ccbf7f1e992e69fef78261dc7c6569012cf397db8d3de0234e6c937ca", "sha256:a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50" ], - "markers": "python_version < '3.3'", + "markers": "python_version < '3.0'", "version": "==1.0.2" }, "futures": {