chore(deps): limit tortoise-orm version to >=0.21
instead of wildcard (*) (#388)
* Limit tortoise-orm version to `>=0.21` instead of wildcard (*) * ci: fix typos * docs: update changelog * refactor: import MEMORY_SQLITE from tortoise * Update changelog
This commit is contained in:
parent
69ce0cafa1
commit
1acb9ed1e7
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
@ -20,7 +20,11 @@ jobs:
|
|||||||
options: --health-cmd=pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
options: --health-cmd=pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||||
|
tortoise-orm:
|
||||||
|
- tortoise021
|
||||||
|
- tortoise022
|
||||||
|
- tortoisedev
|
||||||
steps:
|
steps:
|
||||||
- name: Start MySQL
|
- name: Start MySQL
|
||||||
run: sudo systemctl start mysql.service
|
run: sudo systemctl start mysql.service
|
||||||
@ -38,6 +42,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pip install -U pip poetry
|
pip install -U pip poetry
|
||||||
poetry config virtualenvs.create false
|
poetry config virtualenvs.create false
|
||||||
|
- name: Install dependencies and check style
|
||||||
|
run: make check
|
||||||
|
- name: Install TortoiseORM v0.21
|
||||||
|
if: matrix.tortoise-orm == 'tortoise021'
|
||||||
|
run: poetry run pip install --upgrade "tortoise-orm>=0.21,<0.22"
|
||||||
|
- name: Install TortoiseORM v0.22
|
||||||
|
if: matrix.tortoise-orm == 'tortoise022'
|
||||||
|
run: poetry run pip install --upgrade "tortoise-orm>=0.22,<0.23"
|
||||||
|
- name: Install TortoiseORM develop branch
|
||||||
|
if: matrix.tortoise-orm == 'tortoisedev'
|
||||||
|
run: poetry run pip install --upgrade "git+https://github.com/tortoise/tortoise-orm"
|
||||||
- name: CI
|
- name: CI
|
||||||
env:
|
env:
|
||||||
MYSQL_PASS: root
|
MYSQL_PASS: root
|
||||||
@ -46,4 +61,4 @@ jobs:
|
|||||||
POSTGRES_PASS: 123456
|
POSTGRES_PASS: 123456
|
||||||
POSTGRES_HOST: 127.0.0.1
|
POSTGRES_HOST: 127.0.0.1
|
||||||
POSTGRES_PORT: 5432
|
POSTGRES_PORT: 5432
|
||||||
run: make ci
|
run: make _testall
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#### Changed
|
#### Changed
|
||||||
- Allow run `aerich init-db` with empty migration directories instead of abort with warnings. (#286)
|
- Allow run `aerich init-db` with empty migration directories instead of abort with warnings. (#286)
|
||||||
|
- Add version constraint(>=0.21) for tortoise-orm. (#388)
|
||||||
- Move `tomlkit` to optional and support `pip install aerich[toml]`. (#392)
|
- Move `tomlkit` to optional and support `pip install aerich[toml]`. (#392)
|
||||||
|
|
||||||
### [0.8.0](../../releases/tag/v0.8.0) - 2024-12-04
|
### [0.8.0](../../releases/tag/v0.8.0) - 2024-12-04
|
||||||
|
@ -8,6 +8,7 @@ from tortoise import Tortoise, expand_db_url, generate_schema_for_client
|
|||||||
from tortoise.backends.asyncpg.schema_generator import AsyncpgSchemaGenerator
|
from tortoise.backends.asyncpg.schema_generator import AsyncpgSchemaGenerator
|
||||||
from tortoise.backends.mysql.schema_generator import MySQLSchemaGenerator
|
from tortoise.backends.mysql.schema_generator import MySQLSchemaGenerator
|
||||||
from tortoise.backends.sqlite.schema_generator import SqliteSchemaGenerator
|
from tortoise.backends.sqlite.schema_generator import SqliteSchemaGenerator
|
||||||
|
from tortoise.contrib.test import MEMORY_SQLITE
|
||||||
from tortoise.exceptions import DBConnectionError, OperationalError
|
from tortoise.exceptions import DBConnectionError, OperationalError
|
||||||
|
|
||||||
from aerich.ddl.mysql import MysqlDDL
|
from aerich.ddl.mysql import MysqlDDL
|
||||||
@ -15,7 +16,6 @@ from aerich.ddl.postgres import PostgresDDL
|
|||||||
from aerich.ddl.sqlite import SqliteDDL
|
from aerich.ddl.sqlite import SqliteDDL
|
||||||
from aerich.migrate import Migrate
|
from aerich.migrate import Migrate
|
||||||
|
|
||||||
MEMORY_SQLITE = "sqlite://:memory:"
|
|
||||||
db_url = os.getenv("TEST_DB", MEMORY_SQLITE)
|
db_url = os.getenv("TEST_DB", MEMORY_SQLITE)
|
||||||
db_url_second = os.getenv("TEST_DB_SECOND", MEMORY_SQLITE)
|
db_url_second = os.getenv("TEST_DB_SECOND", MEMORY_SQLITE)
|
||||||
tortoise_orm = {
|
tortoise_orm = {
|
||||||
|
2
poetry.lock
generated
2
poetry.lock
generated
@ -1189,4 +1189,4 @@ toml = ["tomli-w", "tomlkit"]
|
|||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = "^3.8"
|
python-versions = "^3.8"
|
||||||
content-hash = "6debce184c7fb1fa5cfb79083a35bf2fe6b2f87dea29f3e8e8e23189bed744b5"
|
content-hash = "5a17cf1dd79829b76fc2c71cbd83032d70ada4f129cf56973c417eac91a975f6"
|
||||||
|
@ -16,7 +16,7 @@ include = ["CHANGELOG.md", "LICENSE", "README.md"]
|
|||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.8"
|
python = "^3.8"
|
||||||
tortoise-orm = "*"
|
tortoise-orm = ">=0.21"
|
||||||
asyncpg = { version = "*", optional = true }
|
asyncpg = { version = "*", optional = true }
|
||||||
asyncmy = { version = "^0.2.9", optional = true, allow-prereleases = true }
|
asyncmy = { version = "^0.2.9", optional = true, allow-prereleases = true }
|
||||||
pydantic = "^2.0,!=2.7.0"
|
pydantic = "^2.0,!=2.7.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user