返回全部动态

Graham Dumpleton 发布 Wrapture:AI 驱动的 Python 测试与追踪库

原标题:Introducing wrapture

Simon Willison's Weblog开源质量 69

AI 摘要

Graham Dumpleton 发布了新项目 Wrapture,这是一个 Python 库,扩展了 wrapt 的 monkeypatching 思想,用于同时进行测试和追踪。Wrapture 可以包装任何函数或方法,支持追踪和覆盖返回值,并集成了 OpenTelemetry,提供基于配置的追踪机制。该项目完全由 AI 助手在 Dumpleton 的指导下编写,他强调这是工程化开发而非随意的 vibe coding。Wrapture 目前处于早期阶段,但已展现出潜力。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

31st August 2026 - Link Blog Introducing wrapture. New from Graham Dumpleton (of wrapt, mod_wsgi, and New Relic's Python agent fame), who describes Wrapture as taking the monkeypatching ideas from wrapt and extending them to apply to testing and tracing at the same time. Wrapture (full documentation here) makes it easy to wrap any function or method such that all access can be traced, or can be overridden to return a different value. It acts as both an alternative to unittest.mock and a way to i


发布时间:2026-09-01 07:59
抓取时间:2026-09-01 08:19
来源机构:Simon Willison
阅读原文simonwillison.net