From cb877355ac4f2cb60de85a907372f672e31fbb18 Mon Sep 17 00:00:00 2001 From: Bertrand Bordage Date: Sat, 3 Jun 2017 12:21:25 +0200 Subject: [PATCH] Adds bytearray to the list of cachable params. --- cachalot/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cachalot/utils.py b/cachalot/utils.py index 716c725..3113c6b 100644 --- a/cachalot/utils.py +++ b/cachalot/utils.py @@ -25,7 +25,7 @@ class UncachableQuery(Exception): TUPLE_OR_LIST = {tuple, list} CACHABLE_PARAM_TYPES = { - bool, int, float, Decimal, binary_type, text_type, type(None), + bool, int, float, Decimal, bytearray, binary_type, text_type, type(None), datetime.date, datetime.time, datetime.datetime, datetime.timedelta, UUID, } @@ -59,7 +59,6 @@ def check_parameter_types(params): elif cl is dict: check_parameter_types(p.items()) else: - print(params, [text_type(p) for p in params]) raise UncachableQuery