-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update wsgi.py #166
base: master
Are you sure you want to change the base?
Update wsgi.py #166
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
Thanks for the fix, this is a critical issue since eventlet 0.30.3+ actually broke compatibility with old API!
However, this proposal is not retro compatible with older eventlet versions, I suggested some modifications for this purpose.
BR.
@@ -113,7 +113,7 @@ class _AlreadyHandledResponse(Response): | |||
import eventlet | |||
if version.parse(eventlet.__version__) >= version.parse("0.30.3"): | |||
import eventlet.wsgi | |||
_ALREADY_HANDLED = getattr(eventlet.wsgi, "ALREADY_HANDLED", None) | |||
_ALREADY_HANDLED = getattr(getattr(eventlet.wsgi, "WSGI_LOCAL", None), "already_handled", None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should instead take a similar approach than the fix pushed in gunicorn project here. Here is an example:
EVENTLET_WSGI_LOCAL = getattr(eventlet.wsgi, "WSGI_LOCAL", None)
EVENTLET_ALREADY_HANDLED = getattr(eventlet.wsgi, "ALREADY_HANDLED", None)
...
if getattr(EVENTLET_WSGI_LOCAL, "already_handled", None):
_ALREADY_HANDLED = getattr(EVENTLET_WSGI_LOCAL, "already_handled", False)
else:
_ALREADY_HANDLED = EVENTLET_ALREADY_HANDLED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your comment help a lot, thank you👍
Hi all, @anarkiwi, |
I apologize for the lack of updates. I'll update Ryu's README shortly. Our team has not had the resources to fully maintain Ryu, so FAUCET has moved to os-ken. We are currently looking for assistance to help support Ryu. |
eventlet/eventlet#544