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

apischema needs to be updated #499

Open
jottr opened this issue Jan 27, 2025 · 0 comments
Open

apischema needs to be updated #499

jottr opened this issue Jan 27, 2025 · 0 comments

Comments

@jottr
Copy link

jottr commented Jan 27, 2025

Another dependency issue. apischema supposedly supports python 3.12.
apischema version resolves to 0.16.6 according to uv.lock, while the most recent version is 0.18.3.
This causes solana-py to be incompatible with python 3.12

The code snippet for the client code has been taken from the documentation.

# main.py 
import asyncio
from asyncstdlib import enumerate
from solana.rpc.websocket_api import connect

async def main():
    async with connect("wss://api.devnet.solana.com") as websocket:
        await websocket.logs_subscribe()
        first_resp = await websocket.recv()
        subscription_id = first_resp[0].result
        next_resp = await websocket.recv()
        print(next_resp)
        await websocket.logs_unsubscribe(subscription_id)

asyncio.run(main())
#pyproject.toml
[project]
name = "sol-client"
version = "0.1.0"
description = "Add your description here"
requires-python = ">=3.12"
dependencies = [
    "asyncio>=3.4.3",
    "asyncstdlib>=3.13.0",
    "solana>=0.23.3",
    "solders>=0.25.0",
]
Traceback (most recent call last):
  File "/Users/jottr/dev/trading/serum/main.py", line 3, in <module>
    from solana.rpc.websocket_api import connect
  File "/Users/jottr/dev/trading/serum/.venv/lib/python3.12/site-packages/solana/rpc/websocket_api.py", line 7, in <module>
    from apischema import deserialize
  File "/Users/jottr/dev/trading/serum/.venv/lib/python3.12/site-packages/apischema/__init__.py", line 29, in <module>
    from . import (  # noqa: F401
  File "/Users/jottr/dev/trading/serum/.venv/lib/python3.12/site-packages/apischema/cache.py", line 6, in <module>
    from apischema.utils import type_dict_wrapper
  File "/Users/jottr/dev/trading/serum/.venv/lib/python3.12/site-packages/apischema/utils.py", line 44, in <module>
    from apischema.typing import (
  File "/Users/jottr/dev/trading/serum/.venv/lib/python3.12/site-packages/apischema/typing.py", line 99, in <module>
    from typing import _collect_type_vars, ForwardRef  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name '_collect_type_vars' from 'typing' (/Users/jottr/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/typing.py)

Related issues #486

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

No branches or pull requests

1 participant