Remove asyncio event loop workaround for tornado (#4762)

* remove asyncio event loop workaround for tornado

* Update CHANGELOG.md
This commit is contained in:
Maximilian Hils 2021-08-18 16:12:39 +02:00 committed by GitHub
parent edbb3d6791
commit f9b63e973e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 17 deletions

View File

@ -3,6 +3,8 @@
## Unreleased: mitmproxy next ## Unreleased: mitmproxy next
* fix some responses not being decoded properly if the encoding was uppercase #4735 (@Mattwmaster58) * fix some responses not being decoded properly if the encoding was uppercase #4735 (@Mattwmaster58)
* Windows: Switch to Python's default asyncio event loop, which increases the number of sockets
that can be processed simultaneously.
## 4 August 2021: mitmproxy 7.0.2 ## 4 August 2021: mitmproxy 7.0.2

View File

@ -1,9 +0,0 @@
import asyncio
import sys
if sys.platform == 'win32':
# workaround for
# https://github.com/tornadoweb/tornado/issues/2751
# https://www.tornadoweb.org/en/stable/index.html#installation
# (copied multiple times in the codebase, please remove all occurrences)
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())

View File

@ -2,18 +2,10 @@ import asyncio
import json as _json import json as _json
import logging import logging
import os import os
import sys
from unittest import mock from unittest import mock
import pytest import pytest
if sys.platform == 'win32':
# workaround for
# https://github.com/tornadoweb/tornado/issues/2751
# https://www.tornadoweb.org/en/stable/index.html#installation
# (copied multiple times in the codebase, please remove all occurrences)
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
import tornado.testing # noqa import tornado.testing # noqa
from tornado import httpclient # noqa from tornado import httpclient # noqa
from tornado import websocket # noqa from tornado import websocket # noqa