summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-11-13 00:45:32 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-11-13 00:45:32 (GMT)
commitb4b929ec861f75032775f98125df58fa8b333374 (patch)
tree3022b7024d869e805eef838a471f6ebb9bce2aee /Lib/importlib
parentaeaa592516c8ea8a0a6318f69635baa817ced82f (diff)
downloadcpython-b4b929ec861f75032775f98125df58fa8b333374.zip
cpython-b4b929ec861f75032775f98125df58fa8b333374.tar.gz
cpython-b4b929ec861f75032775f98125df58fa8b333374.tar.bz2
no need to translate newlines in python code anymore
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/_bootstrap.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index 02f5c49..ed1598b 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -344,21 +344,6 @@ class PyLoader:
message = "a source path must exist to load {0}".format(fullname)
raise ImportError(message)
source = self.get_data(source_path)
- # Convert to universal newlines.
- line_endings = b'\n'
- for index, c in enumerate(source):
- if c == ord(b'\n'):
- break
- elif c == ord(b'\r'):
- line_endings = b'\r'
- try:
- if source[index+1] == ord(b'\n'):
- line_endings += b'\n'
- except IndexError:
- pass
- break
- if line_endings != b'\n':
- source = source.replace(line_endings, b'\n')
return compile(source, source_path, 'exec', dont_inherit=True)
# Never use in implementing import! Imports code within the method.