-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-2362 Test with dnspython<2.0 to avoid timeouts #484
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
Conversation
if $PYTHON -c 'import dns'; then | ||
# Trying with/without --user to avoid: | ||
# ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv. | ||
$PYTHON -m pip install --upgrade --user 'dnspython<2.0.0' || $PYTHON -m pip install --upgrade 'dnspython<2.0.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not always install without --user
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because then we might need sudo
. This will just be a temporary workaround until the toolchain is updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we cut a 3.11.1 release that pins DNSPython to <2 so that new installs of PyMongo can still talk to Atlas? This seems like a massive issue...
The problem is with Eventlet, right? Probably why no one has complained. |
Yes this is an eventlet problem. dnspython 2.0 works fine up until eventlet is imported: >>> from dns import resolver
>>> resolver.query('_mongodb._tcp.test5.test.build.10gen.cc', 'SRV', lifetime=5)
<stdin>:1: DeprecationWarning: please use dns.resolver.resolve() instead
<dns.resolver.Answer object at 0x7fb575599940>
>>> import eventlet
>>> resolver.query('_mongodb._tcp.test5.test.build.10gen.cc', 'SRV', lifetime=5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/venv/lib/python3.8/site-packages/dns/resolver.py", line 1221, in query
return resolve(qname, rdtype, rdclass, tcp, source,
File "/home/ubuntu/venv/lib/python3.8/site-packages/dns/resolver.py", line 1205, in resolve
return get_default_resolver().resolve(qname, rdtype, rdclass, tcp, source,
File "/home/ubuntu/venv/lib/python3.8/site-packages/dns/resolver.py", line 1043, in resolve
timeout = self._compute_timeout(start, lifetime)
File "/home/ubuntu/venv/lib/python3.8/site-packages/dns/resolver.py", line 950, in _compute_timeout
raise Timeout(timeout=duration)
dns.exception.Timeout: The DNS operation timed out after 5.10618257522583 seconds This should be fixed by eventlet: eventlet/eventlet#619. |
I don't think this is a massive issue and I'm not sure we should do anything else. eventlet>=0.26.1 was released which pins to
|
This reverts commit c549740.
This reverts commit c549740.
There seems to be a bug in dnspython 2.0 related to SRV lookups. For now we should downgrade to
dnspython<2.0
to get the test suite green.