From abb185cb66036535ce4fc0f2d7de7e7ef1e33eff Mon Sep 17 00:00:00 2001 From: mzfive Date: Tue, 7 Oct 2025 20:28:36 +0200 Subject: [PATCH] Fix: Add __future__ annotations import to qwen3_next.py for Python 3.9 compatibility (#533) * Fix Python 3.8/3.9 compatibility in qwen3_next.py Add missing `from __future__ import annotations` import to fix Python 3.8/3.9 compatibility. The `|` union syntax (PEP 604) requires Python 3.10+ or the __future__ import. This change maintains the declared python_requires>=3.8 compatibility. Fixes compatibility with macOS system Python (3.9.6). * format --------- Co-authored-by: Awni Hannun --- mlx_lm/models/qwen3_next.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mlx_lm/models/qwen3_next.py b/mlx_lm/models/qwen3_next.py index 030a878..b5194ad 100644 --- a/mlx_lm/models/qwen3_next.py +++ b/mlx_lm/models/qwen3_next.py @@ -1,5 +1,7 @@ # Copyright © 2025 Apple Inc. +from __future__ import annotations + from dataclasses import dataclass from typing import Any, Dict, List, Optional, Tuple, Union