# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/python/black
- rev: 24.10.0
+ rev: 25.1.0
hooks:
- id: black
- --keep-unused-type-checking
- repo: https://github.com/pycqa/flake8
- rev: 6.1.0
+ rev: 7.2.0
hooks:
- id: flake8
additional_dependencies:
BulkInsertOp,
DropTableOp,
ExecuteSQLOp,
- ]
+ ],
) -> None: ...
@overload
def invoke(operation: MigrateOperation) -> Any:
@overload
def tuple_rev_as_scalar(
- rev: Union[Tuple[_T, ...], List[_T]]
+ rev: Union[Tuple[_T, ...], List[_T]],
) -> Union[_T, Tuple[_T, ...], List[_T]]: ...
--- /dev/null
+.. change::
+ :tags: bug, general
+ :tickets: 1637
+
+ The pyproject.toml configuration has been amended to use the updated
+ :pep:`639` configuration for license, which eliminates loud deprecation
+ warnings when building the package. Note this necessarily bumps
+ setuptools build requirement to 77.0.3.
[build-system]
build-backend = "setuptools.build_meta"
-requires = [
- "setuptools>=61.2",
-]
+requires = ["setuptools>=77.0.3"]
[project]
name = "alembic"
description = "A database migration tool for SQLAlchemy."
authors = [{name = "Mike Bayer", email = "mike_mp@zzzcomputing.com"}]
-license = {text = "MIT"}
+license = "MIT"
+license-files = ["LICENSE"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Environment :: Console",
- "License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
include-package-data = true
zip-safe = false
package-dir = {"" = "."}
-license-files = ["LICENSE"]
[tool.setuptools.package-data]
"*" = ["*.pyi", "py.typed", "*.mako", "README"]
sys.path.append(str(Path(__file__).parent.parent))
-from alembic.autogenerate.api import AutogenContext
-from alembic.ddl.impl import DefaultImpl
-from alembic.runtime.migration import MigrationInfo
if True: # avoid flake/zimports messing with the order
+ from alembic.autogenerate.api import AutogenContext
+ from alembic.ddl.impl import DefaultImpl
+ from alembic.runtime.migration import MigrationInfo
from alembic.operations.base import BatchOperations
from alembic.operations.base import Operations
from alembic.runtime.environment import EnvironmentContext
console_scripts(
str(destination_path),
- {"entrypoint": "black", "options": "-l79"},
+ {"entrypoint": "black", "options": "-l79 --target-version py39"},
ignore_output=ignore_output,
)
envlist = py-sqlalchemy
SQLA_REPO = {env:SQLA_REPO:git+https://github.com/sqlalchemy/sqlalchemy.git}
+BLACK_VERSION = 25.1.0
[testenv]
cov_args=--cov=alembic --cov-report term --cov-report xml
mako
tzdata
zimports
- black==24.10.0
+ black=={[tox]BLACK_VERSION}
greenlet>=1
pydocstyle<4.0.0
# used by flake8-rst-docstrings
pygments
- black==24.10.0
+ black=={[tox]BLACK_VERSION}
commands =
flake8 ./alembic/ ./tests/ setup.py docs/build/conf.py {posargs}
black --check setup.py tests alembic
sqlalchemy>=2
mako
zimports
- black==24.10.0
+ black=={[tox]BLACK_VERSION}
commands = python tools/write_pyi.py