Skip to content

Commit 9aeede5

Browse files
committed
types.io: Fix unpacking of numeric type under Python 3.3
The C implementation of decimal in 3.3 is pickier with regard to arguments than its Python counterpart.
1 parent eb25375 commit 9aeede5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

postgresql/types/io/stdlib_decimal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ def numeric_unpack(x, unpack = lib.numeric_unpack):
147147
npad = (header[3] - ((header[0] - (header[1] + 1)) * 4))
148148
return Decimal((
149149
numeric_signs.get(header[2], header[2]),
150-
chain(
150+
tuple(chain(
151151
numeric_convert_digits(digits),
152152
(0,) * npad
153153
) if npad >= 0 else list(
154154
numeric_convert_digits(digits)
155-
)[:npad],
155+
)[:npad]),
156156
-header[3]
157157
))
158158

0 commit comments

Comments
 (0)