Drop python3.7 support
This commit is contained in:
parent
51117867a6
commit
affffbdae3
@ -66,11 +66,11 @@ class BaseDDL:
|
||||
forward_type=db_field_types.get(self.DIALECT) or db_field_types.get(""),
|
||||
on_delete=field_describe.get("on_delete"),
|
||||
extra=self.schema_generator._table_generate_extra(table=through),
|
||||
comment=self.schema_generator._table_comment_generator(
|
||||
table=through, comment=description
|
||||
)
|
||||
if description
|
||||
else "",
|
||||
comment=(
|
||||
self.schema_generator._table_comment_generator(table=through, comment=description)
|
||||
if description
|
||||
else ""
|
||||
),
|
||||
)
|
||||
|
||||
def drop_m2m(self, table_name: str):
|
||||
@ -121,13 +121,15 @@ class BaseDDL:
|
||||
field_type=db_field_types.get(self.DIALECT, db_field_types.get("")),
|
||||
nullable="NOT NULL" if not field_describe.get("nullable") else "",
|
||||
unique="UNIQUE" if field_describe.get("unique") else "",
|
||||
comment=self.schema_generator._column_comment_generator(
|
||||
table=db_table,
|
||||
column=db_column,
|
||||
comment=field_describe.get("description"),
|
||||
)
|
||||
if description
|
||||
else "",
|
||||
comment=(
|
||||
self.schema_generator._column_comment_generator(
|
||||
table=db_table,
|
||||
column=db_column,
|
||||
comment=field_describe.get("description"),
|
||||
)
|
||||
if description
|
||||
else ""
|
||||
),
|
||||
is_primary_key=is_pk,
|
||||
default=default,
|
||||
),
|
||||
@ -151,13 +153,15 @@ class BaseDDL:
|
||||
field_type=db_field_types.get(self.DIALECT) or db_field_types.get(""),
|
||||
nullable="NOT NULL" if not field_describe.get("nullable") else "",
|
||||
unique="",
|
||||
comment=self.schema_generator._column_comment_generator(
|
||||
table=db_table,
|
||||
column=field_describe.get("db_column"),
|
||||
comment=field_describe.get("description"),
|
||||
)
|
||||
if field_describe.get("description")
|
||||
else "",
|
||||
comment=(
|
||||
self.schema_generator._column_comment_generator(
|
||||
table=db_table,
|
||||
column=field_describe.get("db_column"),
|
||||
comment=field_describe.get("description"),
|
||||
)
|
||||
if field_describe.get("description")
|
||||
else ""
|
||||
),
|
||||
is_primary_key=is_pk,
|
||||
default=default,
|
||||
),
|
||||
|
@ -43,7 +43,9 @@ class PostgresDDL(BaseDDL):
|
||||
return self._SET_COMMENT_TEMPLATE.format(
|
||||
table_name=db_table,
|
||||
column=field_describe.get("db_column") or field_describe.get("raw_field"),
|
||||
comment="'{}'".format(field_describe.get("description"))
|
||||
if field_describe.get("description")
|
||||
else "NULL",
|
||||
comment=(
|
||||
"'{}'".format(field_describe.get("description"))
|
||||
if field_describe.get("description")
|
||||
else "NULL"
|
||||
),
|
||||
)
|
||||
|
1051
poetry.lock
generated
1051
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -15,30 +15,34 @@ packages = [
|
||||
include = ["CHANGELOG.md", "LICENSE", "README.md"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.7"
|
||||
python = "^3.8"
|
||||
tortoise-orm = "*"
|
||||
click = "*"
|
||||
asyncpg = { version = "*", optional = true }
|
||||
asyncmy = { version = "^0.2.8rc1", optional = true, allow-prereleases = true }
|
||||
asyncmy = { version = "^0.2.9", optional = true, allow-prereleases = true }
|
||||
pydantic = "^2.0"
|
||||
dictdiffer = "*"
|
||||
tomlkit = "*"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
ruff = "*"
|
||||
isort = "*"
|
||||
black = "*"
|
||||
pytest = "*"
|
||||
pytest-xdist = "*"
|
||||
pytest-asyncio = "*"
|
||||
# Breaking change in 0.23.*
|
||||
# https://github.com/pytest-dev/pytest-asyncio/issues/706
|
||||
pytest-asyncio = "^0.21.2"
|
||||
bandit = "*"
|
||||
pytest-mock = "*"
|
||||
cryptography = "*"
|
||||
mypy = "^1.10.0"
|
||||
|
||||
[tool.poetry.extras]
|
||||
asyncmy = ["asyncmy"]
|
||||
asyncpg = ["asyncpg"]
|
||||
|
||||
|
||||
[tool.aerich]
|
||||
tortoise_orm = "conftest.tortoise_orm"
|
||||
location = "./migrations"
|
||||
@ -53,7 +57,7 @@ aerich = "aerich.cli:main"
|
||||
|
||||
[tool.black]
|
||||
line-length = 100
|
||||
target-version = ['py36', 'py37', 'py38', 'py39']
|
||||
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = 'auto'
|
||||
@ -62,5 +66,5 @@ asyncio_mode = 'auto'
|
||||
pretty = true
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.ruff]
|
||||
[tool.ruff.lint]
|
||||
ignore = ['E501']
|
||||
|
Loading…
x
Reference in New Issue
Block a user