-
-
Notifications
You must be signed in to change notification settings - Fork 836
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
👷 Add Python 3.10 beta to the CI #1682
Changes from all commits
ae2ed62
96de53d
757ee0e
abe7a56
c8390f8
b89fbc3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
PrivateFormat, | ||
load_pem_private_key, | ||
) | ||
from typing_extensions import Literal | ||
from uvicorn.config import Config | ||
from uvicorn.main import Server | ||
|
||
|
@@ -164,7 +165,7 @@ async def redirect_301(scope, receive, send): | |
await send({"type": "http.response.body"}) | ||
|
||
|
||
SERVER_SCOPE = "session" | ||
SERVER_SCOPE: Literal["session"] = "session" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Few questions, for thoroughness. 😁
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's precisely because it identifies it as + mypy httpx tests
tests/conftest.py:170: error: No overload variant of "fixture" matches argument type "str"
tests/conftest.py:170: note: Possible overload variant:
tests/conftest.py:170: note: def fixture(fixture_function: None = ..., *, scope: Union[Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']], Callable[[str, Config], Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']]]] = ..., params: Optional[Iterable[object]] = ..., autouse: bool = ..., ids: Union[Iterable[Union[None, str, float, int, bool]], Callable[[Any], Optional[object]], None] = ..., name: Optional[str] = ...) -> FixtureFunctionMarker
tests/conftest.py:170: note: <1 more non-matching overload not shown>
tests/conftest.py:175: error: No overload variant of "fixture" matches argument type "str"
tests/conftest.py:175: note: Possible overload variant:
tests/conftest.py:175: note: def fixture(fixture_function: None = ..., *, scope: Union[Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']], Callable[[str, Config], Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']]]] = ..., params: Optional[Iterable[object]] = ..., autouse: bool = ..., ids: Union[Iterable[Union[None, str, float, int, bool]], Callable[[Any], Optional[object]], None] = ..., name: Optional[str] = ...) -> FixtureFunctionMarker
tests/conftest.py:175: note: <1 more non-matching overload not shown>
tests/conftest.py:181: error: No overload variant of "fixture" matches argument type "str"
tests/conftest.py:181: note: Possible overload variant:
tests/conftest.py:181: note: def fixture(fixture_function: None = ..., *, scope: Union[Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']], Callable[[str, Config], Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']]]] = ..., params: Optional[Iterable[object]] = ..., autouse: bool = ..., ids: Union[Iterable[Union[None, str, float, int, bool]], Callable[[Any], Optional[object]], None] = ..., name: Optional[str] = ...) -> FixtureFunctionMarker
tests/conftest.py:181: note: <1 more non-matching overload not shown>
tests/conftest.py:186: error: No overload variant of "fixture" matches argument type "str"
tests/conftest.py:186: note: Possible overload variant:
tests/conftest.py:186: note: def fixture(fixture_function: None = ..., *, scope: Union[Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']], Callable[[str, Config], Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']]]] = ..., params: Optional[Iterable[object]] = ..., autouse: bool = ..., ids: Union[Iterable[Union[None, str, float, int, bool]], Callable[[Any], Optional[object]], None] = ..., name: Optional[str] = ...) -> FixtureFunctionMarker
tests/conftest.py:186: note: <1 more non-matching overload not shown>
tests/conftest.py:192: error: No overload variant of "fixture" matches argument type "str"
tests/conftest.py:192: note: Possible overload variant:
tests/conftest.py:192: note: def fixture(fixture_function: None = ..., *, scope: Union[Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']], Callable[[str, Config], Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']]]] = ..., params: Optional[Iterable[object]] = ..., autouse: bool = ..., ids: Union[Iterable[Union[None, str, float, int, bool]], Callable[[Any], Optional[object]], None] = ..., name: Optional[str] = ...) -> FixtureFunctionMarker
tests/conftest.py:192: note: <1 more non-matching overload not shown>
tests/conftest.py:198: error: No overload variant of "fixture" matches argument type "str"
tests/conftest.py:198: note: Possible overload variant:
tests/conftest.py:198: note: def fixture(fixture_function: None = ..., *, scope: Union[Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']], Callable[[str, Config], Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']]]] = ..., params: Optional[Iterable[object]] = ..., autouse: bool = ..., ids: Union[Iterable[Union[None, str, float, int, bool]], Callable[[Any], Optional[object]], None] = ..., name: Optional[str] = ...) -> FixtureFunctionMarker
tests/conftest.py:198: note: <1 more non-matching overload not shown>
tests/conftest.py:274: error: No overload variant of "fixture" matches argument type "str"
tests/conftest.py:274: note: Possible overload variant:
tests/conftest.py:274: note: def fixture(fixture_function: None = ..., *, scope: Union[Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']], Callable[[str, Config], Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']]]] = ..., params: Optional[Iterable[object]] = ..., autouse: bool = ..., ids: Union[Iterable[Union[None, str, float, int, bool]], Callable[[Any], Optional[object]], None] = ..., name: Optional[str] = ...) -> FixtureFunctionMarker
tests/conftest.py:274: note: <1 more non-matching overload not shown>
tests/conftest.py:281: error: No overload variant of "fixture" matches argument type "str"
tests/conftest.py:281: note: Possible overload variant:
tests/conftest.py:281: note: def fixture(fixture_function: None = ..., *, scope: Union[Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']], Callable[[str, Config], Union[Literal['session'], Literal['package'], Literal['module'], Literal['class'], Literal['function']]]] = ..., params: Optional[Iterable[object]] = ..., autouse: bool = ..., ids: Union[Iterable[Union[None, str, float, int, bool]], Callable[[Any], Optional[object]], None] = ..., name: Optional[str] = ...) -> FixtureFunctionMarker
tests/conftest.py:281: note: <1 more non-matching overload not shown>
Found 8 errors in 1 file (checked 57 source files) Do you have an alternative suggestion? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Nope. Just making sure I understand e'rything going in, and we've got a super clear history in place throughout. 😀 |
||
|
||
|
||
@pytest.fixture(scope=SERVER_SCOPE) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just use
"3.10"
here?Why? / Why not?
Prompted by noticing the same in a Trio pull request.
Also, useful for context here... where does GitHub document the supported values for
python-version
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the extra bit in trio.
https://github.com/python-trio/trio/pull/1921/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR44-R52
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also https://github.com/actions/setup-python#available-versions-of-python and if you search for
range
you can see it show up in a couple comments. All around not entirely explicitly documented, but useful.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I follow
trio
s lead and use the same logic?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps, perhaps not, but either way let's not consider it as part of this pull request.