Code Monkey home page Code Monkey logo

Comments (14)

dstufft avatar dstufft commented on June 15, 2024

What file?

from twine.

sashkab avatar sashkab commented on June 15, 2024

In this case it was wheel.

from twine.

dstufft avatar dstufft commented on June 15, 2024

No I mean what project, version, filename on PyPI.

from twine.

sashkab avatar sashkab commented on June 15, 2024

pygments-q, 0.5, pygments_q-0.5-py2.py3-none-any.whl.

Note, that another owner was able to upload file without a problem.

from twine.

dstufft avatar dstufft commented on June 15, 2024

I see that file on https://pypi.python.org/pypi/pygments-q. Did you perhaps just check too soon before the Web UI cache was updated with the new version?

from twine.

sashkab avatar sashkab commented on June 15, 2024

It was uploaded from different project owner's account couple minutes later and it did show up there right away. For my username/password combination it silently failed. And I waited for 10-15 minutes for it to show up.

from twine.

dstufft avatar dstufft commented on June 15, 2024

Hmm. Strange. That would mean that PyPI accepted it but didn't save it somehow.

from twine.

sashkab avatar sashkab commented on June 15, 2024

Ok, I think I figured out what heppend:

  1. I had wrong URL for repository. Instead of https://pypi.python.org/pypi I had https://www.python.org/pypi.
  2. When you connect to https://www.python.org/pypi, you get 301 redirect to correct URL:
$ curl -I https://www.python.org/pypi
HTTP/1.1 301 Moved Permanently
Date: Fri, 30 Jan 2015 18:25:54 GMT
Server: nginx
Content-Type: text/html
Location: https://pypi.python.org/pypi?
...

Is this case supported?

from twine.

dstufft avatar dstufft commented on June 15, 2024

Ah. No it's not supported.

I wonder if we should get rid of that redirect.

from twine.

sashkab avatar sashkab commented on June 15, 2024

It's better to update Python documentation, which pointed me to wrong server ;-)

from twine.

sashkab avatar sashkab commented on June 15, 2024

But still, if it is not supported, you should say so somehow in the error message.

from twine.

sigmavirus24 avatar sigmavirus24 commented on June 15, 2024

So I toyed with raising an exception in the case of a redirect but I'm not exactly sure it's the best idea. It would be pretty simple so long as we bump the minimum version of requests. I don't think anyone is using twine for anything other than PyPI, so it should be a relatively reliable way of preventing this kind of confusion.

That said, a redirect to a different subdomain would cause requests to not attempt to post the body again, so the redirect like that won't ever be successful. I have pushed a branch with my rough approximation of what this would look like. https://github.com/pypa/twine/tree/bug/92

from twine.

sashkab avatar sashkab commented on June 15, 2024

I like your change - that would have saved me an hour or so of my time today. :)

from twine.

doismellburning avatar doismellburning commented on June 15, 2024

I just experienced this issue, and @sigmavirus24's fix proposal looks better than everything I've come up with <3

from twine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.