-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
[2021/07/15 23:57:40.337] ERROR: Failure: ImportError (cannot import name '_TxnState' from 'synchro' (/data/mci/eb739280245a00d7b8911c9e443753d1/src/synchro/__init__.py)) [2021/07/15 23:57:40.337] ---------------------------------------------------------------------- [2021/07/15 23:57:40.337] Traceback (most recent call last): [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/lib/python3.7/site-packages/nose/failure.py", line 39, in runTest [2021/07/15 23:57:40.337] raise self.exc_val.with_traceback(self.tb) [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/lib/python3.7/site-packages/nose/loader.py", line 418, in loadTestsFromName [2021/07/15 23:57:40.337] addr.filename, addr.module) [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/lib/python3.7/site-packages/nose/importer.py", line 47, in importFromPath [2021/07/15 23:57:40.337] return self.importFromDir(dir_path, fqname) [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/lib/python3.7/site-packages/nose/importer.py", line 94, in importFromDir [2021/07/15 23:57:40.337] mod = load_module(part_fqname, fh, filename, desc) [2021/07/15 23:57:40.337] File "/opt/python/3.7/lib/python3.7/imp.py", line 234, in load_module [2021/07/15 23:57:40.337] return load_source(name, filename, file) [2021/07/15 23:57:40.337] File "/opt/python/3.7/lib/python3.7/imp.py", line 171, in load_source [2021/07/15 23:57:40.337] module = _load(spec) [2021/07/15 23:57:40.337] File "<frozen importlib._bootstrap>", line 696, in _load [2021/07/15 23:57:40.337] File "<frozen importlib._bootstrap>", line 677, in _load_unlocked [2021/07/15 23:57:40.337] File "<frozen importlib._bootstrap_external>", line 728, in exec_module [2021/07/15 23:57:40.337] File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/tmp/mongo-python-driver/test/test_change_stream.py", line 48, in <module> [2021/07/15 23:57:40.337] from test.unified_format import generate_test_classes [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/tmp/mongo-python-driver/test/unified_format.py", line 37, in <module> [2021/07/15 23:57:40.337] from pymongo.client_session import ClientSession, TransactionOptions, _TxnState [2021/07/15 23:57:40.337] ImportError: cannot import name '_TxnState' from 'synchro' (/data/mci/eb739280245a00d7b8911c9e443753d1/src/synchro/__init__.py) [2021/07/15 23:57:40.337] ====================================================================== [2021/07/15 23:57:40.337] ERROR: test_hashable (test.test_client.TestClient) [2021/07/15 23:57:40.337] ---------------------------------------------------------------------- [2021/07/15 23:57:40.337] Traceback (most recent call last): [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/tmp/mongo-python-driver/test/test_client.py", line 668, in test_hashable [2021/07/15 23:57:40.337] self.assertIn(c, {client_context.client}) [2021/07/15 23:57:40.337] TypeError: unhashable type: 'MongoClient' [2021/07/15 23:57:40.337] ====================================================================== [2021/07/15 23:57:40.337] ERROR: test_hashable (test.test_collection.TestCollection) [2021/07/15 23:57:40.337] ---------------------------------------------------------------------- [2021/07/15 23:57:40.337] Traceback (most recent call last): [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/tmp/mongo-python-driver/test/test_collection.py", line 158, in test_hashable [2021/07/15 23:57:40.337] self.assertIn(self.db.test.mike, {self.db["test.mike"]}) [2021/07/15 23:57:40.337] TypeError: unhashable type: 'Collection' ... [2021/07/15 23:57:40.337] ERROR: test_hashable (test.test_database.TestDatabase) [2021/07/15 23:57:40.337] ---------------------------------------------------------------------- [2021/07/15 23:57:40.337] Traceback (most recent call last): [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/tmp/mongo-python-driver/test/test_database.py", line 131, in test_hashable [2021/07/15 23:57:40.337] self.assertIn(self.client.test, {Database(self.client, "test")}) [2021/07/15 23:57:40.337] TypeError: unhashable type: 'Database' [2021/07/15 23:57:40.337] ====================================================================== [2021/07/15 23:57:40.337] ERROR: test suite for <class 'test.test_encryption.TestBsonSizeBatches'> [2021/07/15 23:57:40.337] ---------------------------------------------------------------------- [2021/07/15 23:57:40.337] Traceback (most recent call last): [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/lib/python3.7/site-packages/nose/suite.py", line 210, in run [2021/07/15 23:57:40.337] self.setUp() [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/lib/python3.7/site-packages/nose/suite.py", line 293, in setUp [2021/07/15 23:57:40.337] self.setupContext(ancestor) [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/lib/python3.7/site-packages/nose/suite.py", line 316, in setupContext [2021/07/15 23:57:40.337] try_run(context, names) [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/lib/python3.7/site-packages/nose/util.py", line 471, in try_run [2021/07/15 23:57:40.337] return func() [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/tmp/mongo-python-driver/test/test_encryption.py", line 1043, in setUpClass [2021/07/15 23:57:40.337] auto_encryption_opts=opts, event_listeners=[cls.listener]) [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/tmp/mongo-python-driver/test/utils.py", line 536, in rs_or_single_client [2021/07/15 23:57:40.337] return _mongo_client(h, p, **kwargs) [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/tmp/mongo-python-driver/test/utils.py", line 497, in _mongo_client [2021/07/15 23:57:40.337] **client_options) [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/synchro/__init__.py", line 353, in __init__ [2021/07/15 23:57:40.337] self.delegate = self.__delegate_class__(host, port, *args, **kwargs) [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/motor/core.py", line 158, in __init__ [2021/07/15 23:57:40.337] delegate = self.__delegate_class__(*args, **kwargs) [2021/07/15 23:57:40.337] File "/data/mci/eb739280245a00d7b8911c9e443753d1/src/.tox/synchro37/tmp/mongo-python-driver/pymongo/mongo_client.py", line 783, in __init__ [2021/07/15 23:57:40.337] from pymongo.encryption import _Encrypter [2021/07/15 23:57:40.338] ImportError: cannot import name '_Encrypter' from 'synchro' (/data/mci/eb739280245a00d7b8911c9e443753d1/src/synchro/__init__.py)
- related to
-
PYTHON-2466 Make MongoClient, Database and Collection objects hashable
- Closed