# HG changeset patch # User Rémi Cardona # Date 1442593567 -7200 # Node ID 6c497fe389d26ecd3a87d985e47eb12e1076fb41 # Parent 57dfde80df112f1f7e38f36ecb0f9136a68cc3d1 [py3k] execfile → exec diff -r 57dfde80df11 -r 6c497fe389d2 migration.py --- a/migration.py Tue Sep 15 15:33:47 2015 +0200 +++ b/migration.py Fri Sep 18 18:26:07 2015 +0200 @@ -349,7 +349,9 @@ else: pyname = splitext(basename(migrscript))[0] scriptlocals['__name__'] = pyname - execfile(migrscript, scriptlocals) + with open(migrscript, 'rb') as fobj: + code = compile(fobj.read(), migrscript, 'exec') + exec(code, scriptlocals) if funcname is not None: try: func = scriptlocals[funcname] diff -r 57dfde80df11 -r 6c497fe389d2 web/propertysheet.py --- a/web/propertysheet.py Tue Sep 15 15:33:47 2015 +0200 +++ b/web/propertysheet.py Fri Sep 18 18:26:07 2015 +0200 @@ -57,7 +57,9 @@ def load(self, fpath): scriptglobals = self.context.copy() scriptglobals['__file__'] = fpath - execfile(fpath, scriptglobals, self) + with open(fpath, 'rb') as fobj: + code = compile(fobj.read(), fpath, 'exec') + exec(code, scriptglobals, self) for name, type in TYPE_CHECKS: if name in self: if not isinstance(self[name], type):