Skip to content

Commit

Permalink
Fixed serialization of automatic responders
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhozic committed Jan 30, 2024
1 parent 1539971 commit 6901ee3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ Glossary
Releases
---------------------

v4.0.2
====================
- Fixed automatic responders not being serializable.

v4.0.1
====================
- Fixed remote serialization of regex and time.
Expand Down
2 changes: 1 addition & 1 deletion src/daf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import warnings


VERSION = "4.0.1"
VERSION = "4.0.2"


if sys.version_info.minor == 12 and sys.version_info.major == 3:
Expand Down
4 changes: 4 additions & 0 deletions src/daf/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from . import logging
from . import web
from . import events
from . import responder


__all__ = (
Expand Down Expand Up @@ -155,6 +156,9 @@ def import_class(path: str):
re.Pattern: {
"custom_encoder": lambda data: {"pattern": convert_object_to_semi_dict(data.pattern), "flags": data.flags},
"custom_decoder": lambda data: re.compile(data["pattern"], data.get("flags", 0))
},
responder.DMResponder: {
"attrs": ["condition", "action", "constraints"]
}
}

Expand Down

0 comments on commit 6901ee3

Please sign in to comment.