Update mautrix-python
This commit is contained in:
parent
61f154876d
commit
8f40a0b292
7 changed files with 12 additions and 9 deletions
|
@ -13,7 +13,7 @@ function fixdefault {
|
|||
|
||||
function fixconfig {
|
||||
# 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.load[0]' './plugins' '/data/plugins'
|
||||
fixdefault '.plugin_directories.trash' './trash' '/data/trash'
|
||||
|
|
|
@ -32,7 +32,11 @@ class Config(BaseFileConfig):
|
|||
def do_update(self, helper: ConfigUpdateHelper) -> None:
|
||||
base = helper.base
|
||||
copy = helper.copy
|
||||
copy("database")
|
||||
|
||||
if "database" in self and self["database"].startswith("sqlite:///"):
|
||||
helper.base["database"] = self["database"].replace("sqlite:///", "sqlite:")
|
||||
else:
|
||||
copy("database")
|
||||
copy("database_opts")
|
||||
if isinstance(self["crypto_database"], dict):
|
||||
if self["crypto_database.type"] == "postgres":
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# The full URI to the database. SQLite and Postgres are fully supported.
|
||||
# Other DBMSes supported by SQLAlchemy may or may not work.
|
||||
# Format examples:
|
||||
# SQLite: sqlite:///filename.db
|
||||
# SQLite: sqlite:filename.db
|
||||
# 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.
|
||||
crypto_database: default
|
||||
|
|
|
@ -317,7 +317,7 @@ class PluginInstance(DBInstance):
|
|||
)
|
||||
else:
|
||||
self.inst_db = Database.create(
|
||||
f"sqlite:///{self._sqlite_db_path}",
|
||||
f"sqlite:{self._sqlite_db_path}",
|
||||
upgrade_table=upgrade_table,
|
||||
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).
|
||||
# SQLite and Postgres are supported.
|
||||
database: sqlite:///bot.db
|
||||
database: sqlite:bot.db
|
||||
|
||||
# Additional arguments for asyncpg.create_pool() or sqlite3.connect()
|
||||
# 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
|
||||
yarl>=1,<2
|
||||
SQLAlchemy>=1,<1.4
|
||||
|
|
3
setup.py
3
setup.py
|
@ -41,7 +41,7 @@ setuptools.setup(
|
|||
|
||||
install_requires=install_requires,
|
||||
extras_require=extras_require,
|
||||
python_requires="~=3.8",
|
||||
python_requires="~=3.9",
|
||||
|
||||
classifiers=[
|
||||
"Development Status :: 4 - Beta",
|
||||
|
@ -50,7 +50,6 @@ setuptools.setup(
|
|||
"Framework :: AsyncIO",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
|
Loading…
Reference in a new issue