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

Dont print release url in verbose mode if not necessary #74

Merged

Conversation

peterbe
Copy link
Owner

@peterbe peterbe commented Aug 29, 2018

Fixes #73

Before:
Running with -v on a package that has digests in the JSON. E.g. python hashin.py psycopg2==2.7.4 -r /tmp/reqs.txt -v

Verbose output
https://pypi.org/pypi/psycopg2/json
* Found URL https://files.pythonhosted.org/packages/67/ee/668612acf12fecb8f8a19342517b8c4cf172b7bb9ff9fa1f86e7f95a4757/psycopg2-2.7.4-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Hash aeaba399254ca79c299d9fe6aa811d3c3eac61458dee10270de7f4e71c624998
* Found URL https://files.pythonhosted.org/packages/70/07/3ca5755bfef823dbdb1b582b76163ba3cea2a2d7f39eec48f18ad3a2f132/psycopg2-2.7.4-cp27-cp27m-manylinux1_i686.whl
*   Hash 1d90379d01d0dc50ae9b40c863933d87ff82d51dd7d52cea5d1cb7019afd72cd
* Found URL https://files.pythonhosted.org/packages/75/5c/ee9b236e34ffc595992a08f375a3f907ddb67ee2a59d429f9ea97a8f21b8/psycopg2-2.7.4-cp27-cp27m-manylinux1_x86_64.whl
*   Hash 36030ca7f4b4519ee4f52a74edc4ec73c75abfb6ea1d80ac7480953d1c0aa3c3
* Found URL https://files.pythonhosted.org/packages/99/18/5e56ffe76c499733b0bef59952877c21d257508c4165333a36c2f230f7b5/psycopg2-2.7.4-cp27-cp27mu-manylinux1_i686.whl
*   Hash 7cbc3b21ce2f681ca9ad2d8c0901090b23a30c955e980ebf1006d41f37068a95
* Found URL https://files.pythonhosted.org/packages/7c/c8/7cf31d2fd64b5cfa3f4538ee47f6dac6cfcaf647956e10a0c1617e68248f/psycopg2-2.7.4-cp27-cp27mu-manylinux1_x86_64.whl
*   Hash b178e0923c93393e16646155794521e063ec17b7cc9f943f15b7d4b39776ea2c
* Found URL https://files.pythonhosted.org/packages/56/72/1824e1c95891266ce07e424e75355a66c1ea824c40dbe6ef4dd07cb5a933/psycopg2-2.7.4-cp27-cp27m-win32.whl
*   Hash fe6a7f87356116f5ea840c65b032af17deef0e1a5c34013a2962dd6f99b860dd
* Found URL https://files.pythonhosted.org/packages/3e/23/0162ee2c8aef91d75b44848a4203bb661207ba7d0ffa594db3968df250c5/psycopg2-2.7.4-cp27-cp27m-win_amd64.whl
*   Hash 6f302c486132f8dd11f143e919e236ea4467d53bf18c451cac577e6988ecbd05
* Found URL https://files.pythonhosted.org/packages/20/d8/0164450526030b68535db1007bb6080d8eb62cc6be90888740868105909d/psycopg2-2.7.4-cp33-cp33m-manylinux1_i686.whl
*   Hash 888bba7841116e529f407f15c6d28fe3ef0760df8c45257442ec2f14f161c871
* Found URL https://files.pythonhosted.org/packages/b2/5e/5709c7590f5c44a46a64501fe0a8c86fe13f8cd1d9974b804b654d13294e/psycopg2-2.7.4-cp33-cp33m-manylinux1_x86_64.whl
*   Hash 932a4c101af007cb3132b1f8a9ffef23386acc53dad46536dc5ba43a3235ae02
* Found URL https://files.pythonhosted.org/packages/fc/e1/198f42b46cd6218ccd8a07c3dcf5a37f5ad9e696ba898f3bde57140768dd/psycopg2-2.7.4-cp33-cp33m-win32.whl
*   Hash 179c52eb870110a8c1b460c86d4f696d58510ea025602cd3f81453746fccb94f
* Found URL https://files.pythonhosted.org/packages/26/56/49faf643bea3916dce96d98313a4f60cdf79af3f6d79ff307ca6cbba0f99/psycopg2-2.7.4-cp33-cp33m-win_amd64.whl
*   Hash 33f9e1032095e1436fa9ec424abcbd4c170da934fb70e391c5d78275d0307c75
* Found URL https://files.pythonhosted.org/packages/dd/29/fb5e60247714b076ae19d198ce660b5306f218d339c30cf8935299b634d4/psycopg2-2.7.4-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Hash 092a80da1b052a181b6e6c765849c9b32d46c5dac3b81bf8c9b83e697f3cdbe8
* Found URL https://files.pythonhosted.org/packages/4d/3e/088b6e6200f54811da33a3bc6bbdd14779a9e88941d5497b344e36ff4e0f/psycopg2-2.7.4-cp34-cp34m-manylinux1_i686.whl
*   Hash f3d3a88128f0c219bdc5b2d9ccd496517199660cea021c560a3252116df91cbd
* Found URL https://files.pythonhosted.org/packages/09/e3/d24dfd49b79813f3021116383fdd2f0380b8145ca0bfcb15c6a72072b8d3/psycopg2-2.7.4-cp34-cp34m-manylinux1_x86_64.whl
*   Hash 19983b77ec1fc2a210092aa0333ee48811fd9fb5f194c6cd5b927ed409aea5f8
* Found URL https://files.pythonhosted.org/packages/2a/b8/dce82ffc6222ab1854a2b91bfdce0e527d451715ee7d85de419981e2bec6/psycopg2-2.7.4-cp34-cp34m-win32.whl
*   Hash 027ae518d0e3b8fff41990e598bc7774c3d08a3a20e9ecc0b59fb2aaaf152f7f
* Found URL https://files.pythonhosted.org/packages/1d/62/4b817f8546098d036f5eec016b62473644696b7c24ea6bf2545332d90f56/psycopg2-2.7.4-cp34-cp34m-win_amd64.whl
*   Hash 363fbbf4189722fc46779be1fad2597e2c40b3f577dc618f353a46391cf5d235
* Found URL https://files.pythonhosted.org/packages/6b/08/4f3f7982916ada6a1a15fad8ea5279cbaca22d5324b8ad0fb21f31925bd1/psycopg2-2.7.4-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Hash d74cf9234ba76426add5e123449be08993a9b13ff434c6efa3a07caa305a619f
* Found URL https://files.pythonhosted.org/packages/cb/3e/39f98d73666bb6790567404141ba7eea82d7e61ba2ac44c6b1a2ca1e3ae8/psycopg2-2.7.4-cp35-cp35m-manylinux1_i686.whl
*   Hash 32702e3bd8bfe12b36226ba9846ed9e22336fc4bd710039d594b36bd432ae255
* Found URL https://files.pythonhosted.org/packages/8a/86/97879021d5ca2e069ade58eb55da01a2ade6507bb31f565914f4df10a444/psycopg2-2.7.4-cp35-cp35m-manylinux1_x86_64.whl
*   Hash 8eb94c0625c529215b53c08fb4e461546e2f3fc96a49c13d5474b5ad7aeab6cf
* Found URL https://files.pythonhosted.org/packages/ca/ab/49f8ebecd7d03084215c5e63ad36f14e981872809cad4e64aa27271ce1c9/psycopg2-2.7.4-cp35-cp35m-win32.whl
*   Hash 8ebba5314c609a05c6955e5773c7e0e57b8dd817e4f751f30de729be58fa5e78
* Found URL https://files.pythonhosted.org/packages/f8/b2/b02bbede43cf45844f3303dd9fdf5c8720ca04f811b07ec7489e0be42467/psycopg2-2.7.4-cp35-cp35m-win_amd64.whl
*   Hash 27467fd5af1dcc0a82d72927113b8f92da8f44b2efbdb8906bd76face95b596d
* Found URL https://files.pythonhosted.org/packages/8c/a5/0e61d6f4a140a6e06a9ba40266c4b49123d834f1f97fe9a5ae0b6e45112b/psycopg2-2.7.4-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Hash b68e89bb086a9476fa85298caab43f92d0a6af135a5f433d1f6b6d82cafa7b55
* Found URL https://files.pythonhosted.org/packages/25/7e/eb6d6b1b5e99440def358f45f852f5ac62d26c59fef043770c1d7404c402/psycopg2-2.7.4-cp36-cp36m-manylinux1_i686.whl
*   Hash 0b9851e798bae024ed1a2a6377a8dab4b8a128a56ed406f572f9f06194e4b275
* Found URL https://files.pythonhosted.org/packages/92/15/92b5c363243376ce9cb879bbec561bba196694eb663a6937b4cb967e230e/psycopg2-2.7.4-cp36-cp36m-manylinux1_x86_64.whl
*   Hash 733166464598c239323142c071fa4c9b91c14359176e5ae7e202db6bcc1d2eb5
* Found URL https://files.pythonhosted.org/packages/00/95/4c5d19affca312e1c06d4f88241ebc564bf5269addd191ec4962f0c93553/psycopg2-2.7.4-cp36-cp36m-win32.whl
*   Hash ad75fe10bea19ad2188c5cb5fc4cdf53ee808d9b44578c94a3cd1e9fc2beb656
* Found URL https://files.pythonhosted.org/packages/f9/77/e29b792740ddec37a2d49431efa6c707cf3869c0cc7f28c7411bb6e96d91/psycopg2-2.7.4-cp36-cp36m-win_amd64.whl
*   Hash 8966829cb0d21a08a3c5ac971a2eb67c3927ae27c247300a8476554cc0ce2ae8
* Found URL https://files.pythonhosted.org/packages/74/83/51580322ed0e82cba7ad8e0af590b8fb2cf11bd5aaa1ed872661bd36f462/psycopg2-2.7.4.tar.gz
*   Hash 8bf51191d60f6987482ef0cfe8511bbf4877a5aa7f313d7b488b53189cf26209
* Editing /tmp/reqs.txt

