script, open the file in binary mode and not in text mode with the default
(utf8) encoding.
if (len(args) > 0):
sys.argv[:] = args
sys.path.insert(0, os.path.dirname(sys.argv[0]))
- fp = open(sys.argv[0])
- try:
+ with open(sys.argv[0], 'rb') as fp:
script = fp.read()
- finally:
- fp.close()
run('exec(%r)' % script, options.outfile, options.sort)
else:
parser.print_usage()
Library
-------
+- Issue #4282: Fix the main function of the profile module for a non-ASCII
+ script, open the file in binary mode and not in text mode with the default
+ (utf8) encoding.
+
- Issue #8179: Fix macpath.realpath() on a non-existing path.
- Issue #8024: Update the Unicode database to 5.2.