Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 409 status code support to --skip-existing #162

Merged
merged 1 commit into from
Jan 28, 2016

Conversation

andrewwatts
Copy link
Contributor

twine only supported the 400 status code when deciding to skip an upload. However, alternative implementations of pypi, for example pypiserver, use a 409 status code.

twine only supported the 400 status code when deciding to skip
an upload.  However, alternative implementations of pypi, for
example [pypiserver](http://github.com/pypiserver/pypiserver),
use a 409 status code.
@andrewwatts andrewwatts changed the title Add 409 status code suport to --skip-existing Add 409 status code support to --skip-existing Jan 28, 2016
@sigmavirus24 sigmavirus24 reopened this Jan 28, 2016
@sigmavirus24
Copy link
Member

Closing/re-opening to trigger a new merged build on Travis.

@sigmavirus24
Copy link
Member

"alternative implementations of PyPI" should be API compatible. That said, I don't think PyPI returns a 409 for anything (that could cause a problem here). This should also allow @dstufft to have warehouse return 409 if he agrees that's a the better status code (I agree that it's the correct one).

sigmavirus24 added a commit that referenced this pull request Jan 28, 2016
Add 409 status code support to --skip-existing
@sigmavirus24 sigmavirus24 merged commit cbcb5a4 into pypa:master Jan 28, 2016
@sigmavirus24 sigmavirus24 modified the milestone: next Jan 28, 2016
@dstufft
Copy link
Member

dstufft commented Jan 28, 2016

Maybe for status code 409 it should stop inspecting the status message?

@sigmavirus24
Copy link
Member

Good point @dstufft.

sigmavirus24 added a commit to sigmavirus24/twine that referenced this pull request Jan 28, 2016
Alternative package servers may return a 409 without the same message
stored in the reason attribute that PyPI does. In that case, skip
inspecting the reason message otherwise we will fail to skip that
upload when the user specified --skip-existing.

Ref: pypagh-162
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants