File: improve-python3.13-compatibility.patch

package info (click to toggle)
pytorch-geometric 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,172 kB
  • sloc: python: 144,911; sh: 247; cpp: 27; makefile: 18; javascript: 16
file content (14 lines) | stat: -rw-r--r-- 636 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Description: Python 3.13 deprecates calling `_eval_type` without `type_params`.
Author: Dhyey Mavani <ddmavani2003@gmail.com>
Forwarded: https://github.com/pyg-team/pytorch_geometric/pull/10453
--- a/torch_geometric/inspector.py
+++ b/torch_geometric/inspector.py
@@ -430,7 +430,7 @@
     r"""Returns the type hint of a string."""
     if isinstance(value, str):
         value = typing.ForwardRef(value)
-    return typing._eval_type(value, _globals, None)  # type: ignore
+    return typing._eval_type(value, _globals, None, type_params=())  # type: ignore[attr-defined]
 
 
 def type_repr(obj: Any, _globals: Dict[str, Any]) -> str: