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 on py<3.8 only #269

Merged
merged 1 commit into from Jan 17, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion pytest_asyncio/plugin.py
Expand Up @@ -5,6 +5,7 @@
import functools
import inspect
import socket
import sys
import warnings
from typing import (
Any,
Expand All @@ -24,7 +25,11 @@
)

import pytest
from typing_extensions import Literal

if sys.version_info >= (3, 8):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can change this to use sys.hexversion or ImportError approach if you prefer.

from typing import Literal
else:
from typing_extensions import Literal

_R = TypeVar("_R")

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -39,7 +39,7 @@ setup_requires =

install_requires =
pytest >= 6.1.0
typing-extensions >= 4.0
typing-extensions >= 4.0; python_version < "3.8"

[options.extras_require]
testing =
Expand Down