docs(cli): document how to configure a custom source for "self update"#10930
Open
sridhar-3009 wants to merge 1 commit into
Open
docs(cli): document how to configure a custom source for "self update"#10930sridhar-3009 wants to merge 1 commit into
sridhar-3009 wants to merge 1 commit into
Conversation
`self update` manages Poetry's own runtime environment using a separate pyproject.toml in the Poetry config directory, not the project's pyproject.toml. Users in corporate or air-gapped environments need to know where to configure a private PyPI mirror for this command. Add a "Custom sources for self update" subsection under `### self update` that explains the separate config file, how to add a source via `poetry self add --source`, and how to edit the file directly. Addresses python-poetry#10633
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Instead of hardcoding platform-specific config paths with "usually" wording, consider referencing the existing configuration directory documentation or mentioning the
POETRY_CONFIG_DIRoverride so the guidance stays accurate across nonstandard setups. - The example
poetry self add --source my-mirror poetryassumesmy-mirroris already defined; it may be clearer to either show how that source is configured or explicitly state thatmy-mirrormust be an existing source in the self-managedpyproject.toml.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Instead of hardcoding platform-specific config paths with "usually" wording, consider referencing the existing configuration directory documentation or mentioning the `POETRY_CONFIG_DIR` override so the guidance stays accurate across nonstandard setups.
- The example `poetry self add --source my-mirror poetry` assumes `my-mirror` is already defined; it may be clearer to either show how that source is configured or explicitly state that `my-mirror` must be an existing source in the self-managed `pyproject.toml`.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #10633.
Users in corporate or air-gapped environments cannot reach PyPI directly, so
poetry self updatefails without a way to specify a custom index. The documentation did not explain where or how to configure one.What was missing
self updatemanages Poetry's own runtime environment using a separatepyproject.tomlin Poetry's config directory (e.g.~/.config/pypoetry/pyproject.toml), not the project'spyproject.toml. This is non-obvious and caused confusion.Change
Added a "Custom sources for self update" subsection under
### self updatethat:self updateuses a separatepyproject.tomlat Poetry's config directory.poetry self add --source.pyproject.toml.Test plan
self update