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
Kirill Smelkov
cython
Commits
f875f4c2
Commit
f875f4c2
authored
Jan 29, 2020
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0.29.x'
parents
7d08a53c
e83ff762
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
2 deletions
+55
-2
CHANGES.rst
CHANGES.rst
+13
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-1
tests/run/async_def.pyx
tests/run/async_def.pyx
+35
-0
tests/run/test_coroutines_pep492.pyx
tests/run/test_coroutines_pep492.pyx
+5
-0
No files found.
CHANGES.rst
View file @
f875f4c2
...
...
@@ -169,9 +169,21 @@ Other changes
0.29.15
(
20
??-??-??)
====================
*
Crash
when
returning
a
temporary
Python
object
from
an
async
-
def
function
.
(
Github
issue
#
3337
)
*
Crash
when
using
``**
kwargs
``
in
generators
.
Patch
by
David
Woods
.
(
Github
issue
#
3265
)
*
Double
reference
free
in
``
__class__
``
cell
handling
for
``
super
()``
calls
.
(
Github
issue
#
3246
)
*
Import
failure
in
IPython
7.11
.
(
Github
issue
#
3297
)
*
Fixed
C
name
collision
in
the
auto
-
pickle
code
.
Patch
by
ThePrez
.
(
Github
issue
#
3238
)
*
Deprecated
import
failed
in
Python
3.9
.
(
Github
issue
#
3266
)
...
...
@@ -183,7 +195,7 @@ Bugs fixed
----------
*
The
generated
code
failed
to
initialise
the
``
tp_print
``
slot
in
CPython
3.8
.
Patches
by
Pablo
Galindo
and
Orivej
Desh
(
Github
issues
#
3171
,
#
3201
).
Patches
by
Pablo
Galindo
and
Orivej
Desh
.
(
Github
issues
#
3171
,
#
3201
)
*
``?``
for
``
bool
``
was
missing
from
the
supported
NumPy
dtypes
.
Patch
by
Max
Klein
.
(
Github
issue
#
2675
)
...
...
Cython/Compiler/Nodes.py
View file @
f875f4c2
...
...
@@ -6203,6 +6203,7 @@ class ReturnStatNode(StatNode):
rhs
=
value
,
code
=
code
,
have_gil
=
self
.
in_nogil_context
)
value
.
generate_post_assignment_code
(
code
)
elif
self
.
in_generator
:
# return value == raise StopIteration(value), but uncatchable
code
.
globalstate
.
use_utility_code
(
...
...
@@ -6216,7 +6217,7 @@ class ReturnStatNode(StatNode):
code
.
putln
(
"%s = %s;"
%
(
Naming
.
retval_cname
,
value
.
result_as
(
self
.
return_type
)))
value
.
generate_post_assignment_code
(
code
)
value
.
generate_post_assignment_code
(
code
)
value
.
free_temps
(
code
)
else
:
if
self
.
return_type
.
is_pyobject
:
...
...
tests/run/async_def.pyx
0 → 100644
View file @
f875f4c2
# cython: language_level=3, binding=True
# mode: run
# tag: pep492, await, gh3337
"""
Cython specific tests in addition to "test_coroutines_pep492.pyx"
(which is copied from CPython).
"""
import
sys
def
run_async
(
coro
):
#assert coro.__class__ is types.GeneratorType
assert
coro
.
__class__
.
__name__
in
(
'coroutine'
,
'_GeneratorWrapper'
),
coro
.
__class__
.
__name__
buffer
=
[]
result
=
None
while
True
:
try
:
buffer
.
append
(
coro
.
send
(
None
))
except
StopIteration
as
ex
:
result
=
ex
.
value
if
sys
.
version_info
>=
(
3
,
5
)
else
ex
.
args
[
0
]
if
ex
.
args
else
None
break
return
buffer
,
result
async
def
test_async_temp_gh3337
(
x
,
y
):
"""
>>> run_async(test_async_temp_gh3337(2, 3))
([], -1)
>>> run_async(test_async_temp_gh3337(3, 2))
([], 0)
"""
return
min
(
x
-
y
,
0
)
tests/run/test_coroutines_pep492.pyx
View file @
f875f4c2
...
...
@@ -2,6 +2,11 @@
# mode: run
# tag: pep492, pep530, asyncfor, await
###########
# This file is a copy of the corresponding test file in CPython.
# Please keep in sync and do not add non-upstream tests.
###########
import
re
import
gc
import
sys
...
...
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