Skip to content

📝 Fix stale requirements.txt install command in the completion container guide - #1981

Open
HyperionBurn wants to merge 1 commit into
fastapi:masterfrom
HyperionBurn:docs/fix-stale-requirements-install
Open

HyperionBurn wants to merge 1 commit into
fastapi:masterfrom
HyperionBurn:docs/fix-stale-requirements-install

Conversation

@HyperionBurn

Copy link
Copy Markdown

What

The migration to uv in #1472 removed the root requirements.txt, but two references to it were left behind:

  • docs/contributing.md — the "install typer inside the container" step
  • scripts/docker/Dockerfile — the final RUN step

Because scripts/docker/compose.yaml builds directly from that Dockerfile:

build:
  context: ../../

  dockerfile: scripts/docker/Dockerfile

docker compose run typer bash currently fails while building the image, because the file the RUN step reads no longer exists. That is the documented entry point for testing shell completion, so the whole workflow is blocked at the first command.

This replaces both with uv pip install -e ..

Why uv pip install -e . and not uv sync

The deleted requirements.txt was:

-e .

-r requirements-tests.txt
-r requirements-docs.txt

prek>=0.2.24,<1.0.0

So the previous behaviour was an editable install of the project itself into the container's Python, plus the test/docs/prek extras. The Dockerfile sets ENV UV_SYSTEM_PYTHON=1, which is what makes uv pip install target the system interpreter — that is how typer ended up on PATH, which the rest of the guide depends on for typer --install-completion and typer demo.py <TAB>.

uv pip install -e . preserves that exactly. I deliberately did not use uv sync, because it creates a project virtualenv at /code/.venv and would leave typer off PATH for the steps that follow in the guide. The test/docs/prek extras are not needed here — this container is only used to exercise shell completion.

How this was verified

  • Confirmed requirements.txt is absent from master and from the working tree.
  • Confirmed its removal: commit 39353af ("⬆️ Migrate to uv", ⬆️ Migrate to uv #1472) shows requirements.txt [removed] along with requirements-tests.txt, requirements-docs.txt and requirements-docs-tests.txt. That same commit already updated the other install section in docs/contributing.md to uv sync, but did not touch the container guide or the Dockerfile.
  • Read the file's contents at its parent commit a6a2a37 to confirm it started with -e ..
  • Grepped the tree for any remaining requirements.txt reference; only the historical entry in docs/release-notes.md remains, which is correct as a changelog record.
  • Checked that no open PR or issue already covers this.

Only two lines change.

@latest-changes latest-changes Bot added the docs Improvements or additions to documentation label Oct 18, 2026
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

📝 Docs preview

Last commit 7963544 at: https://66557a93.typertiangolo.pages.dev

Modified Pages

…ner guide

The migration to uv (fastapi#1472) deleted the root requirements.txt, but two references to it were left behind: the install step in docs/contributing.md and the build step in scripts/docker/Dockerfile.

Since scripts/docker/compose.yaml builds from that Dockerfile, `docker compose run typer bash` currently fails at image build time with the file not found, so the documented workflow for testing shell completion cannot be followed at all.

The deleted requirements.txt started with `-e .` plus the tests/docs requirement files. For this container only the project itself is needed, so `uv pip install -e .` keeps the exact previous behaviour of installing Typer into the system Python, where ENV UV_SYSTEM_PYTHON=1 makes it land on PATH for `typer --install-completion`.
@HyperionBurn
HyperionBurn force-pushed the docs/fix-stale-requirements-install branch from a27caec to 7963544 Compare October 18, 2026 12:26

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants