File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 3333except ImportError :
3434 import __builtin__ as builtins
3535
36- import collections
36+ try :
37+ from collections .abc import Callable
38+ except ImportError :
39+ from collections import Callable
40+
3741import os
3842import sys
3943import warnings
@@ -134,14 +138,14 @@ def open(self, name=None):
134138 if self .optimize :
135139 # execute preloaded schema object
136140 self ._exec (self .schema , env )
137- if isinstance (self .schema_hook , collections . Callable ):
141+ if isinstance (self .schema_hook , Callable ):
138142 self .schema_hook (** env )
139143 # use preloaded detectors
140144 detectors = self .detectors
141145 else :
142146 # execute the schema file
143147 self ._execfile ('schema.py' , env )
144- if isinstance (self .schema_hook , collections . Callable ):
148+ if isinstance (self .schema_hook , Callable ):
145149 self .schema_hook (** env )
146150 # reload extensions and detectors
147151 for extension in self .get_extensions ('extensions' ):
You can’t perform that action at this time.
0 commit comments