Windows NT KAMIDAKI 10.0 build 19045 (Windows 10) AMD64
Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.3.9
Server IP : 192.168.3.16 & Your IP : 216.73.216.52
Domains :
Cant Read [ /etc/named.conf ]
User : SISTEMA
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
C: /
Users /
VEGETA /
Envs /
Pessoais /
Lib /
site-packages /
Delete
Unzip
Name
Size
Permission
Date
Action
Django-5.0.2.dist-info
[ DIR ]
drwxrwxrwx
2024-02-25 20:38
EasyProcess-1.1.dist-info
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
Flask-2.2.5.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:18
Jinja2-3.1.2.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:51
MarkupSafe-2.1.3.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:51
MouseInfo-0.1.3.dist-info
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
PIL
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
Pillow-9.5.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
PyAutoGUI-0.9.54.dist-info
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
PyGetWindow-0.0.9.dist-info
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
PyMsgBox-1.0.9.dist-info
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
PyMySQL-1.1.0.dist-info
[ DIR ]
drwxrwxrwx
2024-02-20 18:21
PyRect-0.2.0.dist-info
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
PyScreeze-0.1.29.dist-info
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
Werkzeug-2.2.3.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
__pycache__
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
_distutils_hack
[ DIR ]
drwxrwxrwx
2023-06-29 03:40
_plotly_future_
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
_plotly_utils
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
aiohttp
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
aiohttp-3.9.3.dist-info
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
aiosignal
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
aiosignal-1.3.1.dist-info
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
ansi2html
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
ansi2html-1.8.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
asgiref
[ DIR ]
drwxrwxrwx
2024-02-25 20:37
asgiref-3.7.2.dist-info
[ DIR ]
drwxrwxrwx
2024-02-25 20:37
attr
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
attrs
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
attrs-23.2.0.dist-info
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
bcrypt
[ DIR ]
drwxrwxrwx
2024-03-07 15:54
bcrypt-4.1.2.dist-info
[ DIR ]
drwxrwxrwx
2024-03-07 15:54
beautifulsoup4-4.12.2.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
blinker
[ DIR ]
drwxrwxrwx
2023-06-29 03:51
blinker-1.6.2.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:51
body
[ DIR ]
drwxrwxrwx
2024-03-12 18:33
body-0.1.dist-info
[ DIR ]
drwxrwxrwx
2024-03-12 18:33
bs4
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
certifi
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
certifi-2023.5.7.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
chardet
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
chardet-3.0.4.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
charset_normalizer
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
charset_normalizer-3.1.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
click
[ DIR ]
drwxrwxrwx
2023-06-29 03:51
click-8.1.3.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:51
colorama
[ DIR ]
drwxrwxrwx
2023-06-29 03:51
colorama-0.4.6.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:51
contourpy
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
contourpy-1.1.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
cycler-0.11.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
dash
[ DIR ]
drwxrwxrwx
2023-06-29 04:18
dash-2.11.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:18
dash_core_components
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
dash_core_components-2.0.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
dash_html_components
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
dash_html_components-2.0.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
dash_table
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
dash_table-5.0.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
dateutil
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
discord
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
discord-2.3.2.dist-info
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
discord.py-2.3.2.dist-info
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
django
[ DIR ]
drwxrwxrwx
2024-02-25 20:37
django_scheduler-0.10.1.dist-info
[ DIR ]
drwxrwxrwx
2024-02-25 20:38
easyprocess
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
entrypoint2
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
entrypoint2-1.1.dist-info
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
flask
[ DIR ]
drwxrwxrwx
2023-06-29 04:18
fontTools
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
fonttools-4.40.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
frozenlist
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
frozenlist-1.4.1.dist-info
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
game
[ DIR ]
drwxrwxrwx
2024-03-11 21:24
game-0.0.5.dist-info
[ DIR ]
drwxrwxrwx
2024-03-11 21:24
google-3.0.0.dist-info
[ DIR ]
drwxrwxrwx
2023-11-15 23:29
googlesearch
[ DIR ]
drwxrwxrwx
2023-11-15 23:29
googletrans
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
googletrans-3.0.0.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
h11
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
h11-0.9.0.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
h2
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
h2-3.2.0.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
hpack
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
hpack-3.0.0.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
hstspreload
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
hstspreload-2023.1.1.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
httpcore
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
httpcore-0.9.1.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
httpx
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
httpx-0.13.3.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
hyperframe
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
hyperframe-5.2.0.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
icalendar
[ DIR ]
drwxrwxrwx
2024-02-25 20:37
icalendar-5.0.11.dist-info
[ DIR ]
drwxrwxrwx
2024-02-25 20:37
icon
[ DIR ]
drwxrwxrwx
2024-03-05 14:04
icon-0.0.5.dist-info
[ DIR ]
drwxrwxrwx
2024-03-05 14:04
idna
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
idna-2.10.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
itsdangerous
[ DIR ]
drwxrwxrwx
2023-06-29 03:51
itsdangerous-2.1.2.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:51
jinja2
[ DIR ]
drwxrwxrwx
2023-06-29 03:51
jupyterlab_plotly
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
kiwisolver
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
kiwisolver-1.4.4.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
libretranslatepy
[ DIR ]
drwxrwxrwx
2023-11-15 23:30
libretranslatepy-2.1.1.dist-info
[ DIR ]
drwxrwxrwx
2023-11-15 23:30
lxml
[ DIR ]
drwxrwxrwx
2023-11-15 23:30
lxml-4.9.3.dist-info
[ DIR ]
drwxrwxrwx
2023-11-15 23:30
markupsafe
[ DIR ]
drwxrwxrwx
2023-06-29 03:51
matplotlib
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
matplotlib-3.7.1.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
matplotlib.libs
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
mouseinfo
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
mpl_toolkits
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
mss
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
mss-9.0.1.dist-info
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
multidict
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
multidict-6.0.5.dist-info
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
nest_asyncio-1.5.6.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
numpy
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
numpy-1.25.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
packaging
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
packaging-23.1.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
pandas
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
pandas-2.0.3.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
pexpect
[ DIR ]
drwxrwxrwx
2023-09-27 19:37
pexpect-4.8.0.dist-info
[ DIR ]
drwxrwxrwx
2023-09-27 19:37
pip
[ DIR ]
drwxrwxrwx
2023-06-29 03:40
pip-23.0.1.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:40
pkg_resources
[ DIR ]
drwxrwxrwx
2023-06-29 03:40
plotly
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
plotly-5.15.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:18
psutil
[ DIR ]
drwxrwxrwx
2023-11-20 14:08
psutil-5.9.6.dist-info
[ DIR ]
drwxrwxrwx
2023-11-20 14:08
ptyprocess
[ DIR ]
drwxrwxrwx
2023-09-27 19:37
ptyprocess-0.7.0.dist-info
[ DIR ]
drwxrwxrwx
2023-09-27 19:37
py4j
[ DIR ]
drwxrwxrwx
2023-10-10 16:08
py4j-0.10.9.7.dist-info
[ DIR ]
drwxrwxrwx
2023-10-10 16:08
pyautogui
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
pyfiglet
[ DIR ]
drwxrwxrwx
2024-02-26 00:55
pyfiglet-1.0.2.dist-info
[ DIR ]
drwxrwxrwx
2024-02-26 00:55
pygame
[ DIR ]
drwxrwxrwx
2023-06-29 04:25
pygame-2.5.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:25
pygetwindow
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
pymsgbox
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
pymysql
[ DIR ]
drwxrwxrwx
2024-02-20 18:21
pyparsing
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
pyparsing-3.1.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
pyperclip
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
pyperclip-1.8.2.dist-info
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
pyrect
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
pyscreenshot
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
pyscreenshot-3.1.dist-info
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
pyscreeze
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
pyspark
[ DIR ]
drwxrwxrwx
2023-10-10 16:09
pyspark-3.5.0.dist-info
[ DIR ]
drwxrwxrwx
2023-10-10 16:09
pystray
[ DIR ]
drwxrwxrwx
2024-03-05 14:09
pystray-0.19.5.dist-info
[ DIR ]
drwxrwxrwx
2024-03-05 14:09
python_dateutil-2.8.2.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
pytweening
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
pytweening-1.0.7.dist-info
[ DIR ]
drwxrwxrwx
2023-09-21 16:50
pytz
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
pytz-2023.3.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
requests
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
requests-2.31.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
retrying-1.3.4.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
rfc3986
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
rfc3986-1.5.0.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
scapy
[ DIR ]
drwxrwxrwx
2023-11-20 00:59
scapy-2.5.0.dist-info
[ DIR ]
drwxrwxrwx
2023-11-20 00:59
schedule
[ DIR ]
drwxrwxrwx
2024-02-25 20:38
setuptools
[ DIR ]
drwxrwxrwx
2023-09-21 16:49
setuptools-67.6.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:40
six-1.16.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:41
sniffio
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
sniffio-1.3.0.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
soupsieve
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
soupsieve-2.5.dist-info
[ DIR ]
drwxrwxrwx
2023-11-14 14:19
sqlparse
[ DIR ]
drwxrwxrwx
2024-02-25 20:37
sqlparse-0.4.4.dist-info
[ DIR ]
drwxrwxrwx
2024-02-25 20:37
startrek
[ DIR ]
drwxrwxrwx
2023-11-20 01:28
startrek-0.4.2.dist-info
[ DIR ]
drwxrwxrwx
2023-11-20 01:28
tabulate
[ DIR ]
drwxrwxrwx
2024-03-12 19:19
tabulate-0.9.0.dist-info
[ DIR ]
drwxrwxrwx
2024-03-12 19:19
tcp
[ DIR ]
drwxrwxrwx
2023-11-20 01:28
tcp-0.4.1.dist-info
[ DIR ]
drwxrwxrwx
2023-11-20 01:28
telnetlib3
[ DIR ]
drwxrwxrwx
2023-09-21 15:21
telnetlib3-2.0.4.dist-info
[ DIR ]
drwxrwxrwx
2023-09-21 15:21
tenacity
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
tenacity-8.2.2.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
test
[ DIR ]
drwxrwxrwx
2023-11-20 00:59
tests
[ DIR ]
drwxrwxrwx
2024-02-25 20:38
translate
[ DIR ]
drwxrwxrwx
2023-11-15 23:30
translate-3.6.1.dist-info
[ DIR ]
drwxrwxrwx
2023-11-15 23:30
typing_extensions-4.7.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
tzdata
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
tzdata-2023.3.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
udp
[ DIR ]
drwxrwxrwx
2023-11-20 01:28
udp-0.5.10.dist-info
[ DIR ]
drwxrwxrwx
2023-11-20 01:28
urllib3
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
urllib3-2.0.3.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
urwid
[ DIR ]
drwxrwxrwx
2024-03-12 18:32
urwid-2.6.8.dist-info
[ DIR ]
drwxrwxrwx
2024-03-12 18:32
wcwidth
[ DIR ]
drwxrwxrwx
2024-03-12 18:32
wcwidth-0.2.13.dist-info
[ DIR ]
drwxrwxrwx
2024-03-12 18:32
werkzeug
[ DIR ]
drwxrwxrwx
2023-06-29 04:17
wheel
[ DIR ]
drwxrwxrwx
2023-09-21 16:49
wheel-0.40.0.dist-info
[ DIR ]
drwxrwxrwx
2023-06-29 03:40
yarl
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
yarl-1.9.4.dist-info
[ DIR ]
drwxrwxrwx
2024-02-20 18:30
_virtualenv.pth
18
B
-rw-rw-rw-
2023-06-29 03:40
_virtualenv.py
5.63
KB
-rw-rw-rw-
2023-06-29 03:40
cycler.py
14.18
KB
-rw-rw-rw-
2023-06-29 03:41
distutils-precedence.pth
151
B
-rw-rw-rw-
2023-06-29 03:40
matplotlib-3.7.1-py3.11-nspkg.pth
570
B
-rw-rw-rw-
2023-06-29 03:41
nest_asyncio.py
7.6
KB
-rw-rw-rw-
2023-06-29 04:17
pip-23.0.1.virtualenv
0
B
-rw-rw-rw-
2023-06-29 03:40
pylab.py
93
B
-rw-rw-rw-
2023-06-29 03:41
retrying.py
11
KB
-rw-rw-rw-
2023-06-29 04:17
setuptools-67.6.0.virtualenv
0
B
-rw-rw-rw-
2023-06-29 03:40
six.py
33.74
KB
-rw-rw-rw-
2023-06-29 03:41
typing_extensions.py
107.76
KB
-rw-rw-rw-
2023-06-29 04:17
wheel-0.40.0.virtualenv
0
B
-rw-rw-rw-
2023-06-29 03:40
Save
Rename
"""Patch asyncio to allow nested event loops.""" import asyncio import asyncio.events as events import os import sys import threading from contextlib import contextmanager, suppress from heapq import heappop def apply(loop=None): """Patch asyncio to make its event loop reentrant.""" _patch_asyncio() _patch_task() _patch_tornado() loop = loop or asyncio.get_event_loop() _patch_loop(loop) def _patch_asyncio(): """Patch asyncio module to use pure Python tasks and futures.""" def run(main, *, debug=False): try: loop = asyncio.get_event_loop() except RuntimeError: loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) _patch_loop(loop) loop.set_debug(debug) task = asyncio.ensure_future(main) try: return loop.run_until_complete(task) finally: if not task.done(): task.cancel() with suppress(asyncio.CancelledError): loop.run_until_complete(task) def _get_event_loop(stacklevel=3): loop = events._get_running_loop() if loop is None: loop = events.get_event_loop_policy().get_event_loop() return loop # Use module level _current_tasks, all_tasks and patch run method. if hasattr(asyncio, '_nest_patched'): return if sys.version_info >= (3, 6, 0): asyncio.Task = asyncio.tasks._CTask = asyncio.tasks.Task = \ asyncio.tasks._PyTask asyncio.Future = asyncio.futures._CFuture = asyncio.futures.Future = \ asyncio.futures._PyFuture if sys.version_info < (3, 7, 0): asyncio.tasks._current_tasks = asyncio.tasks.Task._current_tasks asyncio.all_tasks = asyncio.tasks.Task.all_tasks if sys.version_info >= (3, 9, 0): events._get_event_loop = events.get_event_loop = \ asyncio.get_event_loop = _get_event_loop _get_event_loop asyncio.run = run asyncio._nest_patched = True def _patch_loop(loop): """Patch loop to make it reentrant.""" def run_forever(self): with manage_run(self), manage_asyncgens(self): while True: self._run_once() if self._stopping: break self._stopping = False def run_until_complete(self, future): with manage_run(self): f = asyncio.ensure_future(future, loop=self) if f is not future: f._log_destroy_pending = False while not f.done(): self._run_once() if self._stopping: break if not f.done(): raise RuntimeError( 'Event loop stopped before Future completed.') return f.result() def _run_once(self): """ Simplified re-implementation of asyncio's _run_once that runs handles as they become ready. """ ready = self._ready scheduled = self._scheduled while scheduled and scheduled[0]._cancelled: heappop(scheduled) timeout = ( 0 if ready or self._stopping else min(max( scheduled[0]._when - self.time(), 0), 86400) if scheduled else None) event_list = self._selector.select(timeout) self._process_events(event_list) end_time = self.time() + self._clock_resolution while scheduled and scheduled[0]._when < end_time: handle = heappop(scheduled) ready.append(handle) for _ in range(len(ready)): if not ready: break handle = ready.popleft() if not handle._cancelled: handle._run() handle = None @contextmanager def manage_run(self): """Set up the loop for running.""" self._check_closed() old_thread_id = self._thread_id old_running_loop = events._get_running_loop() try: self._thread_id = threading.get_ident() events._set_running_loop(self) self._num_runs_pending += 1 if self._is_proactorloop: if self._self_reading_future is None: self.call_soon(self._loop_self_reading) yield finally: self._thread_id = old_thread_id events._set_running_loop(old_running_loop) self._num_runs_pending -= 1 if self._is_proactorloop: if (self._num_runs_pending == 0 and self._self_reading_future is not None): ov = self._self_reading_future._ov self._self_reading_future.cancel() if ov is not None: self._proactor._unregister(ov) self._self_reading_future = None @contextmanager def manage_asyncgens(self): if not hasattr(sys, 'get_asyncgen_hooks'): # Python version is too old. return old_agen_hooks = sys.get_asyncgen_hooks() try: self._set_coroutine_origin_tracking(self._debug) if self._asyncgens is not None: sys.set_asyncgen_hooks( firstiter=self._asyncgen_firstiter_hook, finalizer=self._asyncgen_finalizer_hook) yield finally: self._set_coroutine_origin_tracking(False) if self._asyncgens is not None: sys.set_asyncgen_hooks(*old_agen_hooks) def _check_running(self): """Do not throw exception if loop is already running.""" pass if hasattr(loop, '_nest_patched'): return if not isinstance(loop, asyncio.BaseEventLoop): raise ValueError('Can\'t patch loop of type %s' % type(loop)) cls = loop.__class__ cls.run_forever = run_forever cls.run_until_complete = run_until_complete cls._run_once = _run_once cls._check_running = _check_running cls._check_runnung = _check_running # typo in Python 3.7 source cls._num_runs_pending = 0 cls._is_proactorloop = ( os.name == 'nt' and issubclass(cls, asyncio.ProactorEventLoop)) if sys.version_info < (3, 7, 0): cls._set_coroutine_origin_tracking = cls._set_coroutine_wrapper cls._nest_patched = True def _patch_task(): """Patch the Task's step and enter/leave methods to make it reentrant.""" def step(task, exc=None): curr_task = curr_tasks.get(task._loop) try: step_orig(task, exc) finally: if curr_task is None: curr_tasks.pop(task._loop, None) else: curr_tasks[task._loop] = curr_task Task = asyncio.Task if hasattr(Task, '_nest_patched'): return if sys.version_info >= (3, 7, 0): def enter_task(loop, task): curr_tasks[loop] = task def leave_task(loop, task): curr_tasks.pop(loop, None) asyncio.tasks._enter_task = enter_task asyncio.tasks._leave_task = leave_task curr_tasks = asyncio.tasks._current_tasks step_orig = Task._Task__step Task._Task__step = step else: curr_tasks = Task._current_tasks step_orig = Task._step Task._step = step Task._nest_patched = True def _patch_tornado(): """ If tornado is imported before nest_asyncio, make tornado aware of the pure-Python asyncio Future. """ if 'tornado' in sys.modules: import tornado.concurrent as tc # type: ignore tc.Future = asyncio.Future if asyncio.Future not in tc.FUTURES: tc.FUTURES += (asyncio.Future,)