Skip to content

Incompatibility with Python 3.8: Use of Python 3.9+ type annotations (list[...], tuple[...]) leads to TypeError #129

@johnny-ning

Description

@johnny-ning

Dear adam developers,

Thank you for your great work on the adam project!
I am using adam together with legged_gym and followed the installation instructions that specify using Python 3.8.

However, when running the code, I encountered the following error:

TypeError: 'type' object is not subscriptable

This happened at this line:

def get_links(self) -> list[Link]:

It seems that recent versions of the codebase are using Python 3.9+ type annotations like list[...], tuple[...], which are not supported in Python 3.8. In Python 3.8, these should be replaced with the corresponding typing types, for example:

from typing import List
def get_links(self) -> List[Link]:

Could you please clarify:

1.Is Python 3.8 still officially supported?

2.If so, would it be possible to revert to Python 3.8-compatible type annotations (typing.List, typing.Tuple, etc.)?

3.Or should we upgrade to Python 3.9+ despite the current documentation?

Thank you very much for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions