8000 bpo-40260: Remove unnecessary newline in compile() call (GH-19641) · python/cpython@fc45cb4 · GitHub
[go: up one dir, main page]

Skip to content

Commit fc45cb4

Browse files
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. (cherry picked from commit 39652cd) Co-authored-by: Anthony Sottile <asottile@umich.edu>
1 parent 4a6da0b commit fc45cb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/modulefinder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def load_module(self, fqname, fp, pathname, file_info):
339339
self.msgout(2, "load_module ->", m)
340340
return m
341341
if type == _PY_SOURCE:
342-
co = compile(fp.read()+b'\n', pathname, 'exec')
342+
co = compile(fp.read(), pathname, 'exec')
343343
elif type == _PY_COMPILED:
344344
try:
345345
data = fp.read()

0 commit comments

Comments
 (0)
0