Sharding bugfixes, runtime bugfixes, optimisations
Pre-release
Pre-release
New features
- New endpoints to support publishing crossposts in announcement channels.
- BotAware.run and BotAware.start are now required to expose some kwargs
provided in BotApp as part of the interface. - Windows signal handling stuff (see below).
- New
logging
logger level can be used. Use"TRACE_HIKARI"
to view
the majority of what was in the"DEBUG"
level logs before (namely
request payloads, etc). This should now allow developers to add stuff to
the"DEBUG"
logs and not be assaulted with socket packet data as soon as
they turn debug logs on. Debug logs are now much more readable.
Stuff to help new developers out
- Using
with <thing>
instead ofasync with <thing>
on objects made by
hikari that requireasync with
will now suggest how to fix this issue in the
error message (foo.Bar is async-only, did you mean 'async with'?
).
Renaming
- Private channels are now known as DM channels again, to match the API
naming.
Fixes and optimisations
- Speedups for entity rebuilding in cache
- TCP connector bugfixes for Windows. You should hopefully not get
NoneType is not a socket
errors or similar when aiohttp/asyncio
encounters issues with the TCP/IP stack on Windows now. Hopefully. - Rewritten signal handling logic to work differently. Bots on Windows
should now support closing gracefully when you use a keyboard interrupt
(PyCharm will still just murder the process immediately, though). - Bot.close has been reimplemented (see below).
- Fixed bug where closing bot during shard startup would take up to 5
seconds to begin to be processed. Shards are interrupted immediately
now. - RESTApp's
_RESTProvider
is now fully implemented again and shouldn't
throw abstract class initialization errors when used internally, meaning the
REST only client should work again. - Closing the bot now waits for shards to close properly. This was due to a
regression in the logic from when we recently rewrote this mechanism which
meant the shard was requested to close, but may not have shut down before
the event loop got closed forcefully. - Platforms that hang on socket IO when a shard zombies or the network
goes down should now not wait forever. - More contextual logging for why shards closed down specifically.
- If one shard is manually closed directly on startup, the bot should now see
this and treat it as a failed startup rather than ignoring it. - Ping-pong heartbeating is now disabled.
Removed features
- Bot.terminate (was only added recently but is no longer needed due to
the other aforementioned changes). debug
kwarg in components. Use theTRACE_HIKARI
logging level
instead.version
kwarg has been removed from BotApp, RESTApp, RESTClientImpl,
and GatewayShardImpl.- UnavailableGuild no longer exists. Guilds that become unavailable are simply
marked as being in this state. READY guilds are not cached until they become
available for the first time.