Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
1cbb1aa3
Commit
1cbb1aa3
authored
Apr 23, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolver_ares: import gevent.core.ares_channel directly, not lazily
parent
494204d1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
gevent/resolver_ares.py
gevent/resolver_ares.py
+3
-3
No files found.
gevent/resolver_ares.py
View file @
1cbb1aa3
import
os
from
_socket
import
getservbyname
,
getaddrinfo
,
gaierror
,
error
from
gevent.hub
import
Waiter
,
get_hub
,
_import
from
gevent.hub
import
Waiter
,
get_hub
from
gevent.socket
import
AF_UNSPEC
,
AF_INET
,
AF_INET6
,
SOCK_STREAM
,
SOCK_DGRAM
,
SOCK_RAW
,
AI_NUMERICHOST
,
EAI_SERVICE
from
gevent.core
import
ares_channel
__all__
=
[
'Resolver'
]
...
...
@@ -9,13 +10,12 @@ __all__ = ['Resolver']
class
Resolver
(
object
):
ares_class
=
'gevent.core.ares_channel'
ares_class
=
ares_channel
def
__init__
(
self
,
hub
=
None
,
**
kwargs
):
if
hub
is
None
:
hub
=
get_hub
()
self
.
hub
=
hub
self
.
ares_class
=
_import
(
self
.
ares_class
)
self
.
ares
=
self
.
ares_class
(
hub
.
loop
,
**
kwargs
)
self
.
pid
=
os
.
getpid
()
self
.
params
=
kwargs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment