Skip to content

Adding a --pre option for install/add/sync #289

@zeroshade

Description

@zeroshade

Similar to the --pre option when using pip/uv we want to allow installing pre-releases of drivers via dbc. Both uv and pip have different behaviors for this so we should decide how we want to handle this.

pip's behavior is very simplistic: Without the --pre option, pre-release versions of packages are never considered and essentially don't exist. The benefit here is that it's very simple to implement via filtering versions when reading package metadata.

uv's behavior provides more options. Via either the --prerelease option or via a UV_PRERELEASE environment variable, one of the following options can be chosen to control the behavior:

  • disallow: never allow pre-release versions (the same as pip without the --pre option)
  • allow: allow pre-release versions, e.g. treat them as normal versions for consideration. This would mean that the "latest" version could be a pre-release (1.1.0-beta1 > 1.0.0)
  • if-necessary: allow pre-release versions if a package only has pre-release versions, ignore them otherwise
  • explicit: allow a pre-release version if explicitly asked for, ignore them otherwise
  • if-necessary-or-explicit: allow a pre-release version if there are only pre-release versions for a package or if the pre-release version is explicitly asked for

My personal preference is to follow pip's behavior, but I'm not opposed to mirroring the behavior of uv. Thoughts?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions