You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FYI I wrote this as a comment in the issue #8, but since it's closed, I'm afraid nobody will look at it.
The latest version of gevent - 1.1.0 - introduced a warning message when monkey.patch_all is called multiple times:
grequests.py:21: RuntimeWarning: Patching more than once will result in the union of all True parameters being patched
curious_george.patch_all(thread=False, select=False)
This happens in my application because both grequests and I call monkey.patch_all.
I don't think libs such as grequests should do monkey patch by themselves. If this is a requirement (and this is one obviously), I'd rather get a warning saying that some part of the standard lib should be monkey patched so that grequests can work. It could also be a failing assertion.
Sure, it's only a warning and it doesn't hurt much. But nobody likes useless warnings, and I'm getting this one at every unit test, every run and in my production logs. This is pretty annoying.
The text was updated successfully, but these errors were encountered:
🙈 Sorry you're running into this annoyance. Curious George seems to be getting grequests in all kinds of trouble 🐒. Though, unfortunately, I don't think there is an appropriate solution from grequests.
Firstly, it's a change in gevent that caused this. Not much we can do about that. Perhaps you could submit a PR with gevent to add an option to suppress the warning.
Secondly, whether or not grequests should itself be calling monkey patch is, in my view, a moot point to discuss, because what it suggests is introducing a change that would break all code using grequests to address a warning presented by gevent. Like you mentioned, it's only a warning and it doesn't hurt much. Such a change as you suggest would hurt a lot. 😥
Finally, it should be possible for you to suppress the warning yourself, even if gevent won't provide it as a feature directly. That should help keep your production logs and CI reports clean 👌
For now, there's not much to be done here. Eventually, I may test and figure out how to do a more selective patching that may solve you're issue. Mixing two libraries that use gevent is never really an easy affair.
FYI I wrote this as a comment in the issue #8, but since it's closed, I'm afraid nobody will look at it.
The latest version of gevent - 1.1.0 - introduced a warning message when monkey.patch_all is called multiple times:
This happens in my application because both grequests and I call monkey.patch_all.
I don't think libs such as grequests should do monkey patch by themselves. If this is a requirement (and this is one obviously), I'd rather get a warning saying that some part of the standard lib should be monkey patched so that grequests can work. It could also be a failing assertion.
Sure, it's only a warning and it doesn't hurt much. But nobody likes useless warnings, and I'm getting this one at every unit test, every run and in my production logs. This is pretty annoying.
The text was updated successfully, but these errors were encountered: