CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

python-poetry/poetry

Scanned commit d4fd21e471 dated 2026-09-27 — last upstream commit. Generated by codevetter 1.15.0 on 2026-10-02.

github.com/python-poetry/poetry ↗ · 962 files · 5.1 MB

Poetry: Python packaging and dependency management made easy [ ][PyPI Releases] [ ][PyPI Releases] [ ][PyPI] [ ][Discord] Poetry helps you declare, manage and install dependencies of Python projects, ensuring you have the right stack everywhere.

Deep analysis by cli:codex via the codex CLI on 2026-10-02 (397s) — every claim below links to its cited source files. Source inspection; upstream code and tests were not executed.

Overview

Poetry is a Python CLI for developers managing project dependencies, virtual environments, package builds, and publication. At commit d4fd21e4711ae948f04e18a1736d9ee85b590e87, it combines poetry-core project models with its own constraint solver, source repositories, lockfile persistence, and installation executor. Its distinctive capabilities include portable dependency locking with groups and markers, direct Git/path/URL dependencies, and plugins that extend commands or mutate project state.

System map

The executable frontend is a Cleo application with lazy command loading and event-driven environment and installer setup. Factory connects poetry-core project parsing to Poetry-owned configuration, repositories, plugins, and lock storage. Resolution, operation planning, artifact preparation, and environment mutation occupy separate modules. Distribution is through Python packages and a console script; the inspected CI includes lock validation, build/install smoke checks, typing, and tests.

Feature catalog

The inspected command table spans project creation, dependency changes, installation, packaging, diagnostics, environments, sources, and Poetry's own runtime. Dependency operations expose groups, extras, dry runs, lock-only execution, and synchronization. Build and publish integrate with Python packaging backends and package indexes. Plugin-provided commands and documented compatibility limits extend or qualify the built-in surface.

Data flow

CLI inputs become project models, configuration, and installer state before resolution or environment mutation begins. Package candidates arrive through prioritized indexes or direct origins and become solved packages with transitive metadata. Transactions filter that result against the selected environment and installed distributions. Artifact caches, build environments, lockfiles, project TOML, and upload requests form distinct output boundaries.

Behavior traces

The source walks cover startup/project initialization, dependency installation, and add/lock persistence from command input to output. Startup establishes options and plugins before command-event setup injects the environment and installer. Installation branches on lock existence, freshness, and re-resolution before executing operations and optionally installing the root. Persistence follows explicit success and dry-run conditions, with separate refresh and regeneration paths.

Testing signals

Tests and CI were inspected, not executed; test existence does not establish a passing result. The configured suite uses pytest with xdist and supporting mocking/coverage tools. Inspected tests exercise command guards, solver operation comparisons, authentication, lock serialization, plugin loading, and installation integrity. This is bounded coverage evidence, and mocked boundaries do not establish live index, keyring, Git, or platform behavior.

Risk map

The main sensitive boundaries are plugin imports, backend execution, credentials, remote artifacts, and writes into Python environments. Source contains guards for credential scheme handling, archive hashes, and installation paths, alongside deliberate compatibility exceptions. Persistence and environment updates occur in separate steps, which deserves attention during failure-path changes. These are source observations or labeled hypotheses, not confirmed vulnerabilities or an exhaustive security audit.

Extension points

Commands and plugins provide the clearest intentional extension surfaces. Repository construction, priority handling, and configuration normalization centralize additional integration choices. Build backend hooks and package-specific build constraints extend packaging behavior. Some interfaces expose mutable internal state, and plugin documentation explicitly warns that the public API is not stable.

Contributor handoff

Read the manifest, application, factory, and task-specific command before following changes into resolution or installation. Preserve distinctions among project roots, working directories, Poetry's runtime environment, and the target project's environment. Tests and CI were inspected, not executed; this brief provides bounded evidence rather than a passing baseline. For future authorized implementation work, select targeted tests and typing/style checks, with particular care around compatibility and external state.

Languages

LanguageFilesShare of source
Python45180%
TOML11020%
JSON106docs/config
Markdown31docs/config
HTML26docs/config
YAML15docs/config
Shell20%
C10%

Start reading here

Probable source entrypoint: pyproject.toml — inferred from the directory tree and manifest, not the upstream docs.

Source roots

src/ (195 files)

Repository structure

Top-level pathFiles
tests/726
src/195
docs/16
.github/15

Docs found: README.mddocs/_index.mddocs/basic-usage.mddocs/building-extension-modules.mddocs/cli.mddocs/community.mddocs/configuration.mddocs/contributing.mddocs/dependency-specification.mddocs/faq.md

Package

pyproject.toml — true v2.5.1, 16 declared dependencies.

pre-commitcoverage##dulwichresponsesjaraco-classespytestpytest-covpytest-mockpytest-randomlypytest-xdist

CI & config entrypoints

Structural health signals

Average score 7.1/10 across 96 analyzed source files; 16 hotspots surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history