Python 3.11, localization and new lifetime
Pre-release
Pre-release
Hikari 2.0.0.dev111 (2022-09-26)
Breaking Changes
- Lifetime improvements breaking changes:
GatewayBot.join
'suntil_close
argument removed.GatewayShardImpl.get_user_id
is no longer async and will now always be available.GatewayBotAware
no longer defines the default parameters forjoin
,start
andrun
. 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.iterator
in favour of using theitertools
module. (#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_ids
argument 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_connected
property 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
mention
property toPartialChannel
. (#1221) - Implement new Gateway reconnect logic enforced by Discord. (#1245)
Bugfixes
- Lifetime improvements bugfixes:
GatewayShardImpl
can 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_to
silently failing if the guild or voice channel do not exist by providing a timeout. (#1242) dm_permission
now correctly defaults toTrue
instead ofFalse
when parsing command objects from Discord. (#1243)- Fix float precision issues when creating a snowflake from a datetime object. (#1247)
- Fix
reposition_channels
to use the correct route. (#1259) - Allow for
replace_attachments
kwarg to be used inRESTClient.create_initial_response
. (#1266) - Ignore guild create events which contain unavailable guilds (#1284)