diff --git a/CHANGES/3468.bugfix b/CHANGES/3468.bugfix new file mode 100644 index 00000000000..4935e91770c --- /dev/null +++ b/CHANGES/3468.bugfix @@ -0,0 +1 @@ +Remove wildcard imports diff --git a/aiohttp/__init__.py b/aiohttp/__init__.py index 20f1580ae7e..5fba772dec0 100644 --- a/aiohttp/__init__.py +++ b/aiohttp/__init__.py @@ -3,20 +3,88 @@ # This relies on each of the submodules having an __all__ variable. from . import hdrs # noqa -from .client import * # noqa -from .client import ClientSession, ServerFingerprintMismatch # noqa -from .cookiejar import * # noqa -from .formdata import * # noqa -from .helpers import * # noqa +from .client import BaseConnector # noqa +from .client import ClientConnectionError # noqa +from .client import ClientConnectorCertificateError # noqa +from .client import ClientConnectorError # noqa +from .client import ClientConnectorSSLError # noqa +from .client import ClientError # noqa +from .client import ClientHttpProxyError # noqa +from .client import ClientOSError # noqa +from .client import ClientPayloadError # noqa +from .client import ClientProxyConnectionError # noqa +from .client import ClientRequest # noqa +from .client import ClientResponse # noqa +from .client import ClientResponseError # noqa +from .client import ClientSSLError # noqa +from .client import ClientSession # noqa +from .client import ClientTimeout # noqa +from .client import ClientWebSocketResponse # noqa +from .client import ContentTypeError # noqa +from .client import Fingerprint # noqa +from .client import InvalidURL # noqa +from .client import RequestInfo # noqa +from .client import ServerConnectionError # noqa +from .client import ServerDisconnectedError # noqa +from .client import ServerFingerprintMismatch # noqa +from .client import ServerTimeoutError # noqa +from .client import TCPConnector # noqa +from .client import UnixConnector # noqa +from .client import WSServerHandshakeError # noqa +from .client import request # noqa +from .cookiejar import CookieJar # noqa +from .cookiejar import DummyCookieJar # noqa +from .formdata import FormData # noqa +from .helpers import BasicAuth # noqa +from .helpers import ChainMapProxy # noqa from .http import (HttpVersion, HttpVersion10, HttpVersion11, # noqa WSMsgType, WSCloseCode, WSMessage, WebSocketError) # noqa -from .multipart import * # noqa -from .payload import * # noqa -from .payload_streamer import * # noqa -from .resolver import * # noqa -from .signals import * # noqa -from .streams import * # noqa -from .tracing import * # noqa +from .multipart import BadContentDispositionHeader # noqa +from .multipart import BadContentDispositionParam # noqa +from .multipart import BodyPartReader # noqa +from .multipart import MultipartReader # noqa +from .multipart import MultipartWriter # noqa +from .multipart import content_disposition_filename # noqa +from .multipart import parse_content_disposition # noqa +from .payload import AsyncIterablePayload # noqa +from .payload import BufferedReaderPayload # noqa +from .payload import BytesIOPayload # noqa +from .payload import BytesPayload # noqa +from .payload import IOBasePayload # noqa +from .payload import JsonPayload # noqa +from .payload import PAYLOAD_REGISTRY # noqa +from .payload import Payload # noqa +from .payload import StringIOPayload # noqa +from .payload import StringPayload # noqa +from .payload import TextIOPayload # noqa +from .payload import get_payload # noqa +from .payload import payload_type # noqa +from .payload_streamer import streamer # noqa +from .resolver import AsyncResolver # noqa +from .resolver import DefaultResolver # noqa +from .resolver import ThreadedResolver # noqa +from .signals import Signal # noqa +from .streams import DataQueue # noqa +from .streams import EMPTY_PAYLOAD # noqa +from .streams import EofStream # noqa +from .streams import FlowControlDataQueue # noqa +from .streams import StreamReader # noqa +from .tracing import TraceConfig # noqa +from .tracing import TraceConnectionCreateEndParams # noqa +from .tracing import TraceConnectionCreateStartParams # noqa +from .tracing import TraceConnectionQueuedEndParams # noqa +from .tracing import TraceConnectionQueuedStartParams # noqa +from .tracing import TraceConnectionReuseconnParams # noqa +from .tracing import TraceDnsCacheHitParams # noqa +from .tracing import TraceDnsCacheMissParams # noqa +from .tracing import TraceDnsResolveHostEndParams # noqa +from .tracing import TraceDnsResolveHostStartParams # noqa +from .tracing import TraceRequestChunkSentParams # noqa +from .tracing import TraceRequestEndParams # noqa +from .tracing import TraceRequestExceptionParams # noqa +from .tracing import TraceRequestRedirectParams # noqa +from .tracing import TraceRequestStartParams # noqa +from .tracing import TraceResponseChunkReceivedParams # noqa try: from .worker import GunicornWebWorker, GunicornUVLoopWebWorker # noqa diff --git a/aiohttp/client.py b/aiohttp/client.py index 11a9999447f..174dce0d335 100644 --- a/aiohttp/client.py +++ b/aiohttp/client.py @@ -20,15 +20,27 @@ from . import connector as connector_mod from . import hdrs, http, payload from .abc import AbstractCookieJar -from .client_exceptions import * # noqa +from .client_exceptions import ClientConnectionError # noqa +from .client_exceptions import ClientConnectorCertificateError # noqa +from .client_exceptions import ClientConnectorError # noqa +from .client_exceptions import ClientConnectorSSLError # noqa +from .client_exceptions import ClientHttpProxyError # noqa +from .client_exceptions import ClientPayloadError # noqa +from .client_exceptions import ClientProxyConnectionError # noqa +from .client_exceptions import ClientResponseError # noqa +from .client_exceptions import ClientSSLError # noqa +from .client_exceptions import ContentTypeError # noqa +from .client_exceptions import ServerConnectionError # noqa +from .client_exceptions import ServerDisconnectedError # noqa +from .client_exceptions import ServerFingerprintMismatch # noqa from .client_exceptions import (ClientError, ClientOSError, InvalidURL, ServerTimeoutError, TooManyRedirects, WSServerHandshakeError) -from .client_reqrep import * # noqa +from .client_reqrep import RequestInfo # noqa from .client_reqrep import (ClientRequest, ClientResponse, Fingerprint, _merge_ssl_params) from .client_ws import ClientWebSocketResponse -from .connector import * # noqa +from .connector import UnixConnector # noqa from .connector import BaseConnector, TCPConnector from .cookiejar import CookieJar from .helpers import (PY_36, BasicAuth, CeilTimeout, TimeoutHandle, diff --git a/aiohttp/web.py b/aiohttp/web.py index e2772199054..d73856c4a65 100644 --- a/aiohttp/web.py +++ b/aiohttp/web.py @@ -13,21 +13,106 @@ from .abc import AbstractAccessLogger from .helpers import all_tasks from .log import access_logger -from .web_app import * # noqa +from .web_app import CleanupError # noqa from .web_app import Application -from .web_exceptions import * # noqa -from .web_fileresponse import * # noqa +from .web_exceptions import HTTPAccepted # noqa +from .web_exceptions import HTTPBadGateway # noqa +from .web_exceptions import HTTPBadRequest # noqa +from .web_exceptions import HTTPClientError # noqa +from .web_exceptions import HTTPConflict # noqa +from .web_exceptions import HTTPCreated # noqa +from .web_exceptions import HTTPError # noqa +from .web_exceptions import HTTPException # noqa +from .web_exceptions import HTTPExpectationFailed # noqa +from .web_exceptions import HTTPFailedDependency # noqa +from .web_exceptions import HTTPForbidden # noqa +from .web_exceptions import HTTPFound # noqa +from .web_exceptions import HTTPGatewayTimeout # noqa +from .web_exceptions import HTTPGone # noqa +from .web_exceptions import HTTPInsufficientStorage # noqa +from .web_exceptions import HTTPInternalServerError # noqa +from .web_exceptions import HTTPLengthRequired # noqa +from .web_exceptions import HTTPMethodNotAllowed # noqa +from .web_exceptions import HTTPMisdirectedRequest # noqa +from .web_exceptions import HTTPMovedPermanently # noqa +from .web_exceptions import HTTPMultipleChoices # noqa +from .web_exceptions import HTTPNetworkAuthenticationRequired # noqa +from .web_exceptions import HTTPNoContent # noqa +from .web_exceptions import HTTPNonAuthoritativeInformation # noqa +from .web_exceptions import HTTPNotAcceptable # noqa +from .web_exceptions import HTTPNotExtended # noqa +from .web_exceptions import HTTPNotFound # noqa +from .web_exceptions import HTTPNotImplemented # noqa +from .web_exceptions import HTTPNotModified # noqa +from .web_exceptions import HTTPOk # noqa +from .web_exceptions import HTTPPartialContent # noqa +from .web_exceptions import HTTPPaymentRequired # noqa +from .web_exceptions import HTTPPermanentRedirect # noqa +from .web_exceptions import HTTPPreconditionFailed # noqa +from .web_exceptions import HTTPPreconditionRequired # noqa +from .web_exceptions import HTTPProxyAuthenticationRequired # noqa +from .web_exceptions import HTTPRedirection # noqa +from .web_exceptions import HTTPRequestEntityTooLarge # noqa +from .web_exceptions import HTTPRequestHeaderFieldsTooLarge # noqa +from .web_exceptions import HTTPRequestRangeNotSatisfiable # noqa +from .web_exceptions import HTTPRequestTimeout # noqa +from .web_exceptions import HTTPRequestURITooLong # noqa +from .web_exceptions import HTTPResetContent # noqa +from .web_exceptions import HTTPSeeOther # noqa +from .web_exceptions import HTTPServerError # noqa +from .web_exceptions import HTTPServiceUnavailable # noqa +from .web_exceptions import HTTPSuccessful # noqa +from .web_exceptions import HTTPTemporaryRedirect # noqa +from .web_exceptions import HTTPTooManyRequests # noqa +from .web_exceptions import HTTPUnauthorized # noqa +from .web_exceptions import HTTPUnavailableForLegalReasons # noqa +from .web_exceptions import HTTPUnprocessableEntity # noqa +from .web_exceptions import HTTPUnsupportedMediaType # noqa +from .web_exceptions import HTTPUpgradeRequired # noqa +from .web_exceptions import HTTPUseProxy # noqa +from .web_exceptions import HTTPVariantAlsoNegotiates # noqa +from .web_exceptions import HTTPVersionNotSupported # noqa +from .web_fileresponse import FileResponse # noqa from .web_log import AccessLogger -from .web_middlewares import * # noqa -from .web_protocol import * # noqa -from .web_request import * # noqa -from .web_response import * # noqa -from .web_routedef import * # noqa +from .web_middlewares import middleware, normalize_path_middleware # noqa +from .web_protocol import PayloadAccessError # noqa +from .web_protocol import RequestHandler # noqa +from .web_protocol import RequestPayloadError # noqa +from .web_request import BaseRequest, FileField, Request # noqa +from .web_response import ContentCoding # noqa +from .web_response import Response # noqa +from .web_response import StreamResponse # noqa +from .web_response import json_response # noqa +from .web_routedef import AbstractRouteDef # noqa +from .web_routedef import RouteDef # noqa +from .web_routedef import RouteTableDef # noqa +from .web_routedef import StaticDef # noqa +from .web_routedef import delete # noqa +from .web_routedef import get # noqa +from .web_routedef import head # noqa +from .web_routedef import options # noqa +from .web_routedef import patch # noqa +from .web_routedef import post # noqa +from .web_routedef import put # noqa +from .web_routedef import route # noqa +from .web_routedef import static # noqa +from .web_routedef import view # noqa from .web_runner import (AppRunner, BaseRunner, BaseSite, GracefulExit, # noqa ServerRunner, SockSite, TCPSite, UnixSite) -from .web_server import * # noqa -from .web_urldispatcher import * # noqa -from .web_ws import * # noqa +from .web_server import Server # noqa +from .web_urldispatcher import AbstractResource # noqa +from .web_urldispatcher import AbstractRoute # noqa +from .web_urldispatcher import DynamicResource # noqa +from .web_urldispatcher import PlainResource # noqa +from .web_urldispatcher import Resource # noqa +from .web_urldispatcher import ResourceRoute # noqa +from .web_urldispatcher import StaticResource # noqa +from .web_urldispatcher import UrlDispatcher # noqa +from .web_urldispatcher import UrlMappingMatchInfo # noqa +from .web_urldispatcher import View # noqa +from .web_ws import WebSocketReady # noqa +from .web_ws import WebSocketResponse # noqa +from .web_ws import WSMsgType # noqa __all__ = (web_protocol.__all__ +