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

fix: add async-timeout dependency to address loading error #13

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

miettal
Copy link
Contributor

@miettal miettal commented Jan 13, 2024

error:

File "app.py",
line 4, in <module>
    from jsonrpc_websocket import Server
  File "(snip)/lib/python3.11/site-packages/jsonrpc_websocket/__init__.py",
line 1, in <module>
    from .jsonrpc import Server, TransportError  # noqa: F401, F403
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "(snip)/lib/python3.11/site-packages/jsonrpc_websocket/jsonrpc.py",
line 7, in <module>
    import async_timeout

cause:

Actually async-timeout is using in jsonrpc-websocket, it was not added to dependency explicitly. But aiohttp depends on async-timeout until py310, so loading error was not happened until py310. From py311, aiohttp drop async-timeout dependency, after that jsonrpc-websocket cause loading error. see also aio-libs/aiohttp#7558 .

error:

    File "app.py",
    line 4, in <module>
        from jsonrpc_websocket import Server
      File "(snip)/lib/python3.11/site-packages/jsonrpc_websocket/__init__.py",
    line 1, in <module>
        from .jsonrpc import Server, TransportError  # noqa: F401, F403
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "(snip)/lib/python3.11/site-packages/jsonrpc_websocket/jsonrpc.py",
    line 7, in <module>
        import async_timeout

cause:

Actually async-timeout is using in jsonrpc-websocket, it was not added
to dependency explicitly. But aiohttp depends on async-timeout until
py310, so loading error was not happened until py310. From py311,
aiohttp drop async-timeout dependency, after that jsonrpc-websocket
cause loading error. see also aio-libs/aiohttp#7558 .
Copy link
Owner

@emlove emlove left a comment

Choose a reason for hiding this comment

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

Thank you!

@emlove emlove merged commit d5c546c into emlove:main Jan 16, 2024
@emlove
Copy link
Owner

emlove commented Jan 16, 2024

This fix has been deployed with version 3.1.5. Thank you!

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