From 828bedbe3ab096d30ade65e387feaffe6c1207e5 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 10 Nov 2025 08:43:10 -0500 Subject: [PATCH] dont fail if imports not set up this is to help with vscode extensions Change-Id: I4dc6c07bec8158c82e376b3399d6e0e104360bf2 --- doc/build/conf.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/build/conf.py b/doc/build/conf.py index 070eba23f4..2748faa93e 100644 --- a/doc/build/conf.py +++ b/doc/build/conf.py @@ -485,6 +485,9 @@ def setup(app): # noqa: U100 # delete class attributes with a value, where the value has ``__doc__`` # defined, but we want to see only the docstring under the attribute # itself. - from sqlalchemy.ext.asyncio import AsyncSession - - del AsyncSession.sync_session_class + try: + from sqlalchemy.ext.asyncio import AsyncSession + except ImportError: + pass + else: + del AsyncSession.sync_session_class -- 2.47.3