Skip to content

Investigate a way to programatically publish a draft release #11312

@alanbato

Description

@alanbato

Sat down with @alanbato at the PyCon sprints and thought through a plan for what we need to do to get this mergeable

  • Programmatic way to turn a draft release into a published release: One thing this feature is missing right now is a way for a user to tell PyPI that a draft release should be published without needing to log into PyPI and do this via the UI itself. Users publishing multiple releases across multiple CI systems probably want some way to determine once all their draft releases have been made, and tell PyPI to publish. This doesn't need to be included in this PR but we should have a plan to work towards it before merging.

Originally posted by @di in #8941 (comment)

One way to do this without making significant changes to twine or our API, is leverage the same mechanism proposed to upload the draft release in the first place, which is to use a special HEADER as part of the request that uploads the package.

One downside of this approach though, is that there'd need to be a final "upload" of the package to mark it to be published, even if there are no source code changes involved. This would add unnecessary bandwidth usage, and could be non-ideal for big packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestneeds discussiona product management/policy issue maintainers and users should discuss

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions