Skip to content

Commit 050e368

Browse files
committed
chore: address review comments
1 parent edae0d0 commit 050e368

5 files changed

Lines changed: 48 additions & 44 deletions

File tree

‎.flake8‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
[flake8]
22
max-line-length = 150
33
extend-select = TC, TC1
4-
exclude = venv/
4+
exclude =
5+
venv/,
6+
.venv/,
7+
.git/,
8+
__pycache__/,
9+
build/,
10+
dist/,
11+
.eggs/,
12+
*.egg-info/

‎docs/using-the-python-wrapper/compatibility/Compatibility.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ We encourage users to verify their configurations and ensure that their configur
1616

1717
The following plugins operate independently of connection management and are compatible with all plugins, database types, and endpoint types:
1818

19-
| Plugin | Description |
20-
|----------------|----------------------------------------------------|
21-
| [dev](../using-plugins/UsingTheDeveloperPlugin.md) | Developer utility plugin for debugging and diagnostics. |
22-
| `connect_time` | Logs the time taken to establish a connection. |
23-
| `execute_time` | Logs the time taken to execute any driver method. |
19+
| Plugin | Description |
20+
|----------------------------------------------------|----------------------------------------------------|
21+
| [`dev`](../using-plugins/UsingTheDeveloperPlugin.md) | Developer utility plugin for debugging and diagnostics. |
22+
| `connect_time` | Logs the time taken to establish a connection. |
23+
| `execute_time` | Logs the time taken to execute any driver method. |

