This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH] Force LesadaDate.load() return `datetime.date` when parsing

Message ID
DKIM signature
Download raw message
Patch: +1 -1
 lesana/types.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lesana/types.py b/lesana/types.py
index 6e5d21d..677fbdf 100644
--- a/lesana/types.py
+++ b/lesana/types.py
@@ -278,7 +278,7 @@ class LesanaDate(LesanaType):
        # compatibility with dateutil before 2.8
        ParserError = getattr(dateutil.parser, 'ParserError', ValueError)
            return dateutil.parser.parse(data)
            return dateutil.parser.parse(data).date()
        except ParserError:
            raise LesanaValueError(
                "Invalid value for date field: {}".format(data)
Reply to thread Export thread (mbox)