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.
Summary
This PR is supposed to fix some incompatibilities with Cython and Nextcord.
The first of these is that Cython stores coros internally with the same
co_flags
as a regular function. Sinceinspect.iscoroutinefunction
is used a bunch in nextcord to ensure listeners work right, "Pure Python" compiled with Cython cannot use nextcord. Cython does add a flag elsewhere thatasyncio.iscoroutinefunction
does check for (see this). I replaced all calls to inspect's impl with asyncio's impl, altering imports where necessary.This is a draft for now, because I don't want to merge it until I can make a bot using Cython. Once the first obstacle is fixed, I'm sure there will be more.
Checklist
I don't know how to test this yet, I was wondering if you guys would be able to point me in the right direction