fsspec / sshfs

sshfs - SSH/SFTP implementation for fsspec
Apache License 2.0
58 stars 14 forks source link

revisit selector loop policy on windows #29

Open efiop opened 1 year ago

efiop commented 1 year ago

https://github.com/ronf/asyncssh/issues/537#issue-1556251100

SlavaDm commented 1 year ago

To fix that problem, I commented a part of the code in file fsspec/asyn.py.

@contextmanager
def _selector_policy():
    original_policy = asyncio.get_event_loop_policy()
    try:
        # if (
        #     sys.version_info >= (3, 8)
        #     and os.name == "nt"
        #     and hasattr(asyncio, "WindowsSelectorEventLoopPolicy")
        # ):
        # asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
        yield
    finally:
        asyncio.set_event_loop_policy(original_policy)
efiop commented 1 year ago

@SlavaDm Thanks for trying it out!

Ok, looks like we need to reconsider https://github.com/fsspec/filesystem_spec/issues/656