From 80813d1c3757ef8d18943af685d7863b801514fd Mon Sep 17 00:00:00 2001 From: Daniel Falbel Date: Tue, 9 Apr 2024 15:19:18 -0300 Subject: [PATCH] Correctly support older python versions. --- .../python_files/positron/positron_ipykernel/inspectors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/positron-python/python_files/positron/positron_ipykernel/inspectors.py b/extensions/positron-python/python_files/positron/positron_ipykernel/inspectors.py index 7ffb1a27481..d9a00ce8840 100644 --- a/extensions/positron-python/python_files/positron/positron_ipykernel/inspectors.py +++ b/extensions/positron-python/python_files/positron/positron_ipykernel/inspectors.py @@ -900,7 +900,8 @@ def to_plaintext(self) -> str: class ConnectionInspector(ObjectInspector): - CLASS_QNAME = ["sqlite3.Connection", "sqlalchemy.engine.base.Engine"] + # in older Python versions (eg 3.9) the qualname for sqlite3.Connection is just "Connection" + CLASS_QNAME = ["Connection", "sqlite3.Connection", "sqlalchemy.engine.base.Engine"] def has_viewer(self) -> bool: return True