Skip to content

Commit

Permalink
method rename
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-merzky committed Apr 5, 2024
1 parent 9e38697 commit 1e686e6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/radical/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
from .get_version import get_version

from .serialize import to_json, from_json, to_msgpack, from_msgpack
from .serialize import register_serialization
from .serialize import register_serializable


# import various utility methods
Expand Down
2 changes: 1 addition & 1 deletion src/radical/utils/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, ctype, encode, decode):

# ------------------------------------------------------------------------------
#
def register_serialization(cls, encode, decode):
def register_serializable(cls, encode, decode):
'''
register a class for json and msgpack serialization / deserialization.
Expand Down
2 changes: 1 addition & 1 deletion src/radical/utils/zmq/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Dict, Any

from ..typeddict import TypedDict
from ..serialize import to_msgpack, from_msgpack, register_serialization
from ..serialize import to_msgpack, from_msgpack, register_serializable


# ------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions tests/unittests/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def deserialize(cls, data):
return cls(data['real'], data['imag'])


ru.register_serialization(Complex, encode=Complex.serialize,
decode=Complex.deserialize)
ru.register_serializable(Complex, encode=Complex.serialize,
decode=Complex.deserialize)

data = {'foo': {'complex_number': Complex(1, 2)}}
json_str = ru.to_json(data)
Expand Down

0 comments on commit 1e686e6

Please sign in to comment.