rigid 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. checksums.yaml +7 -0
  2. data/bin/rigid +4 -0
  3. data/rigid +16 -0
  4. data/vendor/PyYAML-3.12.dist-info/DESCRIPTION.rst +12 -0
  5. data/vendor/PyYAML-3.12.dist-info/INSTALLER +1 -0
  6. data/vendor/PyYAML-3.12.dist-info/METADATA +35 -0
  7. data/vendor/PyYAML-3.12.dist-info/RECORD +42 -0
  8. data/vendor/PyYAML-3.12.dist-info/WHEEL +5 -0
  9. data/vendor/PyYAML-3.12.dist-info/metadata.json +1 -0
  10. data/vendor/PyYAML-3.12.dist-info/top_level.txt +2 -0
  11. data/vendor/_yaml.so +0 -0
  12. data/vendor/click/__init__.py +98 -0
  13. data/vendor/click/__init__.pyc +0 -0
  14. data/vendor/click/_bashcomplete.py +83 -0
  15. data/vendor/click/_bashcomplete.pyc +0 -0
  16. data/vendor/click/_compat.py +642 -0
  17. data/vendor/click/_compat.pyc +0 -0
  18. data/vendor/click/_termui_impl.py +547 -0
  19. data/vendor/click/_termui_impl.pyc +0 -0
  20. data/vendor/click/_textwrap.py +38 -0
  21. data/vendor/click/_textwrap.pyc +0 -0
  22. data/vendor/click/_unicodefun.py +119 -0
  23. data/vendor/click/_unicodefun.pyc +0 -0
  24. data/vendor/click/_winconsole.py +273 -0
  25. data/vendor/click/_winconsole.pyc +0 -0
  26. data/vendor/click/core.py +1738 -0
  27. data/vendor/click/core.pyc +0 -0
  28. data/vendor/click/decorators.py +304 -0
  29. data/vendor/click/decorators.pyc +0 -0
  30. data/vendor/click/exceptions.py +201 -0
  31. data/vendor/click/exceptions.pyc +0 -0
  32. data/vendor/click/formatting.py +256 -0
  33. data/vendor/click/formatting.pyc +0 -0
  34. data/vendor/click/globals.py +48 -0
  35. data/vendor/click/globals.pyc +0 -0
  36. data/vendor/click/parser.py +426 -0
  37. data/vendor/click/parser.pyc +0 -0
  38. data/vendor/click/termui.py +539 -0
  39. data/vendor/click/termui.pyc +0 -0
  40. data/vendor/click/testing.py +322 -0
  41. data/vendor/click/testing.pyc +0 -0
  42. data/vendor/click/types.py +550 -0
  43. data/vendor/click/types.pyc +0 -0
  44. data/vendor/click/utils.py +415 -0
  45. data/vendor/click/utils.pyc +0 -0
  46. data/vendor/click-6.6.dist-info/DESCRIPTION.rst +3 -0
  47. data/vendor/click-6.6.dist-info/INSTALLER +1 -0
  48. data/vendor/click-6.6.dist-info/METADATA +16 -0
  49. data/vendor/click-6.6.dist-info/RECORD +41 -0
  50. data/vendor/click-6.6.dist-info/WHEEL +6 -0
  51. data/vendor/click-6.6.dist-info/metadata.json +1 -0
  52. data/vendor/click-6.6.dist-info/top_level.txt +1 -0
  53. data/vendor/easy_install.py +5 -0
  54. data/vendor/easy_install.pyc +0 -0
  55. data/vendor/pip-9.0.1.dist-info/DESCRIPTION.rst +39 -0
  56. data/vendor/pip-9.0.1.dist-info/INSTALLER +1 -0
  57. data/vendor/pip-9.0.1.dist-info/METADATA +69 -0
  58. data/vendor/pip-9.0.1.dist-info/RECORD +501 -0
  59. data/vendor/pip-9.0.1.dist-info/WHEEL +6 -0
  60. data/vendor/pip-9.0.1.dist-info/entry_points.txt +5 -0
  61. data/vendor/pip-9.0.1.dist-info/metadata.json +1 -0
  62. data/vendor/pip-9.0.1.dist-info/top_level.txt +1 -0
  63. data/vendor/pkg_resources/__init__.py +3051 -0
  64. data/vendor/pkg_resources/__init__.pyc +0 -0
  65. data/vendor/pkg_resources/_vendor/__init__.py +0 -0
  66. data/vendor/pkg_resources/_vendor/__init__.pyc +0 -0
  67. data/vendor/pkg_resources/_vendor/appdirs.py +552 -0
  68. data/vendor/pkg_resources/_vendor/appdirs.pyc +0 -0
  69. data/vendor/pkg_resources/_vendor/packaging/__about__.py +21 -0
  70. data/vendor/pkg_resources/_vendor/packaging/__about__.pyc +0 -0
  71. data/vendor/pkg_resources/_vendor/packaging/__init__.py +14 -0
  72. data/vendor/pkg_resources/_vendor/packaging/__init__.pyc +0 -0
  73. data/vendor/pkg_resources/_vendor/packaging/_compat.py +30 -0
  74. data/vendor/pkg_resources/_vendor/packaging/_compat.pyc +0 -0
  75. data/vendor/pkg_resources/_vendor/packaging/_structures.py +68 -0
  76. data/vendor/pkg_resources/_vendor/packaging/_structures.pyc +0 -0
  77. data/vendor/pkg_resources/_vendor/packaging/markers.py +287 -0
  78. data/vendor/pkg_resources/_vendor/packaging/markers.pyc +0 -0
  79. data/vendor/pkg_resources/_vendor/packaging/requirements.py +127 -0
  80. data/vendor/pkg_resources/_vendor/packaging/requirements.pyc +0 -0
  81. data/vendor/pkg_resources/_vendor/packaging/specifiers.py +774 -0
  82. data/vendor/pkg_resources/_vendor/packaging/specifiers.pyc +0 -0
  83. data/vendor/pkg_resources/_vendor/packaging/utils.py +14 -0
  84. data/vendor/pkg_resources/_vendor/packaging/utils.pyc +0 -0
  85. data/vendor/pkg_resources/_vendor/packaging/version.py +393 -0
  86. data/vendor/pkg_resources/_vendor/packaging/version.pyc +0 -0
  87. data/vendor/pkg_resources/_vendor/pyparsing.py +5696 -0
  88. data/vendor/pkg_resources/_vendor/pyparsing.pyc +0 -0
  89. data/vendor/pkg_resources/_vendor/six.py +868 -0
  90. data/vendor/pkg_resources/_vendor/six.pyc +0 -0
  91. data/vendor/pkg_resources/extern/__init__.py +73 -0
  92. data/vendor/pkg_resources/extern/__init__.pyc +0 -0
  93. data/vendor/requests/__init__.py +86 -0
  94. data/vendor/requests/__init__.pyc +0 -0
  95. data/vendor/requests/adapters.py +503 -0
  96. data/vendor/requests/adapters.pyc +0 -0
  97. data/vendor/requests/api.py +148 -0
  98. data/vendor/requests/api.pyc +0 -0
  99. data/vendor/requests/auth.py +252 -0
  100. data/vendor/requests/auth.pyc +0 -0
  101. data/vendor/requests/cacert.pem +5616 -0
  102. data/vendor/requests/certs.py +25 -0
  103. data/vendor/requests/certs.pyc +0 -0
  104. data/vendor/requests/compat.py +66 -0
  105. data/vendor/requests/compat.pyc +0 -0
  106. data/vendor/requests/cookies.py +540 -0
  107. data/vendor/requests/cookies.pyc +0 -0
  108. data/vendor/requests/exceptions.py +114 -0
  109. data/vendor/requests/exceptions.pyc +0 -0
  110. data/vendor/requests/hooks.py +34 -0
  111. data/vendor/requests/hooks.pyc +0 -0
  112. data/vendor/requests/models.py +873 -0
  113. data/vendor/requests/models.pyc +0 -0
  114. data/vendor/requests/packages/__init__.py +36 -0
  115. data/vendor/requests/packages/__init__.pyc +0 -0
  116. data/vendor/requests/packages/chardet/__init__.py +32 -0
  117. data/vendor/requests/packages/chardet/__init__.pyc +0 -0
  118. data/vendor/requests/packages/chardet/big5freq.py +925 -0
  119. data/vendor/requests/packages/chardet/big5freq.pyc +0 -0
  120. data/vendor/requests/packages/chardet/big5prober.py +42 -0
  121. data/vendor/requests/packages/chardet/big5prober.pyc +0 -0
  122. data/vendor/requests/packages/chardet/chardetect.py +80 -0
  123. data/vendor/requests/packages/chardet/chardetect.pyc +0 -0
  124. data/vendor/requests/packages/chardet/chardistribution.py +231 -0
  125. data/vendor/requests/packages/chardet/chardistribution.pyc +0 -0
  126. data/vendor/requests/packages/chardet/charsetgroupprober.py +106 -0
  127. data/vendor/requests/packages/chardet/charsetgroupprober.pyc +0 -0
  128. data/vendor/requests/packages/chardet/charsetprober.py +62 -0
  129. data/vendor/requests/packages/chardet/charsetprober.pyc +0 -0
  130. data/vendor/requests/packages/chardet/codingstatemachine.py +61 -0
  131. data/vendor/requests/packages/chardet/codingstatemachine.pyc +0 -0
  132. data/vendor/requests/packages/chardet/compat.py +34 -0
  133. data/vendor/requests/packages/chardet/compat.pyc +0 -0
  134. data/vendor/requests/packages/chardet/constants.py +39 -0
  135. data/vendor/requests/packages/chardet/constants.pyc +0 -0
  136. data/vendor/requests/packages/chardet/cp949prober.py +44 -0
  137. data/vendor/requests/packages/chardet/cp949prober.pyc +0 -0
  138. data/vendor/requests/packages/chardet/escprober.py +86 -0
  139. data/vendor/requests/packages/chardet/escprober.pyc +0 -0
  140. data/vendor/requests/packages/chardet/escsm.py +242 -0
  141. data/vendor/requests/packages/chardet/escsm.pyc +0 -0
  142. data/vendor/requests/packages/chardet/eucjpprober.py +90 -0
  143. data/vendor/requests/packages/chardet/eucjpprober.pyc +0 -0
  144. data/vendor/requests/packages/chardet/euckrfreq.py +596 -0
  145. data/vendor/requests/packages/chardet/euckrfreq.pyc +0 -0
  146. data/vendor/requests/packages/chardet/euckrprober.py +42 -0
  147. data/vendor/requests/packages/chardet/euckrprober.pyc +0 -0
  148. data/vendor/requests/packages/chardet/euctwfreq.py +428 -0
  149. data/vendor/requests/packages/chardet/euctwfreq.pyc +0 -0
  150. data/vendor/requests/packages/chardet/euctwprober.py +41 -0
  151. data/vendor/requests/packages/chardet/euctwprober.pyc +0 -0
  152. data/vendor/requests/packages/chardet/gb2312freq.py +472 -0
  153. data/vendor/requests/packages/chardet/gb2312freq.pyc +0 -0
  154. data/vendor/requests/packages/chardet/gb2312prober.py +41 -0
  155. data/vendor/requests/packages/chardet/gb2312prober.pyc +0 -0
  156. data/vendor/requests/packages/chardet/hebrewprober.py +283 -0
  157. data/vendor/requests/packages/chardet/hebrewprober.pyc +0 -0
  158. data/vendor/requests/packages/chardet/jisfreq.py +569 -0
  159. data/vendor/requests/packages/chardet/jisfreq.pyc +0 -0
  160. data/vendor/requests/packages/chardet/jpcntx.py +227 -0
  161. data/vendor/requests/packages/chardet/jpcntx.pyc +0 -0
  162. data/vendor/requests/packages/chardet/langbulgarianmodel.py +229 -0
  163. data/vendor/requests/packages/chardet/langbulgarianmodel.pyc +0 -0
  164. data/vendor/requests/packages/chardet/langcyrillicmodel.py +329 -0
  165. data/vendor/requests/packages/chardet/langcyrillicmodel.pyc +0 -0
  166. data/vendor/requests/packages/chardet/langgreekmodel.py +225 -0
  167. data/vendor/requests/packages/chardet/langgreekmodel.pyc +0 -0
  168. data/vendor/requests/packages/chardet/langhebrewmodel.py +201 -0
  169. data/vendor/requests/packages/chardet/langhebrewmodel.pyc +0 -0
  170. data/vendor/requests/packages/chardet/langhungarianmodel.py +225 -0
  171. data/vendor/requests/packages/chardet/langhungarianmodel.pyc +0 -0
  172. data/vendor/requests/packages/chardet/langthaimodel.py +200 -0
  173. data/vendor/requests/packages/chardet/langthaimodel.pyc +0 -0
  174. data/vendor/requests/packages/chardet/latin1prober.py +139 -0
  175. data/vendor/requests/packages/chardet/latin1prober.pyc +0 -0
  176. data/vendor/requests/packages/chardet/mbcharsetprober.py +86 -0
  177. data/vendor/requests/packages/chardet/mbcharsetprober.pyc +0 -0
  178. data/vendor/requests/packages/chardet/mbcsgroupprober.py +54 -0
  179. data/vendor/requests/packages/chardet/mbcsgroupprober.pyc +0 -0
  180. data/vendor/requests/packages/chardet/mbcssm.py +572 -0
  181. data/vendor/requests/packages/chardet/mbcssm.pyc +0 -0
  182. data/vendor/requests/packages/chardet/sbcharsetprober.py +120 -0
  183. data/vendor/requests/packages/chardet/sbcharsetprober.pyc +0 -0
  184. data/vendor/requests/packages/chardet/sbcsgroupprober.py +69 -0
  185. data/vendor/requests/packages/chardet/sbcsgroupprober.pyc +0 -0
  186. data/vendor/requests/packages/chardet/sjisprober.py +91 -0
  187. data/vendor/requests/packages/chardet/sjisprober.pyc +0 -0
  188. data/vendor/requests/packages/chardet/universaldetector.py +170 -0
  189. data/vendor/requests/packages/chardet/universaldetector.pyc +0 -0
  190. data/vendor/requests/packages/chardet/utf8prober.py +76 -0
  191. data/vendor/requests/packages/chardet/utf8prober.pyc +0 -0
  192. data/vendor/requests/packages/urllib3/__init__.py +96 -0
  193. data/vendor/requests/packages/urllib3/__init__.pyc +0 -0
  194. data/vendor/requests/packages/urllib3/_collections.py +324 -0
  195. data/vendor/requests/packages/urllib3/_collections.pyc +0 -0
  196. data/vendor/requests/packages/urllib3/connection.py +330 -0
  197. data/vendor/requests/packages/urllib3/connection.pyc +0 -0
  198. data/vendor/requests/packages/urllib3/connectionpool.py +866 -0
  199. data/vendor/requests/packages/urllib3/connectionpool.pyc +0 -0
  200. data/vendor/requests/packages/urllib3/contrib/__init__.py +0 -0
  201. data/vendor/requests/packages/urllib3/contrib/__init__.pyc +0 -0
  202. data/vendor/requests/packages/urllib3/contrib/appengine.py +231 -0
  203. data/vendor/requests/packages/urllib3/contrib/appengine.pyc +0 -0
  204. data/vendor/requests/packages/urllib3/contrib/ntlmpool.py +115 -0
  205. data/vendor/requests/packages/urllib3/contrib/ntlmpool.pyc +0 -0
  206. data/vendor/requests/packages/urllib3/contrib/pyopenssl.py +358 -0
  207. data/vendor/requests/packages/urllib3/contrib/pyopenssl.pyc +0 -0
  208. data/vendor/requests/packages/urllib3/contrib/socks.py +172 -0
  209. data/vendor/requests/packages/urllib3/contrib/socks.pyc +0 -0
  210. data/vendor/requests/packages/urllib3/exceptions.py +209 -0
  211. data/vendor/requests/packages/urllib3/exceptions.pyc +0 -0
  212. data/vendor/requests/packages/urllib3/fields.py +178 -0
  213. data/vendor/requests/packages/urllib3/fields.pyc +0 -0
  214. data/vendor/requests/packages/urllib3/filepost.py +94 -0
  215. data/vendor/requests/packages/urllib3/filepost.pyc +0 -0
  216. data/vendor/requests/packages/urllib3/packages/__init__.py +5 -0
  217. data/vendor/requests/packages/urllib3/packages/__init__.pyc +0 -0
  218. data/vendor/requests/packages/urllib3/packages/ordered_dict.py +259 -0
  219. data/vendor/requests/packages/urllib3/packages/ordered_dict.pyc +0 -0
  220. data/vendor/requests/packages/urllib3/packages/six.py +868 -0
  221. data/vendor/requests/packages/urllib3/packages/six.pyc +0 -0
  222. data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py +13 -0
  223. data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyc +0 -0
  224. data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py +105 -0
  225. data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyc +0 -0
  226. data/vendor/requests/packages/urllib3/poolmanager.py +367 -0
  227. data/vendor/requests/packages/urllib3/poolmanager.pyc +0 -0
  228. data/vendor/requests/packages/urllib3/request.py +151 -0
  229. data/vendor/requests/packages/urllib3/request.pyc +0 -0
  230. data/vendor/requests/packages/urllib3/response.py +530 -0
  231. data/vendor/requests/packages/urllib3/response.pyc +0 -0
  232. data/vendor/requests/packages/urllib3/util/__init__.py +46 -0
  233. data/vendor/requests/packages/urllib3/util/__init__.pyc +0 -0
  234. data/vendor/requests/packages/urllib3/util/connection.py +144 -0
  235. data/vendor/requests/packages/urllib3/util/connection.pyc +0 -0
  236. data/vendor/requests/packages/urllib3/util/request.py +72 -0
  237. data/vendor/requests/packages/urllib3/util/request.pyc +0 -0
  238. data/vendor/requests/packages/urllib3/util/response.py +74 -0
  239. data/vendor/requests/packages/urllib3/util/response.pyc +0 -0
  240. data/vendor/requests/packages/urllib3/util/retry.py +300 -0
  241. data/vendor/requests/packages/urllib3/util/retry.pyc +0 -0
  242. data/vendor/requests/packages/urllib3/util/ssl_.py +320 -0
  243. data/vendor/requests/packages/urllib3/util/ssl_.pyc +0 -0
  244. data/vendor/requests/packages/urllib3/util/timeout.py +242 -0
  245. data/vendor/requests/packages/urllib3/util/timeout.pyc +0 -0
  246. data/vendor/requests/packages/urllib3/util/url.py +217 -0
  247. data/vendor/requests/packages/urllib3/util/url.pyc +0 -0
  248. data/vendor/requests/sessions.py +712 -0
  249. data/vendor/requests/sessions.pyc +0 -0
  250. data/vendor/requests/status_codes.py +91 -0
  251. data/vendor/requests/status_codes.pyc +0 -0
  252. data/vendor/requests/structures.py +105 -0
  253. data/vendor/requests/structures.pyc +0 -0
  254. data/vendor/requests/utils.py +817 -0
  255. data/vendor/requests/utils.pyc +0 -0
  256. data/vendor/requests-2.11.1.dist-info/DESCRIPTION.rst +1294 -0
  257. data/vendor/requests-2.11.1.dist-info/INSTALLER +1 -0
  258. data/vendor/requests-2.11.1.dist-info/METADATA +1323 -0
  259. data/vendor/requests-2.11.1.dist-info/RECORD +170 -0
  260. data/vendor/requests-2.11.1.dist-info/WHEEL +6 -0
  261. data/vendor/requests-2.11.1.dist-info/metadata.json +1 -0
  262. data/vendor/requests-2.11.1.dist-info/top_level.txt +1 -0
  263. data/vendor/rigid/__init__.py +1 -0
  264. data/vendor/rigid/__init__.pyc +0 -0
  265. data/vendor/rigid/api.py +129 -0
  266. data/vendor/rigid/api.pyc +0 -0
  267. data/vendor/rigid/commands/__init__.py +260 -0
  268. data/vendor/rigid/commands/__init__.pyc +0 -0
  269. data/vendor/rigid/commands/deploy.py +0 -0
  270. data/vendor/rigid/commands/deploy.pyc +0 -0
  271. data/vendor/rigid/deploy.py +70 -0
  272. data/vendor/rigid/deploy.pyc +0 -0
  273. data/vendor/rigid/file_scanner.py +63 -0
  274. data/vendor/rigid/file_scanner.pyc +0 -0
  275. data/vendor/rigid/utils.py +17 -0
  276. data/vendor/rigid/utils.pyc +0 -0
  277. data/vendor/rigid-0.2.0.dist-info/DESCRIPTION.rst +3 -0
  278. data/vendor/rigid-0.2.0.dist-info/INSTALLER +1 -0
  279. data/vendor/rigid-0.2.0.dist-info/METADATA +23 -0
  280. data/vendor/rigid-0.2.0.dist-info/RECORD +49 -0
  281. data/vendor/rigid-0.2.0.dist-info/WHEEL +5 -0
  282. data/vendor/rigid-0.2.0.dist-info/entry_points.txt +3 -0
  283. data/vendor/rigid-0.2.0.dist-info/metadata.json +1 -0
  284. data/vendor/rigid-0.2.0.dist-info/top_level.txt +2 -0
  285. data/vendor/setuptools-28.8.0.dist-info/DESCRIPTION.rst +243 -0
  286. data/vendor/setuptools-28.8.0.dist-info/INSTALLER +1 -0
  287. data/vendor/setuptools-28.8.0.dist-info/METADATA +272 -0
  288. data/vendor/setuptools-28.8.0.dist-info/RECORD +143 -0
  289. data/vendor/setuptools-28.8.0.dist-info/WHEEL +6 -0
  290. data/vendor/setuptools-28.8.0.dist-info/dependency_links.txt +2 -0
  291. data/vendor/setuptools-28.8.0.dist-info/entry_points.txt +63 -0
  292. data/vendor/setuptools-28.8.0.dist-info/metadata.json +1 -0
  293. data/vendor/setuptools-28.8.0.dist-info/top_level.txt +3 -0
  294. data/vendor/setuptools-28.8.0.dist-info/zip-safe +1 -0
  295. data/vendor/tests/__init__.py +0 -0
  296. data/vendor/tests/__init__.pyc +0 -0
  297. data/vendor/tests/integration/__init__.py +0 -0
  298. data/vendor/tests/integration/__init__.pyc +0 -0
  299. data/vendor/tests/integration/test_app.py +63 -0
  300. data/vendor/tests/integration/test_app.pyc +0 -0
  301. data/vendor/tests/integration/test_apps.py +27 -0
  302. data/vendor/tests/integration/test_apps.pyc +0 -0
  303. data/vendor/tests/integration/test_deploy.py +128 -0
  304. data/vendor/tests/integration/test_deploy.pyc +0 -0
  305. data/vendor/tests/integration/test_domains.py +35 -0
  306. data/vendor/tests/integration/test_domains.pyc +0 -0
  307. data/vendor/tests/integration/test_login.py +37 -0
  308. data/vendor/tests/integration/test_login.pyc +0 -0
  309. data/vendor/tests/integration/test_promote.py +24 -0
  310. data/vendor/tests/integration/test_promote.pyc +0 -0
  311. data/vendor/tests/integration/test_token.py +33 -0
  312. data/vendor/tests/integration/test_token.pyc +0 -0
  313. data/vendor/tests/integration/test_whoami.py +24 -0
  314. data/vendor/tests/integration/test_whoami.pyc +0 -0
  315. data/vendor/tests/test_deploy.py +33 -0
  316. data/vendor/tests/test_deploy.pyc +0 -0
  317. data/vendor/tests/test_file_scanner.py +89 -0
  318. data/vendor/tests/test_file_scanner.pyc +0 -0
  319. data/vendor/tests/utils.py +78 -0
  320. data/vendor/tests/utils.pyc +0 -0
  321. data/vendor/wheel-0.30.0a0.dist-info/DESCRIPTION.rst +325 -0
  322. data/vendor/wheel-0.30.0a0.dist-info/INSTALLER +1 -0
  323. data/vendor/wheel-0.30.0a0.dist-info/LICENSE.txt +22 -0
  324. data/vendor/wheel-0.30.0a0.dist-info/METADATA +357 -0
  325. data/vendor/wheel-0.30.0a0.dist-info/RECORD +86 -0
  326. data/vendor/wheel-0.30.0a0.dist-info/WHEEL +6 -0
  327. data/vendor/wheel-0.30.0a0.dist-info/entry_points.txt +6 -0
  328. data/vendor/wheel-0.30.0a0.dist-info/metadata.json +1 -0
  329. data/vendor/wheel-0.30.0a0.dist-info/top_level.txt +1 -0
  330. data/vendor/yaml/__init__.py +315 -0
  331. data/vendor/yaml/__init__.pyc +0 -0
  332. data/vendor/yaml/composer.py +139 -0
  333. data/vendor/yaml/composer.pyc +0 -0
  334. data/vendor/yaml/constructor.py +675 -0
  335. data/vendor/yaml/constructor.pyc +0 -0
  336. data/vendor/yaml/cyaml.py +85 -0
  337. data/vendor/yaml/cyaml.pyc +0 -0
  338. data/vendor/yaml/dumper.py +62 -0
  339. data/vendor/yaml/dumper.pyc +0 -0
  340. data/vendor/yaml/emitter.py +1140 -0
  341. data/vendor/yaml/emitter.pyc +0 -0
  342. data/vendor/yaml/error.py +75 -0
  343. data/vendor/yaml/error.pyc +0 -0
  344. data/vendor/yaml/events.py +86 -0
  345. data/vendor/yaml/events.pyc +0 -0
  346. data/vendor/yaml/loader.py +40 -0
  347. data/vendor/yaml/loader.pyc +0 -0
  348. data/vendor/yaml/nodes.py +49 -0
  349. data/vendor/yaml/nodes.pyc +0 -0
  350. data/vendor/yaml/parser.py +589 -0
  351. data/vendor/yaml/parser.pyc +0 -0
  352. data/vendor/yaml/reader.py +190 -0
  353. data/vendor/yaml/reader.pyc +0 -0
  354. data/vendor/yaml/representer.py +486 -0
  355. data/vendor/yaml/representer.pyc +0 -0
  356. data/vendor/yaml/resolver.py +227 -0
  357. data/vendor/yaml/resolver.pyc +0 -0
  358. data/vendor/yaml/scanner.py +1453 -0
  359. data/vendor/yaml/scanner.pyc +0 -0
  360. data/vendor/yaml/serializer.py +111 -0
  361. data/vendor/yaml/serializer.pyc +0 -0
  362. data/vendor/yaml/tokens.py +104 -0
  363. data/vendor/yaml/tokens.pyc +0 -0
  364. metadata +407 -0
