Search the archive

14,355 indexed articles, 13,283 of them summarised by us.

Articles
14,355
Research papers
91,965
Models priced
2,249
Providers
163

2 results for “pyo3”

Newest and most relevant first

If in doubt, delete the uv.lock file

Python developers on 3.15 can lose minutes to confusing dependency build failures that are fixed simply by deleting a stale uv.lock file.

Simon Willison shares a fix for a puzzling Python programming error. Python packages sometimes come with a 'lock' file that pins exact versions of other software they need. When those pinned versions lack pre-built files for the new Python 3.15, installing them fails. Deleting the lock file and rerunning usually solves it.

Willison, a prominent Python developer, documents an operational gotcha for teams upgrading to Python 3.15. Stale uv.lock files left by test runs can pin dependency versions without Python 3.15 support, causing build failures like maturin/Pyo3 errors. The remedy, delete the lock file, is cheap, but teams upgrading now should know it to avoid lost debugging time.

Libraries omit uv.lock (pinning dependencies would be rude to consumers), but `uv run pytest` generates one locally, gitignored. With Python 3.15, a pinned version like watchfiles==1.1.1 may lack a 3.15 wheel; maturin's build fails because Pyo3 caps supported Python at 3.14. Deleting the lock and rerunning `uv run pytest` resolves it.

Simon Willison’s Weblog →

How to Call Rust from Python

This article shows how to use Rust, a fast and safe programming language, with Python, a popular and easy-to-use language. By combining them, developers can make their programs run faster while keeping them simple to build. This is helpful for tasks that need both speed and ease of use.

This article provides a practical guide for integrating Rust with Python to combine Python's ease of use with Rust's high performance. It addresses the strategic need for developers to optimize computationally intensive tasks while maintaining productivity. The approach enables businesses to enhance application performance without sacrificing development speed.

The article explains how to call Rust code from Python using tools like PyO3 and cffi, enabling seamless interoperability between the two languages. It covers setup, basic examples, and best practices for leveraging Rust's memory safety and speed within Python workflows. This integration is particularly useful for performance-critical applications in data science and machine learning.

Towards Data Science Blog →