Files
sqlalchemy/pyproject.toml
T
Mike Bayer a463b1109a implement dataclass_transforms
Implement a new means of creating a mapped dataclass where
instead of applying the `@dataclass` decorator distinctly,
the declarative process itself can create the dataclass.

MapperProperty and MappedColumn objects themselves take
the place of the dataclasses.Field object when constructing
the class.

The overall approach is made possible at the typing level
using pep-681 dataclass transforms [1].

This new approach should be able to completely supersede the
previous "dataclasses" approach of embedding metadata into
Field() objects, which remains a mutually exclusive declarative
setup style (mixing them introduces new issues that are not worth
solving).

[1] https://peps.python.org/pep-0681/#transform-descriptor-types-example

Fixes: #7642
Change-Id: I6ba88a87c5df38270317b4faf085904d91c8a63c
2022-05-20 14:19:02 -04:00

77 lines
1.9 KiB
TOML

[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=47",
"wheel>=0.34",
"cython>=0.29.24; python_implementation == 'CPython'", # Skip cython when using pypy
]
[tool.black]
line-length = 79
target-version = ['py37']
[tool.zimports]
black-line-length = 79
[tool.slotscheck]
exclude-modules = '^sqlalchemy\.testing'
[tool.pytest.ini_options]
addopts = "--tb native -v -r sfxX --maxfail=250 -p warnings -p logging --strict-markers"
norecursedirs = "examples build doc lib"
python_files = "test_*.py"
minversion = "6.2"
filterwarnings = [
# NOTE: additional SQLAlchemy specific filters in
# sqlalchemy/testing/warnings.py. SQLAlchemy modules cannot be named
# here as pytest loads them immediately, which breaks coverage as well
# as sys.path adjustments in conftest.py
"error::DeprecationWarning:test",
"error::DeprecationWarning:sqlalchemy"
]
markers = [
"memory_intensive: memory / CPU intensive suite tests",
"mypy: mypy integration / plugin tests",
"timing_intensive: time-oriented tests that are sensitive to race conditions",
"backend: tests that should run on all backends; typically dialect-sensitive",
"sparse_backend: tests that should run on multiple backends, not necessarily all",
]
[tool.pyright]
reportPrivateUsage = "none"
reportUnusedClass = "none"
reportUnusedFunction = "none"
reportTypedDictNotRequiredAccess = "warning"
[tool.mypy]
mypy_path = "./lib/"
show_error_codes = true
incremental = true
[[tool.mypy.overrides]]
module = [
"sqlalchemy.*"
]
warn_unused_ignores = false
strict = true
[[tool.mypy.overrides]]
#####################################################################
# interim list of modules that need some level of type checking to
# pass
module = [
"sqlalchemy.engine.reflection",
]
ignore_errors = true
warn_unused_ignores = false