Skip to content

chore(examples): update messages_stream.py shebang from rye to uv#1519

Open
lucky-verma wants to merge 1 commit intoanthropics:nextfrom
lucky-verma:chore/shebang-messages-stream-rye-to-uv
Open

chore(examples): update messages_stream.py shebang from rye to uv#1519
lucky-verma wants to merge 1 commit intoanthropics:nextfrom
lucky-verma:chore/shebang-messages-stream-rye-to-uv

Conversation

@lucky-verma
Copy link
Copy Markdown

What

Updates the shebang line in examples/messages_stream.py from #!/usr/bin/env -S rye run python to #!/usr/bin/env -S uv run python.

Why

The project migrated from rye to uv (documented in CONTRIBUTING.md), and newer examples like agents.py, agents_comprehensive.py, and agents_with_files.py already use the uv shebang. messages_stream.py was the only remaining example still using the rye shebang.

This is a companion fix to #1497, which converted four other older examples from poetry to uv. No requirements-rye.lock exists in the repo anymore, so running this example with ./examples/messages_stream.py would fail unless a user happened to have rye installed globally.

Verification

  • Lint: ruff check examples/messages_stream.py → All checks passed!
  • Format: ruff format --check examples/messages_stream.py → 1 file already formatted
  • Syntax: python -c "import ast; ast.parse(open('examples/messages_stream.py').read())" → OK
  • Scope: only the shebang line changed, no other modifications

The project migrated from rye to uv (CONTRIBUTING.md), and most examples
already use the uv shebang. messages_stream.py was the last leftover with
the rye shebang. Companion to anthropics#1497 (poetry to uv) which covered four other
older examples.

No requirements-rye.lock exists in the repo, so running this example with
./examples/messages_stream.py would fail unless rye happens to be installed
globally.
@lucky-verma lucky-verma requested a review from a team as a code owner May 8, 2026 08:23
@lucky-verma lucky-verma changed the base branch from main to next May 8, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant