rigid 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/rigid +4 -0
- data/rigid +16 -0
- data/vendor/PyYAML-3.12.dist-info/DESCRIPTION.rst +12 -0
- data/vendor/PyYAML-3.12.dist-info/INSTALLER +1 -0
- data/vendor/PyYAML-3.12.dist-info/METADATA +35 -0
- data/vendor/PyYAML-3.12.dist-info/RECORD +42 -0
- data/vendor/PyYAML-3.12.dist-info/WHEEL +5 -0
- data/vendor/PyYAML-3.12.dist-info/metadata.json +1 -0
- data/vendor/PyYAML-3.12.dist-info/top_level.txt +2 -0
- data/vendor/_yaml.so +0 -0
- data/vendor/click/__init__.py +98 -0
- data/vendor/click/__init__.pyc +0 -0
- data/vendor/click/_bashcomplete.py +83 -0
- data/vendor/click/_bashcomplete.pyc +0 -0
- data/vendor/click/_compat.py +642 -0
- data/vendor/click/_compat.pyc +0 -0
- data/vendor/click/_termui_impl.py +547 -0
- data/vendor/click/_termui_impl.pyc +0 -0
- data/vendor/click/_textwrap.py +38 -0
- data/vendor/click/_textwrap.pyc +0 -0
- data/vendor/click/_unicodefun.py +119 -0
- data/vendor/click/_unicodefun.pyc +0 -0
- data/vendor/click/_winconsole.py +273 -0
- data/vendor/click/_winconsole.pyc +0 -0
- data/vendor/click/core.py +1738 -0
- data/vendor/click/core.pyc +0 -0
- data/vendor/click/decorators.py +304 -0
- data/vendor/click/decorators.pyc +0 -0
- data/vendor/click/exceptions.py +201 -0
- data/vendor/click/exceptions.pyc +0 -0
- data/vendor/click/formatting.py +256 -0
- data/vendor/click/formatting.pyc +0 -0
- data/vendor/click/globals.py +48 -0
- data/vendor/click/globals.pyc +0 -0
- data/vendor/click/parser.py +426 -0
- data/vendor/click/parser.pyc +0 -0
- data/vendor/click/termui.py +539 -0
- data/vendor/click/termui.pyc +0 -0
- data/vendor/click/testing.py +322 -0
- data/vendor/click/testing.pyc +0 -0
- data/vendor/click/types.py +550 -0
- data/vendor/click/types.pyc +0 -0
- data/vendor/click/utils.py +415 -0
- data/vendor/click/utils.pyc +0 -0
- data/vendor/click-6.6.dist-info/DESCRIPTION.rst +3 -0
- data/vendor/click-6.6.dist-info/INSTALLER +1 -0
- data/vendor/click-6.6.dist-info/METADATA +16 -0
- data/vendor/click-6.6.dist-info/RECORD +41 -0
- data/vendor/click-6.6.dist-info/WHEEL +6 -0
- data/vendor/click-6.6.dist-info/metadata.json +1 -0
- data/vendor/click-6.6.dist-info/top_level.txt +1 -0
- data/vendor/easy_install.py +5 -0
- data/vendor/easy_install.pyc +0 -0
- data/vendor/pip-9.0.1.dist-info/DESCRIPTION.rst +39 -0
- data/vendor/pip-9.0.1.dist-info/INSTALLER +1 -0
- data/vendor/pip-9.0.1.dist-info/METADATA +69 -0
- data/vendor/pip-9.0.1.dist-info/RECORD +501 -0
- data/vendor/pip-9.0.1.dist-info/WHEEL +6 -0
- data/vendor/pip-9.0.1.dist-info/entry_points.txt +5 -0
- data/vendor/pip-9.0.1.dist-info/metadata.json +1 -0
- data/vendor/pip-9.0.1.dist-info/top_level.txt +1 -0
- data/vendor/pkg_resources/__init__.py +3051 -0
- data/vendor/pkg_resources/__init__.pyc +0 -0
- data/vendor/pkg_resources/_vendor/__init__.py +0 -0
- data/vendor/pkg_resources/_vendor/__init__.pyc +0 -0
- data/vendor/pkg_resources/_vendor/appdirs.py +552 -0
- data/vendor/pkg_resources/_vendor/appdirs.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/__about__.py +21 -0
- data/vendor/pkg_resources/_vendor/packaging/__about__.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/__init__.py +14 -0
- data/vendor/pkg_resources/_vendor/packaging/__init__.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/_compat.py +30 -0
- data/vendor/pkg_resources/_vendor/packaging/_compat.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/_structures.py +68 -0
- data/vendor/pkg_resources/_vendor/packaging/_structures.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/markers.py +287 -0
- data/vendor/pkg_resources/_vendor/packaging/markers.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/requirements.py +127 -0
- data/vendor/pkg_resources/_vendor/packaging/requirements.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/specifiers.py +774 -0
- data/vendor/pkg_resources/_vendor/packaging/specifiers.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/utils.py +14 -0
- data/vendor/pkg_resources/_vendor/packaging/utils.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/version.py +393 -0
- data/vendor/pkg_resources/_vendor/packaging/version.pyc +0 -0
- data/vendor/pkg_resources/_vendor/pyparsing.py +5696 -0
- data/vendor/pkg_resources/_vendor/pyparsing.pyc +0 -0
- data/vendor/pkg_resources/_vendor/six.py +868 -0
- data/vendor/pkg_resources/_vendor/six.pyc +0 -0
- data/vendor/pkg_resources/extern/__init__.py +73 -0
- data/vendor/pkg_resources/extern/__init__.pyc +0 -0
- data/vendor/requests/__init__.py +86 -0
- data/vendor/requests/__init__.pyc +0 -0
- data/vendor/requests/adapters.py +503 -0
- data/vendor/requests/adapters.pyc +0 -0
- data/vendor/requests/api.py +148 -0
- data/vendor/requests/api.pyc +0 -0
- data/vendor/requests/auth.py +252 -0
- data/vendor/requests/auth.pyc +0 -0
- data/vendor/requests/cacert.pem +5616 -0
- data/vendor/requests/certs.py +25 -0
- data/vendor/requests/certs.pyc +0 -0
- data/vendor/requests/compat.py +66 -0
- data/vendor/requests/compat.pyc +0 -0
- data/vendor/requests/cookies.py +540 -0
- data/vendor/requests/cookies.pyc +0 -0
- data/vendor/requests/exceptions.py +114 -0
- data/vendor/requests/exceptions.pyc +0 -0
- data/vendor/requests/hooks.py +34 -0
- data/vendor/requests/hooks.pyc +0 -0
- data/vendor/requests/models.py +873 -0
- data/vendor/requests/models.pyc +0 -0
- data/vendor/requests/packages/__init__.py +36 -0
- data/vendor/requests/packages/__init__.pyc +0 -0
- data/vendor/requests/packages/chardet/__init__.py +32 -0
- data/vendor/requests/packages/chardet/__init__.pyc +0 -0
- data/vendor/requests/packages/chardet/big5freq.py +925 -0
- data/vendor/requests/packages/chardet/big5freq.pyc +0 -0
- data/vendor/requests/packages/chardet/big5prober.py +42 -0
- data/vendor/requests/packages/chardet/big5prober.pyc +0 -0
- data/vendor/requests/packages/chardet/chardetect.py +80 -0
- data/vendor/requests/packages/chardet/chardetect.pyc +0 -0
- data/vendor/requests/packages/chardet/chardistribution.py +231 -0
- data/vendor/requests/packages/chardet/chardistribution.pyc +0 -0
- data/vendor/requests/packages/chardet/charsetgroupprober.py +106 -0
- data/vendor/requests/packages/chardet/charsetgroupprober.pyc +0 -0
- data/vendor/requests/packages/chardet/charsetprober.py +62 -0
- data/vendor/requests/packages/chardet/charsetprober.pyc +0 -0
- data/vendor/requests/packages/chardet/codingstatemachine.py +61 -0
- data/vendor/requests/packages/chardet/codingstatemachine.pyc +0 -0
- data/vendor/requests/packages/chardet/compat.py +34 -0
- data/vendor/requests/packages/chardet/compat.pyc +0 -0
- data/vendor/requests/packages/chardet/constants.py +39 -0
- data/vendor/requests/packages/chardet/constants.pyc +0 -0
- data/vendor/requests/packages/chardet/cp949prober.py +44 -0
- data/vendor/requests/packages/chardet/cp949prober.pyc +0 -0
- data/vendor/requests/packages/chardet/escprober.py +86 -0
- data/vendor/requests/packages/chardet/escprober.pyc +0 -0
- data/vendor/requests/packages/chardet/escsm.py +242 -0
- data/vendor/requests/packages/chardet/escsm.pyc +0 -0
- data/vendor/requests/packages/chardet/eucjpprober.py +90 -0
- data/vendor/requests/packages/chardet/eucjpprober.pyc +0 -0
- data/vendor/requests/packages/chardet/euckrfreq.py +596 -0
- data/vendor/requests/packages/chardet/euckrfreq.pyc +0 -0
- data/vendor/requests/packages/chardet/euckrprober.py +42 -0
- data/vendor/requests/packages/chardet/euckrprober.pyc +0 -0
- data/vendor/requests/packages/chardet/euctwfreq.py +428 -0
- data/vendor/requests/packages/chardet/euctwfreq.pyc +0 -0
- data/vendor/requests/packages/chardet/euctwprober.py +41 -0
- data/vendor/requests/packages/chardet/euctwprober.pyc +0 -0
- data/vendor/requests/packages/chardet/gb2312freq.py +472 -0
- data/vendor/requests/packages/chardet/gb2312freq.pyc +0 -0
- data/vendor/requests/packages/chardet/gb2312prober.py +41 -0
- data/vendor/requests/packages/chardet/gb2312prober.pyc +0 -0
- data/vendor/requests/packages/chardet/hebrewprober.py +283 -0
- data/vendor/requests/packages/chardet/hebrewprober.pyc +0 -0
- data/vendor/requests/packages/chardet/jisfreq.py +569 -0
- data/vendor/requests/packages/chardet/jisfreq.pyc +0 -0
- data/vendor/requests/packages/chardet/jpcntx.py +227 -0
- data/vendor/requests/packages/chardet/jpcntx.pyc +0 -0
- data/vendor/requests/packages/chardet/langbulgarianmodel.py +229 -0
- data/vendor/requests/packages/chardet/langbulgarianmodel.pyc +0 -0
- data/vendor/requests/packages/chardet/langcyrillicmodel.py +329 -0
- data/vendor/requests/packages/chardet/langcyrillicmodel.pyc +0 -0
- data/vendor/requests/packages/chardet/langgreekmodel.py +225 -0
- data/vendor/requests/packages/chardet/langgreekmodel.pyc +0 -0
- data/vendor/requests/packages/chardet/langhebrewmodel.py +201 -0
- data/vendor/requests/packages/chardet/langhebrewmodel.pyc +0 -0
- data/vendor/requests/packages/chardet/langhungarianmodel.py +225 -0
- data/vendor/requests/packages/chardet/langhungarianmodel.pyc +0 -0
- data/vendor/requests/packages/chardet/langthaimodel.py +200 -0
- data/vendor/requests/packages/chardet/langthaimodel.pyc +0 -0
- data/vendor/requests/packages/chardet/latin1prober.py +139 -0
- data/vendor/requests/packages/chardet/latin1prober.pyc +0 -0
- data/vendor/requests/packages/chardet/mbcharsetprober.py +86 -0
- data/vendor/requests/packages/chardet/mbcharsetprober.pyc +0 -0
- data/vendor/requests/packages/chardet/mbcsgroupprober.py +54 -0
- data/vendor/requests/packages/chardet/mbcsgroupprober.pyc +0 -0
- data/vendor/requests/packages/chardet/mbcssm.py +572 -0
- data/vendor/requests/packages/chardet/mbcssm.pyc +0 -0
- data/vendor/requests/packages/chardet/sbcharsetprober.py +120 -0
- data/vendor/requests/packages/chardet/sbcharsetprober.pyc +0 -0
- data/vendor/requests/packages/chardet/sbcsgroupprober.py +69 -0
- data/vendor/requests/packages/chardet/sbcsgroupprober.pyc +0 -0
- data/vendor/requests/packages/chardet/sjisprober.py +91 -0
- data/vendor/requests/packages/chardet/sjisprober.pyc +0 -0
- data/vendor/requests/packages/chardet/universaldetector.py +170 -0
- data/vendor/requests/packages/chardet/universaldetector.pyc +0 -0
- data/vendor/requests/packages/chardet/utf8prober.py +76 -0
- data/vendor/requests/packages/chardet/utf8prober.pyc +0 -0
- data/vendor/requests/packages/urllib3/__init__.py +96 -0
- data/vendor/requests/packages/urllib3/__init__.pyc +0 -0
- data/vendor/requests/packages/urllib3/_collections.py +324 -0
- data/vendor/requests/packages/urllib3/_collections.pyc +0 -0
- data/vendor/requests/packages/urllib3/connection.py +330 -0
- data/vendor/requests/packages/urllib3/connection.pyc +0 -0
- data/vendor/requests/packages/urllib3/connectionpool.py +866 -0
- data/vendor/requests/packages/urllib3/connectionpool.pyc +0 -0
- data/vendor/requests/packages/urllib3/contrib/__init__.py +0 -0
- data/vendor/requests/packages/urllib3/contrib/__init__.pyc +0 -0
- data/vendor/requests/packages/urllib3/contrib/appengine.py +231 -0
- data/vendor/requests/packages/urllib3/contrib/appengine.pyc +0 -0
- data/vendor/requests/packages/urllib3/contrib/ntlmpool.py +115 -0
- data/vendor/requests/packages/urllib3/contrib/ntlmpool.pyc +0 -0
- data/vendor/requests/packages/urllib3/contrib/pyopenssl.py +358 -0
- data/vendor/requests/packages/urllib3/contrib/pyopenssl.pyc +0 -0
- data/vendor/requests/packages/urllib3/contrib/socks.py +172 -0
- data/vendor/requests/packages/urllib3/contrib/socks.pyc +0 -0
- data/vendor/requests/packages/urllib3/exceptions.py +209 -0
- data/vendor/requests/packages/urllib3/exceptions.pyc +0 -0
- data/vendor/requests/packages/urllib3/fields.py +178 -0
- data/vendor/requests/packages/urllib3/fields.pyc +0 -0
- data/vendor/requests/packages/urllib3/filepost.py +94 -0
- data/vendor/requests/packages/urllib3/filepost.pyc +0 -0
- data/vendor/requests/packages/urllib3/packages/__init__.py +5 -0
- data/vendor/requests/packages/urllib3/packages/__init__.pyc +0 -0
- data/vendor/requests/packages/urllib3/packages/ordered_dict.py +259 -0
- data/vendor/requests/packages/urllib3/packages/ordered_dict.pyc +0 -0
- data/vendor/requests/packages/urllib3/packages/six.py +868 -0
- data/vendor/requests/packages/urllib3/packages/six.pyc +0 -0
- data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py +13 -0
- data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyc +0 -0
- data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py +105 -0
- data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyc +0 -0
- data/vendor/requests/packages/urllib3/poolmanager.py +367 -0
- data/vendor/requests/packages/urllib3/poolmanager.pyc +0 -0
- data/vendor/requests/packages/urllib3/request.py +151 -0
- data/vendor/requests/packages/urllib3/request.pyc +0 -0
- data/vendor/requests/packages/urllib3/response.py +530 -0
- data/vendor/requests/packages/urllib3/response.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/__init__.py +46 -0
- data/vendor/requests/packages/urllib3/util/__init__.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/connection.py +144 -0
- data/vendor/requests/packages/urllib3/util/connection.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/request.py +72 -0
- data/vendor/requests/packages/urllib3/util/request.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/response.py +74 -0
- data/vendor/requests/packages/urllib3/util/response.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/retry.py +300 -0
- data/vendor/requests/packages/urllib3/util/retry.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/ssl_.py +320 -0
- data/vendor/requests/packages/urllib3/util/ssl_.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/timeout.py +242 -0
- data/vendor/requests/packages/urllib3/util/timeout.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/url.py +217 -0
- data/vendor/requests/packages/urllib3/util/url.pyc +0 -0
- data/vendor/requests/sessions.py +712 -0
- data/vendor/requests/sessions.pyc +0 -0
- data/vendor/requests/status_codes.py +91 -0
- data/vendor/requests/status_codes.pyc +0 -0
- data/vendor/requests/structures.py +105 -0
- data/vendor/requests/structures.pyc +0 -0
- data/vendor/requests/utils.py +817 -0
- data/vendor/requests/utils.pyc +0 -0
- data/vendor/requests-2.11.1.dist-info/DESCRIPTION.rst +1294 -0
- data/vendor/requests-2.11.1.dist-info/INSTALLER +1 -0
- data/vendor/requests-2.11.1.dist-info/METADATA +1323 -0
- data/vendor/requests-2.11.1.dist-info/RECORD +170 -0
- data/vendor/requests-2.11.1.dist-info/WHEEL +6 -0
- data/vendor/requests-2.11.1.dist-info/metadata.json +1 -0
- data/vendor/requests-2.11.1.dist-info/top_level.txt +1 -0
- data/vendor/rigid/__init__.py +1 -0
- data/vendor/rigid/__init__.pyc +0 -0
- data/vendor/rigid/api.py +129 -0
- data/vendor/rigid/api.pyc +0 -0
- data/vendor/rigid/commands/__init__.py +260 -0
- data/vendor/rigid/commands/__init__.pyc +0 -0
- data/vendor/rigid/commands/deploy.py +0 -0
- data/vendor/rigid/commands/deploy.pyc +0 -0
- data/vendor/rigid/deploy.py +70 -0
- data/vendor/rigid/deploy.pyc +0 -0
- data/vendor/rigid/file_scanner.py +63 -0
- data/vendor/rigid/file_scanner.pyc +0 -0
- data/vendor/rigid/utils.py +17 -0
- data/vendor/rigid/utils.pyc +0 -0
- data/vendor/rigid-0.2.0.dist-info/DESCRIPTION.rst +3 -0
- data/vendor/rigid-0.2.0.dist-info/INSTALLER +1 -0
- data/vendor/rigid-0.2.0.dist-info/METADATA +23 -0
- data/vendor/rigid-0.2.0.dist-info/RECORD +49 -0
- data/vendor/rigid-0.2.0.dist-info/WHEEL +5 -0
- data/vendor/rigid-0.2.0.dist-info/entry_points.txt +3 -0
- data/vendor/rigid-0.2.0.dist-info/metadata.json +1 -0
- data/vendor/rigid-0.2.0.dist-info/top_level.txt +2 -0
- data/vendor/setuptools-28.8.0.dist-info/DESCRIPTION.rst +243 -0
- data/vendor/setuptools-28.8.0.dist-info/INSTALLER +1 -0
- data/vendor/setuptools-28.8.0.dist-info/METADATA +272 -0
- data/vendor/setuptools-28.8.0.dist-info/RECORD +143 -0
- data/vendor/setuptools-28.8.0.dist-info/WHEEL +6 -0
- data/vendor/setuptools-28.8.0.dist-info/dependency_links.txt +2 -0
- data/vendor/setuptools-28.8.0.dist-info/entry_points.txt +63 -0
- data/vendor/setuptools-28.8.0.dist-info/metadata.json +1 -0
- data/vendor/setuptools-28.8.0.dist-info/top_level.txt +3 -0
- data/vendor/setuptools-28.8.0.dist-info/zip-safe +1 -0
- data/vendor/tests/__init__.py +0 -0
- data/vendor/tests/__init__.pyc +0 -0
- data/vendor/tests/integration/__init__.py +0 -0
- data/vendor/tests/integration/__init__.pyc +0 -0
- data/vendor/tests/integration/test_app.py +63 -0
- data/vendor/tests/integration/test_app.pyc +0 -0
- data/vendor/tests/integration/test_apps.py +27 -0
- data/vendor/tests/integration/test_apps.pyc +0 -0
- data/vendor/tests/integration/test_deploy.py +128 -0
- data/vendor/tests/integration/test_deploy.pyc +0 -0
- data/vendor/tests/integration/test_domains.py +35 -0
- data/vendor/tests/integration/test_domains.pyc +0 -0
- data/vendor/tests/integration/test_login.py +37 -0
- data/vendor/tests/integration/test_login.pyc +0 -0
- data/vendor/tests/integration/test_promote.py +24 -0
- data/vendor/tests/integration/test_promote.pyc +0 -0
- data/vendor/tests/integration/test_token.py +33 -0
- data/vendor/tests/integration/test_token.pyc +0 -0
- data/vendor/tests/integration/test_whoami.py +24 -0
- data/vendor/tests/integration/test_whoami.pyc +0 -0
- data/vendor/tests/test_deploy.py +33 -0
- data/vendor/tests/test_deploy.pyc +0 -0
- data/vendor/tests/test_file_scanner.py +89 -0
- data/vendor/tests/test_file_scanner.pyc +0 -0
- data/vendor/tests/utils.py +78 -0
- data/vendor/tests/utils.pyc +0 -0
- data/vendor/wheel-0.30.0a0.dist-info/DESCRIPTION.rst +325 -0
- data/vendor/wheel-0.30.0a0.dist-info/INSTALLER +1 -0
- data/vendor/wheel-0.30.0a0.dist-info/LICENSE.txt +22 -0
- data/vendor/wheel-0.30.0a0.dist-info/METADATA +357 -0
- data/vendor/wheel-0.30.0a0.dist-info/RECORD +86 -0
- data/vendor/wheel-0.30.0a0.dist-info/WHEEL +6 -0
- data/vendor/wheel-0.30.0a0.dist-info/entry_points.txt +6 -0
- data/vendor/wheel-0.30.0a0.dist-info/metadata.json +1 -0
- data/vendor/wheel-0.30.0a0.dist-info/top_level.txt +1 -0
- data/vendor/yaml/__init__.py +315 -0
- data/vendor/yaml/__init__.pyc +0 -0
- data/vendor/yaml/composer.py +139 -0
- data/vendor/yaml/composer.pyc +0 -0
- data/vendor/yaml/constructor.py +675 -0
- data/vendor/yaml/constructor.pyc +0 -0
- data/vendor/yaml/cyaml.py +85 -0
- data/vendor/yaml/cyaml.pyc +0 -0
- data/vendor/yaml/dumper.py +62 -0
- data/vendor/yaml/dumper.pyc +0 -0
- data/vendor/yaml/emitter.py +1140 -0
- data/vendor/yaml/emitter.pyc +0 -0
- data/vendor/yaml/error.py +75 -0
- data/vendor/yaml/error.pyc +0 -0
- data/vendor/yaml/events.py +86 -0
- data/vendor/yaml/events.pyc +0 -0
- data/vendor/yaml/loader.py +40 -0
- data/vendor/yaml/loader.pyc +0 -0
- data/vendor/yaml/nodes.py +49 -0
- data/vendor/yaml/nodes.pyc +0 -0
- data/vendor/yaml/parser.py +589 -0
- data/vendor/yaml/parser.pyc +0 -0
- data/vendor/yaml/reader.py +190 -0
- data/vendor/yaml/reader.pyc +0 -0
- data/vendor/yaml/representer.py +486 -0
- data/vendor/yaml/representer.pyc +0 -0
- data/vendor/yaml/resolver.py +227 -0
- data/vendor/yaml/resolver.pyc +0 -0
- data/vendor/yaml/scanner.py +1453 -0
- data/vendor/yaml/scanner.pyc +0 -0
- data/vendor/yaml/serializer.py +111 -0
- data/vendor/yaml/serializer.pyc +0 -0
- data/vendor/yaml/tokens.py +104 -0
- data/vendor/yaml/tokens.pyc +0 -0
- metadata +407 -0
@@ -0,0 +1,69 @@
|
|
1
|
+
######################## BEGIN LICENSE BLOCK ########################
|
2
|
+
# The Original Code is Mozilla Universal charset detector code.
|
3
|
+
#
|
4
|
+
# The Initial Developer of the Original Code is
|
5
|
+
# Netscape Communications Corporation.
|
6
|
+
# Portions created by the Initial Developer are Copyright (C) 2001
|
7
|
+
# the Initial Developer. All Rights Reserved.
|
8
|
+
#
|
9
|
+
# Contributor(s):
|
10
|
+
# Mark Pilgrim - port to Python
|
11
|
+
# Shy Shalom - original C code
|
12
|
+
#
|
13
|
+
# This library is free software; you can redistribute it and/or
|
14
|
+
# modify it under the terms of the GNU Lesser General Public
|
15
|
+
# License as published by the Free Software Foundation; either
|
16
|
+
# version 2.1 of the License, or (at your option) any later version.
|
17
|
+
#
|
18
|
+
# This library is distributed in the hope that it will be useful,
|
19
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
21
|
+
# Lesser General Public License for more details.
|
22
|
+
#
|
23
|
+
# You should have received a copy of the GNU Lesser General Public
|
24
|
+
# License along with this library; if not, write to the Free Software
|
25
|
+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
26
|
+
# 02110-1301 USA
|
27
|
+
######################### END LICENSE BLOCK #########################
|
28
|
+
|
29
|
+
from .charsetgroupprober import CharSetGroupProber
|
30
|
+
from .sbcharsetprober import SingleByteCharSetProber
|
31
|
+
from .langcyrillicmodel import (Win1251CyrillicModel, Koi8rModel,
|
32
|
+
Latin5CyrillicModel, MacCyrillicModel,
|
33
|
+
Ibm866Model, Ibm855Model)
|
34
|
+
from .langgreekmodel import Latin7GreekModel, Win1253GreekModel
|
35
|
+
from .langbulgarianmodel import Latin5BulgarianModel, Win1251BulgarianModel
|
36
|
+
from .langhungarianmodel import Latin2HungarianModel, Win1250HungarianModel
|
37
|
+
from .langthaimodel import TIS620ThaiModel
|
38
|
+
from .langhebrewmodel import Win1255HebrewModel
|
39
|
+
from .hebrewprober import HebrewProber
|
40
|
+
|
41
|
+
|
42
|
+
class SBCSGroupProber(CharSetGroupProber):
|
43
|
+
def __init__(self):
|
44
|
+
CharSetGroupProber.__init__(self)
|
45
|
+
self._mProbers = [
|
46
|
+
SingleByteCharSetProber(Win1251CyrillicModel),
|
47
|
+
SingleByteCharSetProber(Koi8rModel),
|
48
|
+
SingleByteCharSetProber(Latin5CyrillicModel),
|
49
|
+
SingleByteCharSetProber(MacCyrillicModel),
|
50
|
+
SingleByteCharSetProber(Ibm866Model),
|
51
|
+
SingleByteCharSetProber(Ibm855Model),
|
52
|
+
SingleByteCharSetProber(Latin7GreekModel),
|
53
|
+
SingleByteCharSetProber(Win1253GreekModel),
|
54
|
+
SingleByteCharSetProber(Latin5BulgarianModel),
|
55
|
+
SingleByteCharSetProber(Win1251BulgarianModel),
|
56
|
+
SingleByteCharSetProber(Latin2HungarianModel),
|
57
|
+
SingleByteCharSetProber(Win1250HungarianModel),
|
58
|
+
SingleByteCharSetProber(TIS620ThaiModel),
|
59
|
+
]
|
60
|
+
hebrewProber = HebrewProber()
|
61
|
+
logicalHebrewProber = SingleByteCharSetProber(Win1255HebrewModel,
|
62
|
+
False, hebrewProber)
|
63
|
+
visualHebrewProber = SingleByteCharSetProber(Win1255HebrewModel, True,
|
64
|
+
hebrewProber)
|
65
|
+
hebrewProber.set_model_probers(logicalHebrewProber, visualHebrewProber)
|
66
|
+
self._mProbers.extend([hebrewProber, logicalHebrewProber,
|
67
|
+
visualHebrewProber])
|
68
|
+
|
69
|
+
self.reset()
|
Binary file
|
@@ -0,0 +1,91 @@
|
|
1
|
+
######################## BEGIN LICENSE BLOCK ########################
|
2
|
+
# The Original Code is mozilla.org code.
|
3
|
+
#
|
4
|
+
# The Initial Developer of the Original Code is
|
5
|
+
# Netscape Communications Corporation.
|
6
|
+
# Portions created by the Initial Developer are Copyright (C) 1998
|
7
|
+
# the Initial Developer. All Rights Reserved.
|
8
|
+
#
|
9
|
+
# Contributor(s):
|
10
|
+
# Mark Pilgrim - port to Python
|
11
|
+
#
|
12
|
+
# This library is free software; you can redistribute it and/or
|
13
|
+
# modify it under the terms of the GNU Lesser General Public
|
14
|
+
# License as published by the Free Software Foundation; either
|
15
|
+
# version 2.1 of the License, or (at your option) any later version.
|
16
|
+
#
|
17
|
+
# This library is distributed in the hope that it will be useful,
|
18
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
20
|
+
# Lesser General Public License for more details.
|
21
|
+
#
|
22
|
+
# You should have received a copy of the GNU Lesser General Public
|
23
|
+
# License along with this library; if not, write to the Free Software
|
24
|
+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
25
|
+
# 02110-1301 USA
|
26
|
+
######################### END LICENSE BLOCK #########################
|
27
|
+
|
28
|
+
import sys
|
29
|
+
from .mbcharsetprober import MultiByteCharSetProber
|
30
|
+
from .codingstatemachine import CodingStateMachine
|
31
|
+
from .chardistribution import SJISDistributionAnalysis
|
32
|
+
from .jpcntx import SJISContextAnalysis
|
33
|
+
from .mbcssm import SJISSMModel
|
34
|
+
from . import constants
|
35
|
+
|
36
|
+
|
37
|
+
class SJISProber(MultiByteCharSetProber):
|
38
|
+
def __init__(self):
|
39
|
+
MultiByteCharSetProber.__init__(self)
|
40
|
+
self._mCodingSM = CodingStateMachine(SJISSMModel)
|
41
|
+
self._mDistributionAnalyzer = SJISDistributionAnalysis()
|
42
|
+
self._mContextAnalyzer = SJISContextAnalysis()
|
43
|
+
self.reset()
|
44
|
+
|
45
|
+
def reset(self):
|
46
|
+
MultiByteCharSetProber.reset(self)
|
47
|
+
self._mContextAnalyzer.reset()
|
48
|
+
|
49
|
+
def get_charset_name(self):
|
50
|
+
return self._mContextAnalyzer.get_charset_name()
|
51
|
+
|
52
|
+
def feed(self, aBuf):
|
53
|
+
aLen = len(aBuf)
|
54
|
+
for i in range(0, aLen):
|
55
|
+
codingState = self._mCodingSM.next_state(aBuf[i])
|
56
|
+
if codingState == constants.eError:
|
57
|
+
if constants._debug:
|
58
|
+
sys.stderr.write(self.get_charset_name()
|
59
|
+
+ ' prober hit error at byte ' + str(i)
|
60
|
+
+ '\n')
|
61
|
+
self._mState = constants.eNotMe
|
62
|
+
break
|
63
|
+
elif codingState == constants.eItsMe:
|
64
|
+
self._mState = constants.eFoundIt
|
65
|
+
break
|
66
|
+
elif codingState == constants.eStart:
|
67
|
+
charLen = self._mCodingSM.get_current_charlen()
|
68
|
+
if i == 0:
|
69
|
+
self._mLastChar[1] = aBuf[0]
|
70
|
+
self._mContextAnalyzer.feed(self._mLastChar[2 - charLen:],
|
71
|
+
charLen)
|
72
|
+
self._mDistributionAnalyzer.feed(self._mLastChar, charLen)
|
73
|
+
else:
|
74
|
+
self._mContextAnalyzer.feed(aBuf[i + 1 - charLen:i + 3
|
75
|
+
- charLen], charLen)
|
76
|
+
self._mDistributionAnalyzer.feed(aBuf[i - 1:i + 1],
|
77
|
+
charLen)
|
78
|
+
|
79
|
+
self._mLastChar[0] = aBuf[aLen - 1]
|
80
|
+
|
81
|
+
if self.get_state() == constants.eDetecting:
|
82
|
+
if (self._mContextAnalyzer.got_enough_data() and
|
83
|
+
(self.get_confidence() > constants.SHORTCUT_THRESHOLD)):
|
84
|
+
self._mState = constants.eFoundIt
|
85
|
+
|
86
|
+
return self.get_state()
|
87
|
+
|
88
|
+
def get_confidence(self):
|
89
|
+
contxtCf = self._mContextAnalyzer.get_confidence()
|
90
|
+
distribCf = self._mDistributionAnalyzer.get_confidence()
|
91
|
+
return max(contxtCf, distribCf)
|
Binary file
|
@@ -0,0 +1,170 @@
|
|
1
|
+
######################## BEGIN LICENSE BLOCK ########################
|
2
|
+
# The Original Code is Mozilla Universal charset detector code.
|
3
|
+
#
|
4
|
+
# The Initial Developer of the Original Code is
|
5
|
+
# Netscape Communications Corporation.
|
6
|
+
# Portions created by the Initial Developer are Copyright (C) 2001
|
7
|
+
# the Initial Developer. All Rights Reserved.
|
8
|
+
#
|
9
|
+
# Contributor(s):
|
10
|
+
# Mark Pilgrim - port to Python
|
11
|
+
# Shy Shalom - original C code
|
12
|
+
#
|
13
|
+
# This library is free software; you can redistribute it and/or
|
14
|
+
# modify it under the terms of the GNU Lesser General Public
|
15
|
+
# License as published by the Free Software Foundation; either
|
16
|
+
# version 2.1 of the License, or (at your option) any later version.
|
17
|
+
#
|
18
|
+
# This library is distributed in the hope that it will be useful,
|
19
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
21
|
+
# Lesser General Public License for more details.
|
22
|
+
#
|
23
|
+
# You should have received a copy of the GNU Lesser General Public
|
24
|
+
# License along with this library; if not, write to the Free Software
|
25
|
+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
26
|
+
# 02110-1301 USA
|
27
|
+
######################### END LICENSE BLOCK #########################
|
28
|
+
|
29
|
+
from . import constants
|
30
|
+
import sys
|
31
|
+
import codecs
|
32
|
+
from .latin1prober import Latin1Prober # windows-1252
|
33
|
+
from .mbcsgroupprober import MBCSGroupProber # multi-byte character sets
|
34
|
+
from .sbcsgroupprober import SBCSGroupProber # single-byte character sets
|
35
|
+
from .escprober import EscCharSetProber # ISO-2122, etc.
|
36
|
+
import re
|
37
|
+
|
38
|
+
MINIMUM_THRESHOLD = 0.20
|
39
|
+
ePureAscii = 0
|
40
|
+
eEscAscii = 1
|
41
|
+
eHighbyte = 2
|
42
|
+
|
43
|
+
|
44
|
+
class UniversalDetector:
|
45
|
+
def __init__(self):
|
46
|
+
self._highBitDetector = re.compile(b'[\x80-\xFF]')
|
47
|
+
self._escDetector = re.compile(b'(\033|~{)')
|
48
|
+
self._mEscCharSetProber = None
|
49
|
+
self._mCharSetProbers = []
|
50
|
+
self.reset()
|
51
|
+
|
52
|
+
def reset(self):
|
53
|
+
self.result = {'encoding': None, 'confidence': 0.0}
|
54
|
+
self.done = False
|
55
|
+
self._mStart = True
|
56
|
+
self._mGotData = False
|
57
|
+
self._mInputState = ePureAscii
|
58
|
+
self._mLastChar = b''
|
59
|
+
if self._mEscCharSetProber:
|
60
|
+
self._mEscCharSetProber.reset()
|
61
|
+
for prober in self._mCharSetProbers:
|
62
|
+
prober.reset()
|
63
|
+
|
64
|
+
def feed(self, aBuf):
|
65
|
+
if self.done:
|
66
|
+
return
|
67
|
+
|
68
|
+
aLen = len(aBuf)
|
69
|
+
if not aLen:
|
70
|
+
return
|
71
|
+
|
72
|
+
if not self._mGotData:
|
73
|
+
# If the data starts with BOM, we know it is UTF
|
74
|
+
if aBuf[:3] == codecs.BOM_UTF8:
|
75
|
+
# EF BB BF UTF-8 with BOM
|
76
|
+
self.result = {'encoding': "UTF-8-SIG", 'confidence': 1.0}
|
77
|
+
elif aBuf[:4] == codecs.BOM_UTF32_LE:
|
78
|
+
# FF FE 00 00 UTF-32, little-endian BOM
|
79
|
+
self.result = {'encoding': "UTF-32LE", 'confidence': 1.0}
|
80
|
+
elif aBuf[:4] == codecs.BOM_UTF32_BE:
|
81
|
+
# 00 00 FE FF UTF-32, big-endian BOM
|
82
|
+
self.result = {'encoding': "UTF-32BE", 'confidence': 1.0}
|
83
|
+
elif aBuf[:4] == b'\xFE\xFF\x00\x00':
|
84
|
+
# FE FF 00 00 UCS-4, unusual octet order BOM (3412)
|
85
|
+
self.result = {
|
86
|
+
'encoding': "X-ISO-10646-UCS-4-3412",
|
87
|
+
'confidence': 1.0
|
88
|
+
}
|
89
|
+
elif aBuf[:4] == b'\x00\x00\xFF\xFE':
|
90
|
+
# 00 00 FF FE UCS-4, unusual octet order BOM (2143)
|
91
|
+
self.result = {
|
92
|
+
'encoding': "X-ISO-10646-UCS-4-2143",
|
93
|
+
'confidence': 1.0
|
94
|
+
}
|
95
|
+
elif aBuf[:2] == codecs.BOM_LE:
|
96
|
+
# FF FE UTF-16, little endian BOM
|
97
|
+
self.result = {'encoding': "UTF-16LE", 'confidence': 1.0}
|
98
|
+
elif aBuf[:2] == codecs.BOM_BE:
|
99
|
+
# FE FF UTF-16, big endian BOM
|
100
|
+
self.result = {'encoding': "UTF-16BE", 'confidence': 1.0}
|
101
|
+
|
102
|
+
self._mGotData = True
|
103
|
+
if self.result['encoding'] and (self.result['confidence'] > 0.0):
|
104
|
+
self.done = True
|
105
|
+
return
|
106
|
+
|
107
|
+
if self._mInputState == ePureAscii:
|
108
|
+
if self._highBitDetector.search(aBuf):
|
109
|
+
self._mInputState = eHighbyte
|
110
|
+
elif ((self._mInputState == ePureAscii) and
|
111
|
+
self._escDetector.search(self._mLastChar + aBuf)):
|
112
|
+
self._mInputState = eEscAscii
|
113
|
+
|
114
|
+
self._mLastChar = aBuf[-1:]
|
115
|
+
|
116
|
+
if self._mInputState == eEscAscii:
|
117
|
+
if not self._mEscCharSetProber:
|
118
|
+
self._mEscCharSetProber = EscCharSetProber()
|
119
|
+
if self._mEscCharSetProber.feed(aBuf) == constants.eFoundIt:
|
120
|
+
self.result = {'encoding': self._mEscCharSetProber.get_charset_name(),
|
121
|
+
'confidence': self._mEscCharSetProber.get_confidence()}
|
122
|
+
self.done = True
|
123
|
+
elif self._mInputState == eHighbyte:
|
124
|
+
if not self._mCharSetProbers:
|
125
|
+
self._mCharSetProbers = [MBCSGroupProber(), SBCSGroupProber(),
|
126
|
+
Latin1Prober()]
|
127
|
+
for prober in self._mCharSetProbers:
|
128
|
+
if prober.feed(aBuf) == constants.eFoundIt:
|
129
|
+
self.result = {'encoding': prober.get_charset_name(),
|
130
|
+
'confidence': prober.get_confidence()}
|
131
|
+
self.done = True
|
132
|
+
break
|
133
|
+
|
134
|
+
def close(self):
|
135
|
+
if self.done:
|
136
|
+
return
|
137
|
+
if not self._mGotData:
|
138
|
+
if constants._debug:
|
139
|
+
sys.stderr.write('no data received!\n')
|
140
|
+
return
|
141
|
+
self.done = True
|
142
|
+
|
143
|
+
if self._mInputState == ePureAscii:
|
144
|
+
self.result = {'encoding': 'ascii', 'confidence': 1.0}
|
145
|
+
return self.result
|
146
|
+
|
147
|
+
if self._mInputState == eHighbyte:
|
148
|
+
proberConfidence = None
|
149
|
+
maxProberConfidence = 0.0
|
150
|
+
maxProber = None
|
151
|
+
for prober in self._mCharSetProbers:
|
152
|
+
if not prober:
|
153
|
+
continue
|
154
|
+
proberConfidence = prober.get_confidence()
|
155
|
+
if proberConfidence > maxProberConfidence:
|
156
|
+
maxProberConfidence = proberConfidence
|
157
|
+
maxProber = prober
|
158
|
+
if maxProber and (maxProberConfidence > MINIMUM_THRESHOLD):
|
159
|
+
self.result = {'encoding': maxProber.get_charset_name(),
|
160
|
+
'confidence': maxProber.get_confidence()}
|
161
|
+
return self.result
|
162
|
+
|
163
|
+
if constants._debug:
|
164
|
+
sys.stderr.write('no probers hit minimum threshhold\n')
|
165
|
+
for prober in self._mCharSetProbers[0].mProbers:
|
166
|
+
if not prober:
|
167
|
+
continue
|
168
|
+
sys.stderr.write('%s confidence = %s\n' %
|
169
|
+
(prober.get_charset_name(),
|
170
|
+
prober.get_confidence()))
|
Binary file
|
@@ -0,0 +1,76 @@
|
|
1
|
+
######################## BEGIN LICENSE BLOCK ########################
|
2
|
+
# The Original Code is mozilla.org code.
|
3
|
+
#
|
4
|
+
# The Initial Developer of the Original Code is
|
5
|
+
# Netscape Communications Corporation.
|
6
|
+
# Portions created by the Initial Developer are Copyright (C) 1998
|
7
|
+
# the Initial Developer. All Rights Reserved.
|
8
|
+
#
|
9
|
+
# Contributor(s):
|
10
|
+
# Mark Pilgrim - port to Python
|
11
|
+
#
|
12
|
+
# This library is free software; you can redistribute it and/or
|
13
|
+
# modify it under the terms of the GNU Lesser General Public
|
14
|
+
# License as published by the Free Software Foundation; either
|
15
|
+
# version 2.1 of the License, or (at your option) any later version.
|
16
|
+
#
|
17
|
+
# This library is distributed in the hope that it will be useful,
|
18
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
20
|
+
# Lesser General Public License for more details.
|
21
|
+
#
|
22
|
+
# You should have received a copy of the GNU Lesser General Public
|
23
|
+
# License along with this library; if not, write to the Free Software
|
24
|
+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
25
|
+
# 02110-1301 USA
|
26
|
+
######################### END LICENSE BLOCK #########################
|
27
|
+
|
28
|
+
from . import constants
|
29
|
+
from .charsetprober import CharSetProber
|
30
|
+
from .codingstatemachine import CodingStateMachine
|
31
|
+
from .mbcssm import UTF8SMModel
|
32
|
+
|
33
|
+
ONE_CHAR_PROB = 0.5
|
34
|
+
|
35
|
+
|
36
|
+
class UTF8Prober(CharSetProber):
|
37
|
+
def __init__(self):
|
38
|
+
CharSetProber.__init__(self)
|
39
|
+
self._mCodingSM = CodingStateMachine(UTF8SMModel)
|
40
|
+
self.reset()
|
41
|
+
|
42
|
+
def reset(self):
|
43
|
+
CharSetProber.reset(self)
|
44
|
+
self._mCodingSM.reset()
|
45
|
+
self._mNumOfMBChar = 0
|
46
|
+
|
47
|
+
def get_charset_name(self):
|
48
|
+
return "utf-8"
|
49
|
+
|
50
|
+
def feed(self, aBuf):
|
51
|
+
for c in aBuf:
|
52
|
+
codingState = self._mCodingSM.next_state(c)
|
53
|
+
if codingState == constants.eError:
|
54
|
+
self._mState = constants.eNotMe
|
55
|
+
break
|
56
|
+
elif codingState == constants.eItsMe:
|
57
|
+
self._mState = constants.eFoundIt
|
58
|
+
break
|
59
|
+
elif codingState == constants.eStart:
|
60
|
+
if self._mCodingSM.get_current_charlen() >= 2:
|
61
|
+
self._mNumOfMBChar += 1
|
62
|
+
|
63
|
+
if self.get_state() == constants.eDetecting:
|
64
|
+
if self.get_confidence() > constants.SHORTCUT_THRESHOLD:
|
65
|
+
self._mState = constants.eFoundIt
|
66
|
+
|
67
|
+
return self.get_state()
|
68
|
+
|
69
|
+
def get_confidence(self):
|
70
|
+
unlike = 0.99
|
71
|
+
if self._mNumOfMBChar < 6:
|
72
|
+
for i in range(0, self._mNumOfMBChar):
|
73
|
+
unlike = unlike * ONE_CHAR_PROB
|
74
|
+
return 1.0 - unlike
|
75
|
+
else:
|
76
|
+
return unlike
|
Binary file
|
@@ -0,0 +1,96 @@
|
|
1
|
+
"""
|
2
|
+
urllib3 - Thread-safe connection pooling and re-using.
|
3
|
+
"""
|
4
|
+
|
5
|
+
from __future__ import absolute_import
|
6
|
+
import warnings
|
7
|
+
|
8
|
+
from .connectionpool import (
|
9
|
+
HTTPConnectionPool,
|
10
|
+
HTTPSConnectionPool,
|
11
|
+
connection_from_url
|
12
|
+
)
|
13
|
+
|
14
|
+
from . import exceptions
|
15
|
+
from .filepost import encode_multipart_formdata
|
16
|
+
from .poolmanager import PoolManager, ProxyManager, proxy_from_url
|
17
|
+
from .response import HTTPResponse
|
18
|
+
from .util.request import make_headers
|
19
|
+
from .util.url import get_host
|
20
|
+
from .util.timeout import Timeout
|
21
|
+
from .util.retry import Retry
|
22
|
+
|
23
|
+
|
24
|
+
# Set default logging handler to avoid "No handler found" warnings.
|
25
|
+
import logging
|
26
|
+
try: # Python 2.7+
|
27
|
+
from logging import NullHandler
|
28
|
+
except ImportError:
|
29
|
+
class NullHandler(logging.Handler):
|
30
|
+
def emit(self, record):
|
31
|
+
pass
|
32
|
+
|
33
|
+
__author__ = 'Andrey Petrov (andrey.petrov@shazow.net)'
|
34
|
+
__license__ = 'MIT'
|
35
|
+
__version__ = '1.16'
|
36
|
+
|
37
|
+
__all__ = (
|
38
|
+
'HTTPConnectionPool',
|
39
|
+
'HTTPSConnectionPool',
|
40
|
+
'PoolManager',
|
41
|
+
'ProxyManager',
|
42
|
+
'HTTPResponse',
|
43
|
+
'Retry',
|
44
|
+
'Timeout',
|
45
|
+
'add_stderr_logger',
|
46
|
+
'connection_from_url',
|
47
|
+
'disable_warnings',
|
48
|
+
'encode_multipart_formdata',
|
49
|
+
'get_host',
|
50
|
+
'make_headers',
|
51
|
+
'proxy_from_url',
|
52
|
+
)
|
53
|
+
|
54
|
+
logging.getLogger(__name__).addHandler(NullHandler())
|
55
|
+
|
56
|
+
|
57
|
+
def add_stderr_logger(level=logging.DEBUG):
|
58
|
+
"""
|
59
|
+
Helper for quickly adding a StreamHandler to the logger. Useful for
|
60
|
+
debugging.
|
61
|
+
|
62
|
+
Returns the handler after adding it.
|
63
|
+
"""
|
64
|
+
# This method needs to be in this __init__.py to get the __name__ correct
|
65
|
+
# even if urllib3 is vendored within another package.
|
66
|
+
logger = logging.getLogger(__name__)
|
67
|
+
handler = logging.StreamHandler()
|
68
|
+
handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(message)s'))
|
69
|
+
logger.addHandler(handler)
|
70
|
+
logger.setLevel(level)
|
71
|
+
logger.debug('Added a stderr logging handler to logger: %s', __name__)
|
72
|
+
return handler
|
73
|
+
|
74
|
+
# ... Clean up.
|
75
|
+
del NullHandler
|
76
|
+
|
77
|
+
|
78
|
+
# All warning filters *must* be appended unless you're really certain that they
|
79
|
+
# shouldn't be: otherwise, it's very hard for users to use most Python
|
80
|
+
# mechanisms to silence them.
|
81
|
+
# SecurityWarning's always go off by default.
|
82
|
+
warnings.simplefilter('always', exceptions.SecurityWarning, append=True)
|
83
|
+
# SubjectAltNameWarning's should go off once per host
|
84
|
+
warnings.simplefilter('default', exceptions.SubjectAltNameWarning, append=True)
|
85
|
+
# InsecurePlatformWarning's don't vary between requests, so we keep it default.
|
86
|
+
warnings.simplefilter('default', exceptions.InsecurePlatformWarning,
|
87
|
+
append=True)
|
88
|
+
# SNIMissingWarnings should go off only once.
|
89
|
+
warnings.simplefilter('default', exceptions.SNIMissingWarning, append=True)
|
90
|
+
|
91
|
+
|
92
|
+
def disable_warnings(category=exceptions.HTTPWarning):
|
93
|
+
"""
|
94
|
+
Helper for quickly disabling all urllib3 warnings.
|
95
|
+
"""
|
96
|
+
warnings.simplefilter('ignore', category)
|
Binary file
|