Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d42556a936 | ||
|
|
103718847a | ||
|
|
28666e5d3a | ||
|
|
ecaa10543f | ||
|
|
908c3b01ee | ||
|
|
c952e9e4e0 | ||
|
|
cceceecb68 | ||
|
|
e9ca4b39b4 | ||
|
|
7962c12451 | ||
|
|
f687e9f3d8 | ||
|
|
dc24bc3217 | ||
|
|
267ec2f9c3 | ||
|
|
18c8924f14 | ||
|
|
413f2a557c | ||
|
|
04faf59f49 |
30
HISTORY.rst
30
HISTORY.rst
@@ -3,6 +3,36 @@
|
||||
Release History
|
||||
---------------
|
||||
|
||||
2.16.2 (2017-05-27)
|
||||
+++++++++++++++++++
|
||||
|
||||
- Further restored the ``requests.packages`` namespace for compatibility reasons.
|
||||
|
||||
No code modification (noted below) should be neccessary any longer.
|
||||
|
||||
2.16.1 (2017-05-27)
|
||||
+++++++++++++++++++
|
||||
|
||||
- Restored the ``requests.packages`` namespace for compatibility reasons.
|
||||
- Bugfix for ``urllib3`` version parsing.
|
||||
|
||||
**Note**: code that was written to import against the ``requests.packages``
|
||||
namespace previously will have to import code that rests at this module-level
|
||||
now.
|
||||
|
||||
For example::
|
||||
|
||||
from requests.packages.urllib3.poolmanager import PoolManager
|
||||
|
||||
Will need to be re-written to be::
|
||||
|
||||
from requests.packages import urllib3
|
||||
urllib3.poolmanager.PoolManager
|
||||
|
||||
Or, even better::
|
||||
|
||||
from urllib3.poolmanager import PoolManager
|
||||
|
||||
2.16.0 (2017-05-26)
|
||||
+++++++++++++++++++
|
||||
|
||||
|
||||
@@ -57,8 +57,7 @@ See `the similar code, sans Requests <https://gist.github.com/973705>`_.
|
||||
Requests allows you to send *organic, grass-fed* HTTP/1.1 requests, without the
|
||||
need for manual labor. There's no need to manually add query strings to your
|
||||
URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling
|
||||
are 100% automatic, powered by `urllib3 <https://github.com/shazow/urllib3>`_,
|
||||
which is embedded within Requests.
|
||||
are 100% automatic, thanks to `urllib3 <https://github.com/shazow/urllib3>`_.
|
||||
|
||||
Besides, all the cool kids are doing it. Requests is one of the most
|
||||
downloaded Python packages of all time, pulling in over 11,000,000 downloads
|
||||
|
||||
@@ -57,8 +57,7 @@ See `similar code, sans Requests <https://gist.github.com/973705>`_.
|
||||
**Requests** allows you to send *organic, grass-fed* HTTP/1.1 requests, without the
|
||||
need for manual labor. There's no need to manually add query strings to your
|
||||
URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling
|
||||
are 100% automatic, powered by `urllib3 <https://github.com/shazow/urllib3>`_,
|
||||
which is embedded within Requests.
|
||||
are 100% automatic, thanks to `urllib3 <https://github.com/shazow/urllib3>`_.
|
||||
|
||||
User Testimonials
|
||||
-----------------
|
||||
|
||||
@@ -46,7 +46,11 @@ from .__version__ import __copyright__, __cake__
|
||||
|
||||
# Check urllib3 for compatibility.
|
||||
import urllib3
|
||||
major, minor, patch = urllib3.__version__.split('.')[:3]
|
||||
urllib3_version = urllib3.__version__.split('.')
|
||||
# Sometimes, urllib3 only reports its version as 16.1.
|
||||
if len(urllib3_version) == 2:
|
||||
urllib3_version.append('0')
|
||||
major, minor, patch= urllib3_version
|
||||
major, minor, patch = int(major), int(minor), int(patch)
|
||||
# urllib3 >= 1.21.1, < 1.22
|
||||
try:
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
__title__ = 'requests'
|
||||
__description__ = 'Python HTTP for Humans.'
|
||||
__url__ = 'http://python-requests.org'
|
||||
__version__ = '2.16.0'
|
||||
__build__ = 0x021600
|
||||
__version__ = '2.16.2'
|
||||
__build__ = 0x021602
|
||||
__author__ = 'Kenneth Reitz'
|
||||
__author_email__ = 'me@kennethreitz.org'
|
||||
__license__ = 'Apache 2.0'
|
||||
|
||||
15
requests/packages.py
Normal file
15
requests/packages.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import sys
|
||||
|
||||
# This code exists for backwards compatibility reasons.
|
||||
# I don't like it either. Just look the other way. :)
|
||||
|
||||
import urllib3
|
||||
sys.modules['requests.packages.urllib3'] = urllib3
|
||||
|
||||
import idna
|
||||
sys.modules['requests.packages.idna'] = idna
|
||||
|
||||
import chardet
|
||||
sys.modules['requests.packages.chardet'] = chardet
|
||||
|
||||
# Kinda cool, though, right?
|
||||
Reference in New Issue
Block a user