6.x.x
6.0.5
Hotfix (for those who believe oc1 platform exists):
In 2022/6/29, a data migration happened for the
oc1platform, moving all the data fromamericasregion tosearegion, it is now reflected in Pyot aswell (after almost 2 months because I forgot thatoc1exists).
6.0.4
Improvement:
Improved documentation syntax and type hints.
6.0.3
Hotfix (rare-breaking bug):
Type error after rate limit returns non-service 429.
6.0.2
Hotfix (breaking bug):
Class
Queuefrompyot.core.queueis not properly printing raised exceptions inside workers and causing workers to fail after an exception is raised. Now fixed.
6.0.1
Hotfix (non-breaking bug):
Changed warning action for
PyotResourceWarningtodefault.
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
warningsmodule instead oflogging.Reworked major parts of
pyot.utilsmodules, removing unused and over-abstracted codes.Support for
aioredisv2.0, dropping support foraioredisv1.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_confsfor importing pyot conf files, located atpyot.conf.utils. It's a slightly modified version ofimportlib.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 modulepyot.core.warningscontain all warning classes used by Pyot. Stores log level remains usinglogging.log.New module
pyot.utils.aiohttpwith classSafeClientSession, intended to fix part of the ungraceful closing of resources byaiohttpuntil the release ofaiohttp>=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.runtimemodule, 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.eventloopmodule, replaced by the new resource management module, the old 'magic' has proven to be problematic and unreliable. The near-replacement isResourceTemplate->EventLoopFactoryandResourceManagerremains 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 andpipeline: strarguments 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 likeawait UnknownPyotCore(param1=param1).using(pipeline_name).get().PyotCore instances now returns
AttributeErrorif.query()or.body()method is not implemented on its classes.Renamed
cleanmethod in PyotCore tovalidate.Removed import hook
PYOT_SETTINGSon django settings, it has been deprecated since v5, usePYOT_CONFSinstead.Removed module
pyot.utils.parsers, for functionsto_bytesandfrom_bytesplease usepickle.dumpsandpickle.loadsdirectly.safejsonis now a module onpyot.utils.safejsonproviding the functionsloadsandload.Removed module
pyot.utils.runners, forloop_runplease useasyncio.get_event_loop().run_until_complete, forthread_runplease useasyncio.get_event_loop().run_in_executor(withfunctools.partialif needed).Removed module
pyot.utils.time, use builtin moduletimeitinstead.Renamed module
pyot.utils.lockstopyot.utils.threading, classLockis renamed toAsyncLock, the intended scope of this module is now to storethreadingrelated utils.Renamed multiple functions in modules
pyot.utils.{model}.cdragonto be more explicit, please review on Utils page.Renamed
import_classinpyot.utils.importlibtoimport_variableas it intends to import any variable in a module.Removed
swapped_dictinpyot.utils.itertools.Renamed
Loggerinpyot.utils.loggingtoLazyLogger.Renamed
snakecaseinpyot.utils.texttosnake_case.Renamed
camelcaseinpyot.utils.texttocamel_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
aioredisnow supportsaioredis>=2.0, due to breaking compatibility, this version will not supportaioredis<=2.0anymore, 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_idtoval.match.MatchInfoData.map_url.Renamed
val.match.MatchPlayerData.player_cardtoval.match.MatchPlayerData.player_card_id.Renamed
val.match.MatchPlayerData.player_titletoval.match.MatchPlayerData.player_title_id.Renamed
val.match.MatchPlayerEconomyData.weapontoval.match.MatchPlayerEconomyData.weapon_id.Renamed
val.match.MatchPlayerEconomyData.armortoval.match.MatchPlayerEconomyData.armor_id.Attribute
val.match.MatchPlayerFinishingDamageData.damage_itemwill remain unchanged, due to it being agnostic and inconsistent, subject to change.
Last updated