-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import error with PyMongo==4.1.1. #278
Comments
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: