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
2d3e49a1
Commit
2d3e49a1
authored
Apr 20, 2011
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Python 3 compatibility
parent
a578b2a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+3
-0
tests/run/parallel.pyx
tests/run/parallel.pyx
+7
-1
No files found.
Cython/Compiler/Nodes.py
View file @
2d3e49a1
...
@@ -5993,6 +5993,9 @@ class ParallelRangeNode(ParallelStatNode):
...
@@ -5993,6 +5993,9 @@ class ParallelRangeNode(ParallelStatNode):
self
.
is_nogil
=
self
.
kwargs
.
pop
(
'nogil'
,
False
)
self
.
is_nogil
=
self
.
kwargs
.
pop
(
'nogil'
,
False
)
self
.
schedule
=
self
.
kwargs
.
pop
(
'schedule'
,
None
)
self
.
schedule
=
self
.
kwargs
.
pop
(
'schedule'
,
None
)
if
hasattr
(
self
.
schedule
,
'decode'
):
self
.
schedule
=
self
.
schedule
.
decode
(
'ascii'
)
if
self
.
schedule
not
in
(
None
,
'static'
,
'dynamic'
,
'guided'
,
if
self
.
schedule
not
in
(
None
,
'static'
,
'dynamic'
,
'guided'
,
'runtime'
):
'runtime'
):
error
(
self
.
pos
,
"Invalid schedule argument to prange: %r"
%
error
(
self
.
pos
,
"Invalid schedule argument to prange: %r"
%
...
...
tests/run/parallel.pyx
View file @
2d3e49a1
...
@@ -10,6 +10,12 @@ from libc.stdio cimport puts
...
@@ -10,6 +10,12 @@ from libc.stdio cimport puts
import
sys
import
sys
try
:
from
builtins
import
next
# Py3k
except
ImportError
:
def
next
(
it
):
return
it
.
next
()
#@cython.test_assert_path_exists(
#@cython.test_assert_path_exists(
# "//ParallelWithBlockNode//ParallelRangeNode[@schedule = 'dynamic']",
# "//ParallelWithBlockNode//ParallelRangeNode[@schedule = 'dynamic']",
# "//GILStatNode[@state = 'nogil]//ParallelRangeNode")
# "//GILStatNode[@state = 'nogil]//ParallelRangeNode")
...
@@ -163,7 +169,7 @@ def test_closure_parallel_privates():
...
@@ -163,7 +169,7 @@ def test_closure_parallel_privates():
yield
x
yield
x
g
=
test_generator
()
g
=
test_generator
()
print
g
.
next
(),
x
,
g
.
next
(
),
x
print
next
(
g
),
x
,
next
(
g
),
x
def
test_pure_mode
():
def
test_pure_mode
():
"""
"""
...
...
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