Skip to content

Commit

Permalink
Add release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick91 committed Nov 8, 2024
1 parent a5c38d9 commit e03b32c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Release type: patch

This release fixes the following deprecation warning:

```
Failing to pass a value to the 'type_params' parameter of 'typing._eval_type' is deprecated,
as it leads to incorrect behaviour when calling typing._eval_type on a stringified annotation
that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
```

This was only trigger in Python 3.13 and above.
2 changes: 1 addition & 1 deletion strawberry/utils/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def eval_type(
assert ast_unparse
type_ = ForwardRef(ast_unparse(ast_obj))

extra = {}
extra: Dict[str, Any] = {}

if sys.version_info >= (3, 13):
extra = {"type_params": None}

Check warning on line 356 in strawberry/utils/typing.py

View check run for this annotation

Codecov / codecov/patch

strawberry/utils/typing.py#L356

Added line #L356 was not covered by tests
Expand Down

0 comments on commit e03b32c

Please sign in to comment.