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

AttributeError: module 'typing' has no attribute 'Unpack' #5185

Open
oroppas opened this issue Mar 1, 2024 · 0 comments
Open

AttributeError: module 'typing' has no attribute 'Unpack' #5185

oroppas opened this issue Mar 1, 2024 · 0 comments
Labels
C-compat A discrepancy between RustPython and CPython

Comments

@oroppas
Copy link

oroppas commented Mar 1, 2024

Feature

Missing Unpack in typing module. I encounter this when trying textual:

(venv) ryuta@orin:~/packages/rustpython$ rustpython -m textual
Traceback (most recent call last):
  File "/home/ryuta/packages/rustpython/rustpython/pylib/Lib/runpy.py", line 192, in _run_module_as_main
    sys.exit(msg)
  File "/home/ryuta/packages/rustpython/rustpython/pylib/Lib/runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/home/ryuta/packages/rustpython/rustpython/pylib/Lib/runpy.py", line 151, in _get_module_details
    "be directly executed") %(e, mod_name))
  File "/home/ryuta/packages/rustpython/rustpython/pylib/Lib/runpy.py", line 146, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/home/ryuta/packages/rustpython/rustpython/pylib/Lib/runpy.py", line 117, in _get_module_details
    raise
  File "/home/ryuta/packages/rustpython/rustpython/pylib/Lib/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "_frozen_importlib", line 1461, in __import__
  File "_frozen_importlib", line 1382, in _gcd_import
  File "_frozen_importlib", line 1352, in _find_and_load
  File "_frozen_importlib", line 1355, in _find_and_load
  File "_frozen_importlib", line 1329, in _find_and_load_unlocked
  File "_frozen_importlib", line 1326, in _find_and_load_unlocked
  File "_frozen_importlib", line 1326, in _find_and_load_unlocked
  File "_frozen_importlib", line 945, in _load_unlocked
  File "_frozen_importlib", line 943, in _load_unlocked
  File "_frozen_importlib", line 936, in _load_unlocked
  File "_frozen_importlib", line 930, in _load_unlocked
  File "_frozen_importlib_external", line 994, in exec_module
  File "_frozen_importlib", line 488, in _call_with_frames_removed
  File "/home/ryuta/packages/rustpython/venv/lib/rustpython3.12/site-packages/textual/__init__.py", line 9, in <module>
    from . import constants
  File "/home/ryuta/packages/rustpython/venv/lib/rustpython3.12/site-packages/textual/constants.py", line 10, in <module>
    from typing_extensions import Final, TypeGuard
  File "/home/ryuta/packages/rustpython/venv/lib/rustpython3.12/site-packages/typing_extensions.py", line 2235, in <module>
    Unpack = typing.Unpack
AttributeError: module 'typing' has no attribute 'Unpack'

Python Documentation or reference to CPython source code

https://docs.python.org/3/library/typing.html#typing.Unpack
https://github.com/python/cpython/blob/3.12/Lib/typing.py#L1603

@oroppas oroppas added the C-compat A discrepancy between RustPython and CPython label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-compat A discrepancy between RustPython and CPython
Projects
None yet
Development

No branches or pull requests

1 participant