From 5dd448d4d0a05c93beb727113b43139eccb4e257 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Wed, 12 Jul 2017 18:22:04 -0700 Subject: [PATCH 1/4] First part of 'as id' fixes --- stdlib/3.4/asyncio/futures.pyi | 2 +- stdlib/3/json/__init__.pyi | 6 +++--- third_party/2and3/click/globals.pyi | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/stdlib/3.4/asyncio/futures.pyi b/stdlib/3.4/asyncio/futures.pyi index 00086f45a786..050b789a1c70 100644 --- a/stdlib/3.4/asyncio/futures.pyi +++ b/stdlib/3.4/asyncio/futures.pyi @@ -1,5 +1,5 @@ import sys -from typing import Any, Union, Callable, TypeVar, List, Generic, Iterable, Generator, Awaitable +from typing import Any, Union, Callable, TypeVar, List, Generic, Iterable, Generator, Awaitable as Awaitable from .events import AbstractEventLoop from concurrent.futures import ( CancelledError as CancelledError, diff --git a/stdlib/3/json/__init__.pyi b/stdlib/3/json/__init__.pyi index ccd121dc9160..c68705d672f9 100644 --- a/stdlib/3/json/__init__.pyi +++ b/stdlib/3/json/__init__.pyi @@ -1,10 +1,10 @@ import sys from typing import Any, IO, Optional, Tuple, Callable, Dict, List, Union -from .decoder import JSONDecoder -from .encoder import JSONEncoder +from .decoder import JSONDecoder as JSONDecoder +from .encoder import JSONEncoder as JSONEncoder if sys.version_info >= (3, 5): - from .decoder import JSONDecodeError + from .decoder import JSONDecodeError as JSONDecodeError def dumps(obj: Any, skipkeys: bool = ..., diff --git a/third_party/2and3/click/globals.pyi b/third_party/2and3/click/globals.pyi index b5a113e5e257..816d393d8f2f 100644 --- a/third_party/2and3/click/globals.pyi +++ b/third_party/2and3/click/globals.pyi @@ -1,4 +1,5 @@ -from click.core import Optional, Context +from click.core import Context +from typing import Optional def get_current_context(silent: bool = False) -> Context: From 589faaef8dbf5d5dfd696e650166875e814f43c3 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Wed, 12 Jul 2017 18:39:27 -0700 Subject: [PATCH 2/4] Second part of 'as id' fixes --- third_party/2and3/jinja2/utils.pyi | 2 +- .../2and3/requests/packages/urllib3/__init__.pyi | 6 +++--- .../requests/packages/urllib3/util/__init__.pyi | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/third_party/2and3/jinja2/utils.pyi b/third_party/2and3/jinja2/utils.pyi index 7a0f1a971224..7cff2cc9847e 100644 --- a/third_party/2and3/jinja2/utils.pyi +++ b/third_party/2and3/jinja2/utils.pyi @@ -1,6 +1,6 @@ from typing import Any, Optional -from markupsafe import Markup, escape, soft_unicode +from markupsafe import Markup as Markup, escape as escape, soft_unicode as soft_unicode missing = ... # type: Any internal_code = ... # type: Any diff --git a/third_party/2and3/requests/packages/urllib3/__init__.pyi b/third_party/2and3/requests/packages/urllib3/__init__.pyi index 185752789cae..6226b3e92215 100644 --- a/third_party/2and3/requests/packages/urllib3/__init__.pyi +++ b/third_party/2and3/requests/packages/urllib3/__init__.pyi @@ -1,8 +1,8 @@ from typing import Any from . import connectionpool -from . import filepost -from . import poolmanager -from . import response +from . import filepost as filepost +from . import poolmanager as poolmanager +from . import response as response from .util import request as _request from .util import url from .util import timeout diff --git a/third_party/2and3/requests/packages/urllib3/util/__init__.pyi b/third_party/2and3/requests/packages/urllib3/util/__init__.pyi index 53bdac9b9275..2f5b0c6b6c71 100644 --- a/third_party/2and3/requests/packages/urllib3/util/__init__.pyi +++ b/third_party/2and3/requests/packages/urllib3/util/__init__.pyi @@ -1,10 +1,10 @@ -from . import connection -from . import request -from . import response -from . import ssl_ -from . import timeout -from . import retry -from . import url +from . import connection as connection +from . import request as request +from . import response as response +from . import ssl_ as ssl_ +from . import timeout as timeout +from . import retry as retry +from . import url as url import ssl is_connection_dropped = connection.is_connection_dropped From debedbe848a0a02a58f975b280d158d979287cb3 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Thu, 13 Jul 2017 05:14:24 -0700 Subject: [PATCH 3/4] Rever some chages (child modules imports) --- .../2and3/requests/packages/urllib3/__init__.pyi | 6 +++--- .../requests/packages/urllib3/util/__init__.pyi | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/third_party/2and3/requests/packages/urllib3/__init__.pyi b/third_party/2and3/requests/packages/urllib3/__init__.pyi index 6226b3e92215..185752789cae 100644 --- a/third_party/2and3/requests/packages/urllib3/__init__.pyi +++ b/third_party/2and3/requests/packages/urllib3/__init__.pyi @@ -1,8 +1,8 @@ from typing import Any from . import connectionpool -from . import filepost as filepost -from . import poolmanager as poolmanager -from . import response as response +from . import filepost +from . import poolmanager +from . import response from .util import request as _request from .util import url from .util import timeout diff --git a/third_party/2and3/requests/packages/urllib3/util/__init__.pyi b/third_party/2and3/requests/packages/urllib3/util/__init__.pyi index 2f5b0c6b6c71..53bdac9b9275 100644 --- a/third_party/2and3/requests/packages/urllib3/util/__init__.pyi +++ b/third_party/2and3/requests/packages/urllib3/util/__init__.pyi @@ -1,10 +1,10 @@ -from . import connection as connection -from . import request as request -from . import response as response -from . import ssl_ as ssl_ -from . import timeout as timeout -from . import retry as retry -from . import url as url +from . import connection +from . import request +from . import response +from . import ssl_ +from . import timeout +from . import retry +from . import url import ssl is_connection_dropped = connection.is_connection_dropped From f9bac53452de82f0e9eeb507310f101a4d414d4c Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Thu, 13 Jul 2017 05:19:27 -0700 Subject: [PATCH 4/4] Fix asyncio.futures.Awaitable (which is absent) --- stdlib/3.4/asyncio/futures.pyi | 2 +- stdlib/3.4/asyncio/locks.pyi | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/3.4/asyncio/futures.pyi b/stdlib/3.4/asyncio/futures.pyi index 050b789a1c70..00086f45a786 100644 --- a/stdlib/3.4/asyncio/futures.pyi +++ b/stdlib/3.4/asyncio/futures.pyi @@ -1,5 +1,5 @@ import sys -from typing import Any, Union, Callable, TypeVar, List, Generic, Iterable, Generator, Awaitable as Awaitable +from typing import Any, Union, Callable, TypeVar, List, Generic, Iterable, Generator, Awaitable from .events import AbstractEventLoop from concurrent.futures import ( CancelledError as CancelledError, diff --git a/stdlib/3.4/asyncio/locks.pyi b/stdlib/3.4/asyncio/locks.pyi index 16cb02b30434..837c50c2d425 100644 --- a/stdlib/3.4/asyncio/locks.pyi +++ b/stdlib/3.4/asyncio/locks.pyi @@ -1,8 +1,8 @@ -from typing import Any, Callable, Generator, Iterable, Iterator, List, Type, TypeVar, Union, Optional +from typing import Any, Callable, Generator, Iterable, Iterator, List, Type, TypeVar, Union, Optional, Awaitable from .coroutines import coroutine from .events import AbstractEventLoop -from .futures import Future, Awaitable +from .futures import Future from types import TracebackType _T = TypeVar('_T')