Skip to content

Commit 4833a62

Browse files
committed
remove unused serde code
1 parent b8f2703 commit 4833a62

2 files changed

Lines changed: 1 addition & 26 deletions

File tree

opteryx/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__build__ = 1392
1+
__build__ = 1393
22

33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

opteryx/compiled/structures/relation_statistics.pyx

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
# cython: wraparound=True
88
# cython: boundscheck=False
99

10-
import decimal
11-
import pybase64 as base64
12-
1310
from libc.stdint cimport int64_t, uint64_t
14-
from cpython.list cimport PyList_Size
1511
from libc.math cimport isnan
1612
from libcpp.unordered_map cimport unordered_map
1713
from cython.operator cimport dereference, preincrement
@@ -36,27 +32,6 @@ cdef inline int64_t map_get(unordered_map[string, int64_t]& m, string key, int64
3632
return m[key]
3733
return default_val
3834

39-
cdef object _orjson_default(obj):
40-
objtype = type(obj)
41-
if objtype == decimal.Decimal:
42-
return {"__decimal__": str(obj)}
43-
if objtype == bytes:
44-
return {"__bytes__": base64.b64encode(obj).decode("utf-8")}
45-
return str(obj)
46-
47-
cdef object _decode_object(object obj):
48-
cdef Py_ssize_t i, sz
49-
if isinstance(obj, dict):
50-
if "__decimal__" in obj:
51-
return decimal.Decimal(obj["__decimal__"])
52-
if "__bytes__" in obj:
53-
return base64.b64decode(obj["__bytes__"])
54-
return {k: _decode_object(v) for k, v in obj.items()}
55-
elif isinstance(obj, list):
56-
sz = PyList_Size(obj)
57-
return [_decode_object(<object>PyList_GET_ITEM(obj, i)) for i in range(sz)]
58-
return obj
59-
6035
cdef inline int64_t _ensure_64bit_range(int64_t val):
6136
if val < MIN_SIGNED_64BIT:
6237
return MIN_SIGNED_64BIT

0 commit comments

Comments
 (0)