Skip to content

Python package index upload API spec #128

Open
@brainwane

Description

@brainwane

As a new twine maintainer I've been running into questions like:

  • Now that Warehouse doesn't use register anymore, can we deprecate it from distutils, setuptools, and twine? Are any other package indexes or upload tools using it? (make register error (with PyPI) more informative twine#311)
  • it would be nice if twine could depend on a package index providing an HTTP 201 response in response to a successful upload, and fail on 200 (a response some non-package index servers will give to an arbitrary POST request).

I do not see specifications to guide me here, e.g., in the official guidance on hosting one's own package index. PEP 301 was long enough ago that it's due an update, and PEP 503 only concerns browsing and download, not upload.

I suggest that I write a PEP specifying an API for uploading to a Python package index. This PEP would partially supersede PEP 301 and would document the Warehouse reference implementation. I would write it in collaboration with the Warehouse maintainers who will develop the reference implementation per pypi/warehouse/issues/284 , and consulting with the maintainers of packaging and distribution tools such as zest.releaser, flit, devpi, pypiserver, etc.

I believe my steps would be:

  1. gather feedback here for about a week or until conversation dies down
  2. run this idea past distutils-sig and maintainers of related tools for about a week or until conversation dies down
  3. start a PEP draft, submit as a PR to the python/peps repo and circulate on distutils-sig for comment
  4. discuss with others at the packaging sprints in May
  5. finalize PEP and get PEP accepted by BDFL-Delegate
  6. coordinate with PyPA, maintainers of distutils, maintainers of packaging and distribution tools, and documentation maintainers to implement PEP compliance

Thoughts are welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions