You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PyMongo does not seem to like LazyProxy objects passed in a query (and most likely in all other places where a dict that will later be serialized to BSON is required).
PyMongo 3.8 (due for release in the next 3-4 weeks) will introduce a new feature for encoding and decoding custom, user-defined types that might help you solve this problem. If you get the chance, you can take a look at an example of this new functionality in action at https://github.com/mongodb/mongo-python-driver/blob/master/doc/examples/custom_type.rst and also test drive it by installing PyMongo from master.
PyMongo does not seem to like
LazyProxy
objects passed in a query (and most likely in all other places where adict
that will later be serialized to BSON is required).The bug, in action:
But surprisingly, it does not happen when the
LazyProxy.value
is adict
:Also, it's worth noting that the pure-Python version of PyMongo's
bson
works just as expected:The issue is most likely an incompatible way of checking the query contents type somewhere in
pymongo/bson/_cbsonmodule.c
.Versions in place:
The text was updated successfully, but these errors were encountered: