From 08dbc4f996e4e95f3ab64f7bb3e1193700c585f5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 21 Feb 2021 21:21:18 +1100 Subject: PyAPI: use postponed annotations to support Python 3.10 Support Python 3.10a5 or 3.9x with support explicitly enabled. - Enable Python's postponed annotations for Blender's RNA classes types registered on startup. - Using postponed annotations has implications for how they are defined, since they must evaluate in the modules name-space instead of the classes name-space. See changes to annotations in `release/scripts`. - Use `from __future__ import annotations` at the top of the module to ensure the script will run with Python 3.10. - Old logic is kept since it could be used if PEP-649 is supported. Resolves T83626 Ref D10474 --- intern/cycles/blender/addon/osl.py | 1 + 1 file changed, 1 insertion(+) (limited to 'intern/cycles/blender/addon/osl.py') diff --git a/intern/cycles/blender/addon/osl.py b/intern/cycles/blender/addon/osl.py index 4c6e7952491..d4c3c447951 100644 --- a/intern/cycles/blender/addon/osl.py +++ b/intern/cycles/blender/addon/osl.py @@ -15,6 +15,7 @@ # # +from __future__ import annotations import bpy import _cycles -- cgit v1.2.3