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