Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
fa448de9
Kaydet (Commit)
fa448de9
authored
Mar 12, 2017
tarafından
Yury Selivanov
Kaydeden (comit)
GitHub
Mar 12, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix wrapping into StopIteration of return values in generators and coroutines (#644) (#647)
üst
aac875fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
test_coroutines.py
Lib/test/test_coroutines.py
+15
-0
NEWS
Misc/NEWS
+2
-0
genobject.c
Objects/genobject.c
+1
-2
No files found.
Lib/test/test_coroutines.py
Dosyayı görüntüle @
fa448de9
...
...
@@ -1103,6 +1103,21 @@ class CoroutineTest(unittest.TestCase):
"coroutine is being awaited already"
):
waiter
(
coro
)
.
send
(
None
)
def
test_await_16
(
self
):
# See https://bugs.python.org/issue29600 for details.
async
def
f
():
return
ValueError
()
async
def
g
():
try
:
raise
KeyError
except
:
return
await
f
()
_
,
result
=
run_async
(
g
())
self
.
assertIsNone
(
result
.
__context__
)
def
test_with_1
(
self
):
class
Manager
:
def
__init__
(
self
,
name
):
...
...
Misc/NEWS
Dosyayı görüntüle @
fa448de9
...
...
@@ -10,6 +10,8 @@ What's New in Python 3.6.1 final?
Core and Builtins
-----------------
- bpo-29600: Fix wrapping coroutine return values in StopIteration.
- bpo-29723: The ``sys.path[0]`` initialization change for bpo-29139 caused a
regression by revealing an inconsistency in how sys.path is initialized when
executing ``__main__`` from a zipfile, directory, or other import location.
...
...
Objects/genobject.c
Dosyayı görüntüle @
fa448de9
...
...
@@ -575,8 +575,7 @@ _PyGen_SetStopIterationValue(PyObject *value)
PyObject
*
e
;
if
(
value
==
NULL
||
(
!
PyTuple_Check
(
value
)
&&
!
PyObject_TypeCheck
(
value
,
(
PyTypeObject
*
)
PyExc_StopIteration
)))
(
!
PyTuple_Check
(
value
)
&&
!
PyExceptionInstance_Check
(
value
)))
{
/* Delay exception instantiation if we can */
PyErr_SetObject
(
PyExc_StopIteration
,
value
);
...
...
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