After:
Same command as before

Verbose output
https://pypi.org/pypi/psycopg2/json
* Found hash for https://files.pythonhosted.org/packages/67/ee/668612acf12fecb8f8a19342517b8c4cf172b7bb9ff9fa1f86e7f95a4757/psycopg2-2.7.4-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Hash aeaba399254ca79c299d9fe6aa811d3c3eac61458dee10270de7f4e71c624998
* Found hash for https://files.pythonhosted.org/packages/70/07/3ca5755bfef823dbdb1b582b76163ba3cea2a2d7f39eec48f18ad3a2f132/psycopg2-2.7.4-cp27-cp27m-manylinux1_i686.whl
*   Hash 1d90379d01d0dc50ae9b40c863933d87ff82d51dd7d52cea5d1cb7019afd72cd
* Found hash for https://files.pythonhosted.org/packages/75/5c/ee9b236e34ffc595992a08f375a3f907ddb67ee2a59d429f9ea97a8f21b8/psycopg2-2.7.4-cp27-cp27m-manylinux1_x86_64.whl
*   Hash 36030ca7f4b4519ee4f52a74edc4ec73c75abfb6ea1d80ac7480953d1c0aa3c3
* Found hash for https://files.pythonhosted.org/packages/99/18/5e56ffe76c499733b0bef59952877c21d257508c4165333a36c2f230f7b5/psycopg2-2.7.4-cp27-cp27mu-manylinux1_i686.whl
*   Hash 7cbc3b21ce2f681ca9ad2d8c0901090b23a30c955e980ebf1006d41f37068a95
* Found hash for https://files.pythonhosted.org/packages/7c/c8/7cf31d2fd64b5cfa3f4538ee47f6dac6cfcaf647956e10a0c1617e68248f/psycopg2-2.7.4-cp27-cp27mu-manylinux1_x86_64.whl
*   Hash b178e0923c93393e16646155794521e063ec17b7cc9f943f15b7d4b39776ea2c
* Found hash for https://files.pythonhosted.org/packages/56/72/1824e1c95891266ce07e424e75355a66c1ea824c40dbe6ef4dd07cb5a933/psycopg2-2.7.4-cp27-cp27m-win32.whl
*   Hash fe6a7f87356116f5ea840c65b032af17deef0e1a5c34013a2962dd6f99b860dd
* Found hash for https://files.pythonhosted.org/packages/3e/23/0162ee2c8aef91d75b44848a4203bb661207ba7d0ffa594db3968df250c5/psycopg2-2.7.4-cp27-cp27m-win_amd64.whl
*   Hash 6f302c486132f8dd11f143e919e236ea4467d53bf18c451cac577e6988ecbd05
* Found hash for https://files.pythonhosted.org/packages/20/d8/0164450526030b68535db1007bb6080d8eb62cc6be90888740868105909d/psycopg2-2.7.4-cp33-cp33m-manylinux1_i686.whl
*   Hash 888bba7841116e529f407f15c6d28fe3ef0760df8c45257442ec2f14f161c871
* Found hash for https://files.pythonhosted.org/packages/b2/5e/5709c7590f5c44a46a64501fe0a8c86fe13f8cd1d9974b804b654d13294e/psycopg2-2.7.4-cp33-cp33m-manylinux1_x86_64.whl
*   Hash 932a4c101af007cb3132b1f8a9ffef23386acc53dad46536dc5ba43a3235ae02
* Found hash for https://files.pythonhosted.org/packages/fc/e1/198f42b46cd6218ccd8a07c3dcf5a37f5ad9e696ba898f3bde57140768dd/psycopg2-2.7.4-cp33-cp33m-win32.whl
*   Hash 179c52eb870110a8c1b460c86d4f696d58510ea025602cd3f81453746fccb94f
* Found hash for https://files.pythonhosted.org/packages/26/56/49faf643bea3916dce96d98313a4f60cdf79af3f6d79ff307ca6cbba0f99/psycopg2-2.7.4-cp33-cp33m-win_amd64.whl
*   Hash 33f9e1032095e1436fa9ec424abcbd4c170da934fb70e391c5d78275d0307c75
* Found hash for https://files.pythonhosted.org/packages/dd/29/fb5e60247714b076ae19d198ce660b5306f218d339c30cf8935299b634d4/psycopg2-2.7.4-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Hash 092a80da1b052a181b6e6c765849c9b32d46c5dac3b81bf8c9b83e697f3cdbe8
* Found hash for https://files.pythonhosted.org/packages/4d/3e/088b6e6200f54811da33a3bc6bbdd14779a9e88941d5497b344e36ff4e0f/psycopg2-2.7.4-cp34-cp34m-manylinux1_i686.whl
*   Hash f3d3a88128f0c219bdc5b2d9ccd496517199660cea021c560a3252116df91cbd
* Found hash for https://files.pythonhosted.org/packages/09/e3/d24dfd49b79813f3021116383fdd2f0380b8145ca0bfcb15c6a72072b8d3/psycopg2-2.7.4-cp34-cp34m-manylinux1_x86_64.whl
*   Hash 19983b77ec1fc2a210092aa0333ee48811fd9fb5f194c6cd5b927ed409aea5f8
* Found hash for https://files.pythonhosted.org/packages/2a/b8/dce82ffc6222ab1854a2b91bfdce0e527d451715ee7d85de419981e2bec6/psycopg2-2.7.4-cp34-cp34m-win32.whl
*   Hash 027ae518d0e3b8fff41990e598bc7774c3d08a3a20e9ecc0b59fb2aaaf152f7f
* Found hash for https://files.pythonhosted.org/packages/1d/62/4b817f8546098d036f5eec016b62473644696b7c24ea6bf2545332d90f56/psycopg2-2.7.4-cp34-cp34m-win_amd64.whl
*   Hash 363fbbf4189722fc46779be1fad2597e2c40b3f577dc618f353a46391cf5d235
* Found hash for https://files.pythonhosted.org/packages/6b/08/4f3f7982916ada6a1a15fad8ea5279cbaca22d5324b8ad0fb21f31925bd1/psycopg2-2.7.4-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Hash d74cf9234ba76426add5e123449be08993a9b13ff434c6efa3a07caa305a619f
* Found hash for https://files.pythonhosted.org/packages/cb/3e/39f98d73666bb6790567404141ba7eea82d7e61ba2ac44c6b1a2ca1e3ae8/psycopg2-2.7.4-cp35-cp35m-manylinux1_i686.whl
*   Hash 32702e3bd8bfe12b36226ba9846ed9e22336fc4bd710039d594b36bd432ae255
* Found hash for https://files.pythonhosted.org/packages/8a/86/97879021d5ca2e069ade58eb55da01a2ade6507bb31f565914f4df10a444/psycopg2-2.7.4-cp35-cp35m-manylinux1_x86_64.whl
*   Hash 8eb94c0625c529215b53c08fb4e461546e2f3fc96a49c13d5474b5ad7aeab6cf
* Found hash for https://files.pythonhosted.org/packages/ca/ab/49f8ebecd7d03084215c5e63ad36f14e981872809cad4e64aa27271ce1c9/psycopg2-2.7.4-cp35-cp35m-win32.whl
*   Hash 8ebba5314c609a05c6955e5773c7e0e57b8dd817e4f751f30de729be58fa5e78
* Found hash for https://files.pythonhosted.org/packages/f8/b2/b02bbede43cf45844f3303dd9fdf5c8720ca04f811b07ec7489e0be42467/psycopg2-2.7.4-cp35-cp35m-win_amd64.whl
*   Hash 27467fd5af1dcc0a82d72927113b8f92da8f44b2efbdb8906bd76face95b596d
* Found hash for https://files.pythonhosted.org/packages/8c/a5/0e61d6f4a140a6e06a9ba40266c4b49123d834f1f97fe9a5ae0b6e45112b/psycopg2-2.7.4-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Hash b68e89bb086a9476fa85298caab43f92d0a6af135a5f433d1f6b6d82cafa7b55
* Found hash for https://files.pythonhosted.org/packages/25/7e/eb6d6b1b5e99440def358f45f852f5ac62d26c59fef043770c1d7404c402/psycopg2-2.7.4-cp36-cp36m-manylinux1_i686.whl
*   Hash 0b9851e798bae024ed1a2a6377a8dab4b8a128a56ed406f572f9f06194e4b275
* Found hash for https://files.pythonhosted.org/packages/92/15/92b5c363243376ce9cb879bbec561bba196694eb663a6937b4cb967e230e/psycopg2-2.7.4-cp36-cp36m-manylinux1_x86_64.whl
*   Hash 733166464598c239323142c071fa4c9b91c14359176e5ae7e202db6bcc1d2eb5
* Found hash for https://files.pythonhosted.org/packages/00/95/4c5d19affca312e1c06d4f88241ebc564bf5269addd191ec4962f0c93553/psycopg2-2.7.4-cp36-cp36m-win32.whl
*   Hash ad75fe10bea19ad2188c5cb5fc4cdf53ee808d9b44578c94a3cd1e9fc2beb656
* Found hash for https://files.pythonhosted.org/packages/f9/77/e29b792740ddec37a2d49431efa6c707cf3869c0cc7f28c7411bb6e96d91/psycopg2-2.7.4-cp36-cp36m-win_amd64.whl
*   Hash 8966829cb0d21a08a3c5ac971a2eb67c3927ae27c247300a8476554cc0ce2ae8
* Found hash for https://files.pythonhosted.org/packages/74/83/51580322ed0e82cba7ad8e0af590b8fb2cf11bd5aaa1ed872661bd36f462/psycopg2-2.7.4.tar.gz
*   Hash 8bf51191d60f6987482ef0cfe8511bbf4877a5aa7f313d7b488b53189cf26209
* Editing /tmp/reqs.txt

