Not working with python 3.9
sebastianw opened this issue · comments
I tried the Tasks example code from the pypeln README but it fails:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/Users/sebastian/test/venv/lib/python3.9/site-packages/pypeln/__init__.py", line 4, in <module>
from . import thread
File "/Users/sebastian/test/venv/lib/python3.9/site-packages/pypeln/thread/__init__.py", line 34, in <module>
from .api.concat import concat
File "/Users/sebastian/test/venv/lib/python3.9/site-packages/pypeln/thread/api/concat.py", line 8, in <module>
from .to_stage import to_stage
File "/Users/sebastian/test/venv/lib/python3.9/site-packages/pypeln/thread/api/to_stage.py", line 5, in <module>
from ..stage import Stage
File "/Users/sebastian/test/venv/lib/python3.9/site-packages/pypeln/thread/stage.py", line 8, in <module>
from .queue import IterableQueue, OutputQueues
File "/Users/sebastian/test/venv/lib/python3.9/site-packages/pypeln/thread/queue.py", line 17, in <module>
class PipelineException(tp.NamedTuple, BaseException):
File "/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 1820, in _namedtuple_mro_entries
raise TypeError("Multiple inheritance with NamedTuple is not supported")
TypeError: Multiple inheritance with NamedTuple is not supported
python-BaseException
If I'm correct this has to do with python/cpython#19363
@sebastianw thanks for reporting. I'll add 3.9 to the CI.
I'll have change the type to a dataclass
.
Fixed with #78.