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
2a8911c0
Kaydet (Commit)
2a8911c0
authored
Agu 04, 2015
tarafından
Yury Selivanov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
asyncio: Sync with upstream (compat module)
üst
996083d6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
16 deletions
+14
-16
base_events.py
Lib/asyncio/base_events.py
+2
-1
base_subprocess.py
Lib/asyncio/base_subprocess.py
+2
-2
proactor_events.py
Lib/asyncio/proactor_events.py
+2
-2
selector_events.py
Lib/asyncio/selector_events.py
+2
-2
sslproto.py
Lib/asyncio/sslproto.py
+2
-2
unix_events.py
Lib/asyncio/unix_events.py
+3
-2
test_subprocess.py
Lib/test/test_asyncio/test_subprocess.py
+1
-5
No files found.
Lib/asyncio/base_events.py
Dosyayı görüntüle @
2a8911c0
...
@@ -28,6 +28,7 @@ import traceback
...
@@ -28,6 +28,7 @@ import traceback
import
sys
import
sys
import
warnings
import
warnings
from
.
import
compat
from
.
import
coroutines
from
.
import
coroutines
from
.
import
events
from
.
import
events
from
.
import
futures
from
.
import
futures
...
@@ -378,7 +379,7 @@ class BaseEventLoop(events.AbstractEventLoop):
...
@@ -378,7 +379,7 @@ class BaseEventLoop(events.AbstractEventLoop):
# On Python 3.3 and older, objects with a destructor part of a reference
# On Python 3.3 and older, objects with a destructor part of a reference
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# to the PEP 442.
# to the PEP 442.
if
sys
.
version_info
>=
(
3
,
4
)
:
if
compat
.
PY34
:
def
__del__
(
self
):
def
__del__
(
self
):
if
not
self
.
is_closed
():
if
not
self
.
is_closed
():
warnings
.
warn
(
"unclosed event loop
%
r"
%
self
,
ResourceWarning
)
warnings
.
warn
(
"unclosed event loop
%
r"
%
self
,
ResourceWarning
)
...
...
Lib/asyncio/base_subprocess.py
Dosyayı görüntüle @
2a8911c0
import
collections
import
collections
import
subprocess
import
subprocess
import
sys
import
warnings
import
warnings
from
.
import
compat
from
.
import
futures
from
.
import
futures
from
.
import
protocols
from
.
import
protocols
from
.
import
transports
from
.
import
transports
...
@@ -116,7 +116,7 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
...
@@ -116,7 +116,7 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
# On Python 3.3 and older, objects with a destructor part of a reference
# On Python 3.3 and older, objects with a destructor part of a reference
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# to the PEP 442.
# to the PEP 442.
if
sys
.
version_info
>=
(
3
,
4
)
:
if
compat
.
PY34
:
def
__del__
(
self
):
def
__del__
(
self
):
if
not
self
.
_closed
:
if
not
self
.
_closed
:
warnings
.
warn
(
"unclosed transport
%
r"
%
self
,
ResourceWarning
)
warnings
.
warn
(
"unclosed transport
%
r"
%
self
,
ResourceWarning
)
...
...
Lib/asyncio/proactor_events.py
Dosyayı görüntüle @
2a8911c0
...
@@ -7,10 +7,10 @@ proactor is only implemented on Windows with IOCP.
...
@@ -7,10 +7,10 @@ proactor is only implemented on Windows with IOCP.
__all__
=
[
'BaseProactorEventLoop'
]
__all__
=
[
'BaseProactorEventLoop'
]
import
socket
import
socket
import
sys
import
warnings
import
warnings
from
.
import
base_events
from
.
import
base_events
from
.
import
compat
from
.
import
constants
from
.
import
constants
from
.
import
futures
from
.
import
futures
from
.
import
sslproto
from
.
import
sslproto
...
@@ -79,7 +79,7 @@ class _ProactorBasePipeTransport(transports._FlowControlMixin,
...
@@ -79,7 +79,7 @@ class _ProactorBasePipeTransport(transports._FlowControlMixin,
# On Python 3.3 and older, objects with a destructor part of a reference
# On Python 3.3 and older, objects with a destructor part of a reference
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# to the PEP 442.
# to the PEP 442.
if
sys
.
version_info
>=
(
3
,
4
)
:
if
compat
.
PY34
:
def
__del__
(
self
):
def
__del__
(
self
):
if
self
.
_sock
is
not
None
:
if
self
.
_sock
is
not
None
:
warnings
.
warn
(
"unclosed transport
%
r"
%
self
,
ResourceWarning
)
warnings
.
warn
(
"unclosed transport
%
r"
%
self
,
ResourceWarning
)
...
...
Lib/asyncio/selector_events.py
Dosyayı görüntüle @
2a8911c0
...
@@ -10,7 +10,6 @@ import collections
...
@@ -10,7 +10,6 @@ import collections
import
errno
import
errno
import
functools
import
functools
import
socket
import
socket
import
sys
import
warnings
import
warnings
try
:
try
:
import
ssl
import
ssl
...
@@ -18,6 +17,7 @@ except ImportError: # pragma: no cover
...
@@ -18,6 +17,7 @@ except ImportError: # pragma: no cover
ssl
=
None
ssl
=
None
from
.
import
base_events
from
.
import
base_events
from
.
import
compat
from
.
import
constants
from
.
import
constants
from
.
import
events
from
.
import
events
from
.
import
futures
from
.
import
futures
...
@@ -568,7 +568,7 @@ class _SelectorTransport(transports._FlowControlMixin,
...
@@ -568,7 +568,7 @@ class _SelectorTransport(transports._FlowControlMixin,
# On Python 3.3 and older, objects with a destructor part of a reference
# On Python 3.3 and older, objects with a destructor part of a reference
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# to the PEP 442.
# to the PEP 442.
if
sys
.
version_info
>=
(
3
,
4
)
:
if
compat
.
PY34
:
def
__del__
(
self
):
def
__del__
(
self
):
if
self
.
_sock
is
not
None
:
if
self
.
_sock
is
not
None
:
warnings
.
warn
(
"unclosed transport
%
r"
%
self
,
ResourceWarning
)
warnings
.
warn
(
"unclosed transport
%
r"
%
self
,
ResourceWarning
)
...
...
Lib/asyncio/sslproto.py
Dosyayı görüntüle @
2a8911c0
import
collections
import
collections
import
sys
import
warnings
import
warnings
try
:
try
:
import
ssl
import
ssl
except
ImportError
:
# pragma: no cover
except
ImportError
:
# pragma: no cover
ssl
=
None
ssl
=
None
from
.
import
compat
from
.
import
protocols
from
.
import
protocols
from
.
import
transports
from
.
import
transports
from
.log
import
logger
from
.log
import
logger
...
@@ -317,7 +317,7 @@ class _SSLProtocolTransport(transports._FlowControlMixin,
...
@@ -317,7 +317,7 @@ class _SSLProtocolTransport(transports._FlowControlMixin,
# On Python 3.3 and older, objects with a destructor part of a reference
# On Python 3.3 and older, objects with a destructor part of a reference
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# to the PEP 442.
# to the PEP 442.
if
sys
.
version_info
>=
(
3
,
4
)
:
if
compat
.
PY34
:
def
__del__
(
self
):
def
__del__
(
self
):
if
not
self
.
_closed
:
if
not
self
.
_closed
:
warnings
.
warn
(
"unclosed transport
%
r"
%
self
,
ResourceWarning
)
warnings
.
warn
(
"unclosed transport
%
r"
%
self
,
ResourceWarning
)
...
...
Lib/asyncio/unix_events.py
Dosyayı görüntüle @
2a8911c0
...
@@ -13,6 +13,7 @@ import warnings
...
@@ -13,6 +13,7 @@ import warnings
from
.
import
base_events
from
.
import
base_events
from
.
import
base_subprocess
from
.
import
base_subprocess
from
.
import
compat
from
.
import
constants
from
.
import
constants
from
.
import
coroutines
from
.
import
coroutines
from
.
import
events
from
.
import
events
...
@@ -370,7 +371,7 @@ class _UnixReadPipeTransport(transports.ReadTransport):
...
@@ -370,7 +371,7 @@ class _UnixReadPipeTransport(transports.ReadTransport):
# On Python 3.3 and older, objects with a destructor part of a reference
# On Python 3.3 and older, objects with a destructor part of a reference
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# to the PEP 442.
# to the PEP 442.
if
sys
.
version_info
>=
(
3
,
4
)
:
if
compat
.
PY34
:
def
__del__
(
self
):
def
__del__
(
self
):
if
self
.
_pipe
is
not
None
:
if
self
.
_pipe
is
not
None
:
warnings
.
warn
(
"unclosed transport
%
r"
%
self
,
ResourceWarning
)
warnings
.
warn
(
"unclosed transport
%
r"
%
self
,
ResourceWarning
)
...
@@ -555,7 +556,7 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
...
@@ -555,7 +556,7 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
# On Python 3.3 and older, objects with a destructor part of a reference
# On Python 3.3 and older, objects with a destructor part of a reference
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# cycle are never destroyed. It's not more the case on Python 3.4 thanks
# to the PEP 442.
# to the PEP 442.
if
sys
.
version_info
>=
(
3
,
4
)
:
if
compat
.
PY34
:
def
__del__
(
self
):
def
__del__
(
self
):
if
self
.
_pipe
is
not
None
:
if
self
.
_pipe
is
not
None
:
warnings
.
warn
(
"unclosed transport
%
r"
%
self
,
ResourceWarning
)
warnings
.
warn
(
"unclosed transport
%
r"
%
self
,
ResourceWarning
)
...
...
Lib/test/test_asyncio/test_subprocess.py
Dosyayı görüntüle @
2a8911c0
...
@@ -417,11 +417,7 @@ class SubprocessMixin:
...
@@ -417,11 +417,7 @@ class SubprocessMixin:
def
test_popen_error
(
self
):
def
test_popen_error
(
self
):
# Issue #24763: check that the subprocess transport is closed
# Issue #24763: check that the subprocess transport is closed
# when BaseSubprocessTransport fails
# when BaseSubprocessTransport fails
if
sys
.
platform
==
'win32'
:
with
mock
.
patch
(
'subprocess.Popen'
)
as
popen
:
target
=
'asyncio.windows_utils.Popen'
else
:
target
=
'subprocess.Popen'
with
mock
.
patch
(
target
)
as
popen
:
exc
=
ZeroDivisionError
exc
=
ZeroDivisionError
popen
.
side_effect
=
exc
popen
.
side_effect
=
exc
...
...
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