-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap backend-specific exceptions in SerializationError/Deserializatio…
…nError
- Loading branch information
Showing
11 changed files
with
98 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
from typing import Any | ||
|
||
from ._api import CustomizableSerializer as CustomizableSerializer | ||
from ._api import CustomTypeCodec as CustomTypeCodec | ||
from ._api import Serializer as Serializer | ||
from ._component import SerializationComponent as SerializationComponent | ||
from ._exceptions import DeserializationError as DeserializationError | ||
from ._exceptions import SerializationError as SerializationError | ||
from ._marshalling import default_marshaller as default_marshaller | ||
from ._marshalling import default_unmarshaller as default_unmarshaller | ||
from ._object_codec import DefaultCustomTypeCodec as DefaultCustomTypeCodec | ||
|
||
# Re-export imports, so they look like they live directly in this package | ||
key: str | ||
value: Any | ||
for key, value in list(locals().items()): | ||
if getattr(value, "__module__", "").startswith(f"{__name__}."): | ||
value.__module__ = __name__ | ||
for __value in list(locals().values()): | ||
if getattr(__value, "__module__", "").startswith(f"{__name__}."): | ||
__value.__module__ = __name__ | ||
|
||
del __value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class SerializationError(Exception): | ||
"""Raised when serialization fails.""" | ||
|
||
|
||
class DeserializationError(Exception): | ||
"""Raised when deserialization fails.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters