File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,15 @@ from libcpp.string cimport string
88from libcpp.vector cimport vector
99from cpython.mem cimport PyMem_Malloc, PyMem_Free
1010from cpython.version cimport PY_MAJOR_VERSION
11- from cpython cimport Py_INCREF, Py_DECREF, PyInt_AsLong, PyInt_FromLong
12-
13- if PY_MAJOR_VERSION < 3 :
14- from cpython cimport PyString_AsStringAndSize, PyString_AsString
15- import cPickle as pickle
16- else :
17- from cpython cimport PyBytes_AsStringAndSize as PyString_AsStringAndSize, PyBytes_AsString as PyString_AsString, PyUnicode_AsUTF8String
18- import pickle
11+ from cpython cimport (
12+ Py_INCREF, Py_DECREF,
13+ PyLong_AsLong as PyInt_AsLong,
14+ PyLong_FromLong as PyInt_FromLong,
15+ PyBytes_AsStringAndSize as PyString_AsStringAndSize,
16+ PyBytes_AsString as PyString_AsString,
17+ PyUnicode_AsUTF8String,
18+ )
19+ from ctypes import c_long as long
1920
2021import os
2122import sys
@@ -24,6 +25,7 @@ import threading
2425import zlib
2526import marshal
2627import warnings
28+ import pickle
2729from contextlib import contextmanager
2830
2931cdef extern from " Common.h" namespace " douban::mc" :
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ def find_version(*file_paths):
100100 "Topic :: Software Development :: Libraries" ,
101101 ],
102102 # Support for the basestring type is new in Cython 0.20.
103- setup_requires = ["Cython >= 0.20, < 3.1 " ],
103+ setup_requires = ["Cython >= 0.20" ],
104104 ext_modules = [
105105 Extension (
106106 "libmc._client" ,
You can’t perform that action at this time.
0 commit comments