-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4
-
Component/s: None
-
Environment:Ubuntu Linux
PyPy 5.6.0 - https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.6.0-linux64.tar.bz2
gevent 1.2.1
pymongo 3.4.0
Hello - I'm not exactly sure where this issue originates, but thought I'd report it here first in case others happen to encounter it as well.
After running the snippet below and then attempting to use the client, a ServerSelectionTimeoutError occurs when running under PyPy with gevent. This error doesn't happen when running with pymongo 3.3 or 3.2 (with the other components remaining the same)
Things also work fine with pymongo 3.4.0 under PyPy when gevent monkey patching is not applied. Code also works as expected under CPython with gevent monkey patching applied
(tested CPython 3.5+)
from gevent import monkey monkey.patch_all() import pymongo client = pymongo.MongoClient('localhost', 27017)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/tmp/mongotest-pypy/site-packages/pymongo/collection.py", line 1102, in find_one for result in cursor.limit(-1): File "/tmp/mongotest-pypy/site-packages/pymongo/cursor.py", line 1114, in next if len(self.__data) or self._refresh(): File "/tmp/mongotest-pypy/site-packages/pymongo/cursor.py", line 1036, in _refresh self.__collation)) File "/tmp/mongotest-pypy/site-packages/pymongo/cursor.py", line 873, in __send_message **kwargs) File "/tmp/mongotest-pypy/site-packages/pymongo/mongo_client.py", line 888, in _send_message_with_response server = topology.select_server(selector) File "/tmp/mongotest-pypy/site-packages/pymongo/topology.py", line 214, in select_server address)) File "/tmp/mongotest-pypy/site-packages/pymongo/topology.py", line 189, in select_servers self._error_message(selector)) ServerSelectionTimeoutError: mongodb:27017: [Errno -7] ai_socktype not supported
- related to
-
PYTHON-1147 Make sockets non-inheritable (best effort)
- Closed