diff options
author | Anthony Sottile <asottile@umich.edu> | 2020-04-22 11:42:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-22 19:42:53 +0100 |
commit | 39652cd8bdf7c82b7c6055089a4ed90ee546a448 (patch) | |
tree | 4a600908b2211d4c39c5a9aa137b5ebb4fa50845 | |
parent | bpo-39562: Prevent collision of future and compiler flags (GH-19230) (diff) | |
download | cpython-39652cd8bdf7c82b7c6055089a4ed90ee546a448.tar.gz cpython-39652cd8bdf7c82b7c6055089a4ed90ee546a448.tar.bz2 cpython-39652cd8bdf7c82b7c6055089a4ed90ee546a448.zip |
bpo-40260: Remove unnecessary newline in compile() call (GH-19641)
Because some people subclass this class and call undocumented methods, and we don't want to break them.
-rw-r--r-- | Lib/modulefinder.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py index 361a6730c06..aadcd23edba 100644 --- a/Lib/modulefinder.py +++ b/Lib/modulefinder.py @@ -339,7 +339,7 @@ class ModuleFinder: self.msgout(2, "load_module ->", m) return m if type == _PY_SOURCE: - co = compile(fp.read()+b'\n', pathname, 'exec') + co = compile(fp.read(), pathname, 'exec') elif type == _PY_COMPILED: try: data = fp.read() |