Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

yasoo

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yasoo - npm Package Compare versions

Comparing version
0.10.0
to
0.11.0
+1
-1
PKG-INFO
Metadata-Version: 2.1
Name: yasoo
Version: 0.10.0
Version: 0.11.0
Summary: Yet another serializer of objects

@@ -5,0 +5,0 @@ Home-page: https://github.com/drorvinkler/yasoo

@@ -9,3 +9,3 @@ import setuptools

name="yasoo",
version="0.10.0",
version="0.11.0",
author="Dror A. Vinkler",

@@ -12,0 +12,0 @@ description="Yet another serializer of objects",

Metadata-Version: 2.1
Name: yasoo
Version: 0.10.0
Version: 0.11.0
Summary: Yet another serializer of objects

@@ -5,0 +5,0 @@ Home-page: https://github.com/drorvinkler/yasoo

@@ -104,2 +104,3 @@ import json

allow_extra_fields: bool = False,
ignore_custom_deserializer: bool = False,
globals: Optional[Dict[str, Any]] = None,

@@ -115,2 +116,3 @@ ) -> T:

allow_extra_fields: bool = False,
ignore_custom_deserializer: bool = False,
globals: Optional[Dict[str, Any]] = None,

@@ -128,2 +130,5 @@ ) -> T:

definition, or just ignore them.
:param ignore_custom_deserializer: Whether to ignore the custom deserializer for this obj_type and use the
default serializer instead. This only applies to the top level object, not to any inner objects
(see ``unregister`` for ignoring custom deserializer for inner objects as well).
:param globals: A dictionary from type name to type, most easily acquired using the built-in ``globals()``

@@ -138,3 +143,8 @@ function.

return self._deserialize(
data, obj_type, type_key, allow_extra_fields, globals or {}
data,
obj_type,
type_key,
allow_extra_fields,
globals or {},
ignore_custom_deserializer,
)

@@ -149,2 +159,3 @@

external_globals: Dict[str, Any],
ignore_custom_deserializer: bool = False,
):

@@ -167,10 +178,11 @@ all_globals = dict(globals())

deserialization_method = self._custom_deserializers.get(
obj_type, self._custom_deserializers.get(real_type)
)
if deserialization_method:
return deserialization_method(data)
for base_class, method in self._inheritance_deserializers.items():
if issubclass(real_type, base_class):
return method(data, real_type)
if not ignore_custom_deserializer:
deserialization_method = self._custom_deserializers.get(
obj_type, self._custom_deserializers.get(real_type)
)
if deserialization_method:
return deserialization_method(data)
for base_class, method in self._inheritance_deserializers.items():
if issubclass(real_type, base_class):
return method(data, real_type)

@@ -177,0 +189,0 @@ key_type = None