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 11import ctypes
22import os
33import sys
4+ import warnings
45
56if os .name == "posix" :
67 if sys .platform == "darwin" :
107108__version__ = version .version
108109group_create = Group .create
109110
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+
110134# Note: we use a modified namespace packaging to allow continuity of existing TileDB-Py imports.
111135# Therefore, 'tiledb/__init__.py' must *only* exist in this package.
112136# 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