New submission from Felipe Rodrigues <fel...@felipevr.com>:

Hi all!

I was testing some static analysis tool and decided to use the HTTP module as 
testing ground. While running `bandit` at the client module, it detected 3 
instances of using `assert` inside the code. Twice in the HTTPResponse class 
and once in the HTTPConnection class.

Now, I know that this will only cause any trouble when running python with the 
optimize settings turned on and if someone is that concerned about 
optimization, they probably won't be using the stdlib's HTTP implementation, 
but I think it would be fitting to fix this corner case.

I've written a PR that fixes this but I'm not sure if the raised exceptions and 
messages are ok

----------
components: Library (Lib)
messages: 378810
nosy: fbidu
priority: normal
severity: normal
status: open
title: Usage of assert in http/client.py
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42060>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to