zestsoftware / zest.releaser

Python software releasing made easy and repeatable
https://zestreleaser.readthedocs.io
GNU General Public License v2.0
198 stars 62 forks source link

make twine upload not fail on 201 status code #318

Closed frisi closed 5 years ago

frisi commented 5 years ago

we're using cloudsmith.io as package index and when uploading python eggs to this index using zest.releaser we get an error message.

reason: zest.releaser checks for the statuscode 200 and cloudsmith sends a 201 "Created" w/o content. https://github.com/zestsoftware/zest.releaser/blob/6.17.0/zest/releaser/release.py#L218

i'd say zest.releaser should be happy with a 201 code too. what do you think @mauritsvanrees ?

reinout commented 5 years ago

Weird? We check requests’ OK statuses. Does it treat 201 as not-ok?

frisi commented 5 years ago

@reinout not as not-ok but 200 != 201 https://github.com/kennethreitz/requests/blob/v2.21.0/requests/status_codes.py#L30

reinout commented 5 years ago

Ah! I expected it to be a list of 20x codes...

Could you make a small PR so that it accepts 201, too?

frisi commented 5 years ago

done @reinout. did not do the necessary setup to get tests running locally though. hope that's ok for you.

mauritsvanrees commented 5 years ago

Thanks! Merged and released in version 6.17.1.

reinout commented 5 years ago

Thanks, @frisi, for the fix.

frisi commented 5 years ago

you're welcome reinout

reinout commented 5 years ago

@frisi: there's been some changes in the last week (using a more high level twine function). Your usecase should still work. If something fails for you with the very latest zest.releaser, please notify us :-)

frisi commented 5 years ago

thanks for the ping @reinout i'll update to 6.18.1 and see if it works for the next release ;-)