0.7.6 fix @glue() stray usage
This commit is contained in:
parent
556019e0bd
commit
96a65c38e3
3 changed files with 62 additions and 65 deletions
|
|
@ -10,7 +10,7 @@ license = "Apache-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"suou==0.7.4",
|
"suou==0.7.5",
|
||||||
"itsdangerous",
|
"itsdangerous",
|
||||||
"toml",
|
"toml",
|
||||||
"pydantic",
|
"pydantic",
|
||||||
|
|
@ -39,14 +39,16 @@ Documentation = "https://suou.readthedocs.io"
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
# the below are all dev dependencies (and probably already installed)
|
# the below are all dev dependencies (and probably already installed)
|
||||||
sqlalchemy = [
|
sqlalchemy = [
|
||||||
"SQLAlchemy[asyncio]>=2.0.0"
|
"SQLAlchemy[asyncio]>=2.0.0",
|
||||||
|
"flask-sqlalchemy"
|
||||||
]
|
]
|
||||||
flask = [
|
flask = [
|
||||||
"Flask>=2.0.0",
|
"Flask>=2.0.0",
|
||||||
"Flask-RestX"
|
"Flask-RestX"
|
||||||
]
|
]
|
||||||
flask_sqlalchemy = [
|
flask_sqlalchemy = [
|
||||||
"Flask-SqlAlchemy",
|
"sakuragasaki46_suou[sqlalchemy]",
|
||||||
|
"sakuragasaki46_suou[flask]"
|
||||||
]
|
]
|
||||||
peewee = [
|
peewee = [
|
||||||
## HEADS UP! peewee has setup.py, may slow down installation
|
## HEADS UP! peewee has setup.py, may slow down installation
|
||||||
|
|
@ -71,7 +73,6 @@ full = [
|
||||||
"sakuragasaki46_suou[quart]",
|
"sakuragasaki46_suou[quart]",
|
||||||
"sakuragasaki46_suou[peewee]",
|
"sakuragasaki46_suou[peewee]",
|
||||||
"sakuragasaki46_suou[markdown]",
|
"sakuragasaki46_suou[markdown]",
|
||||||
"sakuragasaki46_suou[flask-sqlalchemy]",
|
|
||||||
"sakuragasaki46_suou[sass]"
|
"sakuragasaki46_suou[sass]"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ from .redact import redact_url_password
|
||||||
from .http import WantsContentType
|
from .http import WantsContentType
|
||||||
from .color import chalk
|
from .color import chalk
|
||||||
|
|
||||||
__version__ = "0.7.5"
|
__version__ = "0.7.6"
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue',
|
'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue',
|
||||||
|
|
|
||||||
|
|
@ -119,10 +119,10 @@ class SQLAlchemy:
|
||||||
# XXX NOT public API! DO NOT USE
|
# XXX NOT public API! DO NOT USE
|
||||||
current_session: ContextVar[AsyncSession] = ContextVar('current_session')
|
current_session: ContextVar[AsyncSession] = ContextVar('current_session')
|
||||||
|
|
||||||
## experimental
|
|
||||||
@glue('flask_sqlalchemy')
|
|
||||||
def _make_AsyncSelectPagination(flask_sqlalchemy):
|
|
||||||
class AsyncSelectPagination(flask_sqlalchemy.pagination.Pagination):
|
class AsyncSelectPagination(flask_sqlalchemy.pagination.Pagination):
|
||||||
"""
|
"""
|
||||||
flask_sqlalchemy.SelectPagination but asynchronous.
|
flask_sqlalchemy.SelectPagination but asynchronous.
|
||||||
|
|
||||||
|
|
@ -185,10 +185,6 @@ def _make_AsyncSelectPagination(flask_sqlalchemy):
|
||||||
for i in self.items:
|
for i in self.items:
|
||||||
yield i
|
yield i
|
||||||
|
|
||||||
return AsyncSelectPagination
|
|
||||||
|
|
||||||
AsyncSelectPagination = _make_AsyncSelectPagination()
|
|
||||||
del _make_AsyncSelectPagination
|
|
||||||
|
|
||||||
|
|
||||||
def async_query(db: SQLAlchemy, multi: False):
|
def async_query(db: SQLAlchemy, multi: False):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue