Python 的 HTTP 客户端库,Requests 2.6.0 发布

y37f 10年前

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_requires dependency and python setup.py test is 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 files argument. (#2468)

  • Avoid data duplication when creating a request with str, bytes, orbytearray input to the files argument.

更多内容请看更新日志

来自:http://www.oschina.net/news/60539/requests-2-6-0