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

Donald Stufft donald at stufft.io
Thu Dec 22 15:41:41 EST 2016


There is a fairly new restriction that you can only have *one* sdist per release now. That should not apply at all to Wheels and if it is, then it is a bug. I can’t reproduce this issue though, so I’m going to guess there was some bit of confusion about exact errors here. If someone actually cannot upload 1 sdist + N wheels, please leave the state as is and tell me.

> On Dec 22, 2016, at 3:32 PM, Glyph Lefkowitz <glyph at twistedmatrix.com> wrote:
> 
>> 
>> On Dec 22, 2016, at 8:54 AM, Ian Cordasco <graffatcolmingov at gmail.com> wrote:
>> 
>> 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
>> first.
>> 
>> 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)
> 
> Similarly; I've *definitely* done sdist releases after wheel releases of the same version in the past.
> 
> -glyph
> 
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org <mailto:Distutils-SIG at python.org>
> https://mail.python.org/mailman/listinfo/distutils-sig <https://mail.python.org/mailman/listinfo/distutils-sig>

—
Donald Stufft



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20161222/716bd8b6/attachment.html>


More information about the Distutils-SIG mailing list