@@ -1149,7 +1149,7 @@ class Table(object):
11491149 def __init__ (self , parent , group , ** kwargs ):
11501150 self .parent = parent
11511151 self .group = group
1152- self .version = getattr (group ._v_attrs ,'version ' ,None )
1152+ self .version = getattr (group ._v_attrs ,'pandas_version ' ,None )
11531153 self .index_axes = []
11541154 self .non_index_axes = []
11551155 self .values_axes = []
@@ -1257,6 +1257,12 @@ def set_attrs(self):
12571257 self .attrs .values_cols = self .values_cols ()
12581258 self .attrs .non_index_axes = self .non_index_axes
12591259
1260+ def validate_version (self , where = None ):
1261+ """ are we trying to operate on an old version? """
1262+ if where is not None :
1263+ if self .version is None or float (self .version ) < 0.1 :
1264+ warnings .warn ("where criteria is being ignored as we this version is too old (or not-defined) [%s]" % self .version , IncompatibilityWarning )
1265+
12601266 def validate (self ):
12611267 """ raise if we have an incompitable table type with the current """
12621268 et = getattr (self .attrs ,'table_type' ,None )
@@ -1325,6 +1331,9 @@ def create_index(self, columns = None, optlevel = None, kind = None):
13251331 def read_axes (self , where ):
13261332 """ create and return the axes sniffed from the table: return boolean for success """
13271333
1334+ # validate the version
1335+ self .validate_version (where )
1336+
13281337 # infer the data kind
13291338 if not self .infer_axes (): return False
13301339
@@ -1523,11 +1532,6 @@ def read(self, where=None):
15231532 _dm = create_debug_memory (self .parent )
15241533 _dm ('start' )
15251534
1526- # are we trying to operate on an old version?
1527- if where is not None :
1528- if self .version is None or self .version < 0.1 :
1529- warnings .warn ("where criteria is being ignored as we this version is too old (or not-defined) [%s]" % self .version , IncompatibilityWarning )
1530-
15311535 if not self .read_axes (where ): return None
15321536
15331537 _dm ('read_axes' )
0 commit comments