Skip to content

2.0.0.dev73 - bugfixes, stability, and tidying up

Pre-release
Pre-release
Compare
Choose a tag to compare
released this 27 Aug 15:26
· 1941 commits to master since this release
52a847a
  • Reimplemented BotApp.run to handle signal handling better and to close the event loop properly.
    Tasks that are still running get shut down and asyncgens get shut down. (@nekokatt) ¹
  • Removed non-debug asyncio event loop latency checker for performance, and integrated configuration
    with the checker for blocking calls in asyncio on the base event loop. (@nekokatt)
  • Channel events now have cache and REST API helper functions that can be invoked instead of
    bot.rest.<call>. (@nekokatt)
  • Guild events now have cache and REST API helper functions that can be invoked instead of
    bot.rest.<call>. (@nekokatt)
  • Member events now have cache and REST API helper functions that can be invoked instead of
    bot.rest.<call>. (@nekokatt)
  • Updated default User-Agent. (@nekokatt)
  • Made default banner take up less space and not mess up when badly implemented monospace
    fonts are in use. (@nekokatt)
  • Bugfixes for race conditions in starting multisharded bots.
    • Bug fix for starting a bot and shutting it down before it was ready, which previously caused a
      deadlock. (@nekokatt)
    • Bug fix for weird Windows handling of closing a ProactorEventLoop when aiohttp fails to close
      an SSL/TCP connection properly, which previously led to spam of RuntimeErrors on shutting down
      bots in some extreme cases. (@nekokatt)
  • Coroutine tracking depth is now changed as part of BotApp.run only, meaning if you use bot.start,
    you are left to do your own handling of your environment, which is more likely to be desirable
    behaviour. (@nekokatt)
  • Forced websocket closure on shutdown as a resource optimisation. (@nekokatt)
  • Added a handler for aiohttp.WSServerUpgradeError that @Tmpod observed being caused by Discord
    or Cloudflare returning us a 520 non-standard HTTP response code when attempting to upgrade
    an HTTP/1.1 connection to a TCP/IP websocket. The application will now attempt to recover from this
    error using standard exponential backoff that you would see for other repeated failures. (@nekokatt)
  • Disabling the use of intents now will produce a DEPRECATION WARNING. Users should expect
    and prepare for this being removed in the coming weeks entirely
    ready for the October breaking
    intents change deadline quickly approaching. (@nekokatt) ²
  • BotApp now defaults to being state__ful__ rather than state__less__. If you wish to run a stateless
    bot, you should now initialize your BotApp with bot = hikari.Bot(..., stateless=True) to retain
    stateless behaviour. (@nekokatt) ³

¹²³ - these are potentially breaking changes. Please regression-test any of your code before redeploying.