summaryrefslogtreecommitdiffstats
path: root/src/pybind/rados/rados.pyx
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2020-09-01 15:53:10 +0200
committerKefu Chai <kchai@redhat.com>2020-09-11 18:30:55 +0200
commita7b506046e79da8a0fb476a91fa357112e8670a8 (patch)
treeec4330f324954f6109a58a70924f5c56c16f2aba /src/pybind/rados/rados.pyx
parentpybind/rados: drop redundant type in docstring (diff)
downloadceph-a7b506046e79da8a0fb476a91fa357112e8670a8.tar.xz
ceph-a7b506046e79da8a0fb476a91fa357112e8670a8.zip
pybind/rados: define unicode alias
for silencing warnings like: WARNING: Cannot resolve forward reference in type annotations of "rados.Rados.conf_get": name 'unicode' is not defined because cython < 3.0 with language_level = "3", translates "str" to "unicode" to be python2 compatible, but we've migrated to python3. and the specified "language_level" is "3'. see also https://github.com/cython/cython/issues/1370 Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'src/pybind/rados/rados.pyx')
-rw-r--r--src/pybind/rados/rados.pyx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pybind/rados/rados.pyx b/src/pybind/rados/rados.pyx
index f9717000370..d5096419ca3 100644
--- a/src/pybind/rados/rados.pyx
+++ b/src/pybind/rados/rados.pyx
@@ -1869,6 +1869,8 @@ cdef class Snap(object):
raise make_ex(ret, "rados_ioctx_snap_get_stamp error")
return datetime.fromtimestamp(snap_time)
+# https://github.com/cython/cython/issues/1370
+unicode = str
cdef class Completion(object):
"""completion object"""