File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1
1
import ctypes
2
2
import os
3
3
import sys
4
+ import warnings
4
5
5
6
if os .name == "posix" :
6
7
if sys .platform == "darwin" :
107
108
__version__ = version .version
108
109
group_create = Group .create
109
110
111
+ # Create a proxy object to wrap libtiledb and provide a `cc` alias
112
+ class CCProxy :
113
+ def __init__ (self , module ):
114
+ self ._module = module
115
+
116
+ def __getattr__ (self , name ):
117
+ warnings .warn (
118
+ "`tiledb.cc` is deprecated. Please use `tiledb.libtiledb` instead." ,
119
+ )
120
+ return getattr (self ._module , name )
121
+
122
+ def __repr__ (self ):
123
+ warnings .warn (
124
+ "`tiledb.cc` is deprecated. Please use `tiledb.libtiledb` instead." ,
125
+ )
126
+ return self ._module .__repr__ ()
127
+
128
+
129
+ cc = CCProxy (libtiledb )
130
+ sys .modules ["tiledb.cc" ] = cc
131
+ cc = cc
132
+ del CCProxy
133
+
110
134
# Note: we use a modified namespace packaging to allow continuity of existing TileDB-Py imports.
111
135
# Therefore, 'tiledb/__init__.py' must *only* exist in this package.
112
136
# Furthermore, in sub-packages, the `find_packages` helper will not work at the
You can’t perform that action at this time.
0 commit comments