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

Experimental async #401

Merged
merged 10 commits into from
Oct 9, 2024
Merged

Experimental async #401

merged 10 commits into from
Oct 9, 2024

Conversation

rafaelmardojai
Copy link
Member

@rafaelmardojai rafaelmardojai commented Sep 5, 2024

In this PR I'm experimenting with the recent asyncio integration in PyGGbject.

On top of that I've made other refactors to make the new async code more clear and compact.

Aside from Soup's requests the only Gio async function we use is Gdk.Clipboard.read_text_async(), and I believe the current callback based code will be equally compact than using create_background_task so I'm not touching them for now (With our @background_task decorator, that's not longer a problem). I also through about making an async version of ProviderSettings.api_key but I don't think is worth it for now.

After some testing everything seems pretty solid, but since it's an "experimental" feature we probably want to hold this as draft for some time.

TODO

  • Test providers APIs are working as expected
    • Translation
    • TTS
    • Suggestions
    • API keys
      • DeepL
      • LibreTranslate
  • Port search provider

@mufeedali
Copy link
Member

So do we want to merge this right now?

@rafaelmardojai
Copy link
Member Author

So do we want to merge this right now?

After we release 2.5.0 preferably. So we have longer time to keep testing it after merge.

@rafaelmardojai rafaelmardojai marked this pull request as ready for review October 6, 2024 23:09
@rafaelmardojai
Copy link
Member Author

@mufeedali I think we can merge this now.

@mufeedali mufeedali merged commit f80500c into main Oct 9, 2024
2 checks passed
@mufeedali mufeedali deleted the async branch October 9, 2024 17:57
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