Skip to content

spurious "--frozen is a no-op" warning for PEP723 script with lockfile #10839

@ctcjab

Description

@ctcjab

Summary

I'm providing an executable in /usr/local/bin for my users (who don't have write access to /usr/local/bin) to run, and the executable begins with:

#!/usr/bin/env -S uv run -s --frozen
# /// script
# requires-python = "~=3.12"
# dependencies = [<my-dependencies-here>]
# ///

I am also providing an accompanying lockfile that I generated via uv lock --script /usr/local/bin/my-script.

When the script is run, uv emits "warning: --frozen is a no-op for Python scripts with inline metadata, which always run in isolation". But if I remove the --frozen from the shebang, invoking the script fails with "error: failed to write to file /usr/local/bin/my-script.lock: Permission denied (os error 13)" for users since they don't have write access to /usr/local/bin.

Is this warning spurious, or am I holding uv wrong? Apologies if so!

Platform

Ubuntu 24.04

Version

uv 0.5.21 (3478c06 2025-01-17)

Python version

3.12.8

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions