Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [Unreleased]

- Updated pip from 25.3 to 26.0.1. ([#2032](https://github.com/heroku/heroku-buildpack-python/pull/2032))
- Explicitly configured uv to use hard links to maintain the behaviour of previous versions. ([#2044](https://github.com/heroku/heroku-buildpack-python/pull/2044))

## [v336] - 2026-03-02

Expand Down
4 changes: 4 additions & 0 deletions lib/uv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,17 @@ function uv::install_uv() {
# Prevent uv from downloading/using its own Python installation.
export UV_NO_MANAGED_PYTHON="1"
export UV_PYTHON_DOWNLOADS="never"
# Force uv to use hardlinks rather than the new default of reflinks, since the latter are
# significantly slower on Kodon: https://github.com/astral-sh/uv/issues/18259
export UV_LINK_MODE="hardlink"

# Set the same env vars in the environment used by later buildpacks.
cat >>"${export_file}" <<-EOF
export PATH="${uv_dir}:\${PATH}"
export UV_PROJECT_ENVIRONMENT="${python_home}"
export UV_NO_MANAGED_PYTHON="1"
export UV_PYTHON_DOWNLOADS="never"
export UV_LINK_MODE="hardlink"
EOF

# As a performance optimisation, uv attempts to use hardlinks instead of copying files from its
Expand Down
2 changes: 2 additions & 0 deletions spec/hatchet/ci_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@
PATH=/tmp/cache\\w+/.heroku/python-uv:/app/.heroku/python/bin:/usr/local/bin:/usr/bin:/bin:/app/.sprettur/bin/
PKG_CONFIG_PATH=/app/.heroku/python/lib/pkg-config
PYTHONUNBUFFERED=1
UV_LINK_MODE=hardlink
UV_NO_MANAGED_PYTHON=1
UV_PROJECT_ENVIRONMENT=/app/.heroku/python
UV_PYTHON_DOWNLOADS=never
Expand All @@ -331,6 +332,7 @@
PYTHONHOME=/app/.heroku/python
PYTHONPATH=/app
PYTHONUNBUFFERED=true
UV_LINK_MODE=hardlink
UV_NO_MANAGED_PYTHON=1
UV_PROJECT_ENVIRONMENT=/app/.heroku/python
UV_PYTHON_DOWNLOADS=never
Expand Down
2 changes: 2 additions & 0 deletions spec/hatchet/uv_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
remote: PKG_CONFIG_PATH=/app/.heroku/python/lib/pkg-config
remote: PYTHONUNBUFFERED=1
remote: UV_CACHE_DIR=/tmp/uv-cache
remote: UV_LINK_MODE=hardlink
remote: UV_NO_MANAGED_PYTHON=1
remote: UV_PROJECT_ENVIRONMENT=/app/.heroku/python
remote: UV_PYTHON_DOWNLOADS=never
Expand All @@ -46,6 +47,7 @@
remote: PYTHONPATH=/app
remote: PYTHONUNBUFFERED=true
remote: UV_CACHE_DIR=/tmp/uv-cache
remote: UV_LINK_MODE=hardlink
remote: UV_NO_MANAGED_PYTHON=1
remote: UV_PROJECT_ENVIRONMENT=/app/.heroku/python
remote: UV_PYTHON_DOWNLOADS=never
Expand Down