upload_docs receiving a 200 under Python 3
Starting from roughly r665, the upload_docs command under Python 3 will run from completion w/o an exception, but it gets a 200 from the servers. This is not the expected response as 301 is the correct one (and what is received when run under at least Python 2.6).
Comments (8)
-
-
I must have botched the byte encoding for the request, causing PyPI to get something it was not expecting.
-
- changed status to open
Here is the output of what headers are sent along with the body (sans zipfile) for Python 2.6:
'/pypi' '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' '153264' 'Basic ********' '\n----------------GHSKFJDLGDS7543FJKLFHRE75642756743254\nContent-Disposition: form-data; name="content";filename="importers.zip"\n\n
<zip file>
\n----------------GHSKFJDLGDS7543FJKLFHRE75642756743254\nContent-Disposition: form-data; name=":action"\n\ndoc_upload\n----------------GHSKFJDLGDS7543FJKLFHRE75642756743254\nContent-Disposition: form-data; name="name"\n\nimporters\n----------------GHSKFJDLGDS7543FJKLFHRE75642756743254--\n'
And here is it under Python 3.1:
'/pypi' b'--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' '153264' b'Basic ********' b'\n----------------GHSKFJDLGDS7543FJKLFHRE75642756743254\nContent-Disposition: form-data; name="content";filename="importers.zip"\n\n
<zip file>
\n----------------GHSKFJDLGDS7543FJKLFHRE75642756743254\nContent-Disposition: form-data; name=":action"\n\ndoc_upload\n----------------GHSKFJDLGDS7543FJKLFHRE75642756743254\nContent-Disposition: form-data; name="name"\n\nimporters\n----------------GHSKFJDLGDS7543FJKLFHRE75642756743254--\n'
Now I personally cannot see a difference between the two outputs short of the prepended 'b' for the repr of the bytes type. Unless I'm wrong, that would suggest either PyPI is doing something weird or there is a bug in httplib that is being triggered.
-
I'm getting this with the latest distribute on PyPI:
*jwp@torch[x]:io/jwp/py-traffic 0% python3 ./setup.py upload_docs running upload_docs Traceback (most recent call last): File "./setup.py", line 20, in <module> setup(**defaults) File "/x/lib/python3.2/distutils/core.py", line 148, in setup dist.run_commands() File "/x/lib/python3.2/distutils/dist.py", line 917, in run_commands self.run_command(cmd) File "/x/lib/python3.2/distutils/dist.py", line 936, in run_command cmd_obj.run() File "/x/lib/python3.2/site-packages/distribute-0.6.26-py3.2.egg/setuptools/command/upload_docs.py", line 87, in run self.upload_file(zip_file) File "/x/lib/python3.2/site-packages/distribute-0.6.26-py3.2.egg/setuptools/command/upload_docs.py", line 101, in upload_file auth = bytes("Basic ") TypeError: string argument without an encoding
setup.cfg:
*jwp@torch[x]:io/jwp/py-traffic 0% cat setup.cfg [upload_docs] upload-dir = traffic/documentation/html
-
http://www.timberland-discountshoes.com/Bestsellers Cheap Timberland Boots http://www.timberland-discountshoes.com/sale/Timberland-Womens-6-Inch-Premium-Boot-Pink-244.html Timberland 6 inches http://www.timberland-discountshoes.com/sale/Timberland-Classic-2-Eye-Mens-Lug-Sole-Boat-Shoes-Chocolate-206.html Timberland Classic 2 Eye Mens Lug Sole Boat Shoes http://www.timberland-discountshoes.com/sale/Timberland-Roll-Top-Kids-Boots-In-Wheat-159.html Timberland boots http://www.timberland-discountshoes.com/Timberland-Womens-Chukka-Boots Timberland womens Chukka Boots http://www.timberland-discountshoes.com/sale/Timberland-Men-Beach-Sandals-Yellow-274.html Timberland shoes
-
My bug reported in the comment appears to have been fixed in the latest version. Thanks, upload_docs is wonderful. =)
-
Fixed in 984cedb.
-
- changed status to resolved
- Log in to comment
It would be good to know what exact HTTP request has been sent. PyPI just won't respond with 200 for the doc_upload action.