<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/peeking-under-the-hood-of-uv-run---zanie-blue-yj4baan1s" -->

---
title: Peeking under the hood of uv run - Zanie Blue | daily.dev
description: A deep technical walkthrough of how uv, the Rust-based Python package manager, executes 'uv run' by moving through three phases: discovery, locking, and...
canonical: https://daily.dev/posts/peeking-under-the-hood-of-uv-run---zanie-blue-yj4baan1s
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Peeking under the hood of uv run - Zanie Blue | daily.dev
og:description: A deep technical walkthrough of how uv, the Rust-based Python package manager, executes 'uv run' by moving through three phases: discovery, locking, and...
og:url: https://daily.dev/posts/peeking-under-the-hood-of-uv-run---zanie-blue-yj4baan1s
og:image: https://api.daily.dev/og/posts/Yj4BaaN1S.png
og:image:alt: Peeking under the hood of uv run - Zanie Blue
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Peeking under the hood of uv run - Zanie Blue

**[PyCon US](https://daily.dev/sources/pyconus)** · 38 min read · 0 upvotes · 0 comments

## Summary

A deep technical walkthrough of how uv, the Rust-based Python package manager, executes 'uv run' by moving through three phases: discovery, locking, and syncing. The talk covers cold vs warm vs hot performance numbers (4 seconds cold, down to ~10ms hot for Flask), explains internals like TOML traversal, Python interpreter discovery heuristics, cache formats (msgpack, archive crate), HTTP range requests for wheel metadata, universal resolution via a forking resolver, reflinks/hard links for installing packages, and a recently patched low-severity security issue involving uninstall path validation. It closes with future work on locking build dependencies, message-pack index responses, bulk metadata serving, and wheel variants.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=gZiqURP5tbk>

## Questions this post answers

### Why does uv run take several seconds the first time but feel instant afterward?

The first cold run has to fetch package metadata from the index and download and build wheels, which for Flask takes roughly 50ms for discovery, 750ms for locking, and 3 seconds for syncing, totaling about 4 seconds. Once the cache is warm, locking drops to about 15ms and syncing to about 100ms. When the lock file and environment already exist and just need auditing, the whole operation takes around 10 milliseconds, faster than Python's own startup time.

_Understanding these cache tiers helps when debugging why a Python setup feels slow versus instant, something daily.dev readers track alongside other uv internals._

### How does uv avoid downloading an entire wheel just to read its dependency metadata?

Uv uses HTTP range requests to fetch only the central directory at the end of the wheel zip file, locate the metadata file's offset, and then request just that portion, avoiding a full download when the package registry supports range requests. If range requests aren't supported, or no metadata file is available on the index, uv falls back to downloading the full wheel or source distribution and extracting metadata directly.

_Developers optimizing dependency resolution speed can follow this kind of packaging internals detail on daily.dev._

### What was the low severity security issue found in uv and pip related to uninstalling packages?

Both uv and pip previously failed to validate that files listed in a package's RECORD metadata file were actually located inside the installed environment, meaning an uninstall could delete an arbitrary file anywhere on the system. Uv has since been patched to refuse deleting files outside the environment and now also validates that RECORD entries correspond to real files within the installed wheel, removing invalid entries during install.

_Teams auditing dependency tooling for supply chain risks can keep up with fixes like this uv and pip issue on daily.dev._

## Similar posts on daily.dev

- [How uv got so fast](https://daily.dev/posts/how-uv-got-so-fast-fgscee8dp) · Hacker News · 5 upvotes · 2 comments

---

Tags: [#python](https://daily.dev/tags/python), [#performance](https://daily.dev/tags/performance), [#rust](https://daily.dev/tags/rust)

[View this post on daily.dev](https://daily.dev/posts/peeking-under-the-hood-of-uv-run---zanie-blue-yj4baan1s)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Peeking under the hood of uv run - Zanie Blue","url":"https://daily.dev/posts/peeking-under-the-hood-of-uv-run---zanie-blue-yj4baan1s","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/peeking-under-the-hood-of-uv-run---zanie-blue-yj4baan1s"},"datePublished":"2026-08-25T18:58:22.391Z","dateModified":"2026-08-25T18:58:54.825Z","description":"A deep technical walkthrough of how uv, the Rust-based Python package manager, executes 'uv run' by moving through three phases: discovery, locking, and...","image":"https://i.ytimg.com/vi/gZiqURP5tbk/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/gZiqURP5tbk/sddefault.jpg","isAccessibleForFree":true,"articleSection":"PyCon US","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"PyCon US","logo":"https://media.daily.dev/image/upload/s--DLedNxG1--/f_auto,q_auto/v1777800767/logos/pyconus?_a=BAMAMiWQ0","url":"https://daily.dev/sources/pyconus"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/peeking-under-the-hood-of-uv-run---zanie-blue-yj4baan1s","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,performance,rust","timeRequired":"PT38M","video":{"@type":"VideoObject","name":"Peeking under the hood of uv run - Zanie Blue","description":"A deep technical walkthrough of how uv, the Rust-based Python package manager, executes 'uv run' by moving through three phases: discovery, locking, and...","thumbnailUrl":"https://i.ytimg.com/vi/gZiqURP5tbk/sddefault.jpg","uploadDate":"2026-08-25T18:58:22.391Z","duration":"PT38M","url":"https://api.daily.dev/r/Yj4BaaN1S","embedUrl":"https://www.youtube.com/embed/gZiqURP5tbk"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"PyCon US","item":"https://daily.dev/sources/pyconus"},{"@type":"ListItem","position":3,"name":"Peeking under the hood of uv run - Zanie Blue"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/peeking-under-the-hood-of-uv-run---zanie-blue-yj4baan1s#faq","mainEntity":[{"@type":"Question","name":"Why does uv run take several seconds the first time but feel instant afterward?","acceptedAnswer":{"@type":"Answer","text":"The first cold run has to fetch package metadata from the index and download and build wheels, which for Flask takes roughly 50ms for discovery, 750ms for locking, and 3 seconds for syncing, totaling about 4 seconds. Once the cache is warm, locking drops to about 15ms and syncing to about 100ms. When the lock file and environment already exist and just need auditing, the whole operation takes around 10 milliseconds, faster than Python's own startup time. Understanding these cache tiers helps when debugging why a Python setup feels slow versus instant, something daily.dev readers track alongside other uv internals."}},{"@type":"Question","name":"How does uv avoid downloading an entire wheel just to read its dependency metadata?","acceptedAnswer":{"@type":"Answer","text":"Uv uses HTTP range requests to fetch only the central directory at the end of the wheel zip file, locate the metadata file's offset, and then request just that portion, avoiding a full download when the package registry supports range requests. If range requests aren't supported, or no metadata file is available on the index, uv falls back to downloading the full wheel or source distribution and extracting metadata directly. Developers optimizing dependency resolution speed can follow this kind of packaging internals detail on daily.dev."}},{"@type":"Question","name":"What was the low severity security issue found in uv and pip related to uninstalling packages?","acceptedAnswer":{"@type":"Answer","text":"Both uv and pip previously failed to validate that files listed in a package's RECORD metadata file were actually located inside the installed environment, meaning an uninstall could delete an arbitrary file anywhere on the system. Uv has since been patched to refuse deleting files outside the environment and now also validates that RECORD entries correspond to real files within the installed wheel, removing invalid entries during install. Teams auditing dependency tooling for supply chain risks can keep up with fixes like this uv and pip issue on daily.dev."}}]}
```

