This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author acue
Recipients Quentin.Pradet, acue, deivid, martin.panter, xtreak
Date 2018-11-28.09:02:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1543395754.83.0.788709270274.issue35334@psf.upfronthosting.co.za>
In-reply-to
Content
@xtreak
I didn't checked the source of the assignment of the instance of *Retry* to *self.total*. For me it was important to get the display of the actual source of the failure, which is the failed access to PyPI. Thus my proposal, just to intercept the error, display a bug-report, and display the quite good error message for the failed PyPI access already contained in the code. 

Thus the intention to replace:

>  File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 315, in increment
>
>    total -= 1
>
> TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

by:

> Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(&lt;requests.packages.urllib3.connection.VerifiedHTTPSConnection object at/
>
>  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 
'ConnectTimeoutError(&lt;requests.packages.urllib3.connection.VerifiedHTTPSConnection object at/
>
>  Could not find a version that satisfies the requirement evdev (from versions: )
>
> No matching distribution found for evdev
>
> WARNING : Pip failed to install software!

Optionally with an additional error message for the faulty assignment to  the member *total*. But this is actually just a repetition counter, so even the integer replacement(>=1) should be OK. If an application uses it - wrongly - as a reference pointer, this will fail than immediately and the app recognises it's error straight away.
History
Date User Action Args
2018-11-28 09:02:34acuesetrecipients: + acue, martin.panter, Quentin.Pradet, xtreak, deivid
2018-11-28 09:02:34acuesetmessageid: <1543395754.83.0.788709270274.issue35334@psf.upfronthosting.co.za>
2018-11-28 09:02:34acuelinkissue35334 messages
2018-11-28 09:02:34acuecreate