mirror of
https://github.com/maubot/maubot.git
synced 2024-10-01 01:06:10 -04:00
Update mautrix-python
This commit is contained in:
parent
61f154876d
commit
8f40a0b292
@ -13,7 +13,7 @@ function fixdefault {
|
|||||||
|
|
||||||
function fixconfig {
|
function fixconfig {
|
||||||
# Change relative default paths to absolute paths in /data
|
# Change relative default paths to absolute paths in /data
|
||||||
fixdefault '.database' 'sqlite:///maubot.db' 'sqlite:////data/maubot.db'
|
fixdefault '.database' 'sqlite:maubot.db' 'sqlite:/data/maubot.db'
|
||||||
fixdefault '.plugin_directories.upload' './plugins' '/data/plugins'
|
fixdefault '.plugin_directories.upload' './plugins' '/data/plugins'
|
||||||
fixdefault '.plugin_directories.load[0]' './plugins' '/data/plugins'
|
fixdefault '.plugin_directories.load[0]' './plugins' '/data/plugins'
|
||||||
fixdefault '.plugin_directories.trash' './trash' '/data/trash'
|
fixdefault '.plugin_directories.trash' './trash' '/data/trash'
|
||||||
|
@ -32,6 +32,10 @@ class Config(BaseFileConfig):
|
|||||||
def do_update(self, helper: ConfigUpdateHelper) -> None:
|
def do_update(self, helper: ConfigUpdateHelper) -> None:
|
||||||
base = helper.base
|
base = helper.base
|
||||||
copy = helper.copy
|
copy = helper.copy
|
||||||
|
|
||||||
|
if "database" in self and self["database"].startswith("sqlite:///"):
|
||||||
|
helper.base["database"] = self["database"].replace("sqlite:///", "sqlite:")
|
||||||
|
else:
|
||||||
copy("database")
|
copy("database")
|
||||||
copy("database_opts")
|
copy("database_opts")
|
||||||
if isinstance(self["crypto_database"], dict):
|
if isinstance(self["crypto_database"], dict):
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# The full URI to the database. SQLite and Postgres are fully supported.
|
# The full URI to the database. SQLite and Postgres are fully supported.
|
||||||
# Other DBMSes supported by SQLAlchemy may or may not work.
|
# Other DBMSes supported by SQLAlchemy may or may not work.
|
||||||
# Format examples:
|
# Format examples:
|
||||||
# SQLite: sqlite:///filename.db
|
# SQLite: sqlite:filename.db
|
||||||
# Postgres: postgresql://username:password@hostname/dbname
|
# Postgres: postgresql://username:password@hostname/dbname
|
||||||
database: sqlite:///maubot.db
|
database: sqlite:maubot.db
|
||||||
|
|
||||||
# Separate database URL for the crypto database. "default" means use the same database as above.
|
# Separate database URL for the crypto database. "default" means use the same database as above.
|
||||||
crypto_database: default
|
crypto_database: default
|
||||||
|
@ -317,7 +317,7 @@ class PluginInstance(DBInstance):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self.inst_db = Database.create(
|
self.inst_db = Database.create(
|
||||||
f"sqlite:///{self._sqlite_db_path}",
|
f"sqlite:{self._sqlite_db_path}",
|
||||||
upgrade_table=upgrade_table,
|
upgrade_table=upgrade_table,
|
||||||
log=instance_db_log,
|
log=instance_db_log,
|
||||||
)
|
)
|
||||||
|
@ -35,7 +35,7 @@ server:
|
|||||||
|
|
||||||
# The database for the plugin. Used for plugin data, the sync token and e2ee data (if enabled).
|
# The database for the plugin. Used for plugin data, the sync token and e2ee data (if enabled).
|
||||||
# SQLite and Postgres are supported.
|
# SQLite and Postgres are supported.
|
||||||
database: sqlite:///bot.db
|
database: sqlite:bot.db
|
||||||
|
|
||||||
# Additional arguments for asyncpg.create_pool() or sqlite3.connect()
|
# Additional arguments for asyncpg.create_pool() or sqlite3.connect()
|
||||||
# https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool
|
# https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
mautrix>=0.19.8,<0.20
|
mautrix>=0.20.1,<0.21
|
||||||
aiohttp>=3,<4
|
aiohttp>=3,<4
|
||||||
yarl>=1,<2
|
yarl>=1,<2
|
||||||
SQLAlchemy>=1,<1.4
|
SQLAlchemy>=1,<1.4
|
||||||
|
3
setup.py
3
setup.py
@ -41,7 +41,7 @@ setuptools.setup(
|
|||||||
|
|
||||||
install_requires=install_requires,
|
install_requires=install_requires,
|
||||||
extras_require=extras_require,
|
extras_require=extras_require,
|
||||||
python_requires="~=3.8",
|
python_requires="~=3.9",
|
||||||
|
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 4 - Beta",
|
||||||
@ -50,7 +50,6 @@ setuptools.setup(
|
|||||||
"Framework :: AsyncIO",
|
"Framework :: AsyncIO",
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Programming Language :: Python :: 3.8",
|
|
||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.9",
|
||||||
"Programming Language :: Python :: 3.10",
|
"Programming Language :: Python :: 3.10",
|
||||||
"Programming Language :: Python :: 3.11",
|
"Programming Language :: Python :: 3.11",
|
||||||
|
Loading…
Reference in New Issue
Block a user