Skip to content

Commit e240be5

Browse files
AhmadMasryclaude
andcommitted
Merge origin/main into feat/async-parity
Brings in main's "Add basic support for SQLAlchemy ORM (aws#1224)" (a2aa602). Conflict resolutions: - aws_advanced_python_wrapper/__init__.py: kept feat's _dbapi.install() structure (dynamically installs the full PEP 249 surface; verified _dbapi._PEP249_NAMES covers all 9 exceptions main exported explicitly, plus type ctors/singletons + apilevel/threadsafety/paramstyle). Preserved main's only unique addition, __version__ = DriverInfo.DRIVER_VERSION (+ DriverInfo import). Dropped main's redundant explicit pep249 imports and list-style __all__. - pyproject.toml: dropped main's [tool.poetry.plugins."sqlalchemy.dialects"] block. feat is fully PEP 621 ([project.entry-points]); mixing the legacy poetry-plugins mechanism would risk dual-registration of the same entry-point group. The ORM dialects are re-registered under feat's PEP 621 block in a follow-up commit (adopting main's approved dialect+driver URL convention). Dropped main's aws_advanced_python_wrapper/sqlalchemy/mysql_orm_dialect.py: feat's sqlalchemy_dialects/mysql.py is the more robust implementation (failover-signal handling via _FailoverSuccessRewrapMixin + is_disconnect, async sibling, surgical introspection overrides). main's ORM dialect also shipped two defects: a dangling pg_orm_dialect entry point (module never committed) and a _detect_charset that requires CMySQLConnection and raises under the recommended Aurora-MySQL use_pure=True config. Kept main's ORM integration tests (tests/integration/container/sqlalchemy/) for salvage: they already target the mysql+aws_wrapper_mysqlconnector:// URL that the follow-up convention change adopts, so they will bind to feat's dialect. They are infra-gated (Aurora) and not part of unit CI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 parents e713459 + a2aa602 commit e240be5

4 files changed

Lines changed: 1431 additions & 0 deletions

File tree

aws_advanced_python_wrapper/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
from aws_advanced_python_wrapper import _dbapi
1919
from aws_advanced_python_wrapper.cleanup import release_resources
20+
from aws_advanced_python_wrapper.driver_info import DriverInfo
2021
from aws_advanced_python_wrapper.utils.utils import LogUtils
2122
from aws_advanced_python_wrapper.wrapper import AwsWrapperConnection
2223

@@ -25,6 +26,8 @@
2526
# AwsWrapperConnection.connect for back-compat with existing callers.
2627
_dbapi.install(sys.modules[__name__].__dict__, connect=AwsWrapperConnection.connect)
2728

29+
__version__ = DriverInfo.DRIVER_VERSION
30+
2831

2932
def set_logger(name="aws_advanced_python_wrapper", level=DEBUG, format_string=None):
3033
LogUtils.setup_logger(getLogger(name), level, format_string)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License").
4+
# You may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.

0 commit comments

Comments
 (0)