-
Notifications
You must be signed in to change notification settings - Fork 145
refactor: Asynchronous cog/extension loading. #1132
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
Open
elenakrittik
wants to merge
43
commits into
DisnakeDev:master
Choose a base branch
from
elenakrittik:refactor/async
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 29 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
3c35a8c
Port #7528
elenakrittik d6877d6
Port #7545
elenakrittik c24dc14
fix(autoshard): Errors when trying to use AutoSharded client variants…
elenakrittik 124890b
fix(test_bot): Update according to new constraints.
elenakrittik 8f85551
refactor: Further reduce loop state sharing.
elenakrittik 26c4663
misc(debug): Set a name for hearbeat thread.
elenakrittik 213edba
compat: Add Client.loop property for compatibility.
elenakrittik e76ce01
compat: Bring back connector and revert behavior changes.
elenakrittik fb8b1f2
fix: ruff errors
elenakrittik f812d1c
docs: Remove syncio_debug param from Client.
elenakrittik c3988ff
refactor: Async extensions (& cogs).
elenakrittik 2b30e94
fix: Revert setup to be a hook instead of an event.
elenakrittik ebea051
docs: Fix setup_hook docstring.
elenakrittik f37594e
fix: Self-review fixes
elenakrittik 1900902
docs: Add changelogs.
elenakrittik 1daebcd
docs: Add example usage of setup_hook.
elenakrittik 3c1baa9
docs: Post-PR-open fixes. Of course.
elenakrittik 5566e17
fix: Formatting.
elenakrittik 416333e
docs: Minor wording fix.
elenakrittik f677880
fix: run codemod
elenakrittik 8a873a5
Merge branch 'master' into refactor/async
elenakrittik abd0a1d
fix: propagate ignore_session_start_limit
elenakrittik b68f114
Merge branch 'refactor/async' of https://github.com/elenakrittik/disn…
elenakrittik 1d740c3
docs: 3.0
elenakrittik 94ceb0b
Merge branch 'master' into refactor/async
elenakrittik f38fed2
Merge branch 'master' into refactor/async
elenakrittik a078653
Merge branch 'master' into refactor/async
elenakrittik 6cc4a6d
merge latest changes
elenakrittik d8e80b0
Merge branch 'master' of https://github.com/DisnakeDev/disnake into r…
elenakrittik 0d34a70
Apply suggestions from code review
elenakrittik 45382d6
Merge branch 'master' into refactor/async
elenakrittik a0c5a8e
fix voice sending
elenakrittik df499a7
improve error message
elenakrittik c0ab613
remove dependency
elenakrittik 01fc5f2
merge
elenakrittik 10c39cf
merge
elenakrittik 6328931
merge
elenakrittik 1f2dde0
merge
elenakrittik ead0604
merge
elenakrittik 1e703e5
merge
elenakrittik 1dacea2
merge
elenakrittik 302f91f
merge
elenakrittik 442bad8
merge
elenakrittik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Removed ``loop`` and ``asyncio_debug`` parameters from :class:`Client`. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| The majority of the library now assumes that there is an asyncio event loop running. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Deprecated :attr:`Client.loop`. Use :func:`asyncio.get_running_loop` instead. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Add :meth:`Client.setup_hook`. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| :meth:`Client.run` now uses :func:`asyncio.run` under-the-hood, instead of custom runner logic. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| |commands| Make :meth:`.ext.commands.Bot.load_extensions`, :meth:`.ext.commands.Bot.load_extension`, :meth:`.ext.commands.Bot.unload_extension`, :meth:`.ext.commands.Bot.reload_extension`, :meth:`.ext.commands.Bot.add_cog` and :meth:`.ext.commands.Bot.remove_cog` asynchronous. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| |commands| :meth:`.ext.commands.Cog.cog_load` is now called *after* the cog finished loading. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| |commands| :meth:`.ext.commands.Cog.cog_load` and :meth:`.ext.commands.Cog.cog_unload` can now be either asynchronous or not. | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| |commands| The ``setup`` and ``teardown`` functions utilized by :ref:`ext_commands_extensions` can now be asynchronous. |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.