1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
|
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=61.0",
"cython>=0.29.24; platform_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
|ext\.mypy # see slotscheck/issues/178
)
'''
# disable isort, for IDEs that just default isort to be turned on, e.g. vscode.
# we use flake8-import-order for import sorting, using zimports to actually
# reformat code. isort is nicer in many ways but doesn't have our
# "import *" fixer and also is not 100% compatible with flake8-import-order.
[tool.isort]
skip_glob=['*']
[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",
# sqlite3 warnings due to test/dialect/test_sqlite.py->test_native_datetime,
# which is asserting that these deprecated-in-py312 handlers are functional
"ignore:The default (date)?(time)?(stamp)? (adapter|converter):DeprecationWarning",
]
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
# would be nice to enable this but too many error are surfaceds
# enable_error_code = "ignore-without-code"
[[tool.mypy.overrides]]
module = [
"sqlalchemy.*"
]
warn_unused_ignores = true
strict = true
[tool.cibuildwheel]
test-requires = "pytest pytest-xdist"
# remove user site, otherwise the local checkout has precedence, disabling cyextensions
test-command = "python -s -m pytest -c {project}/pyproject.toml -n4 -q --nomemory --notimingintensive --nomypy {project}/test"
build = "*"
# python 3.6 is no longer supported by sqlalchemy
# pypy uses the universal wheel fallback, since it does not use any compiled extension
skip = "cp36-* pp*"
# TODO: remove this skip once action support arm macs
test-skip = "*-macosx_arm64"
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
# On an Linux Intel runner with qemu installed, build Intel and ARM wheels
# NOTE: this is overriden in the pipeline using the CIBW_ARCHS_LINUX env variable to speed up the build
[tool.cibuildwheel.linux]
archs = ["x86_64", "aarch64"]
|