Skip to content
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

Add notice to windows user with wrong asyncio loop #105

Closed
wants to merge 6 commits into from

Conversation

BiDuang
Copy link

@BiDuang BiDuang commented Feb 20, 2023

Check user's env to let them know about aiodns needs a SelectorEventLoop on Windows platform.
Updated the example usage.

Copy link
Contributor

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop the parentheses in the ifs, they are not necessary.

@@ -47,6 +48,10 @@ class DNSResolver:
def __init__(self, nameservers: Optional[List[str]] = None,
loop: Optional[asyncio.AbstractEventLoop] = None,
**kwargs: Any) -> None:
if sys.platform == 'win32':
if(type(loop) != asyncio.SelectorEventLoop):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra parents

saghul added a commit that referenced this pull request Oct 7, 2023
@saghul saghul closed this in 7569a4b Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants