diff --git a/README.rst b/README.rst index bc99414..3474267 100644 --- a/README.rst +++ b/README.rst @@ -355,6 +355,10 @@ Bugs and pull requested can be submitted on GitHub_. Changes ======= +1.1 +~~~ +* BUG: Read source files as bytes. + 1.0 ~~~ * ENH: `kernprof.py` is now installed as `kernprof`. diff --git a/kernprof.py b/kernprof.py index c2b96eb..108d36e 100755 --- a/kernprof.py +++ b/kernprof.py @@ -31,7 +31,7 @@ exec_ = getattr(builtins, "exec") def execfile(filename, globals=None, locals=None): - with open(filename) as f: + with open(filename, 'rb') as f: exec_(compile(f.read(), filename, 'exec'), globals, locals) # =====================================