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

[Linux] [App Compiler] Protocols can only inherit from other protocols #2028

Open
Turelk opened this issue Feb 25, 2024 · 1 comment
Open
Labels
Bug Something isn't working correctly Compiler Issue pertains to the custom BEE compilers Done in next release This has been addressed in the next release

Comments

@Turelk
Copy link

Turelk commented Feb 25, 2024

BEE2 Application Version

2.4.44.1 64bit

BEE2 Package Version

2.4.44.1

What operating system are you running on?

Linux

Description of the bug

When i run compiler.spec it crashes with a TypeError

Expected behavior

I expect it to compile as normal.

Steps to reproduce

  1. Clone BEE2 and it's submodules.
  2. Execute compiler.spec
  3. Get TypeError

Logs and Reports

94 INFO: PyInstaller: 6.4.0, contrib hooks: 2023.7
94 INFO: Python: 3.11.3
95 INFO: Platform: Linux-6.4.12-zen1-1-zen-x86_64-with-glibc2.37
Traceback (most recent call last):
  File "/usr/bin/pyinstaller", line 8, in <module>
    sys.exit(_console_script_run())
             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/PyInstaller/__main__.py", line 228, in _console_script_run
    run()
  File "/usr/lib/python3.11/site-packages/PyInstaller/__main__.py", line 212, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "/usr/lib/python3.11/site-packages/PyInstaller/__main__.py", line 69, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "/usr/lib/python3.11/site-packages/PyInstaller/building/build_main.py", line 1091, in main
    build(specfile, distpath, workpath, clean_build)
  File "/usr/lib/python3.11/site-packages/PyInstaller/building/build_main.py", line 1031, in build
    exec(code, spec_namespace)
  File "compiler.spec", line 17, in <module>
    import utils
  File "/home/turelk/BEE2.4/src/utils.py", line 21, in <module>
    from srctools import Angle
  File "/usr/lib/python3.11/site-packages/srctools/__init__.py", line 16, in <module>
    from useful_types import SupportsKeysAndGetItem
  File "/usr/lib/python3.11/site-packages/useful_types/__init__.py", line 264, in <module>
    class SliceableBuffer(Buffer, Protocol):
  File "<frozen abc>", line 106, in __new__
  File "/usr/lib/python3.11/site-packages/typing_extensions.py", line 696, in __init_subclass__
    _check_proto_bases(cls)
  File "/usr/lib/python3.11/site-packages/typing_extensions.py", line 670, in _check_proto_bases
    raise TypeError('Protocols can only inherit from other'
TypeError: Protocols can only inherit from other protocols, got <class 'typing_extensions.Buffer'>

Additional information

All required packages is installed. (As far as I know)
I use SteamOS 3.0 (Arch Linux)
I have Python 3.11.3

@Turelk Turelk added Bug Something isn't working correctly Compiler Issue pertains to the custom BEE compilers labels Feb 25, 2024
@TeamSpen210
Copy link
Member

I think this was fixed in typing_extensions 4.7.0rc1, so updating to 4.7.0 will fix it. Best to just get the latest though.

@TeamSpen210 TeamSpen210 added the Done in next release This has been addressed in the next release label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working correctly Compiler Issue pertains to the custom BEE compilers Done in next release This has been addressed in the next release
Projects
None yet
Development

No branches or pull requests

2 participants