com.googler.python 1.0.7 → 1.0.9

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 (354) hide show
  1. package/package.json +4 -2
  2. package/python3.4.2/lib/python3.4/site-packages/pip/__init__.py +1 -277
  3. package/python3.4.2/lib/python3.4/site-packages/pip/__main__.py +19 -7
  4. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/__init__.py +246 -0
  5. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/basecommand.py +373 -0
  6. package/python3.4.2/lib/python3.4/site-packages/pip/{baseparser.py → _internal/baseparser.py} +240 -224
  7. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/build_env.py +92 -0
  8. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/cache.py +202 -0
  9. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/cmdoptions.py +609 -0
  10. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/__init__.py +79 -0
  11. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/check.py +42 -0
  12. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/completion.py +94 -0
  13. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/configuration.py +227 -0
  14. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/download.py +233 -0
  15. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/freeze.py +96 -0
  16. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/hash.py +57 -0
  17. package/python3.4.2/lib/python3.4/site-packages/pip/{commands → _internal/commands}/help.py +36 -33
  18. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/install.py +477 -0
  19. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/list.py +343 -0
  20. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/search.py +135 -0
  21. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/show.py +164 -0
  22. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/uninstall.py +71 -0
  23. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/wheel.py +179 -0
  24. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/compat.py +235 -0
  25. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/configuration.py +378 -0
  26. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/download.py +922 -0
  27. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/exceptions.py +249 -0
  28. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/index.py +1117 -0
  29. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/locations.py +194 -0
  30. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/models/__init__.py +4 -0
  31. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/models/index.py +15 -0
  32. package/python3.4.2/lib/python3.4/site-packages/pip/{_vendor/requests/packages/urllib3/contrib → _internal/operations}/__init__.py +0 -0
  33. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/operations/check.py +106 -0
  34. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/operations/freeze.py +252 -0
  35. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/operations/prepare.py +378 -0
  36. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/pep425tags.py +317 -0
  37. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/__init__.py +69 -0
  38. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_file.py +338 -0
  39. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_install.py +1115 -0
  40. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_set.py +164 -0
  41. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_uninstall.py +455 -0
  42. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/resolve.py +354 -0
  43. package/python3.4.2/lib/python3.4/site-packages/pip/{status_codes.py → _internal/status_codes.py} +8 -6
  44. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/__init__.py +0 -0
  45. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/appdirs.py +258 -0
  46. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/deprecation.py +77 -0
  47. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/encoding.py +33 -0
  48. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/filesystem.py +28 -0
  49. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/glibc.py +84 -0
  50. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/hashes.py +94 -0
  51. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/logging.py +132 -0
  52. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/misc.py +851 -0
  53. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/outdated.py +163 -0
  54. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/packaging.py +70 -0
  55. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/setuptools_build.py +8 -0
  56. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/temp_dir.py +82 -0
  57. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/typing.py +29 -0
  58. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/ui.py +421 -0
  59. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/__init__.py +471 -0
  60. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/bazaar.py +113 -0
  61. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/git.py +311 -0
  62. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/mercurial.py +105 -0
  63. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/subversion.py +271 -0
  64. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/wheel.py +817 -0
  65. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/__init__.py +109 -8
  66. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/appdirs.py +604 -0
  67. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/__init__.py +11 -0
  68. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/_cmd.py +60 -0
  69. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/adapter.py +134 -0
  70. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/cache.py +39 -0
  71. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +2 -0
  72. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +133 -0
  73. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +43 -0
  74. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/compat.py +29 -0
  75. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/controller.py +373 -0
  76. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/filewrapper.py +78 -0
  77. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/heuristics.py +138 -0
  78. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/serialize.py +194 -0
  79. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/wrapper.py +27 -0
  80. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/certifi/__init__.py +3 -0
  81. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/certifi/__main__.py +2 -0
  82. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests → certifi}/cacert.pem +1765 -2358
  83. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/certifi/core.py +37 -0
  84. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/__init__.py +39 -32
  85. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/big5freq.py +386 -0
  86. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/big5prober.py +47 -42
  87. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/chardistribution.py +233 -231
  88. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/charsetgroupprober.py +106 -0
  89. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/charsetprober.py +145 -0
  90. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/cli/__init__.py +1 -0
  91. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/cli/chardetect.py +85 -0
  92. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/codingstatemachine.py +88 -0
  93. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/compat.py +34 -34
  94. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/cp949prober.py +49 -44
  95. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/enums.py +76 -0
  96. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/escprober.py +101 -0
  97. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/escsm.py +246 -0
  98. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/eucjpprober.py +92 -0
  99. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/euckrfreq.py +195 -0
  100. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/euckrprober.py +47 -42
  101. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/euctwfreq.py +387 -428
  102. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/euctwprober.py +46 -41
  103. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/gb2312freq.py +283 -472
  104. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/gb2312prober.py +46 -41
  105. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/hebrewprober.py +292 -283
  106. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/jisfreq.py +325 -569
  107. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/jpcntx.py +233 -219
  108. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langbulgarianmodel.py +228 -229
  109. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langcyrillicmodel.py +333 -329
  110. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langgreekmodel.py +225 -225
  111. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langhebrewmodel.py +200 -201
  112. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langhungarianmodel.py +225 -225
  113. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langthaimodel.py +199 -200
  114. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/langturkishmodel.py +193 -0
  115. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/latin1prober.py +145 -139
  116. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/mbcharsetprober.py +91 -0
  117. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/mbcsgroupprober.py +54 -54
  118. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/mbcssm.py +572 -0
  119. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/sbcharsetprober.py +132 -0
  120. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/sbcsgroupprober.py +73 -69
  121. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/sjisprober.py +92 -0
  122. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/universaldetector.py +286 -0
  123. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/utf8prober.py +82 -76
  124. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/version.py +9 -0
  125. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/__init__.py +7 -7
  126. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansi.py +102 -50
  127. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansitowin32.py +236 -190
  128. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/initialise.py +82 -56
  129. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/win32.py +156 -137
  130. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/winterm.py +162 -120
  131. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/__init__.py +23 -23
  132. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/__init__.py +6 -6
  133. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/misc.py +41 -41
  134. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/shutil.py +761 -761
  135. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg +84 -84
  136. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.py +788 -788
  137. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/tarfile.py +2607 -2607
  138. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/compat.py +1117 -1064
  139. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/database.py +1318 -1301
  140. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/index.py +516 -488
  141. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/locators.py +1292 -1194
  142. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/manifest.py +393 -364
  143. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py +131 -190
  144. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/metadata.py +1068 -1026
  145. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/resources.py +355 -317
  146. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/scripts.py +415 -323
  147. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t32.exe +0 -0
  148. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t64.exe +0 -0
  149. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/util.py +1755 -1575
  150. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/version.py +736 -721
  151. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w32.exe +0 -0
  152. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w64.exe +0 -0
  153. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/wheel.py +984 -958
  154. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distro.py +1104 -0
  155. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/__init__.py +35 -23
  156. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{ihatexml.py → _ihatexml.py} +288 -285
  157. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{inputstream.py → _inputstream.py} +923 -881
  158. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{tokenizer.py → _tokenizer.py} +1721 -1731
  159. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/__init__.py +14 -12
  160. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/_base.py +37 -37
  161. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/datrie.py +44 -44
  162. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/py.py +67 -67
  163. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{utils.py → _utils.py} +124 -82
  164. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/constants.py +2947 -3104
  165. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py +29 -20
  166. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/{_base.py → base.py} +12 -12
  167. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py +73 -65
  168. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/lint.py +93 -93
  169. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/optionaltags.py +207 -205
  170. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/sanitizer.py +896 -12
  171. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/whitespace.py +38 -38
  172. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/html5parser.py +2791 -2713
  173. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer.py +409 -0
  174. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py +30 -0
  175. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py +54 -0
  176. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/sax.py +50 -44
  177. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py +88 -76
  178. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/{_base.py → base.py} +417 -377
  179. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/dom.py +236 -227
  180. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree.py +340 -337
  181. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py +366 -369
  182. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py +154 -57
  183. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/{_base.py → base.py} +252 -200
  184. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/dom.py +43 -46
  185. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/etree.py +130 -138
  186. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/{lxmletree.py → etree_lxml.py} +213 -208
  187. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/{genshistream.py → genshi.py} +69 -69
  188. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/__init__.py +2 -0
  189. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/codec.py +118 -0
  190. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/compat.py +12 -0
  191. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/core.py +387 -0
  192. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/idnadata.py +1585 -0
  193. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/intranges.py +53 -0
  194. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/package_data.py +2 -0
  195. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/uts46data.py +7634 -0
  196. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/ipaddress.py +2419 -0
  197. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/__init__.py +347 -0
  198. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/linklockfile.py +73 -0
  199. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/mkdirlockfile.py +84 -0
  200. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/pidlockfile.py +190 -0
  201. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/sqlitelockfile.py +156 -0
  202. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/symlinklockfile.py +70 -0
  203. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/__init__.py +66 -0
  204. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/_version.py +1 -0
  205. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/exceptions.py +41 -0
  206. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/fallback.py +971 -0
  207. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/__about__.py +21 -0
  208. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/__init__.py +14 -0
  209. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/_compat.py +30 -0
  210. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/_structures.py +70 -0
  211. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/markers.py +301 -0
  212. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/requirements.py +130 -0
  213. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/specifiers.py +774 -0
  214. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/utils.py +63 -0
  215. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/version.py +441 -0
  216. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{pkg_resources.py → pkg_resources/__init__.py} +3125 -2762
  217. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pkg_resources/py31compat.py +22 -0
  218. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/__init__.py +127 -0
  219. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/bar.py +88 -0
  220. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/counter.py +48 -0
  221. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/helpers.py +91 -0
  222. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/spinner.py +44 -0
  223. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pyparsing.py +5720 -0
  224. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/__init__.py +3 -0
  225. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/core.py +13 -0
  226. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/parser.py +374 -0
  227. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/writer.py +127 -0
  228. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/__init__.py +123 -77
  229. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/__version__.py +14 -0
  230. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/_internal_utils.py +42 -0
  231. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/adapters.py +525 -388
  232. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/api.py +152 -120
  233. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/auth.py +293 -193
  234. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/certs.py +18 -24
  235. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/compat.py +73 -115
  236. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/cookies.py +542 -454
  237. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/exceptions.py +122 -75
  238. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/help.py +120 -0
  239. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/hooks.py +34 -45
  240. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/models.py +948 -803
  241. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages.py +16 -0
  242. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/sessions.py +737 -637
  243. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/status_codes.py +91 -88
  244. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/structures.py +105 -127
  245. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/utils.py +904 -673
  246. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/retrying.py +267 -0
  247. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/six.py +891 -646
  248. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/__init__.py +97 -0
  249. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/_collections.py +319 -0
  250. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/connection.py +373 -0
  251. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/connectionpool.py +905 -710
  252. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
  253. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
  254. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +593 -0
  255. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +343 -0
  256. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/appengine.py +296 -0
  257. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/contrib/ntlmpool.py +112 -120
  258. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +455 -0
  259. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +810 -0
  260. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/socks.py +188 -0
  261. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/exceptions.py +246 -0
  262. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/fields.py +178 -177
  263. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/filepost.py +94 -100
  264. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/__init__.py +5 -4
  265. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
  266. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +53 -0
  267. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/ordered_dict.py +259 -260
  268. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/packages/six.py +868 -0
  269. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/ssl_match_hostname/__init__.py +19 -13
  270. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/ssl_match_hostname/_implementation.py +157 -105
  271. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/poolmanager.py +440 -0
  272. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/request.py +148 -141
  273. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/response.py +626 -0
  274. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/__init__.py +54 -0
  275. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/connection.py +130 -0
  276. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/request.py +118 -0
  277. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/response.py +81 -0
  278. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/retry.py +401 -0
  279. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/selectors.py +581 -0
  280. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/ssl_.py +341 -0
  281. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/util/timeout.py +242 -234
  282. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/util/url.py +230 -162
  283. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/wait.py +40 -0
  284. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/__init__.py +342 -0
  285. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/labels.py +231 -0
  286. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/mklabels.py +59 -0
  287. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/tests.py +153 -0
  288. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/x_user_defined.py +325 -0
  289. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/__init__.py +0 -16
  290. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/markers.py +0 -119
  291. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/sanitizer.py +0 -271
  292. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/__init__.py +0 -16
  293. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py +0 -320
  294. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py +0 -63
  295. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/re-vendor.py +0 -34
  296. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/__init__.py +0 -3
  297. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py +0 -925
  298. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py +0 -46
  299. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py +0 -106
  300. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py +0 -62
  301. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py +0 -61
  302. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/constants.py +0 -39
  303. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escprober.py +0 -86
  304. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escsm.py +0 -242
  305. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py +0 -90
  306. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py +0 -596
  307. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py +0 -86
  308. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py +0 -575
  309. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py +0 -120
  310. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py +0 -91
  311. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py +0 -170
  312. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py +0 -58
  313. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py +0 -205
  314. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connection.py +0 -204
  315. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py +0 -422
  316. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py +0 -126
  317. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py +0 -385
  318. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py +0 -258
  319. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/response.py +0 -308
  320. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py +0 -27
  321. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py +0 -45
  322. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py +0 -68
  323. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py +0 -13
  324. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py +0 -133
  325. package/python3.4.2/lib/python3.4/site-packages/pip/backwardcompat/__init__.py +0 -138
  326. package/python3.4.2/lib/python3.4/site-packages/pip/basecommand.py +0 -201
  327. package/python3.4.2/lib/python3.4/site-packages/pip/cmdoptions.py +0 -371
  328. package/python3.4.2/lib/python3.4/site-packages/pip/commands/__init__.py +0 -88
  329. package/python3.4.2/lib/python3.4/site-packages/pip/commands/bundle.py +0 -42
  330. package/python3.4.2/lib/python3.4/site-packages/pip/commands/completion.py +0 -59
  331. package/python3.4.2/lib/python3.4/site-packages/pip/commands/freeze.py +0 -114
  332. package/python3.4.2/lib/python3.4/site-packages/pip/commands/install.py +0 -314
  333. package/python3.4.2/lib/python3.4/site-packages/pip/commands/list.py +0 -162
  334. package/python3.4.2/lib/python3.4/site-packages/pip/commands/search.py +0 -132
  335. package/python3.4.2/lib/python3.4/site-packages/pip/commands/show.py +0 -80
  336. package/python3.4.2/lib/python3.4/site-packages/pip/commands/uninstall.py +0 -59
  337. package/python3.4.2/lib/python3.4/site-packages/pip/commands/unzip.py +0 -7
  338. package/python3.4.2/lib/python3.4/site-packages/pip/commands/wheel.py +0 -195
  339. package/python3.4.2/lib/python3.4/site-packages/pip/commands/zip.py +0 -351
  340. package/python3.4.2/lib/python3.4/site-packages/pip/download.py +0 -644
  341. package/python3.4.2/lib/python3.4/site-packages/pip/exceptions.py +0 -46
  342. package/python3.4.2/lib/python3.4/site-packages/pip/index.py +0 -990
  343. package/python3.4.2/lib/python3.4/site-packages/pip/locations.py +0 -171
  344. package/python3.4.2/lib/python3.4/site-packages/pip/log.py +0 -276
  345. package/python3.4.2/lib/python3.4/site-packages/pip/pep425tags.py +0 -102
  346. package/python3.4.2/lib/python3.4/site-packages/pip/req.py +0 -1931
  347. package/python3.4.2/lib/python3.4/site-packages/pip/runner.py +0 -18
  348. package/python3.4.2/lib/python3.4/site-packages/pip/util.py +0 -720
  349. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/__init__.py +0 -251
  350. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/bazaar.py +0 -131
  351. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/git.py +0 -194
  352. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/mercurial.py +0 -151
  353. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/subversion.py +0 -273
  354. package/python3.4.2/lib/python3.4/site-packages/pip/wheel.py +0 -560
