mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
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.
This commit is contained in:
parent
4454057269
commit
39652cd8bd
1 changed files with 1 additions and 1 deletions
|
|
@ -339,7 +339,7 @@ def load_module(self, fqname, fp, pathname, file_info):
|
|||
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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue