Author: Brian Kearns <bdkea...@gmail.com> Branch: Changeset: r71104:c4c478a2375b Date: 2014-04-30 15:18 -0400 http://bitbucket.org/pypy/pypy/changeset/c4c478a2375b/
Log: new module is deprecated, use types diff --git a/lib-python/2.7/cProfile.py b/lib-python/2.7/cProfile.py --- a/lib-python/2.7/cProfile.py +++ b/lib-python/2.7/cProfile.py @@ -161,7 +161,7 @@ # ____________________________________________________________ def main(): - import os, sys, new + import os, sys, types from optparse import OptionParser usage = "cProfile.py [-o output_file_path] [-s sort] scriptfile [arg] ..." parser = OptionParser(usage=usage) @@ -184,7 +184,7 @@ sys.path.insert(0, os.path.dirname(progname)) with open(progname, 'rb') as fp: code = compile(fp.read(), progname, 'exec') - mainmod = new.module('__main__') + mainmod = types.ModuleType('__main__') mainmod.__file__ = progname mainmod.__package__ = None runctx(code, mainmod.__dict__, None, options.outfile, options.sort) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit