Skip to content

chore(examples): update shebang from poetry to uv#1497

Merged
karpetrosyan merged 1 commit intoanthropics:nextfrom
xodn348:chore/update-example-shebangs
May 7, 2026
Merged

chore(examples): update shebang from poetry to uv#1497
karpetrosyan merged 1 commit intoanthropics:nextfrom
xodn348:chore/update-example-shebangs

Conversation

@xodn348
Copy link
Copy Markdown

@xodn348 xodn348 commented May 5, 2026

What

Updates the shebang line in 4 example files from #!/usr/bin/env -S poetry run python to #!/usr/bin/env -S uv run python.

Why

The project migrated from poetry to uv (documented in CONTRIBUTING.md), and newer examples like agents.py already use the uv shebang. These 4 older examples were left behind:

  • examples/bedrock.py
  • examples/text_completions_demo_async.py
  • examples/text_completions_demo_sync.py
  • examples/text_completions_streaming.py

No poetry.lock exists in the repo anymore, so running these examples with ./examples/bedrock.py would fail unless a user happened to have poetry installed globally.

Verification

  • Lint: ruff check passed
  • Format: ruff format --check passed (no changes needed)
  • Syntax: ast.parse verified all 4 files
  • Scope: only shebang lines changed, no other modifications

The project migrated from poetry to uv, and CONTRIBUTING.md documents
uv as the package manager. Newer examples (agents.py) already use
`#!/usr/bin/env -S uv run python`. Update the 4 remaining examples
that still referenced poetry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@xodn348 xodn348 requested a review from a team as a code owner May 5, 2026 05:13
Copy link
Copy Markdown
Collaborator

@karpetrosyan karpetrosyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@karpetrosyan karpetrosyan changed the base branch from main to next May 7, 2026 18:11
@karpetrosyan karpetrosyan merged commit ace8f38 into anthropics:next May 7, 2026
5 checks passed
@stainless-app stainless-app Bot mentioned this pull request May 7, 2026
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.

2 participants