gunicorn
gunicorn copied to clipboard
Use plain socket objects instead of wrapper classes
Refactor socket creation to remove the socket wrapper classes so that these objects have less surprising behavior when used in worker hooks, worker classes, and custom applications.
Close #3013.
is there anything else missing for this?
@benoitc polite bump, if you have the time
@tilgovi is this ready for review or do yui think to any other addition/changes already?
@tilgovi What is the status of your PR?
Should the monkey patching in gunicorn/workers/ggevent.py
stay the same?
I was able to run my WIP request after reloading test against your PR after fixing just the following variable access:
- sockets.append(socket.socket(s.FAMILY, socket.SOCK_STREAM,
- fileno=s.sock.fileno()))
+ sockets.append(socket.socket(s.family, socket.SOCK_STREAM,
+ fileno=s.fileno()))
EDIT: rebased a24ff07d3cf899b3fd05287d34ba145e85cbbd80 - including the above fix here: https://github.com/benoitc/gunicorn/compare/master...pajod:gunicorn:patch-plain-socket