-
-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not strip the type when using auto (#2990)
- Loading branch information
1 parent
5c68c7e
commit 3c47ef7
Showing
4 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Release type: patch | ||
|
||
This release fixes an issue when trying to use `Annotated[strawberry.auto, ...]` | ||
on python 3.10 or older, which got evident after the fix from 0.196.1. | ||
|
||
Previously we were throwing the type away, since it usually is `Any`, but python | ||
3.10 and older will validate that the first argument passed for `Annotated` | ||
is callable (3.11+ does not do that anymore), and `StrawberryAuto` is not. | ||
|
||
This changes it to keep that `Any`, which is also what someone would expect | ||
when resolving the annotation using our custom `eval_type` function. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters