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
faf1ec7c
Commit
faf1ec7c
authored
Jul 07, 2023
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ares fixes.
parent
4550374f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
src/gevent/resolver/ares.py
src/gevent/resolver/ares.py
+1
-2
src/gevent/tests/test__socket_dns.py
src/gevent/tests/test__socket_dns.py
+6
-0
No files found.
src/gevent/resolver/ares.py
View file @
faf1ec7c
...
...
@@ -13,7 +13,6 @@ from _socket import EAI_NONAME
from
gevent._compat
import
text_type
from
gevent._compat
import
integer_types
from
gevent._compat
import
PY3
from
gevent.hub
import
Waiter
from
gevent.hub
import
get_hub
...
...
@@ -329,7 +328,7 @@ class Resolver(AbstractResolver):
self
.
cares
.
getnameinfo
(
waiter
,
address
,
flags
)
node
,
service
=
waiter
.
get
()
if
service
is
None
and
PY3
:
if
service
is
None
:
# ares docs: "If the query did not complete
# successfully, or one of the values was not
# requested, node or service will be NULL ". Python 2
...
...
src/gevent/tests/test__socket_dns.py
View file @
faf1ec7c
...
...
@@ -397,6 +397,12 @@ class TestCase(greentest.TestCase):
# one resolver than we do with the other resolver.
# So as long as they have some subset in common,
# we'll take it.
errors
=
isinstance
(
real_result
,
Exception
)
+
isinstance
(
gevent_result
,
Exception
)
if
errors
==
2
:
return
True
if
errors
==
1
:
return
False
if
not
set
(
real_result
).
isdisjoint
(
set
(
gevent_result
)):
return
True
return
self
.
_generic_compare_results
(
real_result
,
gevent_result
,
func_name
)
...
...
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