‎docs/using-the-python-wrapper/compatibility/CompatibilityDatabaseTypes.md‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@ For Aurora Global Database configuration details, see [Aurora Global Databases](
88

99
Legend: ✅ compatible  |  ❌ incompatible / no added value
1010

11-
| Plugin code / Database type | Aurora Global Database <br>(MySQL and PG) | Aurora Cluster <br>(MySQL and PG) | RDS Multi-AZ DB Cluster (3 instances) <br>(MySQL and PG) |
12-
|---|:---:|:---:|:---:|
13-
| [custom_endpoint](../using-plugins/UsingTheCustomEndpointPlugin.md) | ✅ | ✅ | ✅ |
14-
| [host_monitoring](../using-plugins/UsingTheHostMonitoringPlugin.md) (EFM v1) | ✅ | ✅ | ✅ |
15-
| [host_monitoring_v2](../using-plugins/UsingTheHostMonitoringPlugin.md) (EFM v2) | ✅ | ✅ | ✅ |
16-
| [failover](../using-plugins/UsingTheFailoverPlugin.md) | ✅ | ✅ | ✅ |
17-
| [failover_v2](../using-plugins/UsingTheFailover2Plugin.md) | ✅ | ✅ | ✅ |
18-
| [gdb_failover](../using-plugins/UsingTheGdbFailoverPlugin.md) | ✅ | ✅ | ✅ |
19-
| [iam](../using-plugins/UsingTheIamAuthenticationPlugin.md) | ✅ | ✅ | ✅ |
20-
| [aws_secrets_manager](../using-plugins/UsingTheAwsSecretsManagerPlugin.md) | ✅ | ✅ | ✅ |
21-
| [federated_auth](../using-plugins/UsingTheFederatedAuthenticationPlugin.md) | ✅ | ✅ | ✅ |
22-
| [okta](../using-plugins/UsingTheOktaAuthenticationPlugin.md) | ✅ | ✅ | ✅ |
23-
| stale_dns | ✅ | ✅ | ✅ |
24-
| [read_write_splitting](../using-plugins/UsingTheReadWriteSplittingPlugin.md) | ✅ | ✅ | ✅ |
25-
| [srw](../using-plugins/UsingTheSimpleReadWriteSplittingPlugin.md) | ✅ | ✅ | ✅ |
26-
| [gdb_rw](../using-plugins/UsingTheGdbReadWriteSplittingPlugin.md) | ✅ | ✅ | ✅ |
27-
| [aurora_connection_tracker](../using-plugins/UsingTheAuroraConnectionTrackerPlugin.md) | ✅ | ✅ | ✅ |
28-
| connect_time | ✅ | ✅ | ✅ |
29-
| [fastest_response_strategy](../using-plugins/UsingTheFastestResponseStrategyPlugin.md) | ✅ | ✅ | ✅ |
30-
| [initial_connection](../using-plugins/UsingTheAuroraInitialConnectionStrategyPlugin.md) | ✅ | ✅ | ✅ |
31-
| [limitless](../using-plugins/UsingTheLimitlessPlugin.md) | ❌ | ✅ (PostgreSQL only) | ✅ |
32-
| [bg](../using-plugins/UsingTheBlueGreenPlugin.md) | ❌ | ✅ | ❌ |
11+
| Plugin code / Database type | Aurora Global Database <br>(MySQL and PG) | Aurora Cluster <br>(MySQL and PG) | RDS Multi-AZ DB Cluster (3 instances) <br>(MySQL and PG) |
12+
|---|:---:|:---:|:------------------------------------------------------------------------:|
13+
| [custom_endpoint](../using-plugins/UsingTheCustomEndpointPlugin.md) | ✅ | ✅ | ✅ |
14+
| [host_monitoring](../using-plugins/UsingTheHostMonitoringPlugin.md) (EFM v1) | ✅ | ✅ | ✅ |
15+
| [host_monitoring_v2](../using-plugins/UsingTheHostMonitoringPlugin.md) (EFM v2) | ✅ | ✅ | ✅ |
16+
| [failover](../using-plugins/UsingTheFailoverPlugin.md) | ✅ | ✅ | ✅ |
17+
| [failover_v2](../using-plugins/UsingTheFailover2Plugin.md) | ✅ | ✅ | ✅ |
18+
| [gdb_failover](../using-plugins/UsingTheGdbFailoverPlugin.md) | ✅ | ✅ | ✅ |
19+
| [iam](../using-plugins/UsingTheIamAuthenticationPlugin.md) | ✅ | ✅ | ✅ |
20+
| [aws_secrets_manager](../using-plugins/UsingTheAwsSecretsManagerPlugin.md) | ✅ | ✅ | ✅ |
21+
| [federated_auth](../using-plugins/UsingTheFederatedAuthenticationPlugin.md) | ✅ | ✅ | ✅ |
22+
| [okta](../using-plugins/UsingTheOktaAuthenticationPlugin.md) | ✅ | ✅ | ✅ |
23+
| stale_dns | ✅ | ✅ | ✅ |
24+
| [read_write_splitting](../using-plugins/UsingTheReadWriteSplittingPlugin.md) | ✅ | ✅ | ✅ |
25+
| [srw](../using-plugins/UsingTheSimpleReadWriteSplittingPlugin.md) | ✅ | ✅ | ✅ |
26+
| [gdb_rw](../using-plugins/UsingTheGdbReadWriteSplittingPlugin.md) | ✅ | ✅ | ✅ |
27+
| [aurora_connection_tracker](../using-plugins/UsingTheAuroraConnectionTrackerPlugin.md) | ✅ | ✅ | ✅ |
28+
| connect_time | ✅ | ✅ | ✅ |
29+
| [fastest_response_strategy](../using-plugins/UsingTheFastestResponseStrategyPlugin.md) | ✅ | ✅ | ✅ |
30+
| [initial_connection](../using-plugins/UsingTheAuroraInitialConnectionStrategyPlugin.md) | ✅ | ✅ | ✅ |
31+
| [limitless](../using-plugins/UsingTheLimitlessPlugin.md) | ❌ | ✅ (PostgreSQL only) | ✅ (PostgreSQL only) |
32+
| [bg](../using-plugins/UsingTheBlueGreenPlugin.md) | ❌ | ✅ | ❌ |
3333

3434
<br>
3535

‎docs/using-the-python-wrapper/compatibility/PluginChainCompatibility.md‎

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -154,19 +154,14 @@ built-in weights are:
154154

155155
## Async / sync availability
156156

157-
The Python wrapper ships two execution modes — a synchronous wrapper and an asynchronous (`asyncio`) wrapper. **Every plugin code is registered in both modes**, so the plugin-vs-plugin, database-type, and endpoint matrices above apply equally to sync and async. The differences are in the *target driver* and a few behavioral gaps, not in which plugins you can name.
157+
Every plugin code is registered in **both** the synchronous and asynchronous (`asyncio`) wrappers, so the plugin-vs-plugin, database-type, and endpoint matrices above apply identically to both. The only differences are the target driver and a few async behavioral gaps:
158158

159-
| Concern | Sync | Async |
159+
| Delta | Sync | Async |
160160
|---|---|---|
161-
| Target drivers | `psycopg` (PG), `mysql-connector-python` (MySQL) | `psycopg` async (PG), `aiomysql` (MySQL) |
162-
| Plugin codes available | all 22 | all 22 (identical set) |
163-
| `host_monitoring` / `host_monitoring_v2` on MySQL | ❌ `mysql-connector-python` (no thread-based abort — see below) | ✅ `aiomysql` |
164-
| `federated_auth` / `okta` IdP HTTP client | `requests` (bundled) | `aiohttp` (install separately — see note below) |
165-
166-
**Behavioral gaps to be aware of on the async side:**
167-
168-
- The async `gdb_failover` and `gdb_rw` plugins implement **home-region** logic but do **not** yet apply `gdb_accessible_regions` filtering, and the async topology monitor has no monitoring-connection-priority support. These are sync-only today. If you rely on accessible-regions or monitoring-connection-priority, use the sync wrapper.
169-
- Async plugins are otherwise functionally equivalent to their sync counterparts; differences are documented in the individual plugin pages where they exist.
161+
| Target driver | `psycopg` (PG), `mysql-connector-python` (MySQL) | `psycopg` async (PG), `aiomysql` (MySQL) |
162+
| EFM (`host_monitoring` / `host_monitoring_v2`) on MySQL | ❌ not supported ([why](#driver-specific-incompatibilities)) | ✅ supported (`aiomysql`) |
163+
| `federated_auth` / `okta` IdP HTTP client | `requests` (bundled) | `aiohttp` (install separately) |
164+
| `gdb_failover` / `gdb_rw` accessible-regions filtering + monitoring-connection-priority | ✅ supported | ❌ sync-only today |
170165

171166
## Driver-specific incompatibilities
172167

@@ -183,13 +178,14 @@ These constraints are specific to the Python target drivers and are **not** refl
183178
| Use case | Sync chain | Async chain |
184179
|---|---|---|
185180
| Aurora PG — R/W splitting + failover + EFM | `read_write_splitting,failover_v2,host_monitoring_v2` | `read_write_splitting,failover_v2,host_monitoring_v2` |
186-
| Aurora MySQL (sync, `mysql-connector-python`) — R/W splitting + failover | `read_write_splitting,failover_v2` *(no EFM)* | — |
187-
| Aurora MySQL (async, `aiomysql`) — R/W splitting + failover + EFM | — | `read_write_splitting,failover_v2,host_monitoring_v2` |
181+
| Aurora MySQL — R/W splitting + failover | `read_write_splitting,failover_v2` ¹ | `read_write_splitting,failover_v2,host_monitoring_v2` |
188182
| Aurora PG — failover only | `failover_v2,host_monitoring_v2` | `failover_v2,host_monitoring_v2` |
189-
| Aurora MySQL (sync) — failover only | `failover_v2` | — |
183+
| Aurora MySQL — failover only | `failover_v2` ¹ | `failover_v2,host_monitoring_v2` |
190184
| Aurora Global Database — GDB failover + EFM | `gdb_failover,host_monitoring_v2` | `gdb_failover,host_monitoring_v2` |
191185
| Aurora Global Database — GDB R/W splitting + GDB failover | `gdb_rw,gdb_failover` | `gdb_rw,gdb_failover` |
192186

187+
¹ Sync MySQL (`mysql-connector-python`) omits EFM — see [Async / sync availability](#async--sync-availability).
188+
193189
> **Note (async federated/Okta auth):** the async `federated_auth` and `okta` plugins perform their
194190
> IdP HTTP round-trips with [`aiohttp`](https://docs.aiohttp.org/), which is not a runtime dependency
195191
> of this package — install it alongside your async driver (`pip install aiohttp`) when using either
@@ -202,4 +198,4 @@ These constraints are specific to the Python target drivers and are **not** refl
202198
- [UsingTheFailoverPlugin.md](../using-plugins/UsingTheFailoverPlugin.md) (v1, not recommended for new code per the table above)
203199
- [UsingTheHostMonitoringPlugin.md](../using-plugins/UsingTheHostMonitoringPlugin.md)
204200
- [UsingTheIamAuthenticationPlugin.md](../using-plugins/UsingTheIamAuthenticationPlugin.md)
205-
- [FailoverConfigurationGuide.md](../FailoverConfigurationGuide.md) — retry-budget knobs at the SQLAlchemy / Django boundary
201+
- [FailoverConfigurationGuide.md](../FailoverConfigurationGuide.md)

‎docs/using-the-python-wrapper/using-plugins/UsingTheFailover2Plugin.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Failover Plugin v2
22
The AWS Advanced Python Wrapper uses the Failover Plugin v2 to provide minimal downtime in the event of a DB instance failure. The plugin is the next version (v2) of the [Failover Plugin](./UsingTheFailoverPlugin.md) and unless explicitly stated otherwise, most of the information and suggestions for the Failover Plugin are applicable to the Failover Plugin v2.
33

4-
> **Note**: pair this plugin with `read_write_splitting` when you need R/W splitting — the v1 `failover` plugin doesn't start the cluster topology monitor on initial connect, which makes `read_only = True` silently fall back to the writer. See [PluginChainCompatibility.md](../compatibility/PluginChainCompatibility.md) for the full compatibility matrix and [FailoverConfigurationGuide.md](../FailoverConfigurationGuide.md#retry-behavior-at-the-sqlalchemy--django-pool-boundary) for the retry-budget knobs at the SA / Django pool boundary.
4+
> **Note**: pair this plugin with `read_write_splitting` when you need R/W splitting — the v1 `failover` plugin doesn't start the cluster topology monitor on initial connect, which makes `read_only = True` silently fall back to the writer. See [PluginChainCompatibility.md](../compatibility/PluginChainCompatibility.md) for the full compatibility matrix.
55
66
## Differences between the Failover Plugin and the Failover Plugin v2
77

0 commit comments

Comments
 (0)