Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
152 lines (140 loc) · 5.92 KB
/
Copy pathpyproject.toml
File metadata and controls
152 lines (140 loc) · 5.92 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
[tool.poetry]
name = "aws_advanced_python_wrapper"
version = "3.2.0"
description = "Amazon Web Services (AWS) Advanced Python Wrapper"
authors = ["Amazon Web Services"]
readme = "README.md"
license = "Apache-2.0"
include = ["CONTRIBUTING.md"]
repository = "https://github.com/awslabs/aws-advanced-python-wrapper"
documentation = "https://github.com/awslabs/aws-advanced-python-wrapper/docs/"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
# SQLAlchemy dialect registration. Poetry exposes these as setuptools-style
# entry points under the ``sqlalchemy.dialects`` group, so the wrapper plugs in
# as a driver under SQLAlchemy's existing dialects (matching stock
# mysql+mysqlconnector / postgresql+psycopg) rather than as a parallel
# top-level dialect name. postgresql+aws_wrapper_psycopg serves BOTH sync and
# async: the sync dialect implements get_async_dialect_cls, so
# create_async_engine swaps in the async dialect from the same URL (exactly how
# stock postgresql+psycopg works). MySQL's sync and async paths are different
# DBAPIs (mysql-connector-python vs aiomysql), so they use distinct driver names.
[tool.poetry.plugins."sqlalchemy.dialects"]
"postgresql.aws_wrapper_psycopg" = "aws_advanced_python_wrapper.sqlalchemy_dialects.pg:AwsWrapperPGPsycopgDialect"
"mysql.aws_wrapper_mysqlconnector" = "aws_advanced_python_wrapper.sqlalchemy_dialects.mysql:AwsWrapperMySQLConnectorDialect"
"mysql.aws_wrapper_aiomysql" = "aws_advanced_python_wrapper.sqlalchemy_dialects.mysql_async:AwsWrapperMySQLAiomysqlAsyncDialect"
[tool.poetry.dependencies]
python = "^3.10.0"
resourcebundle = "2.1.0"
boto3 = "^1.42.95"
toml = "^0.10.2"
aws-xray-sdk = "^2.15.0"
opentelemetry-api = "^1.22.0"
opentelemetry-sdk = "^1.22.0"
requests = "^2.33.1"
# The KMS Encryption plugin needs this for AES-GCM, which the stdlib lacks.
# It is installed only with the `encryption` extra, so users who don't use the
# plugin don't pick up a native dependency:
# pip install "aws-advanced-python-wrapper[encryption]"
# The import is lazy as well: nothing on the core import path imports it.
cryptography = { version = ">=42.0.0", optional = true }
# The plugin's SQL analysis (which bind parameter fills which column) parses
# statements with this pure-Python parser. Also only in the `encryption` extra
# and imported lazily. Capped below the next major: its expression tree changes
# shape between majors, and the analysis walks that tree. The floor is the
# oldest release the analysis tests pass on.
sqlglot = { version = ">=30.14.0,<31.0.0", optional = true }
[tool.poetry.extras]
# `pip install "aws-advanced-python-wrapper[encryption]"` to use the KMS Encryption plugin.
encryption = ["cryptography", "sqlglot"]
[tool.poetry.group.dev.dependencies]
mypy = "^1.20.2"
flake8 = ">=7.3.0,<8"
flake8-type-checking = ">=3.2.0,<4.0"
isort = "^9.0.2"
pep8-naming = ">=0.15.1,<0.16.0"
SQLAlchemy = ">=2.0.49,<2.1"
psycopg = "^3.3.3"
psycopg-binary = "^3.3.3"
mysql-connector-python = "^9.7.0"
django = "^5.2.13"
django-stubs = "^6.0.1"
aiomysql = ">=0.2"
aiohttp = ">=3"
boto3-stubs = "^1.43.0"
types_aws_xray_sdk = "^2.13.0"
ruff = "^0.17.6"
import-linter = "~2.15"
# Non-optional in the dev group so the encryption unit tests run without needing
# to install the `encryption` extra explicitly.
cryptography = ">=42.0.0"
sqlglot = ">=30.14.0,<31.0.0"
[tool.poetry.group.test.dependencies]
boto3 = "^1.42.95"
types-boto3 = "^1.42.95"
coverage = "^7.13.5"
debugpy = "^1.8.20"
pydevd-pycharm = "^263.7031.30"
pytest = ">=8.2,!=8.2.2,<10.0.0"
pytest-mock = "^3.15.1"
pytest-html = "^4.2.0"
pytest-html-merger = ">=0.1.0,<0.1.1"
toxiproxy-python = "^0.1.1"
parameterized = "^0.9.0"
tabulate = ">=0.10.0,<0.11"
psycopg = "^3.3.3"
psycopg-binary = "^3.3.3"
mysql-connector-python = "^9.7.0"
opentelemetry-exporter-otlp = "^1.43.0"
opentelemetry-exporter-otlp-proto-grpc = "^1.43.0"
opentelemetry-sdk-extension-aws = "^2.1.0"
pytest-timeout = "^2.4.0"
pytest-repeat = "^0.9.4"
pytest-rerunfailures = "^16.7"
greenlet = ">=3"
[tool.isort]
sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
no_lines_before = "LOCALFOLDER"
[tool.ruff]
target-version = "py310"
line-length = 150
extend-exclude = ["docs/examples"]
[tool.ruff.lint]
select = ["B", "ASYNC", "RUF006", "TID251"]
ignore = ["B904", "B007", "B008", "B024", "B027", "ASYNC110"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"psycopg".msg = "Shared code is driver-agnostic; add a DriverDialect method instead."
"mysql".msg = "Shared code is driver-agnostic; add a DriverDialect method instead."
"aiomysql".msg = "Shared code is driver-agnostic; add an AsyncDriverDialect method instead."
[tool.ruff.lint.per-file-ignores]
"aws_advanced_python_wrapper/*driver_dialect*.py" = ["TID251"]
"aws_advanced_python_wrapper/aio/driver_dialect/*" = ["TID251"]
"aws_advanced_python_wrapper/psycopg.py" = ["TID251"]
"aws_advanced_python_wrapper/mysql_connector.py" = ["TID251"]
"aws_advanced_python_wrapper/aio/psycopg.py" = ["TID251"]
"aws_advanced_python_wrapper/aio/aiomysql.py" = ["TID251"]
"aws_advanced_python_wrapper/utils/*exception_handler*.py" = ["TID251"]
"aws_advanced_python_wrapper/sqlalchemy_dialects/*" = ["TID251"]
"aws_advanced_python_wrapper/django/*" = ["TID251"]
"tests/**" = ["TID251"]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
filterwarnings = [
'ignore:cache could not write path',
'ignore:could not create cache path',
'ignore:Exception during reset or similar:pytest.PytestUnhandledThreadExceptionWarning'
]