But note, if the digest isn't available in the JSON you still have to download each file and run pip on it. Like this: python hashin.py psycopg2==2.7.4 -r /tmp/reqs.txt -v -a sha384

Verbose output
https://pypi.org/pypi/psycopg2/json
* Found URL https://files.pythonhosted.org/packages/67/ee/668612acf12fecb8f8a19342517b8c4cf172b7bb9ff9fa1f86e7f95a4757/psycopg2-2.7.4-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Hash 3433487d9a99cf3cb1aa1b5daaa384e4c2d3e8938c94ef184ec4eec1763f8406311fa9b8982d3ded4ac6143bf724e777
* Found URL https://files.pythonhosted.org/packages/70/07/3ca5755bfef823dbdb1b582b76163ba3cea2a2d7f39eec48f18ad3a2f132/psycopg2-2.7.4-cp27-cp27m-manylinux1_i686.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp27-cp27m-manylinux1_i686.whl
*   Hash 682f798e6c873b57996062375be0a4147e30a9856375616108de5df98482f09e1e68ea88ca54f329faf6d4c62270132a
* Found URL https://files.pythonhosted.org/packages/75/5c/ee9b236e34ffc595992a08f375a3f907ddb67ee2a59d429f9ea97a8f21b8/psycopg2-2.7.4-cp27-cp27m-manylinux1_x86_64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp27-cp27m-manylinux1_x86_64.whl
*   Hash 67d1aae9264df8ff0da9d9d1bf84cf310002a45584e28ea6b47b46463326ec0b46ea2ebd4db8736776d50455bfb3e7cc
* Found URL https://files.pythonhosted.org/packages/99/18/5e56ffe76c499733b0bef59952877c21d257508c4165333a36c2f230f7b5/psycopg2-2.7.4-cp27-cp27mu-manylinux1_i686.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp27-cp27mu-manylinux1_i686.whl
*   Hash 675305c53a5f61cd5d612b69914a255ea96f6a6274eda6cf00236e77c054ac966f4b79b379c16ee5a8d766445efe61b4
* Found URL https://files.pythonhosted.org/packages/7c/c8/7cf31d2fd64b5cfa3f4538ee47f6dac6cfcaf647956e10a0c1617e68248f/psycopg2-2.7.4-cp27-cp27mu-manylinux1_x86_64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp27-cp27mu-manylinux1_x86_64.whl
*   Hash ac287b21797e12cc20eb8d09278153471cf9e6022302aab7afad4a6b2b390e71067cf54d37c4ad72186da3fe62dd530b
* Found URL https://files.pythonhosted.org/packages/56/72/1824e1c95891266ce07e424e75355a66c1ea824c40dbe6ef4dd07cb5a933/psycopg2-2.7.4-cp27-cp27m-win32.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp27-cp27m-win32.whl
*   Hash d7f77824ffa83cadd6cc8f0361b3318476756e08f90c04e6b1d4da1c46cc2af3a0d40eae352e66adad7a27c81505d504
* Found URL https://files.pythonhosted.org/packages/3e/23/0162ee2c8aef91d75b44848a4203bb661207ba7d0ffa594db3968df250c5/psycopg2-2.7.4-cp27-cp27m-win_amd64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp27-cp27m-win_amd64.whl
*   Hash 0666d8eb27c32ea408ff3ec3e0dc64b9ca721bfe0fbb9db90c17c601ab85084edaa7bf01842e25bf85de0ccc713c766d
* Found URL https://files.pythonhosted.org/packages/20/d8/0164450526030b68535db1007bb6080d8eb62cc6be90888740868105909d/psycopg2-2.7.4-cp33-cp33m-manylinux1_i686.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp33-cp33m-manylinux1_i686.whl
*   Hash ea9814e20890bcf9359ad8f549118d068e7272d779733dc191e3ec8b33a9aecf4319d99daba7a89710d09d982e99b794
* Found URL https://files.pythonhosted.org/packages/b2/5e/5709c7590f5c44a46a64501fe0a8c86fe13f8cd1d9974b804b654d13294e/psycopg2-2.7.4-cp33-cp33m-manylinux1_x86_64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp33-cp33m-manylinux1_x86_64.whl
*   Hash 73cda87709216604564716edbd1f177a98d7dcb82868a6e4ad295fd210d0059a200ab5c0e773e0f07f5759a8a91dbf13
* Found URL https://files.pythonhosted.org/packages/fc/e1/198f42b46cd6218ccd8a07c3dcf5a37f5ad9e696ba898f3bde57140768dd/psycopg2-2.7.4-cp33-cp33m-win32.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp33-cp33m-win32.whl
*   Hash da387d09f50b30bf7fa13bc8ef074f7a2d19b13a1f8a9190b6f5ba2b7ab81f7652a1d5da8e5a41d5b7753e11f9f95347
* Found URL https://files.pythonhosted.org/packages/26/56/49faf643bea3916dce96d98313a4f60cdf79af3f6d79ff307ca6cbba0f99/psycopg2-2.7.4-cp33-cp33m-win_amd64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp33-cp33m-win_amd64.whl
*   Hash 13a6eb83b30a6ae30881abab156810ecaaf1b1bb1dbd6441ef5f1f185612c4af118bdbd7be022dc07a937d86ac5cfe10
* Found URL https://files.pythonhosted.org/packages/dd/29/fb5e60247714b076ae19d198ce660b5306f218d339c30cf8935299b634d4/psycopg2-2.7.4-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Hash 54d853ce10ff5ada55179e30b267a52d5ab44bff354bea8abfbc3485f05e7347b8c321521d9c0715f301be223afd9391
* Found URL https://files.pythonhosted.org/packages/4d/3e/088b6e6200f54811da33a3bc6bbdd14779a9e88941d5497b344e36ff4e0f/psycopg2-2.7.4-cp34-cp34m-manylinux1_i686.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp34-cp34m-manylinux1_i686.whl
*   Hash ce707fe7f381580fe89e3186f0a3d6fbb67a3db18e206fb356a0f595be8bf2e30d9fe4324b84f7b1d8273bc65143b228
* Found URL https://files.pythonhosted.org/packages/09/e3/d24dfd49b79813f3021116383fdd2f0380b8145ca0bfcb15c6a72072b8d3/psycopg2-2.7.4-cp34-cp34m-manylinux1_x86_64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp34-cp34m-manylinux1_x86_64.whl
*   Hash f80c131635ff4fce2408ecaf2d6433aef4f243d1fa5069e6f1d4cf838ff0adbdf18167e941d7a44a4c9ddb45f780b647
* Found URL https://files.pythonhosted.org/packages/2a/b8/dce82ffc6222ab1854a2b91bfdce0e527d451715ee7d85de419981e2bec6/psycopg2-2.7.4-cp34-cp34m-win32.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp34-cp34m-win32.whl
*   Hash 51b0369dded0737e639d78b007b2de948cf133ad80140872723d2260e9b7c9a33d14350239bf71c720c596c11644d418
* Found URL https://files.pythonhosted.org/packages/1d/62/4b817f8546098d036f5eec016b62473644696b7c24ea6bf2545332d90f56/psycopg2-2.7.4-cp34-cp34m-win_amd64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp34-cp34m-win_amd64.whl
*   Hash 1d9e6e67f3b64f7e312ca6ab3af7341c56bff3547f19bf425e3e3063d788e81ab498e3b3e1c56d0b18aec7dec021f25d
* Found URL https://files.pythonhosted.org/packages/6b/08/4f3f7982916ada6a1a15fad8ea5279cbaca22d5324b8ad0fb21f31925bd1/psycopg2-2.7.4-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Hash 2f600ca4a91332131a6967d7df106a174ef6fec029b39d0847da06dc174f47fcba7e6c62b7aa148c7b807e59a1e3faef
* Found URL https://files.pythonhosted.org/packages/cb/3e/39f98d73666bb6790567404141ba7eea82d7e61ba2ac44c6b1a2ca1e3ae8/psycopg2-2.7.4-cp35-cp35m-manylinux1_i686.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp35-cp35m-manylinux1_i686.whl
*   Hash 55c98ac7f96ebcdb94dc7e5eac9cc5342da756c01976632c8bb9dc06a8fa7a1158e4b4e211a46fdbbbda156ae2aef441
* Found URL https://files.pythonhosted.org/packages/8a/86/97879021d5ca2e069ade58eb55da01a2ade6507bb31f565914f4df10a444/psycopg2-2.7.4-cp35-cp35m-manylinux1_x86_64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp35-cp35m-manylinux1_x86_64.whl
*   Hash 3f54134aaf05fd2ca8cab7537e9d0c4edd152883d079e053d68676b9f8387aff407d744f70a15db1ae2df0d646f19e99
* Found URL https://files.pythonhosted.org/packages/ca/ab/49f8ebecd7d03084215c5e63ad36f14e981872809cad4e64aa27271ce1c9/psycopg2-2.7.4-cp35-cp35m-win32.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp35-cp35m-win32.whl
*   Hash 557560a4a04c992ea1f1e4506f3a2c626d3de461111ca5baeb5ace694f37c3c1464e3458e6829cff6801a056d9c6e494
* Found URL https://files.pythonhosted.org/packages/f8/b2/b02bbede43cf45844f3303dd9fdf5c8720ca04f811b07ec7489e0be42467/psycopg2-2.7.4-cp35-cp35m-win_amd64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp35-cp35m-win_amd64.whl
*   Hash 7bdf1fba9b9b6d89e6474c5d9602e23e84c14c45f2418f1b7bc3134076def0354d7fc9578357302ed9fa340be02603ae
* Found URL https://files.pythonhosted.org/packages/8c/a5/0e61d6f4a140a6e06a9ba40266c4b49123d834f1f97fe9a5ae0b6e45112b/psycopg2-2.7.4-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
*   Hash 1b286622f269421c75df11ac5dd4d3c7a9e1a0792c2a10acd56e02c77993f811071e13b1b005edfb9d5f61090e84578f
* Found URL https://files.pythonhosted.org/packages/25/7e/eb6d6b1b5e99440def358f45f852f5ac62d26c59fef043770c1d7404c402/psycopg2-2.7.4-cp36-cp36m-manylinux1_i686.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp36-cp36m-manylinux1_i686.whl
*   Hash d5915781a43bf1efe8accf330518a9d0c5e69772a0e8cfc319796d07875572a283a50ebec3412936f3ded218d12b8942
* Found URL https://files.pythonhosted.org/packages/92/15/92b5c363243376ce9cb879bbec561bba196694eb663a6937b4cb967e230e/psycopg2-2.7.4-cp36-cp36m-manylinux1_x86_64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp36-cp36m-manylinux1_x86_64.whl
*   Hash b99e3c9c4d20ed3340d3c1b04371d4d76d400e742f06e2936a5e87285fcbc9bb5ffd218d0af266c687a457b8df1bab63
* Found URL https://files.pythonhosted.org/packages/00/95/4c5d19affca312e1c06d4f88241ebc564bf5269addd191ec4962f0c93553/psycopg2-2.7.4-cp36-cp36m-win32.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp36-cp36m-win32.whl
*   Hash 962e0e5ea8fc5c8c910771f6c47e39287f9f897d292f3913ad1b648d0dd58d577dba2d2e6e7d26009a58492d9825cb13
* Found URL https://files.pythonhosted.org/packages/f9/77/e29b792740ddec37a2d49431efa6c707cf3869c0cc7f28c7411bb6e96d91/psycopg2-2.7.4-cp36-cp36m-win_amd64.whl
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4-cp36-cp36m-win_amd64.whl
*   Hash 2da952ecedfc1c5f6608ae18b1dd8bae04b23255de8e078f844bb43c66670ebb7a069beee614e85febd93625eb8e4670
* Found URL https://files.pythonhosted.org/packages/74/83/51580322ed0e82cba7ad8e0af590b8fb2cf11bd5aaa1ed872661bd36f462/psycopg2-2.7.4.tar.gz
*   Re-using /var/folders/1x/2hf5hbs902q54g3bgby5bzt40000gn/T/psycopg2-2.7.4.tar.gz
*   Hash 1c2b9b004ad24645e316789272c9e196c88b29e16cc2aa85822aba03d9fa7c1fe77b0d9306171b9b183bf704cf6c32f7
* Editing /tmp/reqs.txt

