From 56ec575351ee2a562665bdf9162cbc5d19fbe387 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Fri, 1 Dec 2017 18:57:43 -0800 Subject: [PATCH] Drop leading 0's from numeric literals Not compatible with Python3. Makes the code more forward compatible with modern Pythons. In Python2, it was an alternative syntax for octal. $ python3 >>> 01 File "", line 1 01 ^ SyntaxError: invalid token --- tests/test_types_extras.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_types_extras.py b/tests/test_types_extras.py index f50b1b5e..870819cf 100755 --- a/tests/test_types_extras.py +++ b/tests/test_types_extras.py @@ -1619,7 +1619,7 @@ class RangeCasterTestCase(ConnectingTestCase): from psycopg2.tz import FixedOffsetTimezone cur = self.conn.cursor() - d1 = date(2012, 01, 01) + d1 = date(2012, 1, 1) d2 = date(2012, 12, 31) r = DateRange(d1, d2) cur.execute("select %s", (r,))