go-pyresolver

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: Apache-2.0, MIT

README

go-pyresolver

Python dependency resolution for Go: the Python-aware adapter that drives a generic PubGrub solver with PyPI metadata.

Part of RFD 0001 — Native Go PyPI Dependency Resolution.

Status: partial. pypirsf/, index/, and cmd/pyresolve are implemented and released in v0.1.0. candidate/, provider/, and resolver/ are still documentation-only stubs with no declarations — version solving is not implemented yet, and importing those three gives you nothing. They are populated per RFD 0001's later phases. See CHANGELOG.md.

Where this sits

Three Posit-owned Go modules divide the work:

Module Role
go-python-packaging PEP primitives — PEP 440 versions, PEP 508 requirements and markers, PEP 685 extras, wheel/METADATA parsing, compatibility tags
go-pubgrub The version-solving algorithm, deliberately language-agnostic so it can serve future R or Julia resolution
go-pyresolver (this module) The Python-aware glue between the two, plus metadata retrieval

Packages

Package Scope
pypirsf/ PyPI record layout and dependency-blob decoder for Repository Snapshot Format files
index/ MetadataIndex — the seam between resolver and storage — and its implementations
candidate/ Which version to try next, and which distribution file represents it
provider/ Adapts Python semantics (notably extras) to the generic solver
resolver/ The public entry point

Where dependency metadata comes from

Resolution needs two things: which versions of a package exist, and what each version requires. Both live in a Repository Snapshot Format (RSF) file, so a resolution reads one local file and makes no per-package network request. That is what makes offline and reproducible resolution possible.

pypirsf/ decodes that file. You supply the file; this module does not fetch it.

The resolver core never makes an HTTP request and never touches a database. It calls MetadataIndex, and the implementation decides where the bytes come from. That is what lets one resolver serve connected PPM, air-gapped PPM, local Python sources, and tests.

Build & test

go build ./...
go test ./...
go vet ./...

Module floor is Go 1.25, matching go-python-packaging (conservative for a public library; PPM consumes it fine at 1.26).

License

Dual-licensed under Apache-2.0 OR MIT at your option. Every source file carries SPDX-License-Identifier: Apache-2.0 OR MIT. See NOTICE for attribution.

Directories

Path Synopsis
Package candidate selects which version of a package the resolver should try next, and which distribution file represents it.
Package candidate selects which version of a package the resolver should try next, and which distribution file represents it.
cmd
pyresolve command
Command pyresolve inspects a PyPI Repository Snapshot Format (RSF) file: it reads package and dependency metadata straight out of a local file on disk.
Command pyresolve inspects a PyPI Repository Snapshot Format (RSF) file: it reads package and dependency metadata straight out of a local file on disk.
Package index defines MetadataIndex, the architectural seam between the resolver and storage, and its implementations.
Package index defines MetadataIndex, the architectural seam between the resolver and storage, and its implementations.
Package provider adapts Python packaging semantics to the generic PubGrub solver in github.com/posit-dev/go-pubgrub.
Package provider adapts Python packaging semantics to the generic PubGrub solver in github.com/posit-dev/go-pubgrub.
Package pypirsf reads PyPI dependency metadata out of a Repository Snapshot Format (RSF) file.
Package pypirsf reads PyPI dependency metadata out of a Repository Snapshot Format (RSF) file.
Package resolver is the public entry point of this module: give it requirements and a MetadataIndex, get back a resolved set of pinned versions and the files that satisfy them, or an explained failure.
Package resolver is the public entry point of this module: give it requirements and a MetadataIndex, get back a resolved set of pinned versions and the files that satisfy them, or an explained failure.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL