-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move required packages to extras and guess default driver
- Loading branch information
Showing
5 changed files
with
61 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,26 @@ | ||
from . import base | ||
from .http import base as http_driver | ||
|
||
base.dialect = http_driver.dialect | ||
try: | ||
from .native import base as native_driver | ||
|
||
base.dialect = native_driver.dialect | ||
except ImportError: | ||
pass | ||
|
||
if not hasattr(base, 'dialect'): | ||
try: | ||
from .http import base as http_driver | ||
|
||
base.dialect = http_driver.dialect | ||
except ImportError: | ||
pass | ||
|
||
if not hasattr(base, 'dialect'): | ||
try: | ||
from .asynch import base as asynch_driver | ||
base.dialect = asynch_driver.dialect | ||
except ImportError: | ||
pass | ||
|
||
if not hasattr(base, 'dialect'): | ||
raise RuntimeError('Unable to detect default dialect. Please install one.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
DefaultDialect = None | ||
|
||
try: | ||
from .native import base as native_driver | ||
|
||
DefaultDialect = native_driver.dialect | ||
except ImportError: | ||
pass | ||
|
||
if DefaultDialect is None: | ||
try: | ||
from .http import base as http_driver | ||
|
||
DefaultDialect = http_driver.dialect | ||
except ImportError: | ||
pass | ||
|
||
if DefaultDialect is None: | ||
try: | ||
from .asynch import base as asynch_driver | ||
|
||
DefaultDialect = asynch_driver.dialect | ||
except ImportError: | ||
pass | ||
|
||
if DefaultDialect is None: | ||
raise RuntimeError('Unable to detect default dialect. Please install one.') | ||
|
||
dialect = DefaultDialect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
'sqlalchemy>=2.0.0,<2.1.0', | ||
'greenlet>=2.0.1', | ||
'alembic', | ||
'requests', | ||
'responses', | ||
'parameterized' | ||
] | ||
|