GithubHelp home page GithubHelp logo

NotImplementedError on Windows about aiodns HOT 10 CLOSED

oyarsa avatar oyarsa commented on August 23, 2024
NotImplementedError on Windows

from aiodns.

Comments (10)

g-regor avatar g-regor commented on August 23, 2024 4

In user code, it can be solved by adding

if sys.platform == 'win32':
	asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())

Maybe it should be part of the example?

from aiodns.

BiDuang avatar BiDuang commented on August 23, 2024 1

Okay, thanks. By the way, I made an improvement to let other users know about this issue, and merge it if you think it's good. #105

from aiodns.

P0oOOOo0YA avatar P0oOOOo0YA commented on August 23, 2024

Having the same problem on windows. So the workaround would be to run this under WSL.

from aiodns.

abersheeran avatar abersheeran commented on August 23, 2024

Same problem in CPython3.9 on windows10.

from aiodns.

joggraphy avatar joggraphy commented on August 23, 2024

Exactly the same problem on Python 3.9.4 on Windows 10 using the example program. Any suggestions?

from aiodns.

FredericMa avatar FredericMa commented on August 23, 2024

I'm having the same issue.

from aiodns.

BiDuang avatar BiDuang commented on August 23, 2024

Still got problem on Windows 10 with python3.9.5 and Windows 11 with python 3.10

from aiodns.

saghul avatar saghul commented on August 23, 2024

c-ares, what is used underneath, requires a readyness style API, which is not supported on Windows unless you are using a SelectorEventLoop implementation: https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.SelectorEventLoop

from aiodns.

saghul avatar saghul commented on August 23, 2024

Oh that's nice! When did they add to Python?

Happy to take a PR if you're up for it!

from aiodns.

g-regor avatar g-regor commented on August 23, 2024

WindowsSelectorEventLoopPolicy was added in 3.7

In 3.8 the default event loop for windows was changed to ProactorEventLoop. At which point this became necessary.

Seems this was already discussed in #78

from aiodns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.