Various packaging requirements for idna

This commit is contained in:
Cory Benfield
2016-10-14 10:21:24 +01:00
parent 27812eb902
commit 49b69b57db
4 changed files with 11 additions and 1 deletions
+3 -1
View File
@@ -1,4 +1,4 @@
If you are planning to submit a pull request to requests with any changes in
If you are planning to submit a pull request to requests with any changes in
this library do not go any further. These are independent libraries which we
vendor into requests. Any changes necessary to these libraries must be made in
them and submitted as separate pull requests to those libraries.
@@ -7,5 +7,7 @@ urllib3 pull requests go here: https://github.com/shazow/urllib3
chardet pull requests go here: https://github.com/chardet/chardet
idna pull requests go here: https://github.com/kjd/idna
See https://github.com/kennethreitz/requests/pull/1812#issuecomment-30854316
for the reasoning behind this.
+6
View File
@@ -34,3 +34,9 @@ try:
except ImportError:
import chardet
sys.modules['%s.chardet' % __name__] = chardet
try:
from . import idna
except ImportError:
import idna
sys.modules['%s.idna' % __name__] = idna
+1
View File
@@ -37,6 +37,7 @@ packages = [
'requests',
'requests.packages',
'requests.packages.chardet',
'requests.packages.idna',
'requests.packages.urllib3',
'requests.packages.urllib3.packages',
'requests.packages.urllib3.contrib',
+1
View File
@@ -1884,6 +1884,7 @@ def test_urllib3_pool_connection_closed(httpbin):
def test_vendor_aliases():
from requests.packages import urllib3
from requests.packages import chardet
from requests.packages import idna
with pytest.raises(ImportError):
from requests.packages import webbrowser