OpenCyphal / pydsdl

Cyphal DSDL processing front end implemented in Python
https://opencyphal.org
MIT License
10 stars 9 forks source link

pydsdl appears to be broken by python 3.10 #72

Closed thirtytwobits closed 2 years ago

thirtytwobits commented 2 years ago

When importing pydsdl using python 3.10 I get:

ImportError while loading conftest '/Volumes/workspace/github/thirtytwobits/nunavut/conftest.py'.
conftest.py:19: in <module>
    import pydsdl
.tox/local/lib/python3.10/site-packages/pydsdl/__init__.py:28: in <module>
    from ._namespace import read_namespace as read_namespace
.tox/local/lib/python3.10/site-packages/pydsdl/_namespace.py:13: in <module>
    from . import _dsdl_definition
.tox/local/lib/python3.10/site-packages/pydsdl/_dsdl_definition.py:11: in <module>
    from . import _parser
.tox/local/lib/python3.10/site-packages/pydsdl/_parser.py:11: in <module>
    import parsimonious
.tox/local/lib/python3.10/site-packages/pydsdl/third_party/parsimonious/__init__.py:9: in <module>
    from parsimonious.grammar import Grammar, TokenGrammar
.tox/local/lib/python3.10/site-packages/pydsdl/third_party/parsimonious/grammar.py:14: in <module>
    from parsimonious.expressions import (Literal, Regex, Sequence, OneOf,
.tox/local/lib/python3.10/site-packages/pydsdl/third_party/parsimonious/expressions.py:13: in <module>
    from six.moves import range
E   ImportWarning: _SixMetaPathImporter.find_spec() not found; falling back to find_module()
pavel-kirienko commented 2 years ago

We should look into updating the bundled six.py: https://github.com/benjaminp/six/issues/341. Maybe @coderkalyan could help?

For now, you should be able to make PyTest ignore this warning using ignore::ImportWarning.

coderkalyan commented 2 years ago

I'll take a look.