Comments (14)
What file?
from twine.
In this case it was wheel.
from twine.
No I mean what project, version, filename on PyPI.
from twine.
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.
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.
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.
Hmm. Strange. That would mean that PyPI accepted it but didn't save it somehow.
from twine.
Ok, I think I figured out what heppend:
- I had wrong URL for repository. Instead of
https://pypi.python.org/pypi
I hadhttps://www.python.org/pypi
. - When you connect to
https://www.python.org/pypi
, you get301
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.
Ah. No it's not supported.
I wonder if we should get rid of that redirect.
from twine.
It's better to update Python documentation, which pointed me to wrong server ;-)
from twine.
But still, if it is not supported, you should say so somehow in the error message.
from twine.
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.
I like your change - that would have saved me an hour or so of my time today. :)
from twine.
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)
- Py 3.13: Twine imports `cgi` that doesn't exist HOT 1
- Twine needs a 5.0.0 PyPi release HOT 2
- HTTPError: 403 Forbidden HOT 2
- twine upload: error: the following arguments are required: dist
- Check command doesn't recognize metadata 2.3 HOT 8
- WARNING Error during upload. Retry with the --verbose option for more details. HOT 2
- Twine uploads with `provides_extras` field, not `provides_extra` HOT 2
- twine prompts for API token instead of username. HOT 1
- `twine upload` erroneously says `start filename for 'leo' with 'leo'` HOT 3
- Twine should require pkginfo > 1.10 HOT 7
- test_pkginfo_returns_no_metadata[unsupported Metadata-Version] fails HOT 1
- `'' is not a valid url` when trying to upload a package HOT 3
- HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/ '' is not a valid URL HOT 2
- `--skip-existing` gives misleading feedback HOT 3
- Add an option to skip dependency checking during upload HOT 1
- twine ignores my .pypirc HOT 1
- twine upload sdist gzip failing HOT 2
- Package docutils (0.21.post1) not found. HOT 4
- Integration tests are failing following Setuptools 69.3 HOT 1
- Proposal: preliminary support for PEP 740 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twine.