From 119b34ade7704be464fc15a90897161bdc157a94 Mon Sep 17 00:00:00 2001 From: Khelan Modi Date: Tue, 26 May 2026 14:37:50 -0700 Subject: [PATCH] Recommend PyMongo AsyncMongoClient over deprecated Motor The connection skill listed Motor as the canonical Python async MongoDB driver. MongoDB announced Motor's deprecation in May 2024 in favor of PyMongo's built-in async API (`AsyncMongoClient`, GA in PyMongo 4.9, Sept 2024). Motor receives only critical fixes through May 2026 and will be end-of-life after that. Because this is the only place in the kit that mentions an async Python driver, agents currently default to recommending Motor for any `DocumentDB + async Python` task. Update the bullet to point at `pymongo.AsyncMongoClient` and add a short callout explaining the deprecation so future contributors don't reintroduce Motor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- skills/connection/SKILL.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/skills/connection/SKILL.md b/skills/connection/SKILL.md index 9a2dfe9..ea19ee5 100644 --- a/skills/connection/SKILL.md +++ b/skills/connection/SKILL.md @@ -37,9 +37,16 @@ Borrow from pool → Execute operation → Return to pool → Prune idle connect exceeding `maxIdleTimeMS`. **Synchronous vs Asynchronous Drivers:** -- **Synchronous** (PyMongo, Java sync): Thread blocks; pool size often matches - thread pool size -- **Asynchronous** (Node.js, Motor): Non-blocking I/O; smaller pools suffice +- **Synchronous** (PyMongo `MongoClient`, Java sync): Thread blocks; pool size + often matches thread pool size +- **Asynchronous** (Node.js, PyMongo `AsyncMongoClient`): Non-blocking I/O; + smaller pools suffice + +> **Python async note:** Use PyMongo's native `AsyncMongoClient` (PyMongo +> 4.9+), **not** Motor. MongoDB announced Motor's deprecation in May 2024 in +> favor of PyMongo's built-in async API; Motor receives only critical fixes +> through May 2026 and is end-of-life after that. New Python async code on +> Azure DocumentDB should import `from pymongo import AsyncMongoClient`. **Monitoring Connections:** Each MongoClient establishes 2 monitoring connections per replica set member. Formula: