mirror of
https://github.com/xfgryujk/blivechat.git
synced 2025-03-14 03:40:36 +08:00
升级SQLAlchemy到1.4.31
This commit is contained in:
parent
24d0671dae
commit
02ec4bc4ba
@ -179,6 +179,7 @@ export default {
|
||||
return {
|
||||
serverConfig: {
|
||||
enableTranslate: true,
|
||||
enableUploadFile: true,
|
||||
loaderUrl: ''
|
||||
},
|
||||
form: {
|
||||
|
@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import contextlib
|
||||
from typing import *
|
||||
|
||||
import sqlalchemy.ext.declarative
|
||||
@ -22,13 +21,5 @@ def init(_debug):
|
||||
OrmBase.metadata.create_all(_engine)
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def get_session() -> ContextManager[sqlalchemy.orm.Session]:
|
||||
session = _DbSession()
|
||||
try:
|
||||
yield session
|
||||
except BaseException:
|
||||
session.rollback()
|
||||
raise
|
||||
finally:
|
||||
session.close()
|
||||
def get_session():
|
||||
return _DbSession()
|
||||
|
@ -1,5 +1,5 @@
|
||||
aiohttp==3.7.4
|
||||
Brotli==1.0.9
|
||||
pycryptodome==3.10.1
|
||||
sqlalchemy==1.3.13
|
||||
sqlalchemy==1.4.31
|
||||
tornado==6.1.0
|
||||
|
Loading…
Reference in New Issue
Block a user