benoitc / gunicorn

gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, fast clients and sleepy applications.
http://www.gunicorn.org
Other
9.88k stars 1.76k forks source link

assert only, no change intended: never reflect invalid input #3264

Open pajod opened 3 months ago

pajod commented 3 months ago

This does not fix any bug, nor does it add any feature.

But if my less obviously correct patch for #3125 that deletes all the duplicate branches in error handling is flawed, then adding this assertion should reduce the impact of bugs from somewhat worrying "reflected injection" to much less worrying "crashes with proper traceback".

EDIT: No, those are not superfluous-parens. (Using the binding precedence of not) is not producing readable code. I recommend disabling that pylint warning