Skip to content

Commit ae6e997

Browse files
author
James William Pye
committed
Remove the unused stdio module(typio incorporated it) and fix circle's IO.
1 parent c5f84e9 commit ae6e997

2 files changed

Lines changed: 3 additions & 202 deletions

File tree

postgresql/protocol/stdio.py

Lines changed: 0 additions & 193 deletions
This file was deleted.

postgresql/protocol/typio.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,6 @@ def timetz_unpack(tstz):
274274
lambda x: interval_unpack(ts.interval64_noday_unpack(x))
275275
)
276276

277-
def circle_unpack(x):
278-
"""
279-
Given raw circle data, (x, y, radius), make a circle instance using
280-
`postgresql.types.circle`.
281-
"""
282-
return pg_types.circle(((x[0], x[1]), x[2]))
283-
284277
def two_pair(x):
285278
'Make a pair of pairs out of a sequence of four objects'
286279
return ((x[0], x[1]), (x[2], x[3]))
@@ -306,9 +299,10 @@ def lseg_unpack(x):
306299
return pg_types.lseg(two_pair(ts.lseg_unpack(x)))
307300

308301
def circle_pack(x):
309-
lambda x: ts.circle_pack((x[0][0], x[0][1], x[1])),
302+
return ts.circle_pack((x[0][0], x[0][1], x[1]))
310303
def circle_unpack(x):
311-
lambda x: circle_unpack(ts.circle_unpack(x))
304+
x = ts.circle_unpack(x)
305+
return pg_types.circle(((x[0], x[1]), x[2]))
312306

313307
##
314308
# numeric is represented using:

0 commit comments

Comments
 (0)