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
9c23b173
Kaydet (Commit)
9c23b173
authored
Eki 19, 2017
tarafından
Miss Islington (bot)
Kaydeden (comit)
Yury Selivanov
Eki 19, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-31632: fix set_protocol() in _SSLProtocolTransport (GH-3817) (GH-3817) (#4052)
(cherry picked from commit
ea2ef5d0
)
üst
4d9a8f22
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
6 deletions
+15
-6
sslproto.py
Lib/asyncio/sslproto.py
+4
-6
test_sslproto.py
Lib/test/test_asyncio/test_sslproto.py
+8
-0
ACKS
Misc/ACKS
+1
-0
2017-10-04-11-37-14.bpo-31632.LiOC3C.rst
...S.d/next/Library/2017-10-04-11-37-14.bpo-31632.LiOC3C.rst
+2
-0
No files found.
Lib/asyncio/sslproto.py
Dosyayı görüntüle @
9c23b173
...
...
@@ -294,11 +294,10 @@ class _SSLPipe(object):
class
_SSLProtocolTransport
(
transports
.
_FlowControlMixin
,
transports
.
Transport
):
def
__init__
(
self
,
loop
,
ssl_protocol
,
app_protocol
):
def
__init__
(
self
,
loop
,
ssl_protocol
):
self
.
_loop
=
loop
# SSLProtocol instance
self
.
_ssl_protocol
=
ssl_protocol
self
.
_app_protocol
=
app_protocol
self
.
_closed
=
False
def
get_extra_info
(
self
,
name
,
default
=
None
):
...
...
@@ -306,10 +305,10 @@ class _SSLProtocolTransport(transports._FlowControlMixin,
return
self
.
_ssl_protocol
.
_get_extra_info
(
name
,
default
)
def
set_protocol
(
self
,
protocol
):
self
.
_app_protocol
=
protocol
self
.
_
ssl_protocol
.
_
app_protocol
=
protocol
def
get_protocol
(
self
):
return
self
.
_app_protocol
return
self
.
_
ssl_protocol
.
_
app_protocol
def
is_closing
(
self
):
return
self
.
_closed
...
...
@@ -436,8 +435,7 @@ class SSLProtocol(protocols.Protocol):
self
.
_waiter
=
waiter
self
.
_loop
=
loop
self
.
_app_protocol
=
app_protocol
self
.
_app_transport
=
_SSLProtocolTransport
(
self
.
_loop
,
self
,
self
.
_app_protocol
)
self
.
_app_transport
=
_SSLProtocolTransport
(
self
.
_loop
,
self
)
# _SSLPipe instance (None until the connection is made)
self
.
_sslpipe
=
None
self
.
_session_established
=
False
...
...
Lib/test/test_asyncio/test_sslproto.py
Dosyayı görüntüle @
9c23b173
...
...
@@ -121,6 +121,14 @@ class SslProtoHandshakeTests(test_utils.TestCase):
ssl_proto
.
connection_lost
(
None
)
self
.
assertIsNone
(
ssl_proto
.
_get_extra_info
(
'socket'
))
def
test_set_new_app_protocol
(
self
):
waiter
=
asyncio
.
Future
(
loop
=
self
.
loop
)
ssl_proto
=
self
.
ssl_protocol
(
waiter
)
new_app_proto
=
asyncio
.
Protocol
()
ssl_proto
.
_app_transport
.
set_protocol
(
new_app_proto
)
self
.
assertIs
(
ssl_proto
.
_app_transport
.
get_protocol
(),
new_app_proto
)
self
.
assertIs
(
ssl_proto
.
_app_protocol
,
new_app_proto
)
if
__name__
==
'__main__'
:
unittest
.
main
()
Misc/ACKS
Dosyayı görüntüle @
9c23b173
...
...
@@ -849,6 +849,7 @@ Vladimir Kushnir
Erno Kuusela
Ross Lagerwall
Cameron Laird
Loïc Lajeanne
David Lam
Thomas Lamb
Valerie Lambert
...
...
Misc/NEWS.d/next/Library/2017-10-04-11-37-14.bpo-31632.LiOC3C.rst
0 → 100644
Dosyayı görüntüle @
9c23b173
Fix method set_protocol() of class _SSLProtocolTransport in asyncio module.
This method was previously modifying a wrong reference to the protocol.
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