@@ -0,0 +1,320 @@
1
+ from __future__ import absolute_import
2
+ import errno
3
+ import warnings
4
+ import hmac
5
+
6
+ from binascii import hexlify, unhexlify
7
+ from hashlib import md5, sha1, sha256
8
+
9
+ from ..exceptions import SSLError, InsecurePlatformWarning, SNIMissingWarning
10
+
11
+
12
+ SSLContext = None
13
+ HAS_SNI = False
14
+ create_default_context = None
15
+ IS_PYOPENSSL = False
16
+
17
+ # Maps the length of a digest to a possible hash function producing this digest
18
+ HASHFUNC_MAP = {
19
+ 32: md5,
20
+ 40: sha1,
21
+ 64: sha256,
22
+ }
23
+
24
+
25
+ def _const_compare_digest_backport(a, b):
26
+ """
27
+ Compare two digests of equal length in constant time.
28
+
29
+ The digests must be of type str/bytes.
30
+ Returns True if the digests match, and False otherwise.
31
+ """
32
+ result = abs(len(a) - len(b))
33
+ for l, r in zip(bytearray(a), bytearray(b)):
34
+ result |= l ^ r
35
+ return result == 0
36
+
37
+
38
+ _const_compare_digest = getattr(hmac, 'compare_digest',
39
+ _const_compare_digest_backport)
40
+
41
+
42
+ try: # Test for SSL features
43
+ import ssl
44
+ from ssl import wrap_socket, CERT_NONE, PROTOCOL_SSLv23
45
+ from ssl import HAS_SNI # Has SNI?
46
+ except ImportError:
47
+ pass
48
+
49
+
50
+ try:
51
+ from ssl import OP_NO_SSLv2, OP_NO_SSLv3, OP_NO_COMPRESSION
52
+ except ImportError:
53
+ OP_NO_SSLv2, OP_NO_SSLv3 = 0x1000000, 0x2000000
54
+ OP_NO_COMPRESSION = 0x20000
55
+
56
+ # A secure default.
57
+ # Sources for more information on TLS ciphers:
58
+ #
59
+ # - https://wiki.mozilla.org/Security/Server_Side_TLS
60
+ # - https://www.ssllabs.com/projects/best-practices/index.html
61
+ # - https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
62
+ #
63
+ # The general intent is:
64
+ # - Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE),
65
+ # - prefer ECDHE over DHE for better performance,
66
+ # - prefer any AES-GCM over any AES-CBC for better performance and security,
67
+ # - use 3DES as fallback which is secure but slow,
68
+ # - disable NULL authentication, MD5 MACs and DSS for security reasons.
69
+ DEFAULT_CIPHERS = (
70
+ 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:'
71
+ 'DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL:'
72
+ '!eNULL:!MD5'
73
+ )
74
+
75
+ try:
76
+ from ssl import SSLContext # Modern SSL?
77
+ except ImportError:
78
+ import sys
79
+
80
+ class SSLContext(object): # Platform-specific: Python 2 & 3.1
81
+ supports_set_ciphers = ((2, 7) <= sys.version_info < (3,) or
82
+ (3, 2) <= sys.version_info)
83
+
84
+ def __init__(self, protocol_version):
85
+ self.protocol = protocol_version
86
+ # Use default values from a real SSLContext
87
+ self.check_hostname = False
88
+ self.verify_mode = ssl.CERT_NONE
89
+ self.ca_certs = None
90
+ self.options = 0
91
+ self.certfile = None
92
+ self.keyfile = None
93
+ self.ciphers = None
94
+
95
+ def load_cert_chain(self, certfile, keyfile):
96
+ self.certfile = certfile
97
+ self.keyfile = keyfile
98
+
99
+ def load_verify_locations(self, cafile=None, capath=None):
100
+ self.ca_certs = cafile
101
+
102
+ if capath is not None:
103
+ raise SSLError("CA directories not supported in older Pythons")
104
+
105
+ def set_ciphers(self, cipher_suite):
106
+ if not self.supports_set_ciphers:
107
+ raise TypeError(
108
+ 'Your version of Python does not support setting '
109
+ 'a custom cipher suite. Please upgrade to Python '
110
+ '2.7, 3.2, or later if you need this functionality.'
111
+ )
112
+ self.ciphers = cipher_suite
113
+
114
+ def wrap_socket(self, socket, server_hostname=None, server_side=False):
115
+ warnings.warn(
116
+ 'A true SSLContext object is not available. This prevents '
117
+ 'urllib3 from configuring SSL appropriately and may cause '
118
+ 'certain SSL connections to fail. You can upgrade to a newer '
119
+ 'version of Python to solve this. For more information, see '
120
+ 'https://urllib3.readthedocs.io/en/latest/security.html'
121
+ '#insecureplatformwarning.',
122
+ InsecurePlatformWarning
123
+ )
124
+ kwargs = {
125
+ 'keyfile': self.keyfile,
126
+ 'certfile': self.certfile,
127
+ 'ca_certs': self.ca_certs,
128
+ 'cert_reqs': self.verify_mode,
129
+ 'ssl_version': self.protocol,
130
+ 'server_side': server_side,
131
+ }
132
+ if self.supports_set_ciphers: # Platform-specific: Python 2.7+
133
+ return wrap_socket(socket, ciphers=self.ciphers, **kwargs)
134
+ else: # Platform-specific: Python 2.6
135
+ return wrap_socket(socket, **kwargs)
136
+
137
+
138
+ def assert_fingerprint(cert, fingerprint):
139
+ """
140
+ Checks if given fingerprint matches the supplied certificate.
141
+
142
+ :param cert:
143
+ Certificate as bytes object.
144
+ :param fingerprint:
145
+ Fingerprint as string of hexdigits, can be interspersed by colons.
146
+ """
147
+
148
+ fingerprint = fingerprint.replace(':', '').lower()
149
+ digest_length = len(fingerprint)
150
+ hashfunc = HASHFUNC_MAP.get(digest_length)
151
+ if not hashfunc:
152
+ raise SSLError(
153
+ 'Fingerprint of invalid length: {0}'.format(fingerprint))
154
+
155
+ # We need encode() here for py32; works on py2 and p33.
156
+ fingerprint_bytes = unhexlify(fingerprint.encode())
157
+
158
+ cert_digest = hashfunc(cert).digest()
159
+
160
+ if not _const_compare_digest(cert_digest, fingerprint_bytes):
161
+ raise SSLError('Fingerprints did not match. Expected "{0}", got "{1}".'
162
+ .format(fingerprint, hexlify(cert_digest)))
163
+
164
+
165
+ def resolve_cert_reqs(candidate):
166
+ """
167
+ Resolves the argument to a numeric constant, which can be passed to
168
+ the wrap_socket function/method from the ssl module.
169
+ Defaults to :data:`ssl.CERT_NONE`.
170
+ If given a string it is assumed to be the name of the constant in the
171
+ :mod:`ssl` module or its abbrevation.
172
+ (So you can specify `REQUIRED` instead of `CERT_REQUIRED`.
173
+ If it's neither `None` nor a string we assume it is already the numeric
174
+ constant which can directly be passed to wrap_socket.
175
+ """
176
+ if candidate is None:
177
+ return CERT_NONE
178
+
179
+ if isinstance(candidate, str):
180
+ res = getattr(ssl, candidate, None)
181
+ if res is None:
182
+ res = getattr(ssl, 'CERT_' + candidate)
183
+ return res
184
+
185
+ return candidate
186
+
187
+
188
+ def resolve_ssl_version(candidate):
189
+ """
190
+ like resolve_cert_reqs
191
+ """
192
+ if candidate is None:
193
+ return PROTOCOL_SSLv23
194
+
195
+ if isinstance(candidate, str):
196
+ res = getattr(ssl, candidate, None)
197
+ if res is None:
198
+ res = getattr(ssl, 'PROTOCOL_' + candidate)
199
+ return res
200
+
201
+ return candidate
202
+
203
+
204
+ def create_urllib3_context(ssl_version=None, cert_reqs=None,
205
+ options=None, ciphers=None):
206
+ """All arguments have the same meaning as ``ssl_wrap_socket``.
207
+
208
+ By default, this function does a lot of the same work that
209
+ ``ssl.create_default_context`` does on Python 3.4+. It:
210
+
211
+ - Disables SSLv2, SSLv3, and compression
212
+ - Sets a restricted set of server ciphers
213
+
214
+ If you wish to enable SSLv3, you can do::
215
+
216
+ from urllib3.util import ssl_
217
+ context = ssl_.create_urllib3_context()
218
+ context.options &= ~ssl_.OP_NO_SSLv3
219
+
220
+ You can do the same to enable compression (substituting ``COMPRESSION``
221
+ for ``SSLv3`` in the last line above).
222
+
223
+ :param ssl_version:
224
+ The desired protocol version to use. This will default to
225
+ PROTOCOL_SSLv23 which will negotiate the highest protocol that both
226
+ the server and your installation of OpenSSL support.
227
+ :param cert_reqs:
228
+ Whether to require the certificate verification. This defaults to
229
+ ``ssl.CERT_REQUIRED``.
230
+ :param options:
231
+ Specific OpenSSL options. These default to ``ssl.OP_NO_SSLv2``,
232
+ ``ssl.OP_NO_SSLv3``, ``ssl.OP_NO_COMPRESSION``.
233
+ :param ciphers:
234
+ Which cipher suites to allow the server to select.
235
+ :returns:
236
+ Constructed SSLContext object with specified options
237
+ :rtype: SSLContext
238
+ """
239
+ context = SSLContext(ssl_version or ssl.PROTOCOL_SSLv23)
240
+
241
+ # Setting the default here, as we may have no ssl module on import
242
+ cert_reqs = ssl.CERT_REQUIRED if cert_reqs is None else cert_reqs
243
+
244
+ if options is None:
245
+ options = 0
246
+ # SSLv2 is easily broken and is considered harmful and dangerous
247
+ options |= OP_NO_SSLv2
248
+ # SSLv3 has several problems and is now dangerous
249
+ options |= OP_NO_SSLv3
250
+ # Disable compression to prevent CRIME attacks for OpenSSL 1.0+
251
+ # (issue #309)
252
+ options |= OP_NO_COMPRESSION
253
+
254
+ context.options |= options
255
+
256
+ if getattr(context, 'supports_set_ciphers', True): # Platform-specific: Python 2.6
257
+ context.set_ciphers(ciphers or DEFAULT_CIPHERS)
258
+
259
+ context.verify_mode = cert_reqs
260
+ if getattr(context, 'check_hostname', None) is not None: # Platform-specific: Python 3.2
261
+ # We do our own verification, including fingerprints and alternative
262
+ # hostnames. So disable it here
263
+ context.check_hostname = False
264
+ return context
265
+
266
+
267
+ def ssl_wrap_socket(sock, keyfile=None, certfile=None, cert_reqs=None,
268
+ ca_certs=None, server_hostname=None,
269
+ ssl_version=None, ciphers=None, ssl_context=None,
270
+ ca_cert_dir=None):
271
+ """
272
+ All arguments except for server_hostname, ssl_context, and ca_cert_dir have
273
+ the same meaning as they do when using :func:`ssl.wrap_socket`.
274
+
275
+ :param server_hostname:
276
+ When SNI is supported, the expected hostname of the certificate
277
+ :param ssl_context:
278
+ A pre-made :class:`SSLContext` object. If none is provided, one will
279
+ be created using :func:`create_urllib3_context`.
280
+ :param ciphers:
281
+ A string of ciphers we wish the client to support. This is not
282
+ supported on Python 2.6 as the ssl module does not support it.
283
+ :param ca_cert_dir:
284
+ A directory containing CA certificates in multiple separate files, as
285
+ supported by OpenSSL's -CApath flag or the capath argument to
286
+ SSLContext.load_verify_locations().
287
+ """
288
+ context = ssl_context
289
+ if context is None:
290
+ context = create_urllib3_context(ssl_version, cert_reqs,
291
+ ciphers=ciphers)
292
+
293
+ if ca_certs or ca_cert_dir:
294
+ try:
295
+ context.load_verify_locations(ca_certs, ca_cert_dir)
296
+ except IOError as e: # Platform-specific: Python 2.6, 2.7, 3.2
297
+ raise SSLError(e)
298
+ # Py33 raises FileNotFoundError which subclasses OSError
299
+ # These are not equivalent unless we check the errno attribute
300
+ except OSError as e: # Platform-specific: Python 3.3 and beyond
301
+ if e.errno == errno.ENOENT:
302
+ raise SSLError(e)
303
+ raise
304
+
305
+ if certfile:
306
+ context.load_cert_chain(certfile, keyfile)
307
+ if HAS_SNI: # Platform-specific: OpenSSL with enabled SNI
308
+ return context.wrap_socket(sock, server_hostname=server_hostname)
309
+
310
+ warnings.warn(
311
+ 'An HTTPS request has been made, but the SNI (Subject Name '
312
+ 'Indication) extension to TLS is not available on this platform. '
313
+ 'This may cause the server to present an incorrect TLS '
314
+ 'certificate, which can cause validation failures. You can upgrade to '
315
+ 'a newer version of Python to solve this. For more information, see '
316
+ 'https://urllib3.readthedocs.io/en/latest/security.html'
317
+ '#snimissingwarning.',
318
+ SNIMissingWarning
319
+ )
320
+ return context.wrap_socket(sock)
@@ -0,0 +1,242 @@
1
+ from __future__ import absolute_import
2
+ # The default socket timeout, used by httplib to indicate that no timeout was
3
+ # specified by the user
4
+ from socket import _GLOBAL_DEFAULT_TIMEOUT
5
+ import time
6
+
7
+ from ..exceptions import TimeoutStateError
8
+
9
+ # A sentinel value to indicate that no timeout was specified by the user in
10
+ # urllib3
11
+ _Default = object()
12
+
13
+
14
+ def current_time():
15
+ """
16
+ Retrieve the current time. This function is mocked out in unit testing.
17
+ """
18
+ return time.time()
19
+
20
+
21
+ class Timeout(object):
22
+ """ Timeout configuration.
23
+
24
+ Timeouts can be defined as a default for a pool::
25
+
26
+ timeout = Timeout(connect=2.0, read=7.0)
27
+ http = PoolManager(timeout=timeout)
28
+ response = http.request('GET', 'http://example.com/')
29
+
30
+ Or per-request (which overrides the default for the pool)::
31
+
32
+ response = http.request('GET', 'http://example.com/', timeout=Timeout(10))
33
+
34
+ Timeouts can be disabled by setting all the parameters to ``None``::
35
+
36
+ no_timeout = Timeout(connect=None, read=None)
37
+ response = http.request('GET', 'http://example.com/, timeout=no_timeout)
38
+
39
+
40
+ :param total:
41
+ This combines the connect and read timeouts into one; the read timeout
42
+ will be set to the time leftover from the connect attempt. In the
43
+ event that both a connect timeout and a total are specified, or a read
44
+ timeout and a total are specified, the shorter timeout will be applied.
45
+
46
+ Defaults to None.
47
+
48
+ :type total: integer, float, or None
49
+
50
+ :param connect:
51
+ The maximum amount of time to wait for a connection attempt to a server
52
+ to succeed. Omitting the parameter will default the connect timeout to
53
+ the system default, probably `the global default timeout in socket.py
54
+ <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
55
+ None will set an infinite timeout for connection attempts.
56
+
57
+ :type connect: integer, float, or None
58
+
59
+ :param read:
60
+ The maximum amount of time to wait between consecutive
61
+ read operations for a response from the server. Omitting
62
+ the parameter will default the read timeout to the system
63
+ default, probably `the global default timeout in socket.py
64
+ <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
65
+ None will set an infinite timeout.
66
+
67
+ :type read: integer, float, or None
68
+
69
+ .. note::
70
+
71
+ Many factors can affect the total amount of time for urllib3 to return
72
+ an HTTP response.
73
+
74
+ For example, Python's DNS resolver does not obey the timeout specified
75
+ on the socket. Other factors that can affect total request time include
76
+ high CPU load, high swap, the program running at a low priority level,
77
+ or other behaviors.
78
+
79
+ In addition, the read and total timeouts only measure the time between
80
+ read operations on the socket connecting the client and the server,
81
+ not the total amount of time for the request to return a complete
82
+ response. For most requests, the timeout is raised because the server
83
+ has not sent the first byte in the specified time. This is not always
84
+ the case; if a server streams one byte every fifteen seconds, a timeout
85
+ of 20 seconds will not trigger, even though the request will take
86
+ several minutes to complete.
87
+
88
+ If your goal is to cut off any request after a set amount of wall clock
89
+ time, consider having a second "watcher" thread to cut off a slow
90
+ request.
91
+ """
92
+
93
+ #: A sentinel object representing the default timeout value
94
+ DEFAULT_TIMEOUT = _GLOBAL_DEFAULT_TIMEOUT
95
+
96
+ def __init__(self, total=None, connect=_Default, read=_Default):
97
+ self._connect = self._validate_timeout(connect, 'connect')
98
+ self._read = self._validate_timeout(read, 'read')
99
+ self.total = self._validate_timeout(total, 'total')
100
+ self._start_connect = None
101
+
102
+ def __str__(self):
103
+ return '%s(connect=%r, read=%r, total=%r)' % (
104
+ type(self).__name__, self._connect, self._read, self.total)
105
+
106
+ @classmethod
107
+ def _validate_timeout(cls, value, name):
108
+ """ Check that a timeout attribute is valid.
109
+
110
+ :param value: The timeout value to validate
111
+ :param name: The name of the timeout attribute to validate. This is
112
+ used to specify in error messages.
113
+ :return: The validated and casted version of the given value.
114
+ :raises ValueError: If the type is not an integer or a float, or if it
115
+ is a numeric value less than zero.
116
+ """
117
+ if value is _Default:
118
+ return cls.DEFAULT_TIMEOUT
119
+
120
+ if value is None or value is cls.DEFAULT_TIMEOUT:
121
+ return value
122
+
123
+ try:
124
+ float(value)
125
+ except (TypeError, ValueError):
126
+ raise ValueError("Timeout value %s was %s, but it must be an "
127
+ "int or float." % (name, value))
128
+
129
+ try:
130
+ if value < 0:
131
+ raise ValueError("Attempted to set %s timeout to %s, but the "
132
+ "timeout cannot be set to a value less "
133
+ "than 0." % (name, value))
134
+ except TypeError: # Python 3
135
+ raise ValueError("Timeout value %s was %s, but it must be an "
136
+ "int or float." % (name, value))
137
+
138
+ return value
139
+
140
+ @classmethod
141
+ def from_float(cls, timeout):
142
+ """ Create a new Timeout from a legacy timeout value.
143
+
144
+ The timeout value used by httplib.py sets the same timeout on the
145
+ connect(), and recv() socket requests. This creates a :class:`Timeout`
146
+ object that sets the individual timeouts to the ``timeout`` value
147
+ passed to this function.
148
+
149
+ :param timeout: The legacy timeout value.
150
+ :type timeout: integer, float, sentinel default object, or None
151
+ :return: Timeout object
152
+ :rtype: :class:`Timeout`
153
+ """
154
+ return Timeout(read=timeout, connect=timeout)
155
+
156
+ def clone(self):
157
+ """ Create a copy of the timeout object
158
+
159
+ Timeout properties are stored per-pool but each request needs a fresh
160
+ Timeout object to ensure each one has its own start/stop configured.
161
+
162
+ :return: a copy of the timeout object
163
+ :rtype: :class:`Timeout`
164
+ """
165
+ # We can't use copy.deepcopy because that will also create a new object
166
+ # for _GLOBAL_DEFAULT_TIMEOUT, which socket.py uses as a sentinel to
167
+ # detect the user default.
168
+ return Timeout(connect=self._connect, read=self._read,
169
+ total=self.total)
170
+
171
+ def start_connect(self):
172
+ """ Start the timeout clock, used during a connect() attempt
173
+
174
+ :raises urllib3.exceptions.TimeoutStateError: if you attempt
175
+ to start a timer that has been started already.
176
+ """
177
+ if self._start_connect is not None:
178
+ raise TimeoutStateError("Timeout timer has already been started.")
179
+ self._start_connect = current_time()
180
+ return self._start_connect
181
+
182
+ def get_connect_duration(self):
183
+ """ Gets the time elapsed since the call to :meth:`start_connect`.
184
+
185
+ :return: Elapsed time.
186
+ :rtype: float
187
+ :raises urllib3.exceptions.TimeoutStateError: if you attempt
188
+ to get duration for a timer that hasn't been started.
189
+ """
190
+ if self._start_connect is None:
191
+ raise TimeoutStateError("Can't get connect duration for timer "
192
+ "that has not started.")
193
+ return current_time() - self._start_connect
194
+
195
+ @property
196
+ def connect_timeout(self):
197
+ """ Get the value to use when setting a connection timeout.
198
+
199
+ This will be a positive float or integer, the value None
200
+ (never timeout), or the default system timeout.
201
+
202
+ :return: Connect timeout.
203
+ :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
204
+ """
205
+ if self.total is None:
206
+ return self._connect
207
+
208
+ if self._connect is None or self._connect is self.DEFAULT_TIMEOUT:
209
+ return self.total
210
+
211
+ return min(self._connect, self.total)
212
+
213
+ @property
214
+ def read_timeout(self):
215
+ """ Get the value for the read timeout.
216
+
217
+ This assumes some time has elapsed in the connection timeout and
218
+ computes the read timeout appropriately.
219
+
220
+ If self.total is set, the read timeout is dependent on the amount of
221
+ time taken by the connect timeout. If the connection time has not been
222
+ established, a :exc:`~urllib3.exceptions.TimeoutStateError` will be
223
+ raised.
224
+
225
+ :return: Value to use for the read timeout.
226
+ :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
227
+ :raises urllib3.exceptions.TimeoutStateError: If :meth:`start_connect`
228
+ has not yet been called on this object.
229
+ """
230
+ if (self.total is not None and
231
+ self.total is not self.DEFAULT_TIMEOUT and
232
+ self._read is not None and
233
+ self._read is not self.DEFAULT_TIMEOUT):
234
+ # In case the connect timeout has not yet been established.
235
+ if self._start_connect is None:
236
+ return self._read
237
+ return max(0, min(self.total - self.get_connect_duration(),
238
+ self._read))
239
+ elif self.total is not None and self.total is not self.DEFAULT_TIMEOUT:
240
+ return max(0, self.total - self.get_connect_duration())
241
+ else:
242
+ return self._read