Import error with PyMongo==4.1.1.
Code breaks collection.py when it tries to import _UOP from pymongo.bulk as evident in the traceback below:
import txmongo
File "/Users/mark/Dev/mine/tpikar/venv/lib/python3.9/site-packages/txmongo/__init__.py", line 7, in <module>
from txmongo.database import Database
File "/Users/mark/Dev/mine/tpikar/venv/lib/python3.9/site-packages/txmongo/database.py", line 9, in <module>
from txmongo.collection import Collection
File "/Users/mark/Dev/mine/tpikar/venv/lib/python3.9/site-packages/txmongo/collection.py", line 14, in <module>
from pymongo.bulk import _Bulk, _COMMANDS, _UOP
builtins.ImportError: cannot import name '_UOP' from 'pymongo.bulk' (/home/mark/Dev/mine/project/venv/lib/python3.9/site-packages/pymongo/bulk.py)
It seems _UOP is no longer defined in PyMongo 4.1.1 and "op" is just used instead in pymongo.bulk:
$ grep "\op\"" *.py
bulk.py: replacement["op"] = run.ops[idx]
This may also be a problem with earlier versions of PyMongo but I only tried 4.1.1.
Sorry, seems we need to fix compatibility with newer PyMongo versions...
I'm interested in getting this fixed for a downstream project. Is this actively being worked on? If not, would you accept contributions @IlyaSkriblovsky ?
@whophil Unfortunately, the project is not being actively developed. But I would be happy to merge your pull request!
close after #290