mercurial/extensions.py
changeset 52575 f106d0e629e5
parent 52367 89126d55e18c
child 52640 24ee91ba9aa8
equal deleted inserted replaced
52574:cac851655570 52575:f106d0e629e5
   883 def _disabledcmdtable(path):
   883 def _disabledcmdtable(path):
   884     """Construct a dummy command table without loading the extension module
   884     """Construct a dummy command table without loading the extension module
   885 
   885 
   886     This may raise IOError or SyntaxError.
   886     This may raise IOError or SyntaxError.
   887     """
   887     """
   888     with open(path, 'rb') as src:
   888     root = ast.parse(util.readfile(path), path)
   889         root = ast.parse(src.read(), path)
       
   890     cmdtable = {}
   889     cmdtable = {}
   891 
   890 
   892     # Python 3.12 started removing Bytes and Str and deprecate harder
   891     # Python 3.12 started removing Bytes and Str and deprecate harder
   893     use_constant = 'Bytes' not in vars(ast)
   892     use_constant = 'Bytes' not in vars(ast)
   894 
   893