@@ -0,0 +1,164 @@
1
+ from __future__ import absolute_import
2
+
3
+ import logging
4
+ from collections import OrderedDict
5
+
6
+ from pip._internal.exceptions import InstallationError
7
+ from pip._internal.utils.logging import indent_log
8
+ from pip._internal.wheel import Wheel
9
+
10
+ logger = logging.getLogger(__name__)
11
+
12
+
13
+ class RequirementSet(object):
14
+
15
+ def __init__(self, require_hashes=False):
16
+ """Create a RequirementSet.
17
+
18
+ :param wheel_cache: The pip wheel cache, for passing to
19
+ InstallRequirement.
20
+ """
21
+
22
+ self.requirements = OrderedDict()
23
+ self.require_hashes = require_hashes
24
+
25
+ # Mapping of alias: real_name
26
+ self.requirement_aliases = {}
27
+ self.unnamed_requirements = []
28
+ self.successfully_downloaded = []
29
+ self.reqs_to_cleanup = []
30
+
31
+ def __str__(self):
32
+ reqs = [req for req in self.requirements.values()
33
+ if not req.comes_from]
34
+ reqs.sort(key=lambda req: req.name.lower())
35
+ return ' '.join([str(req.req) for req in reqs])
36
+
37
+ def __repr__(self):
38
+ reqs = [req for req in self.requirements.values()]
39
+ reqs.sort(key=lambda req: req.name.lower())
40
+ reqs_str = ', '.join([str(req.req) for req in reqs])
41
+ return ('<%s object; %d requirement(s): %s>'
42
+ % (self.__class__.__name__, len(reqs), reqs_str))
43
+
44
+ def add_requirement(self, install_req, parent_req_name=None,
45
+ extras_requested=None):
46
+ """Add install_req as a requirement to install.
47
+
48
+ :param parent_req_name: The name of the requirement that needed this
49
+ added. The name is used because when multiple unnamed requirements
50
+ resolve to the same name, we could otherwise end up with dependency
51
+ links that point outside the Requirements set. parent_req must
52
+ already be added. Note that None implies that this is a user
53
+ supplied requirement, vs an inferred one.
54
+ :param extras_requested: an iterable of extras used to evaluate the
55
+ environment markers.
56
+ :return: Additional requirements to scan. That is either [] if
57
+ the requirement is not applicable, or [install_req] if the
58
+ requirement is applicable and has just been added.
59
+ """
60
+ name = install_req.name
61
+ if not install_req.match_markers(extras_requested):
62
+ logger.info("Ignoring %s: markers '%s' don't match your "
63
+ "environment", install_req.name,
64
+ install_req.markers)
65
+ return [], None
66
+
67
+ # This check has to come after we filter requirements with the
68
+ # environment markers.
69
+ if install_req.link and install_req.link.is_wheel:
70
+ wheel = Wheel(install_req.link.filename)
71
+ if not wheel.supported():
72
+ raise InstallationError(
73
+ "%s is not a supported wheel on this platform." %
74
+ wheel.filename
75
+ )
76
+
77
+ # This next bit is really a sanity check.
78
+ assert install_req.is_direct == (parent_req_name is None), (
79
+ "a direct req shouldn't have a parent and also, "
80
+ "a non direct req should have a parent"
81
+ )
82
+
83
+ if not name:
84
+ # url or path requirement w/o an egg fragment
85
+ self.unnamed_requirements.append(install_req)
86
+ return [install_req], None
87
+ else:
88
+ try:
89
+ existing_req = self.get_requirement(name)
90
+ except KeyError:
91
+ existing_req = None
92
+ if (parent_req_name is None and existing_req and not
93
+ existing_req.constraint and
94
+ existing_req.extras == install_req.extras and not
95
+ existing_req.req.specifier == install_req.req.specifier):
96
+ raise InstallationError(
97
+ 'Double requirement given: %s (already in %s, name=%r)'
98
+ % (install_req, existing_req, name))
99
+ if not existing_req:
100
+ # Add requirement
101
+ self.requirements[name] = install_req
102
+ # FIXME: what about other normalizations? E.g., _ vs. -?
103
+ if name.lower() != name:
104
+ self.requirement_aliases[name.lower()] = name
105
+ result = [install_req]
106
+ else:
107
+ # Assume there's no need to scan, and that we've already
108
+ # encountered this for scanning.
109
+ result = []
110
+ if not install_req.constraint and existing_req.constraint:
111
+ if (install_req.link and not (existing_req.link and
112
+ install_req.link.path == existing_req.link.path)):
113
+ self.reqs_to_cleanup.append(install_req)
114
+ raise InstallationError(
115
+ "Could not satisfy constraints for '%s': "
116
+ "installation from path or url cannot be "
117
+ "constrained to a version" % name,
118
+ )
119
+ # If we're now installing a constraint, mark the existing
120
+ # object for real installation.
121
+ existing_req.constraint = False
122
+ existing_req.extras = tuple(
123
+ sorted(set(existing_req.extras).union(
124
+ set(install_req.extras))))
125
+ logger.debug("Setting %s extras to: %s",
126
+ existing_req, existing_req.extras)
127
+ # And now we need to scan this.
128
+ result = [existing_req]
129
+ # Canonicalise to the already-added object for the backref
130
+ # check below.
131
+ install_req = existing_req
132
+
133
+ # We return install_req here to allow for the caller to add it to
134
+ # the dependency information for the parent package.
135
+ return result, install_req
136
+
137
+ def has_requirement(self, project_name):
138
+ name = project_name.lower()
139
+ if (name in self.requirements and
140
+ not self.requirements[name].constraint or
141
+ name in self.requirement_aliases and
142
+ not self.requirements[self.requirement_aliases[name]].constraint):
143
+ return True
144
+ return False
145
+
146
+ @property
147
+ def has_requirements(self):
148
+ return list(req for req in self.requirements.values() if not
149
+ req.constraint) or self.unnamed_requirements
150
+
151
+ def get_requirement(self, project_name):
152
+ for name in project_name, project_name.lower():
153
+ if name in self.requirements:
154
+ return self.requirements[name]
155
+ if name in self.requirement_aliases:
156
+ return self.requirements[self.requirement_aliases[name]]
157
+ raise KeyError("No project with the name %r" % project_name)
158
+
159
+ def cleanup_files(self):
160
+ """Clean up files, remove builds."""
161
+ logger.debug('Cleaning up...')
162
+ with indent_log():
163
+ for req in self.reqs_to_cleanup:
164
+ req.remove_temporary_source()
@@ -0,0 +1,455 @@
1
+ from __future__ import absolute_import
2
+
3
+ import csv
4
+ import functools
5
+ import logging
6
+ import os
7
+ import sys
8
+ import sysconfig
9
+
10
+ from pip._vendor import pkg_resources
11
+
12
+ from pip._internal.compat import WINDOWS, cache_from_source, uses_pycache
13
+ from pip._internal.exceptions import UninstallationError
14
+ from pip._internal.locations import bin_py, bin_user
15
+ from pip._internal.utils.logging import indent_log
16
+ from pip._internal.utils.misc import (
17
+ FakeFile, ask, dist_in_usersite, dist_is_local, egg_link_path, is_local,
18
+ normalize_path, renames,
19
+ )
20
+ from pip._internal.utils.temp_dir import TempDirectory
21
+
22
+ logger = logging.getLogger(__name__)
23
+
24
+
25
+ def _script_names(dist, script_name, is_gui):
26
+ """Create the fully qualified name of the files created by
27
+ {console,gui}_scripts for the given ``dist``.
28
+ Returns the list of file names
29
+ """
30
+ if dist_in_usersite(dist):
31
+ bin_dir = bin_user
32
+ else:
33
+ bin_dir = bin_py
34
+ exe_name = os.path.join(bin_dir, script_name)
35
+ paths_to_remove = [exe_name]
36
+ if WINDOWS:
37
+ paths_to_remove.append(exe_name + '.exe')
38
+ paths_to_remove.append(exe_name + '.exe.manifest')
39
+ if is_gui:
40
+ paths_to_remove.append(exe_name + '-script.pyw')
41
+ else:
42
+ paths_to_remove.append(exe_name + '-script.py')
43
+ return paths_to_remove
44
+
45
+
46
+ def _unique(fn):
47
+ @functools.wraps(fn)
48
+ def unique(*args, **kw):
49
+ seen = set()
50
+ for item in fn(*args, **kw):
51
+ if item not in seen:
52
+ seen.add(item)
53
+ yield item
54
+ return unique
55
+
56
+
57
+ @_unique
58
+ def uninstallation_paths(dist):
59
+ """
60
+ Yield all the uninstallation paths for dist based on RECORD-without-.pyc
61
+
62
+ Yield paths to all the files in RECORD. For each .py file in RECORD, add
63
+ the .pyc in the same directory.
64
+
65
+ UninstallPathSet.add() takes care of the __pycache__ .pyc.
66
+ """
67
+ r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD')))
68
+ for row in r:
69
+ path = os.path.join(dist.location, row[0])
70
+ yield path
71
+ if path.endswith('.py'):
72
+ dn, fn = os.path.split(path)
73
+ base = fn[:-3]
74
+ path = os.path.join(dn, base + '.pyc')
75
+ yield path
76
+
77
+
78
+ def compact(paths):
79
+ """Compact a path set to contain the minimal number of paths
80
+ necessary to contain all paths in the set. If /a/path/ and
81
+ /a/path/to/a/file.txt are both in the set, leave only the
82
+ shorter path."""
83
+
84
+ sep = os.path.sep
85
+ short_paths = set()
86
+ for path in sorted(paths, key=len):
87
+ should_add = any(
88
+ path.startswith(shortpath.rstrip("*")) and
89
+ path[len(shortpath.rstrip("*").rstrip(sep))] == sep
90
+ for shortpath in short_paths
91
+ )
92
+ if not should_add:
93
+ short_paths.add(path)
94
+ return short_paths
95
+
96
+
97
+ def compress_for_output_listing(paths):
98
+ """Returns a tuple of 2 sets of which paths to display to user
99
+
100
+ The first set contains paths that would be deleted. Files of a package
101
+ are not added and the top-level directory of the package has a '*' added
102
+ at the end - to signify that all it's contents are removed.
103
+
104
+ The second set contains files that would have been skipped in the above
105
+ folders.
106
+ """
107
+
108
+ will_remove = list(paths)
109
+ will_skip = set()
110
+
111
+ # Determine folders and files
112
+ folders = set()
113
+ files = set()
114
+ for path in will_remove:
115
+ if path.endswith(".pyc"):
116
+ continue
117
+ if path.endswith("__init__.py") or ".dist-info" in path:
118
+ folders.add(os.path.dirname(path))
119
+ files.add(path)
120
+
121
+ folders = compact(folders)
122
+
123
+ # This walks the tree using os.walk to not miss extra folders
124
+ # that might get added.
125
+ for folder in folders:
126
+ for dirpath, _, dirfiles in os.walk(folder):
127
+ for fname in dirfiles:
128
+ if fname.endswith(".pyc"):
129
+ continue
130
+
131
+ file_ = os.path.normcase(os.path.join(dirpath, fname))
132
+ if os.path.isfile(file_) and file_ not in files:
133
+ # We are skipping this file. Add it to the set.
134
+ will_skip.add(file_)
135
+
136
+ will_remove = files | {
137
+ os.path.join(folder, "*") for folder in folders
138
+ }
139
+
140
+ return will_remove, will_skip
141
+
142
+
143
+ class UninstallPathSet(object):
144
+ """A set of file paths to be removed in the uninstallation of a
145
+ requirement."""
146
+ def __init__(self, dist):
147
+ self.paths = set()
148
+ self._refuse = set()
149
+ self.pth = {}
150
+ self.dist = dist
151
+ self.save_dir = TempDirectory(kind="uninstall")
152
+ self._moved_paths = []
153
+
154
+ def _permitted(self, path):
155
+ """
156
+ Return True if the given path is one we are permitted to
157
+ remove/modify, False otherwise.
158
+
159
+ """
160
+ return is_local(path)
161
+
162
+ def add(self, path):
163
+ head, tail = os.path.split(path)
164
+
165
+ # we normalize the head to resolve parent directory symlinks, but not
166
+ # the tail, since we only want to uninstall symlinks, not their targets
167
+ path = os.path.join(normalize_path(head), os.path.normcase(tail))
168
+
169
+ if not os.path.exists(path):
170
+ return
171
+ if self._permitted(path):
172
+ self.paths.add(path)
173
+ else:
174
+ self._refuse.add(path)
175
+
176
+ # __pycache__ files can show up after 'installed-files.txt' is created,
177
+ # due to imports
178
+ if os.path.splitext(path)[1] == '.py' and uses_pycache:
179
+ self.add(cache_from_source(path))
180
+
181
+ def add_pth(self, pth_file, entry):
182
+ pth_file = normalize_path(pth_file)
183
+ if self._permitted(pth_file):
184
+ if pth_file not in self.pth:
185
+ self.pth[pth_file] = UninstallPthEntries(pth_file)
186
+ self.pth[pth_file].add(entry)
187
+ else:
188
+ self._refuse.add(pth_file)
189
+
190
+ def _stash(self, path):
191
+ return os.path.join(
192
+ self.save_dir.path, os.path.splitdrive(path)[1].lstrip(os.path.sep)
193
+ )
194
+
195
+ def remove(self, auto_confirm=False, verbose=False):
196
+ """Remove paths in ``self.paths`` with confirmation (unless
197
+ ``auto_confirm`` is True)."""
198
+
199
+ if not self.paths:
200
+ logger.info(
201
+ "Can't uninstall '%s'. No files were found to uninstall.",
202
+ self.dist.project_name,
203
+ )
204
+ return
205
+
206
+ dist_name_version = (
207
+ self.dist.project_name + "-" + self.dist.version
208
+ )
209
+ logger.info('Uninstalling %s:', dist_name_version)
210
+
211
+ with indent_log():
212
+ if auto_confirm or self._allowed_to_proceed(verbose):
213
+ self.save_dir.create()
214
+
215
+ for path in sorted(compact(self.paths)):
216
+ new_path = self._stash(path)
217
+ logger.debug('Removing file or directory %s', path)
218
+ self._moved_paths.append(path)
219
+ renames(path, new_path)
220
+ for pth in self.pth.values():
221
+ pth.remove()
222
+
223
+ logger.info('Successfully uninstalled %s', dist_name_version)
224
+
225
+ def _allowed_to_proceed(self, verbose):
226
+ """Display which files would be deleted and prompt for confirmation
227
+ """
228
+
229
+ def _display(msg, paths):
230
+ if not paths:
231
+ return
232
+
233
+ logger.info(msg)
234
+ with indent_log():
235
+ for path in sorted(compact(paths)):
236
+ logger.info(path)
237
+
238
+ if not verbose:
239
+ will_remove, will_skip = compress_for_output_listing(self.paths)
240
+ else:
241
+ # In verbose mode, display all the files that are going to be
242
+ # deleted.
243
+ will_remove = list(self.paths)
244
+ will_skip = set()
245
+
246
+ _display('Would remove:', will_remove)
247
+ _display('Would not remove (might be manually added):', will_skip)
248
+ _display('Would not remove (outside of prefix):', self._refuse)
249
+
250
+ return ask('Proceed (y/n)? ', ('y', 'n')) == 'y'
251
+
252
+ def rollback(self):
253
+ """Rollback the changes previously made by remove()."""
254
+ if self.save_dir.path is None:
255
+ logger.error(
256
+ "Can't roll back %s; was not uninstalled",
257
+ self.dist.project_name,
258
+ )
259
+ return False
260
+ logger.info('Rolling back uninstall of %s', self.dist.project_name)
261
+ for path in self._moved_paths:
262
+ tmp_path = self._stash(path)
263
+ logger.debug('Replacing %s', path)
264
+ renames(tmp_path, path)
265
+ for pth in self.pth.values():
266
+ pth.rollback()
267
+
268
+ def commit(self):
269
+ """Remove temporary save dir: rollback will no longer be possible."""
270
+ self.save_dir.cleanup()
271
+ self._moved_paths = []
272
+
273
+ @classmethod
274
+ def from_dist(cls, dist):
275
+ dist_path = normalize_path(dist.location)
276
+ if not dist_is_local(dist):
277
+ logger.info(
278
+ "Not uninstalling %s at %s, outside environment %s",
279
+ dist.key,
280
+ dist_path,
281
+ sys.prefix,
282
+ )
283
+ return cls(dist)
284
+
285
+ if dist_path in {p for p in {sysconfig.get_path("stdlib"),
286
+ sysconfig.get_path("platstdlib")}
287
+ if p}:
288
+ logger.info(
289
+ "Not uninstalling %s at %s, as it is in the standard library.",
290
+ dist.key,
291
+ dist_path,
292
+ )
293
+ return cls(dist)
294
+
295
+ paths_to_remove = cls(dist)
296
+ develop_egg_link = egg_link_path(dist)
297
+ develop_egg_link_egg_info = '{}.egg-info'.format(
298
+ pkg_resources.to_filename(dist.project_name))
299
+ egg_info_exists = dist.egg_info and os.path.exists(dist.egg_info)
300
+ # Special case for distutils installed package
301
+ distutils_egg_info = getattr(dist._provider, 'path', None)
302
+
303
+ # Uninstall cases order do matter as in the case of 2 installs of the
304
+ # same package, pip needs to uninstall the currently detected version
305
+ if (egg_info_exists and dist.egg_info.endswith('.egg-info') and
306
+ not dist.egg_info.endswith(develop_egg_link_egg_info)):
307
+ # if dist.egg_info.endswith(develop_egg_link_egg_info), we
308
+ # are in fact in the develop_egg_link case
309
+ paths_to_remove.add(dist.egg_info)
310
+ if dist.has_metadata('installed-files.txt'):
311
+ for installed_file in dist.get_metadata(
312
+ 'installed-files.txt').splitlines():
313
+ path = os.path.normpath(
314
+ os.path.join(dist.egg_info, installed_file)
315
+ )
316
+ paths_to_remove.add(path)
317
+ # FIXME: need a test for this elif block
318
+ # occurs with --single-version-externally-managed/--record outside
319
+ # of pip
320
+ elif dist.has_metadata('top_level.txt'):
321
+ if dist.has_metadata('namespace_packages.txt'):
322
+ namespaces = dist.get_metadata('namespace_packages.txt')
323
+ else:
324
+ namespaces = []
325
+ for top_level_pkg in [
326
+ p for p
327
+ in dist.get_metadata('top_level.txt').splitlines()
328
+ if p and p not in namespaces]:
329
+ path = os.path.join(dist.location, top_level_pkg)
330
+ paths_to_remove.add(path)
331
+ paths_to_remove.add(path + '.py')
332
+ paths_to_remove.add(path + '.pyc')
333
+ paths_to_remove.add(path + '.pyo')
334
+
335
+ elif distutils_egg_info:
336
+ raise UninstallationError(
337
+ "Cannot uninstall {!r}. It is a distutils installed project "
338
+ "and thus we cannot accurately determine which files belong "
339
+ "to it which would lead to only a partial uninstall.".format(
340
+ dist.project_name,
341
+ )
342
+ )
343
+
344
+ elif dist.location.endswith('.egg'):
345
+ # package installed by easy_install
346
+ # We cannot match on dist.egg_name because it can slightly vary
347
+ # i.e. setuptools-0.6c11-py2.6.egg vs setuptools-0.6rc11-py2.6.egg
348
+ paths_to_remove.add(dist.location)
349
+ easy_install_egg = os.path.split(dist.location)[1]
350
+ easy_install_pth = os.path.join(os.path.dirname(dist.location),
351
+ 'easy-install.pth')
352
+ paths_to_remove.add_pth(easy_install_pth, './' + easy_install_egg)
353
+
354
+ elif egg_info_exists and dist.egg_info.endswith('.dist-info'):
355
+ for path in uninstallation_paths(dist):
356
+ paths_to_remove.add(path)
357
+
358
+ elif develop_egg_link:
359
+ # develop egg
360
+ with open(develop_egg_link, 'r') as fh:
361
+ link_pointer = os.path.normcase(fh.readline().strip())
362
+ assert (link_pointer == dist.location), (
363
+ 'Egg-link %s does not match installed location of %s '
364
+ '(at %s)' % (link_pointer, dist.project_name, dist.location)
365
+ )
366
+ paths_to_remove.add(develop_egg_link)
367
+ easy_install_pth = os.path.join(os.path.dirname(develop_egg_link),
368
+ 'easy-install.pth')
369
+ paths_to_remove.add_pth(easy_install_pth, dist.location)
370
+
371
+ else:
372
+ logger.debug(
373
+ 'Not sure how to uninstall: %s - Check: %s',
374
+ dist, dist.location,
375
+ )
376
+
377
+ # find distutils scripts= scripts
378
+ if dist.has_metadata('scripts') and dist.metadata_isdir('scripts'):
379
+ for script in dist.metadata_listdir('scripts'):
380
+ if dist_in_usersite(dist):
381
+ bin_dir = bin_user
382
+ else:
383
+ bin_dir = bin_py
384
+ paths_to_remove.add(os.path.join(bin_dir, script))
385
+ if WINDOWS:
386
+ paths_to_remove.add(os.path.join(bin_dir, script) + '.bat')
387
+
388
+ # find console_scripts
389
+ _scripts_to_remove = []
390
+ console_scripts = dist.get_entry_map(group='console_scripts')
391
+ for name in console_scripts.keys():
392
+ _scripts_to_remove.extend(_script_names(dist, name, False))
393
+ # find gui_scripts
394
+ gui_scripts = dist.get_entry_map(group='gui_scripts')
395
+ for name in gui_scripts.keys():
396
+ _scripts_to_remove.extend(_script_names(dist, name, True))
397
+
398
+ for s in _scripts_to_remove:
399
+ paths_to_remove.add(s)
400
+
401
+ return paths_to_remove
402
+
403
+
404
+ class UninstallPthEntries(object):
405
+ def __init__(self, pth_file):
406
+ if not os.path.isfile(pth_file):
407
+ raise UninstallationError(
408
+ "Cannot remove entries from nonexistent file %s" % pth_file
409
+ )
410
+ self.file = pth_file
411
+ self.entries = set()
412
+ self._saved_lines = None
413
+
414
+ def add(self, entry):
415
+ entry = os.path.normcase(entry)
416
+ # On Windows, os.path.normcase converts the entry to use
417
+ # backslashes. This is correct for entries that describe absolute
418
+ # paths outside of site-packages, but all the others use forward
419
+ # slashes.
420
+ if WINDOWS and not os.path.splitdrive(entry)[0]:
421
+ entry = entry.replace('\\', '/')
422
+ self.entries.add(entry)
423
+
424
+ def remove(self):
425
+ logger.debug('Removing pth entries from %s:', self.file)
426
+ with open(self.file, 'rb') as fh:
427
+ # windows uses '\r\n' with py3k, but uses '\n' with py2.x
428
+ lines = fh.readlines()
429
+ self._saved_lines = lines
430
+ if any(b'\r\n' in line for line in lines):
431
+ endline = '\r\n'
432
+ else:
433
+ endline = '\n'
434
+ # handle missing trailing newline
435
+ if lines and not lines[-1].endswith(endline.encode("utf-8")):
436
+ lines[-1] = lines[-1] + endline.encode("utf-8")
437
+ for entry in self.entries:
438
+ try:
439
+ logger.debug('Removing entry: %s', entry)
440
+ lines.remove((entry + endline).encode("utf-8"))
441
+ except ValueError:
442
+ pass
443
+ with open(self.file, 'wb') as fh:
444
+ fh.writelines(lines)
445
+
446
+ def rollback(self):
447
+ if self._saved_lines is None:
448
+ logger.error(
449
+ 'Cannot roll back changes to %s, none were made', self.file
450
+ )
451
+ return False
452
+ logger.debug('Rolling %s back to previous state', self.file)
453
+ with open(self.file, 'wb') as fh:
454
+ fh.writelines(self._saved_lines)
455
+ return True