python requests on Google App Engine not working for HTTPS

前端 未结 2 1515
没有蜡笔的小新
没有蜡笔的小新 2020-12-15 21:28

I\'m using python-request on Google App Engine and it\'s not working as expected for HTTPS. Let\'s see an example:

import requests
requests.get(\'https://www         


        
2条回答
  •  南笙
    南笙 (楼主)
    2020-12-15 21:50

    Downgrading to requests==2.1.0 worked for me.

    Having an up-to-date urllib3 is important for resolving an unrelated bug (import pwd, as I recall).

    Hopefully App Engine fixes this soon, as requests won't.

    EDIT:

    I think you can also patch this in the latest requests by commenting lines 161-175 in sessions.py. Untested.

提交回复
热议问题