Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Releases: iann838/Pyot

Release 6.0.9

20 Nov 18:05
3f6537e
Compare
Choose a tag to compare
v6.0.9

Update python-publish.yml

Release 6.0.8

26 Jan 19:01
Compare
Choose a tag to compare
v6.0.8

Fix: Queue unintentionally sharing same workers

Release 6.0.7

14 Jan 13:39
Compare
Choose a tag to compare
v6.0.7

Bump: Release 6.0.7

Release 6.0.6

06 Jan 04:01
c82146e
Compare
Choose a tag to compare
v6.0.6

New: Release 6.0.6

Release 6.0.5

17 Aug 19:55
Compare
Choose a tag to compare

6.0.5

Hotfix (for those who believe oc1 platform exists):

  • In 2022/6/29, a data migration happened for the oc1 platform, moving all the data from americas region to sea region, it is now reflected in Pyot aswell (after almost 2 months because I forgot that oc1 exists).

Release 6.0.4

16 Aug 16:39
Compare
Choose a tag to compare

6.0.4

Improvement:

  • Improved documentation syntax and type hints.

Release 6.0.3

16 Aug 13:45
Compare
Choose a tag to compare

6.0.3

Fix:

  • Type error after rate limit returns non-service 429.

Release 6.0.2

15 Aug 00:05
Compare
Choose a tag to compare

6.0.2

Hotfix (breaking):

  • Class Queue from pyot.core.queue is not properly printing raised exceptions inside workers and causing workers to fail after an exception is raised. Now fixed.

Release 6.0.1

13 Aug 01:48
Compare
Choose a tag to compare

6.0.1

Hotfix (non-breaking):

  • Changed warning action for PyotResourceWarning to default.

Release 6.0.0

12 Aug 23:48
Compare
Choose a tag to compare

6.0.0

Summary:

  • Reworked resource management logic, fixing a scary amount of issues and bugs related to ungraceful handling of resources. Warnings and errors such as unclosed transport ..., unclosed <socker._socket ..., Event loop is closed, etc.
  • Reworked parts of warning mechanics, warnings are now actual warnings sent using the warnings module instead of logging.
  • Reworked major parts of pyot.utils modules, removing unused and over-abstracted codes.
  • Support for aioredis v2.0, dropping support for aioredis v1.3.
  • Other general codebase improvements.

New additions:

  • Introduces new core resource management module with pyot.core.resources, intended to handle graceful acquisition and release of resources used by Pyot, the usage is recommended but optional, please refer to Cores -> Resources.
  • New conf utils function import_confs for importing pyot conf files, located at pyot.conf.utils. It's a slightly modified version of importlib.import_module.
  • New functools decorator async_generator_property, for decorating an async generator method to a property.
  • Most warnings are now sent using warnings.warn, new module pyot.core.warnings contain all warning classes used by Pyot. Stores log level remains using logging.log.
  • New module pyot.utils.aiohttp with class SafeClientSession, intended to fix part of the ungraceful closing of resources by aiohttp until the release of aiohttp>=4.0 (version where aiohttp fixes it themselves).

Breaking changes:

(To obtain the source of removed or before change codes, please search on the github commit history.)

  • Removed pyot.utils.runtime module, with the new introduced resource management rework, the intended function of the module is no longer needed. To obtain the source code for other uses, please search on the github commit history.
  • Removed pyot.utils.eventloop module, replaced by the new resource management module, the old 'magic' has proven to be problematic and unreliable. The near-replacement is ResourceTemplate -> EventLoopFactory and ResourceManager remains the same name.
  • Renamed multiple internal methods and functions to _ prefixed as they are not intended to be used publicly, its changes will no longer be documented as they are private. Including but not limited to:
    • PyotCore internal methods.
    • Stores and Limiters attributes.
  • Removed .pipeline(name: str) method and pipeline: str arguments in request methods from PyotCore instances, it is now replaced with .using(pipeline_name: str) method. A typical non-default-pipeline request would now look like await UnknownPyotCore(param1=param1).using(pipeline_name).get().
  • PyotCore instances now returns AttributeError if .query() or .body() method is not implemented on its classes.
  • Renamed clean method in PyotCore to validate.
  • Removed import hook PYOT_SETTINGS on django settings, it has been deprecated since v5, use PYOT_CONFS instead.
  • Removed module pyot.utils.parsers, for functions to_bytes and from_bytes please use pickle.dumps and pickle.loads directly. safejson is now a module on pyot.utils.safejson providing the functions loads and load.
  • Removed module pyot.utils.runners, for loop_run please use asyncio.get_event_loop().run_until_complete, for thread_run please use asyncio.get_event_loop().run_in_executor (with functools.partial if needed).
  • Removed module pyot.utils.time, use builtin module timeit instead.
  • Renamed module pyot.utils.locks to pyot.utils.threading, class Lock is renamed to AsyncLock, the intended scope of this module is now to store threading related utils.
  • Renamed multiple functions in modules pyot.utils.{model}.cdragon to be more explicit, please review on Utils page.
  • Renamed import_class in pyot.utils.importlib to import_variable as it intends to import any variable in a module.
  • Removed swapped_dict in pyot.utils.itertools.
  • Renamed Logger in pyot.utils.logging to LazyLogger.
  • Renamed snakecase in pyot.utils.text to snake_case.
  • Renamed camelcase in pyot.utils.text to camel_case.
  • Logs formatting changed from [Trace: ...] ... to [pyot.{modules...}:{class}#{optional_tag}] ....
  • Store instantiation, for stores that accepts kwargs, is now on first level as **kwargs, e.g. now accepts "a": "b" instead of "kwargs": {"a": "b"}.
  • Stores and limiters depending on aioredis now supports aioredis>=2.0, due to breaking compatibility, this version will not support aioredis<=2.0 anymore, the class names remains the same and no extra changes required on conf.

The following breaking changes is specific to the PyotCore class val.Match, the renamed attributes is to reserve them for the new static asset bridges (much like lol.Champion, lol.Item, etc.) to be released in the next versions.

  • Renamed val.match.MatchInfoData.map_id to val.match.MatchInfoData.map_url.
  • Renamed val.match.MatchPlayerData.player_card to val.match.MatchPlayerData.player_card_id.
  • Renamed val.match.MatchPlayerData.player_title to val.match.MatchPlayerData.player_title_id.
  • Renamed val.match.MatchPlayerEconomyData.weapon to val.match.MatchPlayerEconomyData.weapon_id.
  • Renamed val.match.MatchPlayerEconomyData.armor to val.match.MatchPlayerEconomyData.armor_id.
  • Attribute val.match.MatchPlayerFinishingDamageData.damage_item will remain unchanged, due to it being agnostic and inconsistent, subject to change.