Open dsm054 opened 2 years ago
@dsm054 exactly, mongoengine-goodjson is support <=3.12.3 versions of pymongo :cry:
For what it's worth, I'm using the current master branch and it works fine for my use case (I'm only using the Document
document). I just had to change my import statement to
from mongoengine_goodjson.document import Document as gjDocument
and have my documents inherit from gjDocument
.
In modern versions of pymongo, they've abandoned support for Python 2, and removed the py3 compatibility libraries. This means that in mongoengine-goodjson 1.1.8,
will fail because of PY3 and bson.py3compat no longer existing. For example:
At this point I think losing support for 2.7 entirely would be more than justified, but if it's desired to preserve that, we can simply embed the few lines that are actually being used:
and leave everything else alone.
To work around this, right now I'm having to do something like
on the client side (as well as a
collections.Iterable = collections.abc.Iterable
elsewhere, to deal with that issue) but obviously that's not optimal.