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

Python 3.12 compatibility: Bump fabric #401

Closed
systemofapwne opened this issue May 16, 2024 · 1 comment · Fixed by #406
Closed

Python 3.12 compatibility: Bump fabric #401

systemofapwne opened this issue May 16, 2024 · 1 comment · Fixed by #406
Labels
bug Something isn't working

Comments

@systemofapwne
Copy link

Trying to run linien on python 3.12 fails due to an import error

raceback (most recent call last):
  File "/home/gardener/.local/bin/linien", line 5, in <module>
    from linien_gui.app import main
  File "/home/gardener/.local/lib/python3.12/site-packages/linien_gui/app.py", line 23, in <module>
    from linien_client.connection import LinienClient
  File "/home/gardener/.local/lib/python3.12/site-packages/linien_client/connection.py", line 29, in <module>
    from .deploy import hash_username_and_password, start_remote_server
  File "/home/gardener/.local/lib/python3.12/site-packages/linien_client/deploy.py", line 24, in <module>
    from fabric import Connection
  File "/home/gardener/.local/lib/python3.12/site-packages/fabric/__init__.py", line 3, in <module>
    from .connection import Config, Connection
  File "/home/gardener/.local/lib/python3.12/site-packages/fabric/connection.py", line 14, in <module>
    from invoke import Context
  File "/home/gardener/.local/lib/python3.12/site-packages/invoke/__init__.py", line 23, in <module>
    from .loader import FilesystemLoader  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gardener/.local/lib/python3.12/site-packages/invoke/loader.py", line 3, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

The package imp is considered deprecated since python 3.6 and seems to have been dropped with python 3.12. Since the used version of fabric is kind of outdated and still relies on older versions of invoke which in turn uses imp, linien will not run on python 3.12 onwords.

Solution: Bump linien to use recent fabric package. This however needs some code refactoring, since there are breaking changes between fabric 2.7.1 to 3+.

@systemofapwne systemofapwne added the bug Something isn't working label May 16, 2024
This was referenced May 29, 2024
@bleykauf
Copy link
Collaborator

Thanks for reporting this. Luckily no changes to the code were necessary for us, no breaking changes that affect Linien.

Fixed in new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants