From cdd6de555bd12ae92145455d1426f758b18ae847 Mon Sep 17 00:00:00 2001 From: kenwoodjw Date: Sun, 23 Mar 2025 11:06:11 +0800 Subject: [PATCH] docs: Update dependencies.md (#12388) ## Summary Fixes #12334 ## Test Plan --- docs/concepts/projects/dependencies.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/concepts/projects/dependencies.md b/docs/concepts/projects/dependencies.md index f6780b638..dca46b030 100644 --- a/docs/concepts/projects/dependencies.md +++ b/docs/concepts/projects/dependencies.md @@ -1,8 +1,8 @@ # Managing dependencies -## Dependency tables +## Dependency fields -Dependencies of the project are defined in several tables: +Dependencies of the project are defined in several fields: - [`project.dependencies`](#project-dependencies): Published dependencies. - [`project.optional-dependencies`](#optional-dependencies): Published optional dependencies, or @@ -12,7 +12,7 @@ Dependencies of the project are defined in several tables: !!! note - The `project.dependencies` and `project.optional-dependencies` tables can be used even if + The `project.dependencies` and `project.optional-dependencies` fields can be used even if project isn't going to be published. `dependency-groups` are a recently standardized feature and may not be supported by all tools yet. @@ -27,7 +27,7 @@ To add a dependency: $ uv add httpx ``` -An entry will be added in the `project.dependencies` table: +An entry will be added in the `project.dependencies` field: ```toml title="pyproject.toml" hl_lines="4" [project] @@ -38,7 +38,7 @@ dependencies = ["httpx>=0.27.2"] The [`--dev`](#development-dependencies), [`--group`](#dependency-groups), or [`--optional`](#optional-dependencies) flags can be used to add a dependencies to an alternative -table. +field. The dependency will include a constraint, e.g., `>=0.27.2`, for the most recent, compatible version of the package. An alternative constraint can be provided: @@ -48,7 +48,7 @@ $ uv add "httpx>=0.20" ``` When adding a dependency from a source other than a package registry, uv will add an entry in the -sources table. For example, when adding `httpx` from GitHub: +sources field. For example, when adding `httpx` from GitHub: ```console $ uv add "httpx @ git+https://github.com/encode/httpx"