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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
3f130b73
Commit
3f130b73
authored
Apr 20, 2011
by
Mark Florisson
Committed by
Vitja Makarov
May 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Python 3 compatibility
parent
3b7426f5
Changes
2
Show 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 @
3f130b73
...
...
@@ -5999,6 +5999,9 @@ class ParallelRangeNode(ParallelStatNode):
self
.
is_nogil
=
self
.
kwargs
.
pop
(
'nogil'
,
False
)
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'
,
'runtime'
):
error
(
self
.
pos
,
"Invalid schedule argument to prange: %r"
%
...
...
tests/run/parallel.pyx
View file @
3f130b73
...
...
@@ -10,6 +10,12 @@ from libc.stdio cimport puts
import
sys
try
:
from
builtins
import
next
# Py3k
except
ImportError
:
def
next
(
it
):
return
it
.
next
()
#@cython.test_assert_path_exists(
# "//ParallelWithBlockNode//ParallelRangeNode[@schedule = 'dynamic']",
# "//GILStatNode[@state = 'nogil]//ParallelRangeNode")
...
...
@@ -163,7 +169,7 @@ def test_closure_parallel_privates():
yield
x
g
=
test_generator
()
print
g
.
next
(),
x
,
g
.
next
(
),
x
print
next
(
g
),
x
,
next
(
g
),
x
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