Mercurial > cpython-lru_cache-weakref
diff Lib/modulefinder.py @ 51657:627db59031be
no 2.3 compat in the py3k lib #3676
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Mon, 16 Feb 2009 16:20:10 +0000 |
| parents | bd0e9a9cd283 |
| children | 61798f076676 9b66a9f137b6 |
line wrap: on
line diff
--- a/Lib/modulefinder.py Mon Feb 16 16:15:34 2009 +0000 +++ b/Lib/modulefinder.py Mon Feb 16 16:20:10 2009 +0000 @@ -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 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')])
