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

Add typing_extensions to flatpak requirement #1178

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SqAtx
Copy link
Contributor

@SqAtx SqAtx commented Jan 20, 2025

Without it, the weekly flatpak fails on startup:

Traceback (most recent call last):
  File "/app/bin/gtg", line 98, in <module>
    from GTG.gtk.application import Application
  File "/app/lib/python3.11/site-packages/GTG/gtk/application.py", line 30, in <module>
    from GTG.core.datastore import Datastore
  File "/app/lib/python3.11/site-packages/GTG/core/datastore.py", line 30, in <module>
    from GTG.core.tasks import TaskStore, Filter
  File "/app/lib/python3.11/site-packages/GTG/core/tasks.py", line 35, in <module>
    from GTG.core.base_store import BaseStore, StoreItem
  File "/app/lib/python3.11/site-packages/GTG/core/base_store.py", line 29, in <module>
    from typing_extensions import Self
ModuleNotFoundError: No module named 'typing_extensions'

The requirement has been necessary since 908da7d

Without it, the weekly flatpak fails on startup:

```
Traceback (most recent call last):
  File "/app/bin/gtg", line 98, in <module>
    from GTG.gtk.application import Application
  File "/app/lib/python3.11/site-packages/GTG/gtk/application.py", line 30, in <module>
    from GTG.core.datastore import Datastore
  File "/app/lib/python3.11/site-packages/GTG/core/datastore.py", line 30, in <module>
    from GTG.core.tasks import TaskStore, Filter
  File "/app/lib/python3.11/site-packages/GTG/core/tasks.py", line 35, in <module>
    from GTG.core.base_store import BaseStore, StoreItem
  File "/app/lib/python3.11/site-packages/GTG/core/base_store.py", line 29, in <module>
    from typing_extensions import Self
ModuleNotFoundError: No module named 'typing_extensions'
```

The requirement has been necessary since 908da7d
@SqAtx SqAtx requested a review from gycsaba96 January 20, 2025 18:04
@SqAtx
Copy link
Contributor Author

SqAtx commented Jan 20, 2025

Note that I haven't been able to test this yet

@gycsaba96
Copy link
Contributor

Note that I haven't been able to test this yet

I am not yet that familiar with the flatpak build pipeline. However, it seems the python3-requirements.yaml file should also be updated based on this comment. Another option could be to leverage typing.TYPE_CHECKING and treat typing_extensions as an optional dependency not included in the flatpak build.

(If I understand correctly, this will be a quick fix before PR 1163 is merged.)

@SqAtx
Copy link
Contributor Author

SqAtx commented Jan 22, 2025

You might be right - I tried to build it and it still didn't work. I'll try and follow your suggestion tomorrow and update this if it works.

@SqAtx SqAtx marked this pull request as draft January 22, 2025 04:31
@SqAtx
Copy link
Contributor Author

SqAtx commented Jan 22, 2025

Hm I haven't been able to make that command work.

I created #1179 to document the fact that the weekly flatpak isn't running, and will make another attempt at fixing it when I have time.

@gycsaba96
Copy link
Contributor

Hm I haven't been able to make that command work.

Maybe we are facing the same error: error: app/org.gnome.Sdk/x86_64/46 not installed
Installing the SDK solved the problem: flatpak install org.gnome.Sdk/x86_64/46

Again, using typing.TYPE_CHECKING seems also a viable solution that keeps the flatpak cleaner.

Or we can just wait until PR #1163 is merged. :)

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

Successfully merging this pull request may close these issues.

2 participants