Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
fd4ba3c5
Commit
fd4ba3c5
authored
Jul 25, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make 'basestring' usages compatible with Py2/Py3
parent
4c2b18da
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
0 deletions
+24
-0
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+5
-0
Cython/Distutils/build_ext.py
Cython/Distutils/build_ext.py
+5
-0
Cython/Shadow.py
Cython/Shadow.py
+7
-0
Cython/Utils.py
Cython/Utils.py
+7
-0
No files found.
Cython/Compiler/Main.py
View file @
fd4ba3c5
...
...
@@ -13,6 +13,11 @@ if sys.version_info[:2] < (2, 6) or (3, 0) <= sys.version_info[:2] < (3, 2):
sys
.
stderr
.
write
(
"Sorry, Cython requires Python 2.6+ or 3.2+, found %d.%d
\
n
"
%
tuple
(
sys
.
version_info
[:
2
]))
sys
.
exit
(
1
)
try
:
from
__builtin__
import
basestring
except
ImportError
:
basestring
=
str
from
.
import
Errors
# Do not import Parsing here, import it when needed, because Parsing imports
# Nodes, which globally needs debug command line options initialized to set a
...
...
Cython/Distutils/build_ext.py
View file @
fd4ba3c5
...
...
@@ -15,6 +15,11 @@ from distutils import log
from
distutils.command
import
build_ext
as
_build_ext
from
distutils
import
sysconfig
try
:
from
__builtin__
import
basestring
except
ImportError
:
basestring
=
str
extension_name_re
=
_build_ext
.
extension_name_re
show_compilers
=
_build_ext
.
show_compilers
...
...
Cython/Shadow.py
View file @
fd4ba3c5
# cython.* namespace for pure mode.
from
__future__
import
absolute_import
__version__
=
"0.23.beta1"
try
:
from
__builtin__
import
basestring
except
ImportError
:
basestring
=
str
# BEGIN shameless copy from Cython/minivect/minitypes.py
...
...
Cython/Utils.py
View file @
fd4ba3c5
...
...
@@ -3,6 +3,13 @@
# anywhere else in particular
#
from
__future__
import
absolute_import
try
:
from
__builtin__
import
basestring
except
ImportError
:
basestring
=
str
import
os
import
sys
import
re
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment