Skip to content

0.4.0

Latest
Compare
Choose a tag to compare
@nxtlo nxtlo released this 14 Jan 10:01
· 1 commit to master since this release

Added

  • Python 3.13 Support. i know, it has been months since this released.
  • framework.Global is a pre initialized instance alternative to aiobungie.Empty.
  • You can customize the behavior of certain HTTP parameters via aiobungie.builders.Settings
    object, This can be used in any client implementation, Example:
import aiobungie
from aiobungie.builders import Settings

# By default, it initialize pre-configured.
# You can checkout the documentations for more details
# on what you can configure.
default = Settings()
client = aiobungie.RESTClient("token", settings=default)
  • A settings property on both client implementations.
  • owned_client parameter to RESTClient, This allows you to use
    your own aiohttp.ClientSession instance, Example.
import aiobungie
import aiohttp

my_session = aiohttp.ClientSession()
# What `owned_client=False` means here is we're using our own TCP session.
client = aiobungie.RESTClient("token", owned_client=False, client_session=my_session)

async with client:
    ...

This is useful if you're using one session for the entire lifetime of the program
which's also being used in different parts of the program,

Removed

  • ujson is no longer supported. See Why
  • Empty framework, This was supposed to be removed in 0.3.1.

Changed

  • You need to open and close the HTTP connection by yourself when using RESTPool, Example:
import aiobungie

pool = aiobungie.RESTPool("token")

async def start():
    # Starting point of the program
    await pool.start()

async def runtime():
    # We know that the pool connection is open
    # at this point of the program.
    async with pool.acquire() as client:
        ...

async def closing():
    # Exit point of the program
    await pool.stop()
  • The method search_entnties is currently marked as unstable until a further fix, This is a Bungie problem.
  • Methods such as RESTClient._handle_ratelimit and RESTClient.open/close has been unmarked as @final methods, which allows you to write your own logic.

Fixed

  • The TRACE debugging level no longer outputs sensitive data.