Nonebot-plugin-orm

Latest version: v0.7.6

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

0.2.3

What's Changed
* [🐛 fix: regress of Python 3.8 support](https://github.com/nonebot/plugin-orm/commit/de4b6e22f97add2e519f9352d68ea941af75aa74)

**Full Changelog**: https://github.com/nonebot/plugin-orm/compare/v0.2.2...v0.2.3

0.2.2

What's Changed
* [🐛 fix: lower log level for echo](https://github.com/nonebot/plugin-orm/commit/488826d931396b25094974b91791afaba6b74fc2)

**Full Changelog**: https://github.com/nonebot/plugin-orm/compare/v0.2.1...v0.2.2

0.2.1

What's Changed
* [🐛 fix(alembic): check if main_version_location exists](https://github.com/nonebot/plugin-orm/commit/9a6e146e51a9e7b7f055fc209fcc7d706d69fe33)

**Full Changelog**: https://github.com/nonebot/plugin-orm/compare/v0.2.0...v0.2.1

0.2.0

Notable Changes
* [🐛 fix(alembic): env.py open multi transcations](https://github.com/nonebot/plugin-orm/commit/5907585edd64e832b95f2e873f590ad178038756)
此修复改动了模板中的 env.py. 对于初始化脚本目录后使用的用户, 需要对 env.py 应用如下更改:

**单数据库模板 (generic)**
diff
--- a/migrations/env.py
+++ b/migrations/env.py
-59,7 +59,7 async def run_migrations_online() -> None:

这种情况下,我们需要为 context 创建一个连接。
"""
- async with engine.begin() as connection:
+ async with engine.connect() as connection:
await connection.run_sync(do_run_migrations)


**多数据库模板 (multidb)**
diff
--- a/migrations/env.py
+++ b/migrations/env.py
-52,6 +52,7 def run_migrations_offline() -> None:
使用 --sql 选项的情况下,将每个引擎的迁移写入到单独的 .sql 文件中。

for name, engine in engines.items():
+ config.print_stdout(f"迁移数据库 {name or '<default>'} 中 ...")
file_ = f"{name}.sql"
with open(file_, "w") as buffer:
context.configure(
-62,9 +63,7 def run_migrations_offline() -> None:
dialect_opts={"paramstyle": "named"},
**plugin_config.alembic_context,
)
- with context.begin_transaction(), config.status(
- f"迁移数据库 {name or '<default>'} 中"
- ):
+ with context.begin_transaction():
context.run_migrations(name=name)
config.print_stdout(f"将输出写入到 {file_}")

* [💥 refactor(alembic)!: AlembicConfig initialization and version locati…](https://github.com/nonebot/plugin-orm/commit/c1f08e1e7bd7d50fb2f66958fb92221cc6b9ec89)
此重构改动了读取插件内的迁移脚本目录的方式. 现在要求 `orm_version_location` 必须是一个常规包 (regular package) 而非命名空间包 (namespace package), 所以需要在插件内的迁移脚本目录中添加 \_\_init\_\_.py 文件:

diff
--- a/a.tree
+++ b/b.tree
-1,8 +1,9
.
└── nonebot_plugin
├── config.py
├── __init__.py
└── migrations
├── 21e03401e435_.py
├── 595fd3d5f5b4_.py
- └── e04c11aa30b7_.py
+ ├── e04c11aa30b7_.py
+ └── __init__.py


What's Changed
* [🐛 fix: logger echo](https://github.com/nonebot/plugin-orm/commit/d46f5ce7803d4a7a32477cdafe8c1c04c2a61c2b)
* [✨ feat(sqla): Model support dependency injection](https://github.com/nonebot/plugin-orm/commit/10c8df6a993fc3f54a901a26cfcc99d2da4c2f09)

**Full Changelog**: https://github.com/nonebot/plugin-orm/compare/v0.1.2...v0.2.0

0.1.2

What's Changed
* [✨ feat(alembic): auto infer --version-path](https://github.com/nonebot/plugin-orm/commit/8909e42d60b08e384885538e3ab90ed7ae31fc4c)
* [🐛 fix: raise RuntimeError when uninitialized](https://github.com/nonebot/plugin-orm/commit/264bb5450d812fc098f8ff036276f808b1df3b95) (#3)
* [🐛 fix: require localstore](https://github.com/nonebot/plugin-orm/commit/91ea2d0dcd2164282384f7ff0406abb1edabb0fa)
* [🐛 fix: redirect logger](https://github.com/nonebot/plugin-orm/commit/d39c20f3c0cdadfd2cce273b0dca0a12c5dcd89f)
* [⬇️ chore: backport to Python 3.8](https://github.com/nonebot/plugin-orm/commit/fd31e64259b8825b655c55ea57d240d43f8d85a3)

**Full Changelog**: https://github.com/nonebot/plugin-orm/compare/v0.1.1...v0.1.2

0.1.1

What's Changed
* [🐛 fix(alembic): show](https://github.com/nonebot/plugin-orm/commit/225813cd09085b6ab3b5f23fe43eac29fe880882)
* [✨ feat(alembic): upgrade --fast](https://github.com/nonebot/plugin-orm/commit/6e432b1feb0cdabb818de51f0a631e18092cc654)
* [🐛 fix(alembic): remove revision --version-path empty restriction](https://github.com/nonebot/plugin-orm/commit/4d6b8093862e3984d11a4dc4cf90c820263c50f1)

**Full Changelog**: https://github.com/nonebot/plugin-orm/compare/v0.1.0...v0.1.1

Page 4 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.