allow non-fully qualified paths in classes argument to deserializer
@@ -172,6 +172,10 @@ def loadclass(module_and_name, classes=None):
if classes:
try:
return classes[module_and_name]
+ except KeyError:
+ # maybe they didn't provide a fully qualified path
+ try:
+ return classes[module_and_name.rsplit('.', 1)]
except KeyError:
pass
# Otherwise, load classes from globally-accessible imports
