Skip to content

Commit

Permalink
Fix Python 3.6 compatibility issue
Browse files Browse the repository at this point in the history
  • Loading branch information
greyli committed Feb 13, 2024
1 parent e02bf31 commit eac6dd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion flask_whooshee.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
from whoosh.filedb.filestore import RamStorage

from flask import current_app
from flask_sqlalchemy.query import Query
try:
from flask_sqlalchemy.query import Query
except ImportError:
from flask_sqlalchemy import BaseQuery as Query
from sqlalchemy import text, event
from sqlalchemy.inspection import inspect
from sqlalchemy.orm.mapper import Mapper
Expand Down
5 changes: 4 additions & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
from whoosh.filedb.filestore import RamStorage
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_sqlalchemy.query import Query
try:
from flask_sqlalchemy.query import Query
except ImportError:
from flask_sqlalchemy import BaseQuery as Query
from sqlalchemy.orm import Query as SQLAQuery
from flask_whooshee import AbstractWhoosheer, Whooshee, WhoosheeQuery

Expand Down

0 comments on commit eac6dd2

Please sign in to comment.