Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require typing_extensions for py<3.8 only #484

Merged
merged 1 commit into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/484.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do not require typing_extensions on Python 3.8 and newer.
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pytest-cov>=2.3.1
pytest==5.4.3
multidict==4.7.6
idna==2.10
typing_extensions==3.7.4.2
typing_extensions==3.7.4.2;python_version<"3.8"
-e .
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
except IndexError:
raise RuntimeError("Unable to determine version.")

install_requires = ["multidict>=4.0", "idna>=2.0", "typing_extensions>=3.7.4"]
install_requires = [
"multidict>=4.0",
"idna>=2.0",
'typing_extensions>=3.7.4;python_version<"3.8"',
]


def read(name):
Expand Down
7 changes: 6 additions & 1 deletion yarl/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
from typing import overload, Any, Tuple, Optional, Mapping, Union, Sequence, Type
from typing_extensions import TypedDict, Final, final
import multidict
from functools import _CacheInfo
import sys

if sys.version_info >= (3, 8):
from typing import TypedDict, Final, final
else:
from typing_extensions import TypedDict, Final, final

_QueryVariable = Union[str, int]
_Query = Union[
Expand Down