-
Notifications
You must be signed in to change notification settings - Fork 332
Introduce grequests error report in django project #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This warning comes from For example: # bad
import requests
import grequests This raises the warning you see. It's a good warning, as this scenario will also lead to misbehavior in using grequests. Instead, you want to try to make sure you import grequests first before other modules that use patched libraries. # OK
import grequests
import requests Key takeaway: make sure that It's also worth mentioning that See also: gevent/gevent#1235 |
Does this warning need to be dealt with? |
Unfortunately, I'm not sure it's possible to say. Really, it depends... It's hard to predict whether or not the monkey patching between libraries will be compatible... For better or worse, This may or may not be compatible with how other libraries expect things to be patched. That said, |
Thanks!!! It works 😁😁😁 |
Introduce grequests error report in django project:
/usr/local/python3/lib/python3.6/site-packages/grequests.py:22:
MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See gevent/gevent#1016. Modules that had direct imports (NOT patched): ['urllib3.util.ssl_ (/usr/local/python3/lib/python3.6/site-packages/urllib3/util/ssl_.py)', 'urllib3.util (/usr/local/python3/lib/python3.6/site-packages/urllib3/util/init.py)'].
curious_george.patch_all(thread=False, select=False)
May I ask what is the reason?
Package Version
alipay-sdk-python 3.3.398
amqp 2.5.2
asgiref 3.2.7
asn1crypto 1.3.0
billiard 3.6.3.0
celery 4.4.2
certifi 2020.4.5.1
cffi 1.14.0
chardet 3.0.4
crypto 1.4.1
cryptography 2.9
Django 3.0.5
django-celery-results 1.1.2
django-cors-headers 3.4.0
dnspython 1.16.0
dwebsocket 0.5.12
eventlet 0.29.1
gevent 20.9.0
greenlet 0.4.17
grequests 0.6.0
idna 2.9
importlib-metadata 1.6.0
kombu 4.6.8
monotonic 1.5
more-itertools 8.2.0
Naked 0.1.31
optionaldict 0.1.1
pip 20.2.4
pyasn1 0.4.8
pycparser 2.20
pycrypto 2.6.1
pycryptodomex 3.9.4
PyJWT 1.7.1
PyMySQL 0.9.3
pyOpenSSL 19.1.0
python-alipay-sdk 2.0.1
python-dateutil 2.8.1
pytz 2019.3
PyYAML 5.3.1
requests 2.25.0
rsa 4.0
setuptools 46.1.3
shellescape 3.8.1
six 1.14.0
sqlparse 0.3.1
urllib3 1.25.9
uWSGI 2.0.19.1
vine 1.3.0
wechatpy 1.8.14
xmltodict 0.12.0
xpinyin 0.5.7
zipp 3.1.0
zope.event 4.5.0
zope.interface 5.2.0
The text was updated successfully, but these errors were encountered: