Hikari 2.0.0.dev111 (2022-09-26)
Breaking Changes
- Lifetime improvements breaking changes:
GatewayBot.join'suntil_closeargument removed.GatewayShardImpl.get_user_idis no longer async and will now always be available.GatewayBotAwareno longer defines the default parameters forjoin,startandrun. It is left to implementation detail. (#1204)
- Remove support for ProcessPoolExecutor executor when reading files
- It is much more efficient to use a threadpool executor for I/O actions like this one
- Due to the nature of process pool, we were also not able to perform proper chunking when reading off the file (#1273)
- It is much more efficient to use a threadpool executor for I/O actions like this one
Deprecation
- Deprecate
CacheView.iteratorin favour of using theitertoolsmodule. (#1289)
Features
- Add python 3.11-dev support. (#847)
- Support for Application Command Localizations. (#1141)
- Improve components lifetimes:
GatewayBot:- General speedups.
- Fix a lot of edge cases of hard crashes if the application shuts unexpectedly.
- More consistent signal handling.
run'sshard_idsargument can now be atyping.Sequence.- Improved logging.
RESTBot:- Consistent signal handling inline with
GatewayBot. - Improved logging.
- Improved loop closing.
- Consistent signal handling inline with
GatewayShardImpl:- New
is_connectedproperty to determine whether the shard is connected to the gateway. - Faster websocket pulling and heartbeating.
- Improved error handling.
- Rate limiting changes:
- Chunking no longer has its own special ratelimit. Now it is shared with the rest of
"non-priority" packages sent, which is of 117/60s (3 less than the hard limit).- "priority" packages currently only include heartbeating. (#1204)
- Chunking no longer has its own special ratelimit. Now it is shared with the rest of
- New
- Implement slash option min/max length fields (#1216)
- Add
mentionproperty toPartialChannel. (#1221) - Implement new Gateway reconnect logic enforced by Discord. (#1245)
Bugfixes
- Lifetime improvements bugfixes:
GatewayShardImplcan now be instantiated out of an async environment for consistency with other components.- Correct signal handling in
RESTBot. (#1204)
- Improve
BadRequestError's error string. (#1213) - Fix
hikari.impl.VoiceImpl.connect_tosilently failing if the guild or voice channel do not exist by providing a timeout. (#1242) dm_permissionnow correctly defaults toTrueinstead ofFalsewhen parsing command objects from Discord. (#1243)- Fix float precision issues when creating a snowflake from a datetime object. (#1247)
- Fix
reposition_channelsto use the correct route. (#1259) - Allow for
replace_attachmentskwarg to be used inRESTClient.create_initial_response. (#1266) - Ignore guild create events which contain unavailable guilds (#1284)