[Distutils] Can't upload sdist: "File already exists"

Ian Cordasco graffatcolmingov at gmail.com
Thu Dec 22 11:54:54 EST 2016

On Thu, Dec 22, 2016 at 9:49 AM, Brett Cannon <brett at python.org> wrote:
> Because you already uploaded a wheel for version 0.1.2 you can't upload any
> other files for that version, else people could accidentally upload e.g. an
> sdist with code different from what was already uploaded in the wheel. If
> you want an sdist then I would do another release as version 0.1.2post1 with
> the wheel and sdist (or whatever the proper post release version format is;
> on my phone so a pain to look up right now).

I'm pretty sure that's not correct. Twine is written to specifically
upload the wheel first because PyPI will extract metadata from that
and display it on the page. It won't do that if the sdist is uploaded

I'm not able to reproduce the behaviour Nick is seeing. My only guess
is that something changed in Warehouse or the file existed, was
deleted, and is now being re-uploaded with the same version. That's
not something Warehouse or PyPI allows anymore (republishing with the
same version)

More information about the Distutils-SIG mailing list