File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212# See the License for the specific language governing permissions and
1313# limitations under the License.
14+
1415from .base_session_service import BaseSessionService
1516from .in_memory_session_service import InMemorySessionService
1617from .session import Session
2122 from .database_session_service import DatabaseSessionService
2223except ImportError :
2324 # This handles the case where optional dependencies (like sqlalchemy)
24- # are not installed. Using a top-level import ensures documentation
25- # tools can "see" the class.
26- pass
25+ # are not installed. A placeholder class ensures the symbol is always
26+ # available for documentation tools, providing a clear error message
27+ # at runtime if used without the necessary dependencies.
28+ class DatabaseSessionService :
29+
30+ def __init__ (self , * args , ** kwargs ):
31+ raise ImportError (
32+ 'DatabaseSessionService requires sqlalchemy>=2.0, please ensure it is'
33+ ' installed correctly.'
34+ )
35+
2736
2837__all__ = [
2938 'BaseSessionService' ,
You can’t perform that action at this time.
0 commit comments