Simon Willison

Introducing wrapture

Introducing wrapture, a new Python library from Graham Dumpleton that extends the monkeypatching concepts of wrapt to support both testing and tracing simultaneously. It allows developers to wrap any function or method so that all accesses can be traced or overridden, serving as an alternative to unittest.mock and enabling observation of code without altering its behavior. Wrapture includes OpenTelemetry support and offers a configuration-based approach for adding tracing to existing projects, with the entire project and its documentation created under AI assistance.

Simon Willison
Sep 11

Don't sleep on wrapture

Graham Dumpleton’s new monkey‑patching library, wrapture, offers a versatile toolkit for Python developers, combining testing utilities, observability, and live tracing. It supports a wide range of use cases—from unit testing and call recording to phased behavior changes and zero‑code tracing via TOML configuration. The library also includes instrumentation for popular frameworks and services, OpenTelemetry export, and interactive JupyterLab workshops, making it a potentially indispensable Swiss‑Army‑knife for Python projects.

Simon Willison
Oct 12

Hello Python 3.15, goodbye 3.10, and now I can use 3.11

Python 3.15 introduces several new features, notably explicit lazy imports from PEP 810 that delay module loading until first use, and unpacking syntax in comprehensions (PEP 798) that simplifies flattening lists, sets, and dictionaries. The release also updates the profiling tools, renaming the tracing profiler to profiling.tracing and adding a new sampling profiler, profiling.sampling. These changes aim to improve performance and developer ergonomics in Python code.

Simon Willison
Sep 1

Python 3.15.0 candidate 2 is here!

Python 3.15.0 candidate 2 has been released, marking the final release candidate for the upcoming 3.15 release scheduled for October. Hugo van Kemenade, the release manager, notes that only clear bug‑fix changes are allowed between this candidate and the final release, and urges third‑party maintainers to prepare wheels on PyPI and test their projects during this phase. The new RC is not yet available for GitHub Actions, but users can add it to their testing matrix using the allow‑prereleases and check‑latest flags to automatically test against the latest RC and then the stable release.

Simon Willison
Oct 10

Python 3.15.0 added to actions/python-versions

Python 3.15.0 has been added to the actions/python-versions repository. The author had been monitoring the repository for the release and used ChatGPT to automate the check. With the new version available, users can now include "3.15" in their GitHub Actions testing matrix to run tests against the latest Python release.

Simon Willison
Aug 24

llm-anthropic 0.27

The release of llm‑anthropic 0.27 updates the Anthropic plugin for LLM to be compatible with the newly released anthropic v1.0.0 Python library, which has switched from httpx to httpx2. This mirrors a similar change made by OpenAI in their v3.0.0 release two weeks prior. The update includes a migration guide and a pull request that ensures tests pass after upgrading to anthropic>=1.

Simon Willison
Sep 8

Introducing ChatGPT Images 2.5

Simon Willison announces the release of ChatGPT Images 2.5, noting that OpenAI’s image generation models have processed over 3 billion images across ChatGPT Images and the GPT‑Image API. The new version improves instruction‑following across multiple turns, speeds up responses, and better preserves subjects from reference photos. Two new API model IDs—gpt‑image‑2.5‑sunburst and gpt‑image‑2.5‑flare—are available, with Sunburst recommended for precision editing and Flare for fast, high‑quality everyday generation. Willison has updated his openai_image.py CLI tool to accept reference images, demonstrating its use with a raccoon scientist prompt.

Simon Willison
Aug 29

Introducing Hy4 Preview

Simon Willison introduces Hy4 Preview, a new large language model from Tencent featuring 770 B total parameters, 49 B active parameters, a 1 M token context window, and 1.56 TB of storage on Hugging Face. The release marks a significant increase over Hy3, which had 295 B total parameters, 21 B active parameters, a 256 k token context window, and 598 GB of storage. Willison also shares the model’s chat template, highlighting two reasoning effort levels—‘high’ (default) and ‘no_think’—and demonstrates a sample prompt that showcases the model’s reasoning trace. whyItMatters":"The article provides concrete details on Hy4’s scale and configuration, illustrating Tencent’s advancement in large‑language‑model capabilities and offering practical insights into its usage through the chat template and reasoning settings."

Simon Willison
Aug 22

Quoting Linus Torvalds

The article recounts a challenging debug session that was significantly aided by an AI assistant. Despite the AI initially claiming the problem was unsolvable and suggesting a report be written instead, it persisted, adding debug code and analyzing it as the author pushed forward. Ultimately, the author credits the AI with writing the commit message for the fix.

Simon Willison
Sep 22

llm-typesafe 0.1a0

Simon Willison released the llm-typesafe 0.1a0 plugin, adding support for TypeSafe AI’s Jev model to the LLM tool. Users install it with `llm install llm-typesafe`, set an API key, and can then ask Jev-model questions such as yes/no, choice, or scoring queries via the `llm -m jev` command. The release includes examples for each question type and references a README for further details.