-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Experimental async #401
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rafaelmardojai
force-pushed
the
async
branch
from
September 8, 2024 16:45
792612b
to
7071f69
Compare
rafaelmardojai
force-pushed
the
async
branch
from
September 15, 2024 20:32
7071f69
to
03858cc
Compare
Make all provider's methods async
Dialect should work with the expentancy that all lang codes on translation requests are normalized.
This should make calling async functions from sync ones more natural.
rafaelmardojai
force-pushed
the
async
branch
from
September 16, 2024 15:51
03858cc
to
6761195
Compare
So do we want to merge this right now? |
After we release |
@mufeedali I think we can merge this now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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(With ourcreate_background_task
so I'm not touching them for now@background_task
decorator, that's not longer a problem). I also through about making an async version ofProviderSettings.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