-
-
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
Conversation
Okay, so #1679 resolves the unrelated mypy failure, which is now merged in. We've got a curious failure on the 3.10 test run, which I don't understand on first glance. |
It's due to Can I proceed? Reference: |
Yup, makes sense. I'm assuming you'll want to update this line: Line 23 in 4a3e5e1
Switching it to |
Now there's an issue with Reference: python-trio/trio#1899 |
Hrrrmmm.... I'm not entirely surprised that we've got a different failure there. After all, we will have pinned pytest for a reason. However, looking at the The pin was introduced in this commit but it doesn't have an associated PR, and doesn't include the rationale. (We're way cleaner on process here now, as things have evolved nicely) That one looks like it needs some further digging. |
I'd assume it's a pytest/trio interaction issue, rather than "an issue with trio" or "an issue with pytest", but... (?) |
Ah gotcha, thanks! |
Okay, so I think we're hard blocked by that one, on adding 3.10 to the matrix. Right? (Which is totally okay, just making sure we've got the same assessment on that.) |
Looks to me like python-trio/trio#1921 will resolve this, and seems pretty much good to go. |
@@ -14,7 +14,7 @@ jobs: | |||
|
|||
strategy: | |||
matrix: | |||
python-version: ["3.6", "3.7", "3.8", "3.9"] | |||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10.0-beta.2"] |
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.
# This allows the matrix to specify just the major.minor version while still
# expanding it to get the latest patch version including alpha releases.
# This avoids the need to update for each new alpha, beta, release candidate,
# and then finally an actual release version. actions/setup-python doesn't
# support this for PyPy presently so we get no help there.
#
# CPython -> 3.9.0-alpha - 3.9.X
# PyPy -> pypy-3.7
python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python), matrix.python))[startsWith(matrix.python, 'pypy')] }}
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.
Should I follow trios lead and use the same logic?
Perhaps, perhaps not, but either way let's not consider it as part of this pull request.
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Few questions, for thoroughness. 😁
- What's prompting this change?
- Is it strictly necessary for us to type this variable, here?
- Do we have a build failure without it?
- Can it simply be
str
?
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.
It's precisely because it identifies it as str
that we need it. This is the mypy issue:
+ 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have an alternative suggestion?
Nope. Just making sure I understand e'rything going in, and we've got a super clear history in place throughout. 😀
related: #1671 |
I just released Trio 0.19.0 with Python 3.10 support. ✨ |
👏 Fantastic, thanks @pquentin - I've triggered a test re-run now. |
Closes #1678.
EDIT: Failing due to
mypy
. - @KludexEDIT: Changed "Related to #...." to "Closes #...." - @tomchristie