From: Mike Bayer Date: Mon, 10 Nov 2025 13:43:10 +0000 (-0500) Subject: dont fail if imports not set up X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=828bedbe3ab096d30ade65e387feaffe6c1207e5;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git dont fail if imports not set up this is to help with vscode extensions Change-Id: I4dc6c07bec8158c82e376b3399d6e0e104360bf2 --- 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