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