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

Python 3.11 support #485

Closed
ltworf opened this issue Oct 3, 2022 · 5 comments · Fixed by #515
Closed

Python 3.11 support #485

ltworf opened this issue Oct 3, 2022 · 5 comments · Fixed by #515

Comments

@ltworf
Copy link

ltworf commented Oct 3, 2022

Hello!

Unfortunately it seems that currently published apischema doesn't run on python 3.11.

@Imaclean74
Copy link

still - by the looks of it

  File "/home/maclei/poc/python/jup-poc/dca_poc.py", line 16, in <module>
    from apischema import deserialize, serialize
  File "/home/maclei/poc/python/jup-poc/.venv/lib/python3.11/site-packages/apischema/__init__.py", line 30, in <module>
    from . import (  # noqa: F401
  File "/home/maclei/poc/python/jup-poc/.venv/lib/python3.11/site-packages/apischema/cache.py", line 6, in <module>
    from apischema.utils import type_dict_wrapper
  File "/home/maclei/poc/python/jup-poc/.venv/lib/python3.11/site-packages/apischema/utils.py", line 37, in <module>
    from apischema.typing import (
  File "/home/maclei/poc/python/jup-poc/.venv/lib/python3.11/site-packages/apischema/typing.py", line 98, in <module>
    from typing import _collect_type_vars  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name '_collect_type_vars' from 'typing' (/home/maclei/.pyenv/versions/3.11.0/lib/python3.11/typing.py)

@ltworf
Copy link
Author

ltworf commented Oct 30, 2022

Well there haven't been changes since 30 Mar

@Imaclean74
Copy link

aah right. It seems that _collect_type_vars is not being used in my use case - and I was able to work around it by commenting out the import and subsequent references. YMMV

@wyfo
Copy link
Owner

wyfo commented Dec 12, 2022

I'm deeply sorry for the time it took to get 3.11 support, I'd taken a (too) long break but I'm back now.

@Imaclean74
Copy link

hey - no worries. I was looking at this again this morning actually and it looks like _collect_type_vars is available in typing_extensions and 8should* be a straight replacement for what was in typing.

https://pypi.org/project/typing-extensions/

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 a pull request may close this issue.

3 participants