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

ImportError: cannot import name 'Self' from 'typing' #87

Closed
zhuoqun-chen opened this issue Feb 20, 2024 · 1 comment
Closed

ImportError: cannot import name 'Self' from 'typing' #87

zhuoqun-chen opened this issue Feb 20, 2024 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@zhuoqun-chen
Copy link

typing.Self is included in python 3.11 and later, thus the import part in the examples, such as steering, should add additional check, for example,

try:
    from typing import Self, Sequence
except:
    from typing_extensions import Self, Sequence

to be backward compatible. Or you can update the doc and remind users that examples require 3.11 or later.

@falkoschindler
Copy link
Contributor

Oh, thanks for pointing this out, @zhuoqun-chen!

We usually use RoSys with Python 3.11, but according to pyproject.toml we allow for Python 3.10 as well.

@rodja What do you think: Should we keep supporting Python 3.10? We'd probably only need to add 3.10 to the pytest workflow and fix some minor issues like importing Self.

@falkoschindler falkoschindler added the bug Something isn't working label Feb 20, 2024
@falkoschindler falkoschindler added this to the 0.10.2 milestone Feb 20, 2024
@rodja rodja removed this from the 0.10.2 milestone Feb 23, 2024
@falkoschindler falkoschindler added this to the 0.10.3 milestone Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants