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

TypeError on import #283

Closed
didimelli opened this issue Dec 22, 2021 · 3 comments
Closed

TypeError on import #283

didimelli opened this issue Dec 22, 2021 · 3 comments
Assignees
Labels

Comments

@didimelli
Copy link

I am on WSL2, with python 3.8. I installed tractor via poetry, with the command poetry add git+https://github.com/goodboy/[email protected].

If i try to import the module, i get a ValueError.

❯ poetry run python                           Python 3.8.8 (default, Apr  1 2021, 11:08:44)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import trio
>>> import tractor
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/didi/leaf/leaf-radio/.venv/lib/python3.8/site-packages/tractor/__init__.py", line 25, in <module>
    from ._streaming import (
  File "/home/didi/leaf/leaf-radio/.venv/lib/python3.8/site-packages/tractor/_streaming.py", line 39, in <module>
    from .trionics import broadcast_receiver, BroadcastReceiver
  File "/home/didi/leaf/leaf-radio/.venv/lib/python3.8/site-packages/tractor/trionics/__init__.py", line 21, in <module>
    from ._mngrs import (
  File "/home/didi/leaf/leaf-radio/.venv/lib/python3.8/site-packages/tractor/trionics/_mngrs.py", line 50, in <module>
    unwrapped: dict[int, T],
TypeError: 'type' object is not subscriptable

Looking at the exception, it seems that my import is failing due to the use of dict as a type (I believe it is sintax of python 3.9).

Looking at the setup.py of Tractor, it seems that python3.8 should be supported https://github.com/goodboy/tractor/blob/master/setup.py#L68.

Is python3.8 being actually unsupported, or is the dict an error?
Unluckily, I am not sure i can use python 3.9 on this project.

@goodboy
Copy link
Owner

goodboy commented Dec 25, 2021

@didimelli sorry, i missed this post!

We actually aren't supporting 3.8 any more iirc since #248.

If the setup.py doesn't reflect this (which it seems you are correct it still is showing 3.8 support) it's a bug and please feel free to PR in the change.

@goodboy goodboy added bug Something isn't working python_updates labels Dec 25, 2021
@goodboy
Copy link
Owner

goodboy commented Dec 25, 2021

Fwiw alpha 2 should support 3.8 if you really are stuck on that version.
I believe we've agreed while still in pre-first major relase we're just sticking with the latest 2 minor Python versions.

@goodboy
Copy link
Owner

goodboy commented Dec 25, 2021

@overclockworked64 gonna make you do this one since you missed the detail 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants