Python 的 HTTP 客户端库,Requests 2.6.0 发布
Requests 是一个 Python 的 HTTP 客户端库。
示例代码:
>>> r = requests.get('https://api.github.com', auth=('user', 'pass')) >>> r.status_code 204 >>> r.headers['content-type'] 'application/json' >>> r.text ... Requests 2.6.0 发布,此版本现已提供下载:https://github.com/kennethreitz/requests/archive/v2.6.0.zip。
更新内容如下:
Bug 修复
-
Fix handling of cookies on redirect.
-
Fix error when requests is an
install_requiresdependency andpython setup.py testis run. (#2462) -
Fix error when urllib3 is unbundled and requests continues to use the vendored import location.
-
Include fixes to
urllib3's header handling. -
Requests' handling of unvendored dependencies is now more restrictive.
新特性和改进
-
Support bytearrays when passed as parameters in the
filesargument. (#2468) -
Avoid data duplication when creating a request with
str,bytes, orbytearrayinput to thefilesargument.
更多内容请看更新日志。
来自:http://www.oschina.net/news/60539/requests-2-6-0