Discussion:
[gevent] Gevent dnspython DNS resolution
nilesh bhadane
2018-06-11 20:29:11 UTC
Permalink
How to change gevent DNS resolution to dnspython?

Thanks.
--
You received this message because you are subscribed to the Google Groups "gevent: coroutine-based Python network library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gevent+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jason Madden
2018-06-11 20:38:36 UTC
Permalink
Post by nilesh bhadane
How to change gevent DNS resolution to dnspython?
The DNS documentation previously referenced at http://www.gevent.org/dns.html links directly to the configuration documentation at http://www.gevent.org/configuration.html#gevent._config.Config.resolver . In short, either set `gevent.config.resolver = 'dnspython'` in code immediately after importing gevent or set the `GEVENT_RESOLVER` environment variable to `dnspython` before starting the program. (Obviously, dnspython must be installed for this to work.)

Additionally, I would recommend that you join the gevent group if you're going to continue to post to it. That will avoid the moderation delays.

Jason
--
You received this message because you are subscribed to the Google Groups "gevent: coroutine-based Python network library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gevent+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Grady Player
2018-06-11 22:53:30 UTC
Permalink
this adapted from code we have in use, I don't 100% know this still works.

from gevent import hub
hub.Hub.resolver_class = ['gevent.resolver.dnspython']
Post by Jason Madden
Post by nilesh bhadane
How to change gevent DNS resolution to dnspython?
The DNS documentation previously referenced at http://www.gevent.org/dns.html links directly to the configuration documentation at http://www.gevent.org/configuration.html#gevent._config.Config.resolver . In short, either set `gevent.config.resolver = 'dnspython'` in code immediately after importing gevent or set the `GEVENT_RESOLVER` environment variable to `dnspython` before starting the program. (Obviously, dnspython must be installed for this to work.)
Additionally, I would recommend that you join the gevent group if you're going to continue to post to it. That will avoid the moderation delays.
Jason
--
You received this message because you are subscribed to the Google Groups "gevent: coroutine-based Python network library" group.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "gevent: coroutine-based Python network library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gevent+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
nilesh bhadane
2018-06-11 21:45:39 UTC
Permalink
Thank you for the solution and advice :-)
Post by Jason Madden
Post by nilesh bhadane
How to change gevent DNS resolution to dnspython?
The DNS documentation previously referenced at
http://www.gevent.org/dns.html links directly to the configuration
documentation at
http://www.gevent.org/configuration.html#gevent._config.Config.resolver .
In short, either set `gevent.config.resolver = 'dnspython'` in code
immediately after importing gevent or set the `GEVENT_RESOLVER` environment
variable to `dnspython` before starting the program. (Obviously, dnspython
must be installed for this to work.)
Additionally, I would recommend that you join the gevent group if you're
going to continue to post to it. That will avoid the moderation delays.
Jason
--
You received this message because you are subscribed to the Google Groups "gevent: coroutine-based Python network library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gevent+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...