So that still works and prints out the URL right before it starts downloading it.

@peterbe
Copy link
Owner Author

peterbe commented Aug 29, 2018

@mythmon r?

@mythmon
Copy link
Contributor

mythmon commented Aug 29, 2018

Perhaps the log output above should be in a code block? I think Github is messing with your formatting by erasing the newlines, or something.

@peterbe
Copy link
Owner Author

peterbe commented Aug 29, 2018

Ah, I didn't have the backticks inside there. And apprently you need a leading newline before the ticks.

Copy link
Contributor

@mythmon mythmon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes look good. It might be nice for the output to be a bit more explicit though. Maybe something like "Got hash from metadata for {url}" and "Got hash by downloading {url}"? Maybe those aren't quite right either, but I think they explain the difference a little more clearly to someone who isn't reading the code.

@peterbe
Copy link
Owner Author

peterbe commented Aug 29, 2018

You're right about the English prefixes before printing those things. It could be better but I'm also wary of explaining the verbose output too much. The most important thing is there and more English verbiage isn't likely to be much use.

By the way, the original intent of the --verbose was for the "paranoid" to manually check the downloaded files and see that each one doesn't have malicious stuff in it. That feature kinda went away (slowly and quietly) when using pypi.org and extracting the sha256 straight from the JSON. Now, if you're paranoid, you'd have to manually wget each of those files and basically check that what pypi is hosting is files that haven't been tampered with.

@peterbe peterbe merged commit d682470 into master Aug 29, 2018
@peterbe peterbe deleted the dont-print-release-url-in-verbose-mode-if-not-necessary branch August 29, 2018 15:36
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.

2 participants