projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
769720a
)
safety import fix: 'io' isn't a very unique module name
author
Stefan Behnel
<scoder@users.berlios.de>
Fri, 16 Apr 2010 07:04:57 +0000
(09:04 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Fri, 16 Apr 2010 07:04:57 +0000
(09:04 +0200)
Cython/Utils.py
patch
|
blob
|
history
diff --git
a/Cython/Utils.py
b/Cython/Utils.py
index 91b8cf49f7850ec52e4449c07172d545af3dea4f..48877c7b212811d508b12a6a4d163be10be82330 100644
(file)
--- a/
Cython/Utils.py
+++ b/
Cython/Utils.py
@@
-130,10
+130,12
@@
class NormalisedNewlineStream(object):
data = self._read(0x1000)
return u''.join(content).split(u'\n')
-try:
- import io
-except ImportError:
- io = None
+io = None
+if sys.version_info >= (2,6):
+ try:
+ import io
+ except ImportError:
+ pass
def open_source_file(source_filename, mode="r",
encoding=None, error_handling=None,