-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Python Drivers
Detailed steps to reproduce the problem?
As of today, pymongo package was updated to 4.9 on pip, and the following error started to show up:
ImportError: cannot import name '_QUERY_OPTIONS' from 'pymongo.cursor'
The change history on GitHub still shows version 4.8, so I can't see if anything changed regarding _QUERY_OPTIONS.
Steps:
- Install pymongo 4.9 using pip:
- pip install pymongo
- Try to import _QUERY_OPTIONS:
- python3 -c "from pymongo.cursor import _QUERY_OPTIONS"
Definition of done: what must be done to consider the task complete?
_QUERY_OPTIONS is imported, or change history shows the changes that affects _QUERY_OPTIONS.
The exact Python version used, with patch level:
$ python -c "import sys; print(sys.version)"
The exact version of PyMongo used, with patch level:
$ python -c "import pymongo; print(pymongo.version); print(pymongo.has_c())"
$ python3 -c "import sys; print(sys.version)"
3.12.5 (main, Aug 23 2024, 00:00:00) [GCC 14.2.1 20240801 (Red Hat 14.2.1-1)]
Describe how MongoDB is set up. Local vs Hosted, version, topology, load balanced, etc.
The operating system and version (e.g. Windows 7, OSX 10.8, ...)
Fedora 40
Web framework or asynchronous network library used, if any, with version (e.g. Django 1.7, mod_wsgi 4.3.0, gevent 1.0.1, Tornado 4.0.2, ...)
Security Vulnerabilities
If you’ve identified a security vulnerability in a driver or any other MongoDB project, please report it according to the instructions here
- is duplicated by
-
MOTOR-1371 PyMongo ImportError when using motor
- Closed
-
PYTHON-4775 Python3.9 pymongo-4.9.1 throws error cannot import name '_QUERY_OPTIONS' from 'pymongo.cursor' (python3.9/site-packages/pymongo/cursor.py)
- Closed
- is related to
-
MOTOR-1368 Motor 3.5 should cap PyMongo dependency to <=4.8
- Closed