- Added
PyAwaitable_AddExpr. - Fix assertion failures when running in debug mode.
- Pinned dependencies to a specific version to prevent incompatibility problems.
- Moved away from function pointer tables for loading PyAwaitable--everything is now vendored upon installation.
- Improved performance with compiler optimizations.
PyAwaitable_prefixes are now required, and the oldpyawaitable_*functions have been removed.- The warning emitted when a PyAwaitable object is not awaited is now a
ResourceWarning(was aRuntimeWarning). PyAwaitable_AddAwaitnow raises aValueErrorif the passed object isNULLor self, and also now raises aTypeErrorif the passed object is not a coroutine.- Added a simple CLI, primarily for getting the include directory from
meson-python(pyawaitable --include). - PyAwaitable objects now support garbage collection.
- Breaking Change:
PyAwaitable_Initno longer takes a module object. - Breaking Change: Renamed
awaitcallbacktoPyAwaitable_Callback - Breaking Change: Renamed
awaitcallback_errtoPyAwaitable_Error - Breaking Change: Renamed
defercallbacktoPyAwaitable_Defer - Breaking Change: Removed the integer value APIs (
SaveIntValues,LoadIntValues,SetIntValue,GetIntValue). They proved to be maintenance heavy, unintuitive, and most of all replaceable with the arbitrary values API (viamallocing an integer and storing it).
- Significantly reduced awaitable object size by dynamically allocating it.
- Reduced memory footprint by removing preallocated awaitable objects.
- Objects returned by a PyAwaitable object's
__await__are now garbage collected (i.e., they don't leak with rare circular references). - Removed limit on number of stored callbacks or values.
- Switched some user-error messages to
RuntimeErrorinstead ofSystemError. - Added
PyAwaitable_DeferAwaitfor executing code without a coroutine when the awaitable object is called by the event loop.
- Added support for
async withviapyawaitable_async_with.
- Added getting and setting of value storage.
- Changed error message when attempting to await a non-awaitable object (i.e., it has no
__await__). - Fixed coroutine iterator reference leak.
- Fixed reference leak in error callbacks.
- Fixed early exit of
pyawaitable_unpack_arbif aNULLvalue was saved. - Added integer value saving and unpacking (
pyawaitable_save_intandpyawaitable_unpack_int). - Callbacks are now preallocated for better performance.
- Fixed reference leak in the coroutine
send()method.
- Initial release.