summaryrefslogtreecommitdiffstats
path: root/Lib/modulefinder.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-02-16 16:20:10 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-02-16 16:20:10 (GMT)
commit821d0f8b1f7666d1bc85ffdc8ca9cd4a64eaec17 (patch)
tree90947a9a2802b4aeb80786890e94b8d18eb270af /Lib/modulefinder.py
parentb7851694e0bcfad81844021da0dead4d0948c651 (diff)
downloadcpython-821d0f8b1f7666d1bc85ffdc8ca9cd4a64eaec17.zip
cpython-821d0f8b1f7666d1bc85ffdc8ca9cd4a64eaec17.tar.gz
cpython-821d0f8b1f7666d1bc85ffdc8ca9cd4a64eaec17.tar.bz2
no 2.3 compat in the py3k lib #3676
Diffstat (limited to 'Lib/modulefinder.py')
-rw-r--r--Lib/modulefinder.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
index 989172a..478c749 100644
--- a/Lib/modulefinder.py
+++ b/Lib/modulefinder.py
@@ -1,5 +1,4 @@
"""Find modules used by a script, using introspection."""
-# This module should be kept compatible with Python 2.2, see PEP 291.
from __future__ import generators
import dis
@@ -10,11 +9,7 @@ import sys
import types
import struct
-if hasattr(sys.__stdout__, "newlines"):
- READ_MODE = "U" # universal line endings
-else:
- # remain compatible with Python < 2.3
- READ_MODE = "r"
+READ_MODE = "rU"
# XXX Clean up once str8's cstor matches bytes.
LOAD_CONST = bytes([dis.opname.index('LOAD_CONST')])