From 1f38a0c994093a30608d83d034861eedeed2563f Mon Sep 17 00:00:00 2001 From: Abhayindia Date: Tue, 25 Aug 2026 20:52:50 +0900 Subject: [PATCH] Remove undeclared dependency on past.builtins dronekit/__init__.py imported basestring from past.builtins, but python-future was never listed as an install dependency, so a fresh `pip install dronekit` fails with ModuleNotFoundError: No module named 'past' as soon as dronekit is imported (#1252). basestring is only needed for Python 2/3 compatibility, so replace the external import with the same sys.version_info gating already used a few lines above for the collections.abc change. --- dronekit/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dronekit/__init__.py b/dronekit/__init__.py index bc05a7098..09979c6ec 100644 --- a/dronekit/__init__.py +++ b/dronekit/__init__.py @@ -48,7 +48,10 @@ import time import monotonic -from past.builtins import basestring + +# Python 2 had a builtin `basestring`; Python 3 does not. +if sys.version_info.major >= 3: + basestring = str from pymavlink import mavutil, mavwp from pymavlink.dialects.v10 import ardupilotmega