xplia 1.0.1__py3-none-any.whl

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 (870) hide show
  1. venv/Lib/site-packages/_distutils_hack/__init__.py +222 -0
  2. venv/Lib/site-packages/_distutils_hack/override.py +1 -0
  3. venv/Lib/site-packages/pip/__init__.py +13 -0
  4. venv/Lib/site-packages/pip/__main__.py +24 -0
  5. venv/Lib/site-packages/pip/__pip-runner__.py +50 -0
  6. venv/Lib/site-packages/pip/_internal/__init__.py +19 -0
  7. venv/Lib/site-packages/pip/_internal/build_env.py +311 -0
  8. venv/Lib/site-packages/pip/_internal/cache.py +292 -0
  9. venv/Lib/site-packages/pip/_internal/cli/__init__.py +4 -0
  10. venv/Lib/site-packages/pip/_internal/cli/autocompletion.py +171 -0
  11. venv/Lib/site-packages/pip/_internal/cli/base_command.py +236 -0
  12. venv/Lib/site-packages/pip/_internal/cli/cmdoptions.py +1074 -0
  13. venv/Lib/site-packages/pip/_internal/cli/command_context.py +27 -0
  14. venv/Lib/site-packages/pip/_internal/cli/main.py +79 -0
  15. venv/Lib/site-packages/pip/_internal/cli/main_parser.py +134 -0
  16. venv/Lib/site-packages/pip/_internal/cli/parser.py +294 -0
  17. venv/Lib/site-packages/pip/_internal/cli/progress_bars.py +68 -0
  18. venv/Lib/site-packages/pip/_internal/cli/req_command.py +508 -0
  19. venv/Lib/site-packages/pip/_internal/cli/spinners.py +159 -0
  20. venv/Lib/site-packages/pip/_internal/cli/status_codes.py +6 -0
  21. venv/Lib/site-packages/pip/_internal/commands/__init__.py +132 -0
  22. venv/Lib/site-packages/pip/_internal/commands/cache.py +222 -0
  23. venv/Lib/site-packages/pip/_internal/commands/check.py +54 -0
  24. venv/Lib/site-packages/pip/_internal/commands/completion.py +121 -0
  25. venv/Lib/site-packages/pip/_internal/commands/configuration.py +282 -0
  26. venv/Lib/site-packages/pip/_internal/commands/debug.py +199 -0
  27. venv/Lib/site-packages/pip/_internal/commands/download.py +147 -0
  28. venv/Lib/site-packages/pip/_internal/commands/freeze.py +108 -0
  29. venv/Lib/site-packages/pip/_internal/commands/hash.py +59 -0
  30. venv/Lib/site-packages/pip/_internal/commands/help.py +41 -0
  31. venv/Lib/site-packages/pip/_internal/commands/index.py +139 -0
  32. venv/Lib/site-packages/pip/_internal/commands/inspect.py +92 -0
  33. venv/Lib/site-packages/pip/_internal/commands/install.py +778 -0
  34. venv/Lib/site-packages/pip/_internal/commands/list.py +368 -0
  35. venv/Lib/site-packages/pip/_internal/commands/search.py +174 -0
  36. venv/Lib/site-packages/pip/_internal/commands/show.py +189 -0
  37. venv/Lib/site-packages/pip/_internal/commands/uninstall.py +113 -0
  38. venv/Lib/site-packages/pip/_internal/commands/wheel.py +183 -0
  39. venv/Lib/site-packages/pip/_internal/configuration.py +381 -0
  40. venv/Lib/site-packages/pip/_internal/distributions/__init__.py +21 -0
  41. venv/Lib/site-packages/pip/_internal/distributions/base.py +39 -0
  42. venv/Lib/site-packages/pip/_internal/distributions/installed.py +23 -0
  43. venv/Lib/site-packages/pip/_internal/distributions/sdist.py +150 -0
  44. venv/Lib/site-packages/pip/_internal/distributions/wheel.py +34 -0
  45. venv/Lib/site-packages/pip/_internal/exceptions.py +733 -0
  46. venv/Lib/site-packages/pip/_internal/index/__init__.py +2 -0
  47. venv/Lib/site-packages/pip/_internal/index/collector.py +505 -0
  48. venv/Lib/site-packages/pip/_internal/index/package_finder.py +1029 -0
  49. venv/Lib/site-packages/pip/_internal/index/sources.py +223 -0
  50. venv/Lib/site-packages/pip/_internal/locations/__init__.py +467 -0
  51. venv/Lib/site-packages/pip/_internal/locations/_distutils.py +173 -0
  52. venv/Lib/site-packages/pip/_internal/locations/_sysconfig.py +213 -0
  53. venv/Lib/site-packages/pip/_internal/locations/base.py +81 -0
  54. venv/Lib/site-packages/pip/_internal/main.py +12 -0
  55. venv/Lib/site-packages/pip/_internal/metadata/__init__.py +127 -0
  56. venv/Lib/site-packages/pip/_internal/metadata/_json.py +84 -0
  57. venv/Lib/site-packages/pip/_internal/metadata/base.py +688 -0
  58. venv/Lib/site-packages/pip/_internal/metadata/importlib/__init__.py +4 -0
  59. venv/Lib/site-packages/pip/_internal/metadata/importlib/_compat.py +55 -0
  60. venv/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +224 -0
  61. venv/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +188 -0
  62. venv/Lib/site-packages/pip/_internal/metadata/pkg_resources.py +270 -0
  63. venv/Lib/site-packages/pip/_internal/models/__init__.py +2 -0
  64. venv/Lib/site-packages/pip/_internal/models/candidate.py +34 -0
  65. venv/Lib/site-packages/pip/_internal/models/direct_url.py +237 -0
  66. venv/Lib/site-packages/pip/_internal/models/format_control.py +80 -0
  67. venv/Lib/site-packages/pip/_internal/models/index.py +28 -0
  68. venv/Lib/site-packages/pip/_internal/models/installation_report.py +53 -0
  69. venv/Lib/site-packages/pip/_internal/models/link.py +581 -0
  70. venv/Lib/site-packages/pip/_internal/models/scheme.py +31 -0
  71. venv/Lib/site-packages/pip/_internal/models/search_scope.py +132 -0
  72. venv/Lib/site-packages/pip/_internal/models/selection_prefs.py +51 -0
  73. venv/Lib/site-packages/pip/_internal/models/target_python.py +110 -0
  74. venv/Lib/site-packages/pip/_internal/models/wheel.py +92 -0
  75. venv/Lib/site-packages/pip/_internal/network/__init__.py +2 -0
  76. venv/Lib/site-packages/pip/_internal/network/auth.py +561 -0
  77. venv/Lib/site-packages/pip/_internal/network/cache.py +69 -0
  78. venv/Lib/site-packages/pip/_internal/network/download.py +186 -0
  79. venv/Lib/site-packages/pip/_internal/network/lazy_wheel.py +210 -0
  80. venv/Lib/site-packages/pip/_internal/network/session.py +519 -0
  81. venv/Lib/site-packages/pip/_internal/network/utils.py +96 -0
  82. venv/Lib/site-packages/pip/_internal/network/xmlrpc.py +60 -0
  83. venv/Lib/site-packages/pip/_internal/operations/__init__.py +0 -0
  84. venv/Lib/site-packages/pip/_internal/operations/build/__init__.py +0 -0
  85. venv/Lib/site-packages/pip/_internal/operations/build/build_tracker.py +124 -0
  86. venv/Lib/site-packages/pip/_internal/operations/build/metadata.py +39 -0
  87. venv/Lib/site-packages/pip/_internal/operations/build/metadata_editable.py +41 -0
  88. venv/Lib/site-packages/pip/_internal/operations/build/metadata_legacy.py +74 -0
  89. venv/Lib/site-packages/pip/_internal/operations/build/wheel.py +37 -0
  90. venv/Lib/site-packages/pip/_internal/operations/build/wheel_editable.py +46 -0
  91. venv/Lib/site-packages/pip/_internal/operations/build/wheel_legacy.py +102 -0
  92. venv/Lib/site-packages/pip/_internal/operations/check.py +187 -0
  93. venv/Lib/site-packages/pip/_internal/operations/freeze.py +255 -0
  94. venv/Lib/site-packages/pip/_internal/operations/install/__init__.py +2 -0
  95. venv/Lib/site-packages/pip/_internal/operations/install/editable_legacy.py +46 -0
  96. venv/Lib/site-packages/pip/_internal/operations/install/wheel.py +740 -0
  97. venv/Lib/site-packages/pip/_internal/operations/prepare.py +743 -0
  98. venv/Lib/site-packages/pip/_internal/pyproject.py +179 -0
  99. venv/Lib/site-packages/pip/_internal/req/__init__.py +92 -0
  100. venv/Lib/site-packages/pip/_internal/req/constructors.py +506 -0
  101. venv/Lib/site-packages/pip/_internal/req/req_file.py +552 -0
  102. venv/Lib/site-packages/pip/_internal/req/req_install.py +874 -0
  103. venv/Lib/site-packages/pip/_internal/req/req_set.py +119 -0
  104. venv/Lib/site-packages/pip/_internal/req/req_uninstall.py +650 -0
  105. venv/Lib/site-packages/pip/_internal/resolution/__init__.py +0 -0
  106. venv/Lib/site-packages/pip/_internal/resolution/base.py +20 -0
  107. venv/Lib/site-packages/pip/_internal/resolution/legacy/__init__.py +0 -0
  108. venv/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +600 -0
  109. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/__init__.py +0 -0
  110. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +141 -0
  111. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +555 -0
  112. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +730 -0
  113. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +155 -0
  114. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +255 -0
  115. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/reporter.py +80 -0
  116. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/requirements.py +165 -0
  117. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +299 -0
  118. venv/Lib/site-packages/pip/_internal/self_outdated_check.py +242 -0
  119. venv/Lib/site-packages/pip/_internal/utils/__init__.py +0 -0
  120. venv/Lib/site-packages/pip/_internal/utils/_jaraco_text.py +109 -0
  121. venv/Lib/site-packages/pip/_internal/utils/_log.py +38 -0
  122. venv/Lib/site-packages/pip/_internal/utils/appdirs.py +52 -0
  123. venv/Lib/site-packages/pip/_internal/utils/compat.py +63 -0
  124. venv/Lib/site-packages/pip/_internal/utils/compatibility_tags.py +165 -0
  125. venv/Lib/site-packages/pip/_internal/utils/datetime.py +11 -0
  126. venv/Lib/site-packages/pip/_internal/utils/deprecation.py +120 -0
  127. venv/Lib/site-packages/pip/_internal/utils/direct_url_helpers.py +87 -0
  128. venv/Lib/site-packages/pip/_internal/utils/egg_link.py +72 -0
  129. venv/Lib/site-packages/pip/_internal/utils/encoding.py +36 -0
  130. venv/Lib/site-packages/pip/_internal/utils/entrypoints.py +84 -0
  131. venv/Lib/site-packages/pip/_internal/utils/filesystem.py +153 -0
  132. venv/Lib/site-packages/pip/_internal/utils/filetypes.py +27 -0
  133. venv/Lib/site-packages/pip/_internal/utils/glibc.py +88 -0
  134. venv/Lib/site-packages/pip/_internal/utils/hashes.py +151 -0
  135. venv/Lib/site-packages/pip/_internal/utils/inject_securetransport.py +35 -0
  136. venv/Lib/site-packages/pip/_internal/utils/logging.py +348 -0
  137. venv/Lib/site-packages/pip/_internal/utils/misc.py +735 -0
  138. venv/Lib/site-packages/pip/_internal/utils/models.py +39 -0
  139. venv/Lib/site-packages/pip/_internal/utils/packaging.py +57 -0
  140. venv/Lib/site-packages/pip/_internal/utils/setuptools_build.py +146 -0
  141. venv/Lib/site-packages/pip/_internal/utils/subprocess.py +260 -0
  142. venv/Lib/site-packages/pip/_internal/utils/temp_dir.py +246 -0
  143. venv/Lib/site-packages/pip/_internal/utils/unpacking.py +257 -0
  144. venv/Lib/site-packages/pip/_internal/utils/urls.py +62 -0
  145. venv/Lib/site-packages/pip/_internal/utils/virtualenv.py +104 -0
  146. venv/Lib/site-packages/pip/_internal/utils/wheel.py +136 -0
  147. venv/Lib/site-packages/pip/_internal/vcs/__init__.py +15 -0
  148. venv/Lib/site-packages/pip/_internal/vcs/bazaar.py +112 -0
  149. venv/Lib/site-packages/pip/_internal/vcs/git.py +526 -0
  150. venv/Lib/site-packages/pip/_internal/vcs/mercurial.py +163 -0
  151. venv/Lib/site-packages/pip/_internal/vcs/subversion.py +324 -0
  152. venv/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +705 -0
  153. venv/Lib/site-packages/pip/_internal/wheel_builder.py +355 -0
  154. venv/Lib/site-packages/pip/_vendor/__init__.py +120 -0
  155. venv/Lib/site-packages/pip/_vendor/cachecontrol/__init__.py +18 -0
  156. venv/Lib/site-packages/pip/_vendor/cachecontrol/_cmd.py +61 -0
  157. venv/Lib/site-packages/pip/_vendor/cachecontrol/adapter.py +137 -0
  158. venv/Lib/site-packages/pip/_vendor/cachecontrol/cache.py +65 -0
  159. venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +9 -0
  160. venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +188 -0
  161. venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +39 -0
  162. venv/Lib/site-packages/pip/_vendor/cachecontrol/compat.py +32 -0
  163. venv/Lib/site-packages/pip/_vendor/cachecontrol/controller.py +439 -0
  164. venv/Lib/site-packages/pip/_vendor/cachecontrol/filewrapper.py +111 -0
  165. venv/Lib/site-packages/pip/_vendor/cachecontrol/heuristics.py +139 -0
  166. venv/Lib/site-packages/pip/_vendor/cachecontrol/serialize.py +190 -0
  167. venv/Lib/site-packages/pip/_vendor/cachecontrol/wrapper.py +33 -0
  168. venv/Lib/site-packages/pip/_vendor/certifi/__init__.py +4 -0
  169. venv/Lib/site-packages/pip/_vendor/certifi/__main__.py +12 -0
  170. venv/Lib/site-packages/pip/_vendor/certifi/core.py +108 -0
  171. venv/Lib/site-packages/pip/_vendor/chardet/__init__.py +115 -0
  172. venv/Lib/site-packages/pip/_vendor/chardet/big5freq.py +386 -0
  173. venv/Lib/site-packages/pip/_vendor/chardet/big5prober.py +47 -0
  174. venv/Lib/site-packages/pip/_vendor/chardet/chardistribution.py +261 -0
  175. venv/Lib/site-packages/pip/_vendor/chardet/charsetgroupprober.py +106 -0
  176. venv/Lib/site-packages/pip/_vendor/chardet/charsetprober.py +147 -0
  177. venv/Lib/site-packages/pip/_vendor/chardet/cli/__init__.py +0 -0
  178. venv/Lib/site-packages/pip/_vendor/chardet/cli/chardetect.py +112 -0
  179. venv/Lib/site-packages/pip/_vendor/chardet/codingstatemachine.py +90 -0
  180. venv/Lib/site-packages/pip/_vendor/chardet/codingstatemachinedict.py +19 -0
  181. venv/Lib/site-packages/pip/_vendor/chardet/cp949prober.py +49 -0
  182. venv/Lib/site-packages/pip/_vendor/chardet/enums.py +85 -0
  183. venv/Lib/site-packages/pip/_vendor/chardet/escprober.py +102 -0
  184. venv/Lib/site-packages/pip/_vendor/chardet/escsm.py +261 -0
  185. venv/Lib/site-packages/pip/_vendor/chardet/eucjpprober.py +102 -0
  186. venv/Lib/site-packages/pip/_vendor/chardet/euckrfreq.py +196 -0
  187. venv/Lib/site-packages/pip/_vendor/chardet/euckrprober.py +47 -0
  188. venv/Lib/site-packages/pip/_vendor/chardet/euctwfreq.py +388 -0
  189. venv/Lib/site-packages/pip/_vendor/chardet/euctwprober.py +47 -0
  190. venv/Lib/site-packages/pip/_vendor/chardet/gb2312freq.py +284 -0
  191. venv/Lib/site-packages/pip/_vendor/chardet/gb2312prober.py +47 -0
  192. venv/Lib/site-packages/pip/_vendor/chardet/hebrewprober.py +316 -0
  193. venv/Lib/site-packages/pip/_vendor/chardet/jisfreq.py +325 -0
  194. venv/Lib/site-packages/pip/_vendor/chardet/johabfreq.py +2382 -0
  195. venv/Lib/site-packages/pip/_vendor/chardet/johabprober.py +47 -0
  196. venv/Lib/site-packages/pip/_vendor/chardet/jpcntx.py +238 -0
  197. venv/Lib/site-packages/pip/_vendor/chardet/langbulgarianmodel.py +4649 -0
  198. venv/Lib/site-packages/pip/_vendor/chardet/langgreekmodel.py +4397 -0
  199. venv/Lib/site-packages/pip/_vendor/chardet/langhebrewmodel.py +4380 -0
  200. venv/Lib/site-packages/pip/_vendor/chardet/langhungarianmodel.py +4649 -0
  201. venv/Lib/site-packages/pip/_vendor/chardet/langrussianmodel.py +5725 -0
  202. venv/Lib/site-packages/pip/_vendor/chardet/langthaimodel.py +4380 -0
  203. venv/Lib/site-packages/pip/_vendor/chardet/langturkishmodel.py +4380 -0
  204. venv/Lib/site-packages/pip/_vendor/chardet/latin1prober.py +147 -0
  205. venv/Lib/site-packages/pip/_vendor/chardet/macromanprober.py +162 -0
  206. venv/Lib/site-packages/pip/_vendor/chardet/mbcharsetprober.py +95 -0
  207. venv/Lib/site-packages/pip/_vendor/chardet/mbcsgroupprober.py +57 -0
  208. venv/Lib/site-packages/pip/_vendor/chardet/mbcssm.py +661 -0
  209. venv/Lib/site-packages/pip/_vendor/chardet/metadata/__init__.py +0 -0
  210. venv/Lib/site-packages/pip/_vendor/chardet/metadata/languages.py +352 -0
  211. venv/Lib/site-packages/pip/_vendor/chardet/resultdict.py +16 -0
  212. venv/Lib/site-packages/pip/_vendor/chardet/sbcharsetprober.py +162 -0
  213. venv/Lib/site-packages/pip/_vendor/chardet/sbcsgroupprober.py +88 -0
  214. venv/Lib/site-packages/pip/_vendor/chardet/sjisprober.py +105 -0
  215. venv/Lib/site-packages/pip/_vendor/chardet/universaldetector.py +362 -0
  216. venv/Lib/site-packages/pip/_vendor/chardet/utf1632prober.py +225 -0
  217. venv/Lib/site-packages/pip/_vendor/chardet/utf8prober.py +82 -0
  218. venv/Lib/site-packages/pip/_vendor/chardet/version.py +9 -0
  219. venv/Lib/site-packages/pip/_vendor/colorama/__init__.py +7 -0
  220. venv/Lib/site-packages/pip/_vendor/colorama/ansi.py +102 -0
  221. venv/Lib/site-packages/pip/_vendor/colorama/ansitowin32.py +277 -0
  222. venv/Lib/site-packages/pip/_vendor/colorama/initialise.py +121 -0
  223. venv/Lib/site-packages/pip/_vendor/colorama/tests/__init__.py +1 -0
  224. venv/Lib/site-packages/pip/_vendor/colorama/tests/ansi_test.py +76 -0
  225. venv/Lib/site-packages/pip/_vendor/colorama/tests/ansitowin32_test.py +294 -0
  226. venv/Lib/site-packages/pip/_vendor/colorama/tests/initialise_test.py +189 -0
  227. venv/Lib/site-packages/pip/_vendor/colorama/tests/isatty_test.py +57 -0
  228. venv/Lib/site-packages/pip/_vendor/colorama/tests/utils.py +49 -0
  229. venv/Lib/site-packages/pip/_vendor/colorama/tests/winterm_test.py +131 -0
  230. venv/Lib/site-packages/pip/_vendor/colorama/win32.py +180 -0
  231. venv/Lib/site-packages/pip/_vendor/colorama/winterm.py +195 -0
  232. venv/Lib/site-packages/pip/_vendor/distlib/__init__.py +23 -0
  233. venv/Lib/site-packages/pip/_vendor/distlib/compat.py +1116 -0
  234. venv/Lib/site-packages/pip/_vendor/distlib/database.py +1350 -0
  235. venv/Lib/site-packages/pip/_vendor/distlib/index.py +508 -0
  236. venv/Lib/site-packages/pip/_vendor/distlib/locators.py +1300 -0
  237. venv/Lib/site-packages/pip/_vendor/distlib/manifest.py +393 -0
  238. venv/Lib/site-packages/pip/_vendor/distlib/markers.py +152 -0
  239. venv/Lib/site-packages/pip/_vendor/distlib/metadata.py +1076 -0
  240. venv/Lib/site-packages/pip/_vendor/distlib/resources.py +358 -0
  241. venv/Lib/site-packages/pip/_vendor/distlib/scripts.py +437 -0
  242. venv/Lib/site-packages/pip/_vendor/distlib/util.py +1932 -0
  243. venv/Lib/site-packages/pip/_vendor/distlib/version.py +739 -0
  244. venv/Lib/site-packages/pip/_vendor/distlib/wheel.py +1082 -0
  245. venv/Lib/site-packages/pip/_vendor/distro/__init__.py +54 -0
  246. venv/Lib/site-packages/pip/_vendor/distro/__main__.py +4 -0
  247. venv/Lib/site-packages/pip/_vendor/distro/distro.py +1399 -0
  248. venv/Lib/site-packages/pip/_vendor/idna/__init__.py +44 -0
  249. venv/Lib/site-packages/pip/_vendor/idna/codec.py +112 -0
  250. venv/Lib/site-packages/pip/_vendor/idna/compat.py +13 -0
  251. venv/Lib/site-packages/pip/_vendor/idna/core.py +400 -0
  252. venv/Lib/site-packages/pip/_vendor/idna/idnadata.py +2151 -0
  253. venv/Lib/site-packages/pip/_vendor/idna/intranges.py +54 -0
  254. venv/Lib/site-packages/pip/_vendor/idna/package_data.py +2 -0
  255. venv/Lib/site-packages/pip/_vendor/idna/uts46data.py +8600 -0
  256. venv/Lib/site-packages/pip/_vendor/msgpack/__init__.py +57 -0
  257. venv/Lib/site-packages/pip/_vendor/msgpack/exceptions.py +48 -0
  258. venv/Lib/site-packages/pip/_vendor/msgpack/ext.py +193 -0
  259. venv/Lib/site-packages/pip/_vendor/msgpack/fallback.py +1010 -0
  260. venv/Lib/site-packages/pip/_vendor/packaging/__about__.py +26 -0
  261. venv/Lib/site-packages/pip/_vendor/packaging/__init__.py +25 -0
  262. venv/Lib/site-packages/pip/_vendor/packaging/_manylinux.py +301 -0
  263. venv/Lib/site-packages/pip/_vendor/packaging/_musllinux.py +136 -0
  264. venv/Lib/site-packages/pip/_vendor/packaging/_structures.py +61 -0
  265. venv/Lib/site-packages/pip/_vendor/packaging/markers.py +304 -0
  266. venv/Lib/site-packages/pip/_vendor/packaging/requirements.py +146 -0
  267. venv/Lib/site-packages/pip/_vendor/packaging/specifiers.py +802 -0
  268. venv/Lib/site-packages/pip/_vendor/packaging/tags.py +487 -0
  269. venv/Lib/site-packages/pip/_vendor/packaging/utils.py +136 -0
  270. venv/Lib/site-packages/pip/_vendor/packaging/version.py +504 -0
  271. venv/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py +3361 -0
  272. venv/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +566 -0
  273. venv/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +53 -0
  274. venv/Lib/site-packages/pip/_vendor/platformdirs/android.py +210 -0
  275. venv/Lib/site-packages/pip/_vendor/platformdirs/api.py +223 -0
  276. venv/Lib/site-packages/pip/_vendor/platformdirs/macos.py +91 -0
  277. venv/Lib/site-packages/pip/_vendor/platformdirs/unix.py +223 -0
  278. venv/Lib/site-packages/pip/_vendor/platformdirs/version.py +4 -0
  279. venv/Lib/site-packages/pip/_vendor/platformdirs/windows.py +255 -0
  280. venv/Lib/site-packages/pip/_vendor/pygments/__init__.py +82 -0
  281. venv/Lib/site-packages/pip/_vendor/pygments/__main__.py +17 -0
  282. venv/Lib/site-packages/pip/_vendor/pygments/cmdline.py +668 -0
  283. venv/Lib/site-packages/pip/_vendor/pygments/console.py +70 -0
  284. venv/Lib/site-packages/pip/_vendor/pygments/filter.py +71 -0
  285. venv/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +940 -0
  286. venv/Lib/site-packages/pip/_vendor/pygments/formatter.py +124 -0
  287. venv/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +158 -0
  288. venv/Lib/site-packages/pip/_vendor/pygments/formatters/_mapping.py +23 -0
  289. venv/Lib/site-packages/pip/_vendor/pygments/formatters/bbcode.py +108 -0
  290. venv/Lib/site-packages/pip/_vendor/pygments/formatters/groff.py +170 -0
  291. venv/Lib/site-packages/pip/_vendor/pygments/formatters/html.py +989 -0
  292. venv/Lib/site-packages/pip/_vendor/pygments/formatters/img.py +645 -0
  293. venv/Lib/site-packages/pip/_vendor/pygments/formatters/irc.py +154 -0
  294. venv/Lib/site-packages/pip/_vendor/pygments/formatters/latex.py +521 -0
  295. venv/Lib/site-packages/pip/_vendor/pygments/formatters/other.py +161 -0
  296. venv/Lib/site-packages/pip/_vendor/pygments/formatters/pangomarkup.py +83 -0
  297. venv/Lib/site-packages/pip/_vendor/pygments/formatters/rtf.py +146 -0
  298. venv/Lib/site-packages/pip/_vendor/pygments/formatters/svg.py +188 -0
  299. venv/Lib/site-packages/pip/_vendor/pygments/formatters/terminal.py +127 -0
  300. venv/Lib/site-packages/pip/_vendor/pygments/formatters/terminal256.py +338 -0
  301. venv/Lib/site-packages/pip/_vendor/pygments/lexer.py +943 -0
  302. venv/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +362 -0
  303. venv/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +559 -0
  304. venv/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +1198 -0
  305. venv/Lib/site-packages/pip/_vendor/pygments/modeline.py +43 -0
  306. venv/Lib/site-packages/pip/_vendor/pygments/plugin.py +88 -0
  307. venv/Lib/site-packages/pip/_vendor/pygments/regexopt.py +91 -0
  308. venv/Lib/site-packages/pip/_vendor/pygments/scanner.py +104 -0
  309. venv/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +217 -0
  310. venv/Lib/site-packages/pip/_vendor/pygments/style.py +197 -0
  311. venv/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +103 -0
  312. venv/Lib/site-packages/pip/_vendor/pygments/token.py +213 -0
  313. venv/Lib/site-packages/pip/_vendor/pygments/unistring.py +153 -0
  314. venv/Lib/site-packages/pip/_vendor/pygments/util.py +330 -0
  315. venv/Lib/site-packages/pip/_vendor/pyparsing/__init__.py +322 -0
  316. venv/Lib/site-packages/pip/_vendor/pyparsing/actions.py +217 -0
  317. venv/Lib/site-packages/pip/_vendor/pyparsing/common.py +432 -0
  318. venv/Lib/site-packages/pip/_vendor/pyparsing/core.py +6115 -0
  319. venv/Lib/site-packages/pip/_vendor/pyparsing/diagram/__init__.py +656 -0
  320. venv/Lib/site-packages/pip/_vendor/pyparsing/exceptions.py +299 -0
  321. venv/Lib/site-packages/pip/_vendor/pyparsing/helpers.py +1100 -0
  322. venv/Lib/site-packages/pip/_vendor/pyparsing/results.py +796 -0
  323. venv/Lib/site-packages/pip/_vendor/pyparsing/testing.py +331 -0
  324. venv/Lib/site-packages/pip/_vendor/pyparsing/unicode.py +361 -0
  325. venv/Lib/site-packages/pip/_vendor/pyparsing/util.py +284 -0
  326. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/__init__.py +23 -0
  327. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_compat.py +8 -0
  328. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_impl.py +330 -0
  329. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py +18 -0
  330. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py +353 -0
  331. venv/Lib/site-packages/pip/_vendor/requests/__init__.py +182 -0
  332. venv/Lib/site-packages/pip/_vendor/requests/__version__.py +14 -0
  333. venv/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +50 -0
  334. venv/Lib/site-packages/pip/_vendor/requests/adapters.py +538 -0
  335. venv/Lib/site-packages/pip/_vendor/requests/api.py +157 -0
  336. venv/Lib/site-packages/pip/_vendor/requests/auth.py +315 -0
  337. venv/Lib/site-packages/pip/_vendor/requests/certs.py +24 -0
  338. venv/Lib/site-packages/pip/_vendor/requests/compat.py +67 -0
  339. venv/Lib/site-packages/pip/_vendor/requests/cookies.py +561 -0
  340. venv/Lib/site-packages/pip/_vendor/requests/exceptions.py +141 -0
  341. venv/Lib/site-packages/pip/_vendor/requests/help.py +131 -0
  342. venv/Lib/site-packages/pip/_vendor/requests/hooks.py +33 -0
  343. venv/Lib/site-packages/pip/_vendor/requests/models.py +1034 -0
  344. venv/Lib/site-packages/pip/_vendor/requests/packages.py +16 -0
  345. venv/Lib/site-packages/pip/_vendor/requests/sessions.py +833 -0
  346. venv/Lib/site-packages/pip/_vendor/requests/status_codes.py +128 -0
  347. venv/Lib/site-packages/pip/_vendor/requests/structures.py +99 -0
  348. venv/Lib/site-packages/pip/_vendor/requests/utils.py +1094 -0
  349. venv/Lib/site-packages/pip/_vendor/resolvelib/__init__.py +26 -0
  350. venv/Lib/site-packages/pip/_vendor/resolvelib/compat/__init__.py +0 -0
  351. venv/Lib/site-packages/pip/_vendor/resolvelib/compat/collections_abc.py +6 -0
  352. venv/Lib/site-packages/pip/_vendor/resolvelib/providers.py +133 -0
  353. venv/Lib/site-packages/pip/_vendor/resolvelib/reporters.py +43 -0
  354. venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers.py +547 -0
  355. venv/Lib/site-packages/pip/_vendor/resolvelib/structs.py +170 -0
  356. venv/Lib/site-packages/pip/_vendor/rich/__init__.py +177 -0
  357. venv/Lib/site-packages/pip/_vendor/rich/__main__.py +274 -0
  358. venv/Lib/site-packages/pip/_vendor/rich/_cell_widths.py +451 -0
  359. venv/Lib/site-packages/pip/_vendor/rich/_emoji_codes.py +3610 -0
  360. venv/Lib/site-packages/pip/_vendor/rich/_emoji_replace.py +32 -0
  361. venv/Lib/site-packages/pip/_vendor/rich/_export_format.py +76 -0
  362. venv/Lib/site-packages/pip/_vendor/rich/_extension.py +10 -0
  363. venv/Lib/site-packages/pip/_vendor/rich/_fileno.py +24 -0
  364. venv/Lib/site-packages/pip/_vendor/rich/_inspect.py +270 -0
  365. venv/Lib/site-packages/pip/_vendor/rich/_log_render.py +94 -0
  366. venv/Lib/site-packages/pip/_vendor/rich/_loop.py +43 -0
  367. venv/Lib/site-packages/pip/_vendor/rich/_null_file.py +69 -0
  368. venv/Lib/site-packages/pip/_vendor/rich/_palettes.py +309 -0
  369. venv/Lib/site-packages/pip/_vendor/rich/_pick.py +17 -0
  370. venv/Lib/site-packages/pip/_vendor/rich/_ratio.py +160 -0
  371. venv/Lib/site-packages/pip/_vendor/rich/_spinners.py +482 -0
  372. venv/Lib/site-packages/pip/_vendor/rich/_stack.py +16 -0
  373. venv/Lib/site-packages/pip/_vendor/rich/_timer.py +19 -0
  374. venv/Lib/site-packages/pip/_vendor/rich/_win32_console.py +662 -0
  375. venv/Lib/site-packages/pip/_vendor/rich/_windows.py +72 -0
  376. venv/Lib/site-packages/pip/_vendor/rich/_windows_renderer.py +56 -0
  377. venv/Lib/site-packages/pip/_vendor/rich/_wrap.py +56 -0
  378. venv/Lib/site-packages/pip/_vendor/rich/abc.py +33 -0
  379. venv/Lib/site-packages/pip/_vendor/rich/align.py +311 -0
  380. venv/Lib/site-packages/pip/_vendor/rich/ansi.py +240 -0
  381. venv/Lib/site-packages/pip/_vendor/rich/bar.py +94 -0
  382. venv/Lib/site-packages/pip/_vendor/rich/box.py +517 -0
  383. venv/Lib/site-packages/pip/_vendor/rich/cells.py +154 -0
  384. venv/Lib/site-packages/pip/_vendor/rich/color.py +622 -0
  385. venv/Lib/site-packages/pip/_vendor/rich/color_triplet.py +38 -0
  386. venv/Lib/site-packages/pip/_vendor/rich/columns.py +187 -0
  387. venv/Lib/site-packages/pip/_vendor/rich/console.py +2633 -0
  388. venv/Lib/site-packages/pip/_vendor/rich/constrain.py +37 -0
  389. venv/Lib/site-packages/pip/_vendor/rich/containers.py +167 -0
  390. venv/Lib/site-packages/pip/_vendor/rich/control.py +225 -0
  391. venv/Lib/site-packages/pip/_vendor/rich/default_styles.py +190 -0
  392. venv/Lib/site-packages/pip/_vendor/rich/diagnose.py +37 -0
  393. venv/Lib/site-packages/pip/_vendor/rich/emoji.py +96 -0
  394. venv/Lib/site-packages/pip/_vendor/rich/errors.py +34 -0
  395. venv/Lib/site-packages/pip/_vendor/rich/file_proxy.py +57 -0
  396. venv/Lib/site-packages/pip/_vendor/rich/filesize.py +89 -0
  397. venv/Lib/site-packages/pip/_vendor/rich/highlighter.py +232 -0
  398. venv/Lib/site-packages/pip/_vendor/rich/json.py +140 -0
  399. venv/Lib/site-packages/pip/_vendor/rich/jupyter.py +101 -0
  400. venv/Lib/site-packages/pip/_vendor/rich/layout.py +443 -0
  401. venv/Lib/site-packages/pip/_vendor/rich/live.py +375 -0
  402. venv/Lib/site-packages/pip/_vendor/rich/live_render.py +113 -0
  403. venv/Lib/site-packages/pip/_vendor/rich/logging.py +289 -0
  404. venv/Lib/site-packages/pip/_vendor/rich/markup.py +246 -0
  405. venv/Lib/site-packages/pip/_vendor/rich/measure.py +151 -0
  406. venv/Lib/site-packages/pip/_vendor/rich/padding.py +141 -0
  407. venv/Lib/site-packages/pip/_vendor/rich/pager.py +34 -0
  408. venv/Lib/site-packages/pip/_vendor/rich/palette.py +100 -0
  409. venv/Lib/site-packages/pip/_vendor/rich/panel.py +308 -0
  410. venv/Lib/site-packages/pip/_vendor/rich/pretty.py +994 -0
  411. venv/Lib/site-packages/pip/_vendor/rich/progress.py +1702 -0
  412. venv/Lib/site-packages/pip/_vendor/rich/progress_bar.py +224 -0
  413. venv/Lib/site-packages/pip/_vendor/rich/prompt.py +376 -0
  414. venv/Lib/site-packages/pip/_vendor/rich/protocol.py +42 -0
  415. venv/Lib/site-packages/pip/_vendor/rich/region.py +10 -0
  416. venv/Lib/site-packages/pip/_vendor/rich/repr.py +149 -0
  417. venv/Lib/site-packages/pip/_vendor/rich/rule.py +130 -0
  418. venv/Lib/site-packages/pip/_vendor/rich/scope.py +86 -0
  419. venv/Lib/site-packages/pip/_vendor/rich/screen.py +54 -0
  420. venv/Lib/site-packages/pip/_vendor/rich/segment.py +739 -0
  421. venv/Lib/site-packages/pip/_vendor/rich/spinner.py +137 -0
  422. venv/Lib/site-packages/pip/_vendor/rich/status.py +132 -0
  423. venv/Lib/site-packages/pip/_vendor/rich/style.py +796 -0
  424. venv/Lib/site-packages/pip/_vendor/rich/styled.py +42 -0
  425. venv/Lib/site-packages/pip/_vendor/rich/syntax.py +948 -0
  426. venv/Lib/site-packages/pip/_vendor/rich/table.py +1002 -0
  427. venv/Lib/site-packages/pip/_vendor/rich/terminal_theme.py +153 -0
  428. venv/Lib/site-packages/pip/_vendor/rich/text.py +1307 -0
  429. venv/Lib/site-packages/pip/_vendor/rich/theme.py +115 -0
  430. venv/Lib/site-packages/pip/_vendor/rich/themes.py +5 -0
  431. venv/Lib/site-packages/pip/_vendor/rich/traceback.py +756 -0
  432. venv/Lib/site-packages/pip/_vendor/rich/tree.py +251 -0
  433. venv/Lib/site-packages/pip/_vendor/six.py +998 -0
  434. venv/Lib/site-packages/pip/_vendor/tenacity/__init__.py +608 -0
  435. venv/Lib/site-packages/pip/_vendor/tenacity/_asyncio.py +94 -0
  436. venv/Lib/site-packages/pip/_vendor/tenacity/_utils.py +76 -0
  437. venv/Lib/site-packages/pip/_vendor/tenacity/after.py +51 -0
  438. venv/Lib/site-packages/pip/_vendor/tenacity/before.py +46 -0
  439. venv/Lib/site-packages/pip/_vendor/tenacity/before_sleep.py +71 -0
  440. venv/Lib/site-packages/pip/_vendor/tenacity/nap.py +43 -0
  441. venv/Lib/site-packages/pip/_vendor/tenacity/retry.py +272 -0
  442. venv/Lib/site-packages/pip/_vendor/tenacity/stop.py +103 -0
  443. venv/Lib/site-packages/pip/_vendor/tenacity/tornadoweb.py +59 -0
  444. venv/Lib/site-packages/pip/_vendor/tenacity/wait.py +228 -0
  445. venv/Lib/site-packages/pip/_vendor/tomli/__init__.py +11 -0
  446. venv/Lib/site-packages/pip/_vendor/tomli/_parser.py +691 -0
  447. venv/Lib/site-packages/pip/_vendor/tomli/_re.py +107 -0
  448. venv/Lib/site-packages/pip/_vendor/tomli/_types.py +10 -0
  449. venv/Lib/site-packages/pip/_vendor/typing_extensions.py +3072 -0
  450. venv/Lib/site-packages/pip/_vendor/urllib3/__init__.py +102 -0
  451. venv/Lib/site-packages/pip/_vendor/urllib3/_collections.py +337 -0
  452. venv/Lib/site-packages/pip/_vendor/urllib3/_version.py +2 -0
  453. venv/Lib/site-packages/pip/_vendor/urllib3/connection.py +572 -0
  454. venv/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +1132 -0
  455. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
  456. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py +36 -0
  457. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
  458. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +519 -0
  459. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +397 -0
  460. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/appengine.py +314 -0
  461. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py +130 -0
  462. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +518 -0
  463. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +921 -0
  464. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +216 -0
  465. venv/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +323 -0
  466. venv/Lib/site-packages/pip/_vendor/urllib3/fields.py +274 -0
  467. venv/Lib/site-packages/pip/_vendor/urllib3/filepost.py +98 -0
  468. venv/Lib/site-packages/pip/_vendor/urllib3/packages/__init__.py +0 -0
  469. venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
  470. venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +51 -0
  471. venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py +155 -0
  472. venv/Lib/site-packages/pip/_vendor/urllib3/packages/six.py +1076 -0
  473. venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +537 -0
  474. venv/Lib/site-packages/pip/_vendor/urllib3/request.py +170 -0
  475. venv/Lib/site-packages/pip/_vendor/urllib3/response.py +879 -0
  476. venv/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py +49 -0
  477. venv/Lib/site-packages/pip/_vendor/urllib3/util/connection.py +149 -0
  478. venv/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py +57 -0
  479. venv/Lib/site-packages/pip/_vendor/urllib3/util/queue.py +22 -0
  480. venv/Lib/site-packages/pip/_vendor/urllib3/util/request.py +137 -0
  481. venv/Lib/site-packages/pip/_vendor/urllib3/util/response.py +107 -0
  482. venv/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +620 -0
  483. venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +495 -0
  484. venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +159 -0
  485. venv/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py +221 -0
  486. venv/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py +271 -0
  487. venv/Lib/site-packages/pip/_vendor/urllib3/util/url.py +435 -0
  488. venv/Lib/site-packages/pip/_vendor/urllib3/util/wait.py +152 -0
  489. venv/Lib/site-packages/pip/_vendor/webencodings/__init__.py +342 -0
  490. venv/Lib/site-packages/pip/_vendor/webencodings/labels.py +231 -0
  491. venv/Lib/site-packages/pip/_vendor/webencodings/mklabels.py +59 -0
  492. venv/Lib/site-packages/pip/_vendor/webencodings/tests.py +153 -0
  493. venv/Lib/site-packages/pip/_vendor/webencodings/x_user_defined.py +325 -0
  494. venv/Lib/site-packages/pip/py.typed +4 -0
  495. venv/Lib/site-packages/pkg_resources/__init__.py +3296 -0
  496. venv/Lib/site-packages/pkg_resources/_vendor/__init__.py +0 -0
  497. venv/Lib/site-packages/pkg_resources/_vendor/appdirs.py +608 -0
  498. venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/__init__.py +36 -0
  499. venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/_adapters.py +170 -0
  500. venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/_common.py +104 -0
  501. venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/_compat.py +98 -0
  502. venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/_itertools.py +35 -0
  503. venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/_legacy.py +121 -0
  504. venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/abc.py +137 -0
  505. venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/readers.py +122 -0
  506. venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/simple.py +116 -0
  507. venv/Lib/site-packages/pkg_resources/_vendor/jaraco/__init__.py +0 -0
  508. venv/Lib/site-packages/pkg_resources/_vendor/jaraco/context.py +213 -0
  509. venv/Lib/site-packages/pkg_resources/_vendor/jaraco/functools.py +525 -0
  510. venv/Lib/site-packages/pkg_resources/_vendor/jaraco/text/__init__.py +599 -0
  511. venv/Lib/site-packages/pkg_resources/_vendor/more_itertools/__init__.py +4 -0
  512. venv/Lib/site-packages/pkg_resources/_vendor/more_itertools/more.py +4316 -0
  513. venv/Lib/site-packages/pkg_resources/_vendor/more_itertools/recipes.py +698 -0
  514. venv/Lib/site-packages/pkg_resources/_vendor/packaging/__about__.py +26 -0
  515. venv/Lib/site-packages/pkg_resources/_vendor/packaging/__init__.py +25 -0
  516. venv/Lib/site-packages/pkg_resources/_vendor/packaging/_manylinux.py +301 -0
  517. venv/Lib/site-packages/pkg_resources/_vendor/packaging/_musllinux.py +136 -0
  518. venv/Lib/site-packages/pkg_resources/_vendor/packaging/_structures.py +61 -0
  519. venv/Lib/site-packages/pkg_resources/_vendor/packaging/markers.py +304 -0
  520. venv/Lib/site-packages/pkg_resources/_vendor/packaging/requirements.py +146 -0
  521. venv/Lib/site-packages/pkg_resources/_vendor/packaging/specifiers.py +802 -0
  522. venv/Lib/site-packages/pkg_resources/_vendor/packaging/tags.py +487 -0
  523. venv/Lib/site-packages/pkg_resources/_vendor/packaging/utils.py +136 -0
  524. venv/Lib/site-packages/pkg_resources/_vendor/packaging/version.py +504 -0
  525. venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/__init__.py +331 -0
  526. venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/actions.py +207 -0
  527. venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/common.py +424 -0
  528. venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/core.py +5814 -0
  529. venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/diagram/__init__.py +642 -0
  530. venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/exceptions.py +267 -0
  531. venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/helpers.py +1088 -0
  532. venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/results.py +760 -0
  533. venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/testing.py +331 -0
  534. venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/unicode.py +352 -0
  535. venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/util.py +235 -0
  536. venv/Lib/site-packages/pkg_resources/_vendor/zipp.py +329 -0
  537. venv/Lib/site-packages/pkg_resources/extern/__init__.py +76 -0
  538. venv/Lib/site-packages/setuptools/__init__.py +247 -0
  539. venv/Lib/site-packages/setuptools/_deprecation_warning.py +7 -0
  540. venv/Lib/site-packages/setuptools/_distutils/__init__.py +24 -0
  541. venv/Lib/site-packages/setuptools/_distutils/_collections.py +56 -0
  542. venv/Lib/site-packages/setuptools/_distutils/_functools.py +20 -0
  543. venv/Lib/site-packages/setuptools/_distutils/_macos_compat.py +12 -0
  544. venv/Lib/site-packages/setuptools/_distutils/_msvccompiler.py +572 -0
  545. venv/Lib/site-packages/setuptools/_distutils/archive_util.py +280 -0
  546. venv/Lib/site-packages/setuptools/_distutils/bcppcompiler.py +408 -0
  547. venv/Lib/site-packages/setuptools/_distutils/ccompiler.py +1220 -0
  548. venv/Lib/site-packages/setuptools/_distutils/cmd.py +436 -0
  549. venv/Lib/site-packages/setuptools/_distutils/command/__init__.py +25 -0
  550. venv/Lib/site-packages/setuptools/_distutils/command/_framework_compat.py +55 -0
  551. venv/Lib/site-packages/setuptools/_distutils/command/bdist.py +157 -0
  552. venv/Lib/site-packages/setuptools/_distutils/command/bdist_dumb.py +144 -0
  553. venv/Lib/site-packages/setuptools/_distutils/command/bdist_rpm.py +615 -0
  554. venv/Lib/site-packages/setuptools/_distutils/command/build.py +153 -0
  555. venv/Lib/site-packages/setuptools/_distutils/command/build_clib.py +208 -0
  556. venv/Lib/site-packages/setuptools/_distutils/command/build_ext.py +787 -0
  557. venv/Lib/site-packages/setuptools/_distutils/command/build_py.py +407 -0
  558. venv/Lib/site-packages/setuptools/_distutils/command/build_scripts.py +173 -0
  559. venv/Lib/site-packages/setuptools/_distutils/command/check.py +151 -0
  560. venv/Lib/site-packages/setuptools/_distutils/command/clean.py +76 -0
  561. venv/Lib/site-packages/setuptools/_distutils/command/config.py +377 -0
  562. venv/Lib/site-packages/setuptools/_distutils/command/install.py +814 -0
  563. venv/Lib/site-packages/setuptools/_distutils/command/install_data.py +84 -0
  564. venv/Lib/site-packages/setuptools/_distutils/command/install_egg_info.py +91 -0
  565. venv/Lib/site-packages/setuptools/_distutils/command/install_headers.py +45 -0
  566. venv/Lib/site-packages/setuptools/_distutils/command/install_lib.py +238 -0
  567. venv/Lib/site-packages/setuptools/_distutils/command/install_scripts.py +61 -0
  568. venv/Lib/site-packages/setuptools/_distutils/command/py37compat.py +31 -0
  569. venv/Lib/site-packages/setuptools/_distutils/command/register.py +319 -0
  570. venv/Lib/site-packages/setuptools/_distutils/command/sdist.py +531 -0
  571. venv/Lib/site-packages/setuptools/_distutils/command/upload.py +205 -0
  572. venv/Lib/site-packages/setuptools/_distutils/config.py +139 -0
  573. venv/Lib/site-packages/setuptools/_distutils/core.py +291 -0
  574. venv/Lib/site-packages/setuptools/_distutils/cygwinccompiler.py +364 -0
  575. venv/Lib/site-packages/setuptools/_distutils/debug.py +5 -0
  576. venv/Lib/site-packages/setuptools/_distutils/dep_util.py +96 -0
  577. venv/Lib/site-packages/setuptools/_distutils/dir_util.py +243 -0
  578. venv/Lib/site-packages/setuptools/_distutils/dist.py +1286 -0
  579. venv/Lib/site-packages/setuptools/_distutils/errors.py +127 -0
  580. venv/Lib/site-packages/setuptools/_distutils/extension.py +248 -0
  581. venv/Lib/site-packages/setuptools/_distutils/fancy_getopt.py +470 -0
  582. venv/Lib/site-packages/setuptools/_distutils/file_util.py +249 -0
  583. venv/Lib/site-packages/setuptools/_distutils/filelist.py +371 -0
  584. venv/Lib/site-packages/setuptools/_distutils/log.py +80 -0
  585. venv/Lib/site-packages/setuptools/_distutils/msvc9compiler.py +832 -0
  586. venv/Lib/site-packages/setuptools/_distutils/msvccompiler.py +695 -0
  587. venv/Lib/site-packages/setuptools/_distutils/py38compat.py +8 -0
  588. venv/Lib/site-packages/setuptools/_distutils/py39compat.py +22 -0
  589. venv/Lib/site-packages/setuptools/_distutils/spawn.py +109 -0
  590. venv/Lib/site-packages/setuptools/_distutils/sysconfig.py +558 -0
  591. venv/Lib/site-packages/setuptools/_distutils/text_file.py +287 -0
  592. venv/Lib/site-packages/setuptools/_distutils/unixccompiler.py +401 -0
  593. venv/Lib/site-packages/setuptools/_distutils/util.py +513 -0
  594. venv/Lib/site-packages/setuptools/_distutils/version.py +358 -0
  595. venv/Lib/site-packages/setuptools/_distutils/versionpredicate.py +175 -0
  596. venv/Lib/site-packages/setuptools/_entry_points.py +86 -0
  597. venv/Lib/site-packages/setuptools/_imp.py +82 -0
  598. venv/Lib/site-packages/setuptools/_importlib.py +47 -0
  599. venv/Lib/site-packages/setuptools/_itertools.py +23 -0
  600. venv/Lib/site-packages/setuptools/_path.py +29 -0
  601. venv/Lib/site-packages/setuptools/_reqs.py +19 -0
  602. venv/Lib/site-packages/setuptools/_vendor/__init__.py +0 -0
  603. venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/__init__.py +1047 -0
  604. venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_adapters.py +68 -0
  605. venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_collections.py +30 -0
  606. venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_compat.py +71 -0
  607. venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_functools.py +104 -0
  608. venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_itertools.py +73 -0
  609. venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_meta.py +48 -0
  610. venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_text.py +99 -0
  611. venv/Lib/site-packages/setuptools/_vendor/importlib_resources/__init__.py +36 -0
  612. venv/Lib/site-packages/setuptools/_vendor/importlib_resources/_adapters.py +170 -0
  613. venv/Lib/site-packages/setuptools/_vendor/importlib_resources/_common.py +104 -0
  614. venv/Lib/site-packages/setuptools/_vendor/importlib_resources/_compat.py +98 -0
  615. venv/Lib/site-packages/setuptools/_vendor/importlib_resources/_itertools.py +35 -0
  616. venv/Lib/site-packages/setuptools/_vendor/importlib_resources/_legacy.py +121 -0
  617. venv/Lib/site-packages/setuptools/_vendor/importlib_resources/abc.py +137 -0
  618. venv/Lib/site-packages/setuptools/_vendor/importlib_resources/readers.py +122 -0
  619. venv/Lib/site-packages/setuptools/_vendor/importlib_resources/simple.py +116 -0
  620. venv/Lib/site-packages/setuptools/_vendor/jaraco/__init__.py +0 -0
  621. venv/Lib/site-packages/setuptools/_vendor/jaraco/context.py +213 -0
  622. venv/Lib/site-packages/setuptools/_vendor/jaraco/functools.py +525 -0
  623. venv/Lib/site-packages/setuptools/_vendor/jaraco/text/__init__.py +599 -0
  624. venv/Lib/site-packages/setuptools/_vendor/more_itertools/__init__.py +4 -0
  625. venv/Lib/site-packages/setuptools/_vendor/more_itertools/more.py +3824 -0
  626. venv/Lib/site-packages/setuptools/_vendor/more_itertools/recipes.py +620 -0
  627. venv/Lib/site-packages/setuptools/_vendor/ordered_set.py +488 -0
  628. venv/Lib/site-packages/setuptools/_vendor/packaging/__about__.py +26 -0
  629. venv/Lib/site-packages/setuptools/_vendor/packaging/__init__.py +25 -0
  630. venv/Lib/site-packages/setuptools/_vendor/packaging/_manylinux.py +301 -0
  631. venv/Lib/site-packages/setuptools/_vendor/packaging/_musllinux.py +136 -0
  632. venv/Lib/site-packages/setuptools/_vendor/packaging/_structures.py +61 -0
  633. venv/Lib/site-packages/setuptools/_vendor/packaging/markers.py +304 -0
  634. venv/Lib/site-packages/setuptools/_vendor/packaging/requirements.py +146 -0
  635. venv/Lib/site-packages/setuptools/_vendor/packaging/specifiers.py +802 -0
  636. venv/Lib/site-packages/setuptools/_vendor/packaging/tags.py +487 -0
  637. venv/Lib/site-packages/setuptools/_vendor/packaging/utils.py +136 -0
  638. venv/Lib/site-packages/setuptools/_vendor/packaging/version.py +504 -0
  639. venv/Lib/site-packages/setuptools/_vendor/pyparsing/__init__.py +331 -0
  640. venv/Lib/site-packages/setuptools/_vendor/pyparsing/actions.py +207 -0
  641. venv/Lib/site-packages/setuptools/_vendor/pyparsing/common.py +424 -0
  642. venv/Lib/site-packages/setuptools/_vendor/pyparsing/core.py +5814 -0
  643. venv/Lib/site-packages/setuptools/_vendor/pyparsing/diagram/__init__.py +642 -0
  644. venv/Lib/site-packages/setuptools/_vendor/pyparsing/exceptions.py +267 -0
  645. venv/Lib/site-packages/setuptools/_vendor/pyparsing/helpers.py +1088 -0
  646. venv/Lib/site-packages/setuptools/_vendor/pyparsing/results.py +760 -0
  647. venv/Lib/site-packages/setuptools/_vendor/pyparsing/testing.py +331 -0
  648. venv/Lib/site-packages/setuptools/_vendor/pyparsing/unicode.py +352 -0
  649. venv/Lib/site-packages/setuptools/_vendor/pyparsing/util.py +235 -0
  650. venv/Lib/site-packages/setuptools/_vendor/tomli/__init__.py +11 -0
  651. venv/Lib/site-packages/setuptools/_vendor/tomli/_parser.py +691 -0
  652. venv/Lib/site-packages/setuptools/_vendor/tomli/_re.py +107 -0
  653. venv/Lib/site-packages/setuptools/_vendor/tomli/_types.py +10 -0
  654. venv/Lib/site-packages/setuptools/_vendor/typing_extensions.py +2296 -0
  655. venv/Lib/site-packages/setuptools/_vendor/zipp.py +329 -0
  656. venv/Lib/site-packages/setuptools/archive_util.py +213 -0
  657. venv/Lib/site-packages/setuptools/build_meta.py +511 -0
  658. venv/Lib/site-packages/setuptools/command/__init__.py +12 -0
  659. venv/Lib/site-packages/setuptools/command/alias.py +78 -0
  660. venv/Lib/site-packages/setuptools/command/bdist_egg.py +457 -0
  661. venv/Lib/site-packages/setuptools/command/bdist_rpm.py +40 -0
  662. venv/Lib/site-packages/setuptools/command/build.py +146 -0
  663. venv/Lib/site-packages/setuptools/command/build_clib.py +101 -0
  664. venv/Lib/site-packages/setuptools/command/build_ext.py +383 -0
  665. venv/Lib/site-packages/setuptools/command/build_py.py +368 -0
  666. venv/Lib/site-packages/setuptools/command/develop.py +193 -0
  667. venv/Lib/site-packages/setuptools/command/dist_info.py +142 -0
  668. venv/Lib/site-packages/setuptools/command/easy_install.py +2312 -0
  669. venv/Lib/site-packages/setuptools/command/editable_wheel.py +844 -0
  670. venv/Lib/site-packages/setuptools/command/egg_info.py +763 -0
  671. venv/Lib/site-packages/setuptools/command/install.py +139 -0
  672. venv/Lib/site-packages/setuptools/command/install_egg_info.py +63 -0
  673. venv/Lib/site-packages/setuptools/command/install_lib.py +122 -0
  674. venv/Lib/site-packages/setuptools/command/install_scripts.py +70 -0
  675. venv/Lib/site-packages/setuptools/command/py36compat.py +134 -0
  676. venv/Lib/site-packages/setuptools/command/register.py +18 -0
  677. venv/Lib/site-packages/setuptools/command/rotate.py +64 -0
  678. venv/Lib/site-packages/setuptools/command/saveopts.py +22 -0
  679. venv/Lib/site-packages/setuptools/command/sdist.py +210 -0
  680. venv/Lib/site-packages/setuptools/command/setopt.py +149 -0
  681. venv/Lib/site-packages/setuptools/command/test.py +251 -0
  682. venv/Lib/site-packages/setuptools/command/upload.py +17 -0
  683. venv/Lib/site-packages/setuptools/command/upload_docs.py +213 -0
  684. venv/Lib/site-packages/setuptools/config/__init__.py +35 -0
  685. venv/Lib/site-packages/setuptools/config/_apply_pyprojecttoml.py +377 -0
  686. venv/Lib/site-packages/setuptools/config/_validate_pyproject/__init__.py +34 -0
  687. venv/Lib/site-packages/setuptools/config/_validate_pyproject/error_reporting.py +318 -0
  688. venv/Lib/site-packages/setuptools/config/_validate_pyproject/extra_validations.py +36 -0
  689. venv/Lib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_exceptions.py +51 -0
  690. venv/Lib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_validations.py +1035 -0
  691. venv/Lib/site-packages/setuptools/config/_validate_pyproject/formats.py +259 -0
  692. venv/Lib/site-packages/setuptools/config/expand.py +462 -0
  693. venv/Lib/site-packages/setuptools/config/pyprojecttoml.py +493 -0
  694. venv/Lib/site-packages/setuptools/config/setupcfg.py +762 -0
  695. venv/Lib/site-packages/setuptools/dep_util.py +25 -0
  696. venv/Lib/site-packages/setuptools/depends.py +176 -0
  697. venv/Lib/site-packages/setuptools/discovery.py +600 -0
  698. venv/Lib/site-packages/setuptools/dist.py +1222 -0
  699. venv/Lib/site-packages/setuptools/errors.py +58 -0
  700. venv/Lib/site-packages/setuptools/extension.py +148 -0
  701. venv/Lib/site-packages/setuptools/extern/__init__.py +76 -0
  702. venv/Lib/site-packages/setuptools/glob.py +167 -0
  703. venv/Lib/site-packages/setuptools/installer.py +104 -0
  704. venv/Lib/site-packages/setuptools/launch.py +36 -0
  705. venv/Lib/site-packages/setuptools/logging.py +36 -0
  706. venv/Lib/site-packages/setuptools/monkey.py +165 -0
  707. venv/Lib/site-packages/setuptools/msvc.py +1703 -0
  708. venv/Lib/site-packages/setuptools/namespaces.py +107 -0
  709. venv/Lib/site-packages/setuptools/package_index.py +1126 -0
  710. venv/Lib/site-packages/setuptools/py34compat.py +13 -0
  711. venv/Lib/site-packages/setuptools/sandbox.py +530 -0
  712. venv/Lib/site-packages/setuptools/unicode_utils.py +42 -0
  713. venv/Lib/site-packages/setuptools/version.py +6 -0
  714. venv/Lib/site-packages/setuptools/wheel.py +222 -0
  715. venv/Lib/site-packages/setuptools/windows_support.py +29 -0
  716. xplia/__init__.py +72 -0
  717. xplia/api/__init__.py +432 -0
  718. xplia/api/fastapi_app.py +453 -0
  719. xplia/cli.py +321 -0
  720. xplia/compliance/__init__.py +39 -0
  721. xplia/compliance/ai_act.py +538 -0
  722. xplia/compliance/compliance_checker.py +511 -0
  723. xplia/compliance/compliance_report.py +236 -0
  724. xplia/compliance/expert_review/__init__.py +18 -0
  725. xplia/compliance/expert_review/evaluation_criteria.py +209 -0
  726. xplia/compliance/expert_review/integration.py +270 -0
  727. xplia/compliance/expert_review/trust_expert_evaluator.py +379 -0
  728. xplia/compliance/explanation_rights.py +45 -0
  729. xplia/compliance/formatters/__init__.py +35 -0
  730. xplia/compliance/formatters/csv_formatter.py +179 -0
  731. xplia/compliance/formatters/html_formatter.py +689 -0
  732. xplia/compliance/formatters/html_trust_formatter.py +147 -0
  733. xplia/compliance/formatters/json_formatter.py +107 -0
  734. xplia/compliance/formatters/pdf_formatter.py +641 -0
  735. xplia/compliance/formatters/pdf_trust_formatter.py +309 -0
  736. xplia/compliance/formatters/trust_formatter_mixin.py +267 -0
  737. xplia/compliance/formatters/xml_formatter.py +173 -0
  738. xplia/compliance/gdpr.py +803 -0
  739. xplia/compliance/hipaa.py +134 -0
  740. xplia/compliance/report_base.py +205 -0
  741. xplia/compliance/report_generator.py +820 -0
  742. xplia/compliance/translations.py +299 -0
  743. xplia/core/__init__.py +98 -0
  744. xplia/core/base.py +391 -0
  745. xplia/core/config.py +297 -0
  746. xplia/core/factory.py +416 -0
  747. xplia/core/model_adapters/__init__.py +47 -0
  748. xplia/core/model_adapters/base.py +160 -0
  749. xplia/core/model_adapters/pytorch_adapter.py +339 -0
  750. xplia/core/model_adapters/sklearn_adapter.py +215 -0
  751. xplia/core/model_adapters/tensorflow_adapter.py +280 -0
  752. xplia/core/model_adapters/xgboost_adapter.py +295 -0
  753. xplia/core/optimizations.py +322 -0
  754. xplia/core/performance/__init__.py +57 -0
  755. xplia/core/performance/cache_manager.py +502 -0
  756. xplia/core/performance/memory_optimizer.py +465 -0
  757. xplia/core/performance/parallel_executor.py +327 -0
  758. xplia/core/registry.py +1234 -0
  759. xplia/explainers/__init__.py +70 -0
  760. xplia/explainers/__init__updated.py +62 -0
  761. xplia/explainers/adaptive/__init__.py +24 -0
  762. xplia/explainers/adaptive/explainer_selector.py +405 -0
  763. xplia/explainers/adaptive/explanation_quality.py +395 -0
  764. xplia/explainers/adaptive/fusion_strategies.py +297 -0
  765. xplia/explainers/adaptive/meta_explainer.py +320 -0
  766. xplia/explainers/adversarial/__init__.py +21 -0
  767. xplia/explainers/adversarial/adversarial_xai.py +678 -0
  768. xplia/explainers/anchor_explainer.py +1769 -0
  769. xplia/explainers/attention_explainer.py +996 -0
  770. xplia/explainers/bayesian/__init__.py +8 -0
  771. xplia/explainers/bayesian/bayesian_explainer.py +127 -0
  772. xplia/explainers/bias/__init__.py +17 -0
  773. xplia/explainers/bias/advanced_bias_detection.py +934 -0
  774. xplia/explainers/calibration/__init__.py +26 -0
  775. xplia/explainers/calibration/audience_adapter.py +376 -0
  776. xplia/explainers/calibration/audience_profiles.py +372 -0
  777. xplia/explainers/calibration/calibration_metrics.py +299 -0
  778. xplia/explainers/calibration/explanation_calibrator.py +460 -0
  779. xplia/explainers/causal/__init__.py +19 -0
  780. xplia/explainers/causal/causal_inference.py +669 -0
  781. xplia/explainers/certified/__init__.py +21 -0
  782. xplia/explainers/certified/certified_explanations.py +619 -0
  783. xplia/explainers/continual/__init__.py +8 -0
  784. xplia/explainers/continual/continual_explainer.py +102 -0
  785. xplia/explainers/counterfactual_explainer.py +804 -0
  786. xplia/explainers/counterfactuals/__init__.py +17 -0
  787. xplia/explainers/counterfactuals/advanced_counterfactuals.py +259 -0
  788. xplia/explainers/expert_evaluator.py +538 -0
  789. xplia/explainers/feature_importance_explainer.py +376 -0
  790. xplia/explainers/federated/__init__.py +17 -0
  791. xplia/explainers/federated/federated_xai.py +664 -0
  792. xplia/explainers/generative/__init__.py +15 -0
  793. xplia/explainers/generative/generative_explainer.py +243 -0
  794. xplia/explainers/gradient_explainer.py +3590 -0
  795. xplia/explainers/graph/__init__.py +26 -0
  796. xplia/explainers/graph/gnn_explainer.py +638 -0
  797. xplia/explainers/graph/molecular_explainer.py +438 -0
  798. xplia/explainers/lime_explainer.py +1580 -0
  799. xplia/explainers/llm/__init__.py +23 -0
  800. xplia/explainers/llm/llm_explainability.py +737 -0
  801. xplia/explainers/metalearning/__init__.py +15 -0
  802. xplia/explainers/metalearning/metalearning_explainer.py +276 -0
  803. xplia/explainers/moe/__init__.py +8 -0
  804. xplia/explainers/moe/moe_explainer.py +108 -0
  805. xplia/explainers/multimodal/__init__.py +30 -0
  806. xplia/explainers/multimodal/base.py +262 -0
  807. xplia/explainers/multimodal/diffusion_explainer.py +608 -0
  808. xplia/explainers/multimodal/foundation_model_explainer.py +323 -0
  809. xplia/explainers/multimodal/registry.py +139 -0
  810. xplia/explainers/multimodal/text_image_explainer.py +381 -0
  811. xplia/explainers/multimodal/vision_language_explainer.py +608 -0
  812. xplia/explainers/nas/__init__.py +5 -0
  813. xplia/explainers/nas/nas_explainer.py +65 -0
  814. xplia/explainers/neuralodes/__init__.py +5 -0
  815. xplia/explainers/neuralodes/neuralode_explainer.py +64 -0
  816. xplia/explainers/neurosymbolic/__init__.py +8 -0
  817. xplia/explainers/neurosymbolic/neurosymbolic_explainer.py +97 -0
  818. xplia/explainers/partial_dependence_explainer.py +509 -0
  819. xplia/explainers/privacy/__init__.py +21 -0
  820. xplia/explainers/privacy/differential_privacy_xai.py +624 -0
  821. xplia/explainers/quantum/__init__.py +5 -0
  822. xplia/explainers/quantum/quantum_explainer.py +79 -0
  823. xplia/explainers/recommender/__init__.py +8 -0
  824. xplia/explainers/recommender/recsys_explainer.py +124 -0
  825. xplia/explainers/reinforcement/__init__.py +15 -0
  826. xplia/explainers/reinforcement/rl_explainer.py +173 -0
  827. xplia/explainers/shap_explainer.py +2238 -0
  828. xplia/explainers/streaming/__init__.py +19 -0
  829. xplia/explainers/streaming/streaming_xai.py +703 -0
  830. xplia/explainers/timeseries/__init__.py +15 -0
  831. xplia/explainers/timeseries/timeseries_explainer.py +252 -0
  832. xplia/explainers/trust/__init__.py +24 -0
  833. xplia/explainers/trust/confidence_report.py +368 -0
  834. xplia/explainers/trust/fairwashing.py +489 -0
  835. xplia/explainers/trust/uncertainty.py +453 -0
  836. xplia/explainers/unified_explainer.py +566 -0
  837. xplia/explainers/unified_explainer_utils.py +309 -0
  838. xplia/integrations/__init__.py +3 -0
  839. xplia/integrations/mlflow_integration.py +331 -0
  840. xplia/integrations/wandb_integration.py +375 -0
  841. xplia/plugins/__init__.py +36 -0
  842. xplia/plugins/example_visualizer.py +11 -0
  843. xplia/utils/__init__.py +18 -0
  844. xplia/utils/performance.py +119 -0
  845. xplia/utils/validation.py +109 -0
  846. xplia/visualizations/__init__.py +31 -0
  847. xplia/visualizations/base.py +256 -0
  848. xplia/visualizations/boxplot_chart.py +224 -0
  849. xplia/visualizations/charts_impl.py +65 -0
  850. xplia/visualizations/gauge_chart.py +211 -0
  851. xplia/visualizations/gradient_viz.py +117 -0
  852. xplia/visualizations/heatmap_chart.py +173 -0
  853. xplia/visualizations/histogram_chart.py +176 -0
  854. xplia/visualizations/line_chart.py +100 -0
  855. xplia/visualizations/pie_chart.py +134 -0
  856. xplia/visualizations/radar_chart.py +154 -0
  857. xplia/visualizations/registry.py +76 -0
  858. xplia/visualizations/sankey_chart.py +190 -0
  859. xplia/visualizations/scatter_chart.py +252 -0
  860. xplia/visualizations/table_chart.py +263 -0
  861. xplia/visualizations/treemap_chart.py +216 -0
  862. xplia/visualizations.py +535 -0
  863. xplia/visualizers/__init__.py +87 -0
  864. xplia/visualizers/base_visualizer.py +294 -0
  865. xplia-1.0.1.dist-info/METADATA +685 -0
  866. xplia-1.0.1.dist-info/RECORD +870 -0
  867. xplia-1.0.1.dist-info/WHEEL +5 -0
  868. xplia-1.0.1.dist-info/entry_points.txt +2 -0
  869. xplia-1.0.1.dist-info/licenses/LICENSE +21 -0
  870. xplia-1.0.1.dist-info/top_level.txt +2 -0
@@ -0,0 +1,1094 @@
1
+ """
2
+ requests.utils
3
+ ~~~~~~~~~~~~~~
4
+
5
+ This module provides utility functions that are used within Requests
6
+ that are also useful for external consumption.
7
+ """
8
+
9
+ import codecs
10
+ import contextlib
11
+ import io
12
+ import os
13
+ import re
14
+ import socket
15
+ import struct
16
+ import sys
17
+ import tempfile
18
+ import warnings
19
+ import zipfile
20
+ from collections import OrderedDict
21
+
22
+ from pip._vendor.urllib3.util import make_headers, parse_url
23
+
24
+ from . import certs
25
+ from .__version__ import __version__
26
+
27
+ # to_native_string is unused here, but imported here for backwards compatibility
28
+ from ._internal_utils import ( # noqa: F401
29
+ _HEADER_VALIDATORS_BYTE,
30
+ _HEADER_VALIDATORS_STR,
31
+ HEADER_VALIDATORS,
32
+ to_native_string,
33
+ )
34
+ from .compat import (
35
+ Mapping,
36
+ basestring,
37
+ bytes,
38
+ getproxies,
39
+ getproxies_environment,
40
+ integer_types,
41
+ )
42
+ from .compat import parse_http_list as _parse_list_header
43
+ from .compat import (
44
+ proxy_bypass,
45
+ proxy_bypass_environment,
46
+ quote,
47
+ str,
48
+ unquote,
49
+ urlparse,
50
+ urlunparse,
51
+ )
52
+ from .cookies import cookiejar_from_dict
53
+ from .exceptions import (
54
+ FileModeWarning,
55
+ InvalidHeader,
56
+ InvalidURL,
57
+ UnrewindableBodyError,
58
+ )
59
+ from .structures import CaseInsensitiveDict
60
+
61
+ NETRC_FILES = (".netrc", "_netrc")
62
+
63
+ DEFAULT_CA_BUNDLE_PATH = certs.where()
64
+
65
+ DEFAULT_PORTS = {"http": 80, "https": 443}
66
+
67
+ # Ensure that ', ' is used to preserve previous delimiter behavior.
68
+ DEFAULT_ACCEPT_ENCODING = ", ".join(
69
+ re.split(r",\s*", make_headers(accept_encoding=True)["accept-encoding"])
70
+ )
71
+
72
+
73
+ if sys.platform == "win32":
74
+ # provide a proxy_bypass version on Windows without DNS lookups
75
+
76
+ def proxy_bypass_registry(host):
77
+ try:
78
+ import winreg
79
+ except ImportError:
80
+ return False
81
+
82
+ try:
83
+ internetSettings = winreg.OpenKey(
84
+ winreg.HKEY_CURRENT_USER,
85
+ r"Software\Microsoft\Windows\CurrentVersion\Internet Settings",
86
+ )
87
+ # ProxyEnable could be REG_SZ or REG_DWORD, normalizing it
88
+ proxyEnable = int(winreg.QueryValueEx(internetSettings, "ProxyEnable")[0])
89
+ # ProxyOverride is almost always a string
90
+ proxyOverride = winreg.QueryValueEx(internetSettings, "ProxyOverride")[0]
91
+ except (OSError, ValueError):
92
+ return False
93
+ if not proxyEnable or not proxyOverride:
94
+ return False
95
+
96
+ # make a check value list from the registry entry: replace the
97
+ # '<local>' string by the localhost entry and the corresponding
98
+ # canonical entry.
99
+ proxyOverride = proxyOverride.split(";")
100
+ # now check if we match one of the registry values.
101
+ for test in proxyOverride:
102
+ if test == "<local>":
103
+ if "." not in host:
104
+ return True
105
+ test = test.replace(".", r"\.") # mask dots
106
+ test = test.replace("*", r".*") # change glob sequence
107
+ test = test.replace("?", r".") # change glob char
108
+ if re.match(test, host, re.I):
109
+ return True
110
+ return False
111
+
112
+ def proxy_bypass(host): # noqa
113
+ """Return True, if the host should be bypassed.
114
+
115
+ Checks proxy settings gathered from the environment, if specified,
116
+ or the registry.
117
+ """
118
+ if getproxies_environment():
119
+ return proxy_bypass_environment(host)
120
+ else:
121
+ return proxy_bypass_registry(host)
122
+
123
+
124
+ def dict_to_sequence(d):
125
+ """Returns an internal sequence dictionary update."""
126
+
127
+ if hasattr(d, "items"):
128
+ d = d.items()
129
+
130
+ return d
131
+
132
+
133
+ def super_len(o):
134
+ total_length = None
135
+ current_position = 0
136
+
137
+ if hasattr(o, "__len__"):
138
+ total_length = len(o)
139
+
140
+ elif hasattr(o, "len"):
141
+ total_length = o.len
142
+
143
+ elif hasattr(o, "fileno"):
144
+ try:
145
+ fileno = o.fileno()
146
+ except (io.UnsupportedOperation, AttributeError):
147
+ # AttributeError is a surprising exception, seeing as how we've just checked
148
+ # that `hasattr(o, 'fileno')`. It happens for objects obtained via
149
+ # `Tarfile.extractfile()`, per issue 5229.
150
+ pass
151
+ else:
152
+ total_length = os.fstat(fileno).st_size
153
+
154
+ # Having used fstat to determine the file length, we need to
155
+ # confirm that this file was opened up in binary mode.
156
+ if "b" not in o.mode:
157
+ warnings.warn(
158
+ (
159
+ "Requests has determined the content-length for this "
160
+ "request using the binary size of the file: however, the "
161
+ "file has been opened in text mode (i.e. without the 'b' "
162
+ "flag in the mode). This may lead to an incorrect "
163
+ "content-length. In Requests 3.0, support will be removed "
164
+ "for files in text mode."
165
+ ),
166
+ FileModeWarning,
167
+ )
168
+
169
+ if hasattr(o, "tell"):
170
+ try:
171
+ current_position = o.tell()
172
+ except OSError:
173
+ # This can happen in some weird situations, such as when the file
174
+ # is actually a special file descriptor like stdin. In this
175
+ # instance, we don't know what the length is, so set it to zero and
176
+ # let requests chunk it instead.
177
+ if total_length is not None:
178
+ current_position = total_length
179
+ else:
180
+ if hasattr(o, "seek") and total_length is None:
181
+ # StringIO and BytesIO have seek but no usable fileno
182
+ try:
183
+ # seek to end of file
184
+ o.seek(0, 2)
185
+ total_length = o.tell()
186
+
187
+ # seek back to current position to support
188
+ # partially read file-like objects
189
+ o.seek(current_position or 0)
190
+ except OSError:
191
+ total_length = 0
192
+
193
+ if total_length is None:
194
+ total_length = 0
195
+
196
+ return max(0, total_length - current_position)
197
+
198
+
199
+ def get_netrc_auth(url, raise_errors=False):
200
+ """Returns the Requests tuple auth for a given url from netrc."""
201
+
202
+ netrc_file = os.environ.get("NETRC")
203
+ if netrc_file is not None:
204
+ netrc_locations = (netrc_file,)
205
+ else:
206
+ netrc_locations = (f"~/{f}" for f in NETRC_FILES)
207
+
208
+ try:
209
+ from netrc import NetrcParseError, netrc
210
+
211
+ netrc_path = None
212
+
213
+ for f in netrc_locations:
214
+ try:
215
+ loc = os.path.expanduser(f)
216
+ except KeyError:
217
+ # os.path.expanduser can fail when $HOME is undefined and
218
+ # getpwuid fails. See https://bugs.python.org/issue20164 &
219
+ # https://github.com/psf/requests/issues/1846
220
+ return
221
+
222
+ if os.path.exists(loc):
223
+ netrc_path = loc
224
+ break
225
+
226
+ # Abort early if there isn't one.
227
+ if netrc_path is None:
228
+ return
229
+
230
+ ri = urlparse(url)
231
+
232
+ # Strip port numbers from netloc. This weird `if...encode`` dance is
233
+ # used for Python 3.2, which doesn't support unicode literals.
234
+ splitstr = b":"
235
+ if isinstance(url, str):
236
+ splitstr = splitstr.decode("ascii")
237
+ host = ri.netloc.split(splitstr)[0]
238
+
239
+ try:
240
+ _netrc = netrc(netrc_path).authenticators(host)
241
+ if _netrc:
242
+ # Return with login / password
243
+ login_i = 0 if _netrc[0] else 1
244
+ return (_netrc[login_i], _netrc[2])
245
+ except (NetrcParseError, OSError):
246
+ # If there was a parsing error or a permissions issue reading the file,
247
+ # we'll just skip netrc auth unless explicitly asked to raise errors.
248
+ if raise_errors:
249
+ raise
250
+
251
+ # App Engine hackiness.
252
+ except (ImportError, AttributeError):
253
+ pass
254
+
255
+
256
+ def guess_filename(obj):
257
+ """Tries to guess the filename of the given object."""
258
+ name = getattr(obj, "name", None)
259
+ if name and isinstance(name, basestring) and name[0] != "<" and name[-1] != ">":
260
+ return os.path.basename(name)
261
+
262
+
263
+ def extract_zipped_paths(path):
264
+ """Replace nonexistent paths that look like they refer to a member of a zip
265
+ archive with the location of an extracted copy of the target, or else
266
+ just return the provided path unchanged.
267
+ """
268
+ if os.path.exists(path):
269
+ # this is already a valid path, no need to do anything further
270
+ return path
271
+
272
+ # find the first valid part of the provided path and treat that as a zip archive
273
+ # assume the rest of the path is the name of a member in the archive
274
+ archive, member = os.path.split(path)
275
+ while archive and not os.path.exists(archive):
276
+ archive, prefix = os.path.split(archive)
277
+ if not prefix:
278
+ # If we don't check for an empty prefix after the split (in other words, archive remains unchanged after the split),
279
+ # we _can_ end up in an infinite loop on a rare corner case affecting a small number of users
280
+ break
281
+ member = "/".join([prefix, member])
282
+
283
+ if not zipfile.is_zipfile(archive):
284
+ return path
285
+
286
+ zip_file = zipfile.ZipFile(archive)
287
+ if member not in zip_file.namelist():
288
+ return path
289
+
290
+ # we have a valid zip archive and a valid member of that archive
291
+ tmp = tempfile.gettempdir()
292
+ extracted_path = os.path.join(tmp, member.split("/")[-1])
293
+ if not os.path.exists(extracted_path):
294
+ # use read + write to avoid the creating nested folders, we only want the file, avoids mkdir racing condition
295
+ with atomic_open(extracted_path) as file_handler:
296
+ file_handler.write(zip_file.read(member))
297
+ return extracted_path
298
+
299
+
300
+ @contextlib.contextmanager
301
+ def atomic_open(filename):
302
+ """Write a file to the disk in an atomic fashion"""
303
+ tmp_descriptor, tmp_name = tempfile.mkstemp(dir=os.path.dirname(filename))
304
+ try:
305
+ with os.fdopen(tmp_descriptor, "wb") as tmp_handler:
306
+ yield tmp_handler
307
+ os.replace(tmp_name, filename)
308
+ except BaseException:
309
+ os.remove(tmp_name)
310
+ raise
311
+
312
+
313
+ def from_key_val_list(value):
314
+ """Take an object and test to see if it can be represented as a
315
+ dictionary. Unless it can not be represented as such, return an
316
+ OrderedDict, e.g.,
317
+
318
+ ::
319
+
320
+ >>> from_key_val_list([('key', 'val')])
321
+ OrderedDict([('key', 'val')])
322
+ >>> from_key_val_list('string')
323
+ Traceback (most recent call last):
324
+ ...
325
+ ValueError: cannot encode objects that are not 2-tuples
326
+ >>> from_key_val_list({'key': 'val'})
327
+ OrderedDict([('key', 'val')])
328
+
329
+ :rtype: OrderedDict
330
+ """
331
+ if value is None:
332
+ return None
333
+
334
+ if isinstance(value, (str, bytes, bool, int)):
335
+ raise ValueError("cannot encode objects that are not 2-tuples")
336
+
337
+ return OrderedDict(value)
338
+
339
+
340
+ def to_key_val_list(value):
341
+ """Take an object and test to see if it can be represented as a
342
+ dictionary. If it can be, return a list of tuples, e.g.,
343
+
344
+ ::
345
+
346
+ >>> to_key_val_list([('key', 'val')])
347
+ [('key', 'val')]
348
+ >>> to_key_val_list({'key': 'val'})
349
+ [('key', 'val')]
350
+ >>> to_key_val_list('string')
351
+ Traceback (most recent call last):
352
+ ...
353
+ ValueError: cannot encode objects that are not 2-tuples
354
+
355
+ :rtype: list
356
+ """
357
+ if value is None:
358
+ return None
359
+
360
+ if isinstance(value, (str, bytes, bool, int)):
361
+ raise ValueError("cannot encode objects that are not 2-tuples")
362
+
363
+ if isinstance(value, Mapping):
364
+ value = value.items()
365
+
366
+ return list(value)
367
+
368
+
369
+ # From mitsuhiko/werkzeug (used with permission).
370
+ def parse_list_header(value):
371
+ """Parse lists as described by RFC 2068 Section 2.
372
+
373
+ In particular, parse comma-separated lists where the elements of
374
+ the list may include quoted-strings. A quoted-string could
375
+ contain a comma. A non-quoted string could have quotes in the
376
+ middle. Quotes are removed automatically after parsing.
377
+
378
+ It basically works like :func:`parse_set_header` just that items
379
+ may appear multiple times and case sensitivity is preserved.
380
+
381
+ The return value is a standard :class:`list`:
382
+
383
+ >>> parse_list_header('token, "quoted value"')
384
+ ['token', 'quoted value']
385
+
386
+ To create a header from the :class:`list` again, use the
387
+ :func:`dump_header` function.
388
+
389
+ :param value: a string with a list header.
390
+ :return: :class:`list`
391
+ :rtype: list
392
+ """
393
+ result = []
394
+ for item in _parse_list_header(value):
395
+ if item[:1] == item[-1:] == '"':
396
+ item = unquote_header_value(item[1:-1])
397
+ result.append(item)
398
+ return result
399
+
400
+
401
+ # From mitsuhiko/werkzeug (used with permission).
402
+ def parse_dict_header(value):
403
+ """Parse lists of key, value pairs as described by RFC 2068 Section 2 and
404
+ convert them into a python dict:
405
+
406
+ >>> d = parse_dict_header('foo="is a fish", bar="as well"')
407
+ >>> type(d) is dict
408
+ True
409
+ >>> sorted(d.items())
410
+ [('bar', 'as well'), ('foo', 'is a fish')]
411
+
412
+ If there is no value for a key it will be `None`:
413
+
414
+ >>> parse_dict_header('key_without_value')
415
+ {'key_without_value': None}
416
+
417
+ To create a header from the :class:`dict` again, use the
418
+ :func:`dump_header` function.
419
+
420
+ :param value: a string with a dict header.
421
+ :return: :class:`dict`
422
+ :rtype: dict
423
+ """
424
+ result = {}
425
+ for item in _parse_list_header(value):
426
+ if "=" not in item:
427
+ result[item] = None
428
+ continue
429
+ name, value = item.split("=", 1)
430
+ if value[:1] == value[-1:] == '"':
431
+ value = unquote_header_value(value[1:-1])
432
+ result[name] = value
433
+ return result
434
+
435
+
436
+ # From mitsuhiko/werkzeug (used with permission).
437
+ def unquote_header_value(value, is_filename=False):
438
+ r"""Unquotes a header value. (Reversal of :func:`quote_header_value`).
439
+ This does not use the real unquoting but what browsers are actually
440
+ using for quoting.
441
+
442
+ :param value: the header value to unquote.
443
+ :rtype: str
444
+ """
445
+ if value and value[0] == value[-1] == '"':
446
+ # this is not the real unquoting, but fixing this so that the
447
+ # RFC is met will result in bugs with internet explorer and
448
+ # probably some other browsers as well. IE for example is
449
+ # uploading files with "C:\foo\bar.txt" as filename
450
+ value = value[1:-1]
451
+
452
+ # if this is a filename and the starting characters look like
453
+ # a UNC path, then just return the value without quotes. Using the
454
+ # replace sequence below on a UNC path has the effect of turning
455
+ # the leading double slash into a single slash and then
456
+ # _fix_ie_filename() doesn't work correctly. See #458.
457
+ if not is_filename or value[:2] != "\\\\":
458
+ return value.replace("\\\\", "\\").replace('\\"', '"')
459
+ return value
460
+
461
+
462
+ def dict_from_cookiejar(cj):
463
+ """Returns a key/value dictionary from a CookieJar.
464
+
465
+ :param cj: CookieJar object to extract cookies from.
466
+ :rtype: dict
467
+ """
468
+
469
+ cookie_dict = {}
470
+
471
+ for cookie in cj:
472
+ cookie_dict[cookie.name] = cookie.value
473
+
474
+ return cookie_dict
475
+
476
+
477
+ def add_dict_to_cookiejar(cj, cookie_dict):
478
+ """Returns a CookieJar from a key/value dictionary.
479
+
480
+ :param cj: CookieJar to insert cookies into.
481
+ :param cookie_dict: Dict of key/values to insert into CookieJar.
482
+ :rtype: CookieJar
483
+ """
484
+
485
+ return cookiejar_from_dict(cookie_dict, cj)
486
+
487
+
488
+ def get_encodings_from_content(content):
489
+ """Returns encodings from given content string.
490
+
491
+ :param content: bytestring to extract encodings from.
492
+ """
493
+ warnings.warn(
494
+ (
495
+ "In requests 3.0, get_encodings_from_content will be removed. For "
496
+ "more information, please see the discussion on issue #2266. (This"
497
+ " warning should only appear once.)"
498
+ ),
499
+ DeprecationWarning,
500
+ )
501
+
502
+ charset_re = re.compile(r'<meta.*?charset=["\']*(.+?)["\'>]', flags=re.I)
503
+ pragma_re = re.compile(r'<meta.*?content=["\']*;?charset=(.+?)["\'>]', flags=re.I)
504
+ xml_re = re.compile(r'^<\?xml.*?encoding=["\']*(.+?)["\'>]')
505
+
506
+ return (
507
+ charset_re.findall(content)
508
+ + pragma_re.findall(content)
509
+ + xml_re.findall(content)
510
+ )
511
+
512
+
513
+ def _parse_content_type_header(header):
514
+ """Returns content type and parameters from given header
515
+
516
+ :param header: string
517
+ :return: tuple containing content type and dictionary of
518
+ parameters
519
+ """
520
+
521
+ tokens = header.split(";")
522
+ content_type, params = tokens[0].strip(), tokens[1:]
523
+ params_dict = {}
524
+ items_to_strip = "\"' "
525
+
526
+ for param in params:
527
+ param = param.strip()
528
+ if param:
529
+ key, value = param, True
530
+ index_of_equals = param.find("=")
531
+ if index_of_equals != -1:
532
+ key = param[:index_of_equals].strip(items_to_strip)
533
+ value = param[index_of_equals + 1 :].strip(items_to_strip)
534
+ params_dict[key.lower()] = value
535
+ return content_type, params_dict
536
+
537
+
538
+ def get_encoding_from_headers(headers):
539
+ """Returns encodings from given HTTP Header Dict.
540
+
541
+ :param headers: dictionary to extract encoding from.
542
+ :rtype: str
543
+ """
544
+
545
+ content_type = headers.get("content-type")
546
+
547
+ if not content_type:
548
+ return None
549
+
550
+ content_type, params = _parse_content_type_header(content_type)
551
+
552
+ if "charset" in params:
553
+ return params["charset"].strip("'\"")
554
+
555
+ if "text" in content_type:
556
+ return "ISO-8859-1"
557
+
558
+ if "application/json" in content_type:
559
+ # Assume UTF-8 based on RFC 4627: https://www.ietf.org/rfc/rfc4627.txt since the charset was unset
560
+ return "utf-8"
561
+
562
+
563
+ def stream_decode_response_unicode(iterator, r):
564
+ """Stream decodes an iterator."""
565
+
566
+ if r.encoding is None:
567
+ yield from iterator
568
+ return
569
+
570
+ decoder = codecs.getincrementaldecoder(r.encoding)(errors="replace")
571
+ for chunk in iterator:
572
+ rv = decoder.decode(chunk)
573
+ if rv:
574
+ yield rv
575
+ rv = decoder.decode(b"", final=True)
576
+ if rv:
577
+ yield rv
578
+
579
+
580
+ def iter_slices(string, slice_length):
581
+ """Iterate over slices of a string."""
582
+ pos = 0
583
+ if slice_length is None or slice_length <= 0:
584
+ slice_length = len(string)
585
+ while pos < len(string):
586
+ yield string[pos : pos + slice_length]
587
+ pos += slice_length
588
+
589
+
590
+ def get_unicode_from_response(r):
591
+ """Returns the requested content back in unicode.
592
+
593
+ :param r: Response object to get unicode content from.
594
+
595
+ Tried:
596
+
597
+ 1. charset from content-type
598
+ 2. fall back and replace all unicode characters
599
+
600
+ :rtype: str
601
+ """
602
+ warnings.warn(
603
+ (
604
+ "In requests 3.0, get_unicode_from_response will be removed. For "
605
+ "more information, please see the discussion on issue #2266. (This"
606
+ " warning should only appear once.)"
607
+ ),
608
+ DeprecationWarning,
609
+ )
610
+
611
+ tried_encodings = []
612
+
613
+ # Try charset from content-type
614
+ encoding = get_encoding_from_headers(r.headers)
615
+
616
+ if encoding:
617
+ try:
618
+ return str(r.content, encoding)
619
+ except UnicodeError:
620
+ tried_encodings.append(encoding)
621
+
622
+ # Fall back:
623
+ try:
624
+ return str(r.content, encoding, errors="replace")
625
+ except TypeError:
626
+ return r.content
627
+
628
+
629
+ # The unreserved URI characters (RFC 3986)
630
+ UNRESERVED_SET = frozenset(
631
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "0123456789-._~"
632
+ )
633
+
634
+
635
+ def unquote_unreserved(uri):
636
+ """Un-escape any percent-escape sequences in a URI that are unreserved
637
+ characters. This leaves all reserved, illegal and non-ASCII bytes encoded.
638
+
639
+ :rtype: str
640
+ """
641
+ parts = uri.split("%")
642
+ for i in range(1, len(parts)):
643
+ h = parts[i][0:2]
644
+ if len(h) == 2 and h.isalnum():
645
+ try:
646
+ c = chr(int(h, 16))
647
+ except ValueError:
648
+ raise InvalidURL(f"Invalid percent-escape sequence: '{h}'")
649
+
650
+ if c in UNRESERVED_SET:
651
+ parts[i] = c + parts[i][2:]
652
+ else:
653
+ parts[i] = f"%{parts[i]}"
654
+ else:
655
+ parts[i] = f"%{parts[i]}"
656
+ return "".join(parts)
657
+
658
+
659
+ def requote_uri(uri):
660
+ """Re-quote the given URI.
661
+
662
+ This function passes the given URI through an unquote/quote cycle to
663
+ ensure that it is fully and consistently quoted.
664
+
665
+ :rtype: str
666
+ """
667
+ safe_with_percent = "!#$%&'()*+,/:;=?@[]~"
668
+ safe_without_percent = "!#$&'()*+,/:;=?@[]~"
669
+ try:
670
+ # Unquote only the unreserved characters
671
+ # Then quote only illegal characters (do not quote reserved,
672
+ # unreserved, or '%')
673
+ return quote(unquote_unreserved(uri), safe=safe_with_percent)
674
+ except InvalidURL:
675
+ # We couldn't unquote the given URI, so let's try quoting it, but
676
+ # there may be unquoted '%'s in the URI. We need to make sure they're
677
+ # properly quoted so they do not cause issues elsewhere.
678
+ return quote(uri, safe=safe_without_percent)
679
+
680
+
681
+ def address_in_network(ip, net):
682
+ """This function allows you to check if an IP belongs to a network subnet
683
+
684
+ Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
685
+ returns False if ip = 192.168.1.1 and net = 192.168.100.0/24
686
+
687
+ :rtype: bool
688
+ """
689
+ ipaddr = struct.unpack("=L", socket.inet_aton(ip))[0]
690
+ netaddr, bits = net.split("/")
691
+ netmask = struct.unpack("=L", socket.inet_aton(dotted_netmask(int(bits))))[0]
692
+ network = struct.unpack("=L", socket.inet_aton(netaddr))[0] & netmask
693
+ return (ipaddr & netmask) == (network & netmask)
694
+
695
+
696
+ def dotted_netmask(mask):
697
+ """Converts mask from /xx format to xxx.xxx.xxx.xxx
698
+
699
+ Example: if mask is 24 function returns 255.255.255.0
700
+
701
+ :rtype: str
702
+ """
703
+ bits = 0xFFFFFFFF ^ (1 << 32 - mask) - 1
704
+ return socket.inet_ntoa(struct.pack(">I", bits))
705
+
706
+
707
+ def is_ipv4_address(string_ip):
708
+ """
709
+ :rtype: bool
710
+ """
711
+ try:
712
+ socket.inet_aton(string_ip)
713
+ except OSError:
714
+ return False
715
+ return True
716
+
717
+
718
+ def is_valid_cidr(string_network):
719
+ """
720
+ Very simple check of the cidr format in no_proxy variable.
721
+
722
+ :rtype: bool
723
+ """
724
+ if string_network.count("/") == 1:
725
+ try:
726
+ mask = int(string_network.split("/")[1])
727
+ except ValueError:
728
+ return False
729
+
730
+ if mask < 1 or mask > 32:
731
+ return False
732
+
733
+ try:
734
+ socket.inet_aton(string_network.split("/")[0])
735
+ except OSError:
736
+ return False
737
+ else:
738
+ return False
739
+ return True
740
+
741
+
742
+ @contextlib.contextmanager
743
+ def set_environ(env_name, value):
744
+ """Set the environment variable 'env_name' to 'value'
745
+
746
+ Save previous value, yield, and then restore the previous value stored in
747
+ the environment variable 'env_name'.
748
+
749
+ If 'value' is None, do nothing"""
750
+ value_changed = value is not None
751
+ if value_changed:
752
+ old_value = os.environ.get(env_name)
753
+ os.environ[env_name] = value
754
+ try:
755
+ yield
756
+ finally:
757
+ if value_changed:
758
+ if old_value is None:
759
+ del os.environ[env_name]
760
+ else:
761
+ os.environ[env_name] = old_value
762
+
763
+
764
+ def should_bypass_proxies(url, no_proxy):
765
+ """
766
+ Returns whether we should bypass proxies or not.
767
+
768
+ :rtype: bool
769
+ """
770
+ # Prioritize lowercase environment variables over uppercase
771
+ # to keep a consistent behaviour with other http projects (curl, wget).
772
+ def get_proxy(key):
773
+ return os.environ.get(key) or os.environ.get(key.upper())
774
+
775
+ # First check whether no_proxy is defined. If it is, check that the URL
776
+ # we're getting isn't in the no_proxy list.
777
+ no_proxy_arg = no_proxy
778
+ if no_proxy is None:
779
+ no_proxy = get_proxy("no_proxy")
780
+ parsed = urlparse(url)
781
+
782
+ if parsed.hostname is None:
783
+ # URLs don't always have hostnames, e.g. file:/// urls.
784
+ return True
785
+
786
+ if no_proxy:
787
+ # We need to check whether we match here. We need to see if we match
788
+ # the end of the hostname, both with and without the port.
789
+ no_proxy = (host for host in no_proxy.replace(" ", "").split(",") if host)
790
+
791
+ if is_ipv4_address(parsed.hostname):
792
+ for proxy_ip in no_proxy:
793
+ if is_valid_cidr(proxy_ip):
794
+ if address_in_network(parsed.hostname, proxy_ip):
795
+ return True
796
+ elif parsed.hostname == proxy_ip:
797
+ # If no_proxy ip was defined in plain IP notation instead of cidr notation &
798
+ # matches the IP of the index
799
+ return True
800
+ else:
801
+ host_with_port = parsed.hostname
802
+ if parsed.port:
803
+ host_with_port += f":{parsed.port}"
804
+
805
+ for host in no_proxy:
806
+ if parsed.hostname.endswith(host) or host_with_port.endswith(host):
807
+ # The URL does match something in no_proxy, so we don't want
808
+ # to apply the proxies on this URL.
809
+ return True
810
+
811
+ with set_environ("no_proxy", no_proxy_arg):
812
+ # parsed.hostname can be `None` in cases such as a file URI.
813
+ try:
814
+ bypass = proxy_bypass(parsed.hostname)
815
+ except (TypeError, socket.gaierror):
816
+ bypass = False
817
+
818
+ if bypass:
819
+ return True
820
+
821
+ return False
822
+
823
+
824
+ def get_environ_proxies(url, no_proxy=None):
825
+ """
826
+ Return a dict of environment proxies.
827
+
828
+ :rtype: dict
829
+ """
830
+ if should_bypass_proxies(url, no_proxy=no_proxy):
831
+ return {}
832
+ else:
833
+ return getproxies()
834
+
835
+
836
+ def select_proxy(url, proxies):
837
+ """Select a proxy for the url, if applicable.
838
+
839
+ :param url: The url being for the request
840
+ :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
841
+ """
842
+ proxies = proxies or {}
843
+ urlparts = urlparse(url)
844
+ if urlparts.hostname is None:
845
+ return proxies.get(urlparts.scheme, proxies.get("all"))
846
+
847
+ proxy_keys = [
848
+ urlparts.scheme + "://" + urlparts.hostname,
849
+ urlparts.scheme,
850
+ "all://" + urlparts.hostname,
851
+ "all",
852
+ ]
853
+ proxy = None
854
+ for proxy_key in proxy_keys:
855
+ if proxy_key in proxies:
856
+ proxy = proxies[proxy_key]
857
+ break
858
+
859
+ return proxy
860
+
861
+
862
+ def resolve_proxies(request, proxies, trust_env=True):
863
+ """This method takes proxy information from a request and configuration
864
+ input to resolve a mapping of target proxies. This will consider settings
865
+ such a NO_PROXY to strip proxy configurations.
866
+
867
+ :param request: Request or PreparedRequest
868
+ :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
869
+ :param trust_env: Boolean declaring whether to trust environment configs
870
+
871
+ :rtype: dict
872
+ """
873
+ proxies = proxies if proxies is not None else {}
874
+ url = request.url
875
+ scheme = urlparse(url).scheme
876
+ no_proxy = proxies.get("no_proxy")
877
+ new_proxies = proxies.copy()
878
+
879
+ if trust_env and not should_bypass_proxies(url, no_proxy=no_proxy):
880
+ environ_proxies = get_environ_proxies(url, no_proxy=no_proxy)
881
+
882
+ proxy = environ_proxies.get(scheme, environ_proxies.get("all"))
883
+
884
+ if proxy:
885
+ new_proxies.setdefault(scheme, proxy)
886
+ return new_proxies
887
+
888
+
889
+ def default_user_agent(name="python-requests"):
890
+ """
891
+ Return a string representing the default user agent.
892
+
893
+ :rtype: str
894
+ """
895
+ return f"{name}/{__version__}"
896
+
897
+
898
+ def default_headers():
899
+ """
900
+ :rtype: requests.structures.CaseInsensitiveDict
901
+ """
902
+ return CaseInsensitiveDict(
903
+ {
904
+ "User-Agent": default_user_agent(),
905
+ "Accept-Encoding": DEFAULT_ACCEPT_ENCODING,
906
+ "Accept": "*/*",
907
+ "Connection": "keep-alive",
908
+ }
909
+ )
910
+
911
+
912
+ def parse_header_links(value):
913
+ """Return a list of parsed link headers proxies.
914
+
915
+ i.e. Link: <http:/.../front.jpeg>; rel=front; type="image/jpeg",<http://.../back.jpeg>; rel=back;type="image/jpeg"
916
+
917
+ :rtype: list
918
+ """
919
+
920
+ links = []
921
+
922
+ replace_chars = " '\""
923
+
924
+ value = value.strip(replace_chars)
925
+ if not value:
926
+ return links
927
+
928
+ for val in re.split(", *<", value):
929
+ try:
930
+ url, params = val.split(";", 1)
931
+ except ValueError:
932
+ url, params = val, ""
933
+
934
+ link = {"url": url.strip("<> '\"")}
935
+
936
+ for param in params.split(";"):
937
+ try:
938
+ key, value = param.split("=")
939
+ except ValueError:
940
+ break
941
+
942
+ link[key.strip(replace_chars)] = value.strip(replace_chars)
943
+
944
+ links.append(link)
945
+
946
+ return links
947
+
948
+
949
+ # Null bytes; no need to recreate these on each call to guess_json_utf
950
+ _null = "\x00".encode("ascii") # encoding to ASCII for Python 3
951
+ _null2 = _null * 2
952
+ _null3 = _null * 3
953
+
954
+
955
+ def guess_json_utf(data):
956
+ """
957
+ :rtype: str
958
+ """
959
+ # JSON always starts with two ASCII characters, so detection is as
960
+ # easy as counting the nulls and from their location and count
961
+ # determine the encoding. Also detect a BOM, if present.
962
+ sample = data[:4]
963
+ if sample in (codecs.BOM_UTF32_LE, codecs.BOM_UTF32_BE):
964
+ return "utf-32" # BOM included
965
+ if sample[:3] == codecs.BOM_UTF8:
966
+ return "utf-8-sig" # BOM included, MS style (discouraged)
967
+ if sample[:2] in (codecs.BOM_UTF16_LE, codecs.BOM_UTF16_BE):
968
+ return "utf-16" # BOM included
969
+ nullcount = sample.count(_null)
970
+ if nullcount == 0:
971
+ return "utf-8"
972
+ if nullcount == 2:
973
+ if sample[::2] == _null2: # 1st and 3rd are null
974
+ return "utf-16-be"
975
+ if sample[1::2] == _null2: # 2nd and 4th are null
976
+ return "utf-16-le"
977
+ # Did not detect 2 valid UTF-16 ascii-range characters
978
+ if nullcount == 3:
979
+ if sample[:3] == _null3:
980
+ return "utf-32-be"
981
+ if sample[1:] == _null3:
982
+ return "utf-32-le"
983
+ # Did not detect a valid UTF-32 ascii-range character
984
+ return None
985
+
986
+
987
+ def prepend_scheme_if_needed(url, new_scheme):
988
+ """Given a URL that may or may not have a scheme, prepend the given scheme.
989
+ Does not replace a present scheme with the one provided as an argument.
990
+
991
+ :rtype: str
992
+ """
993
+ parsed = parse_url(url)
994
+ scheme, auth, host, port, path, query, fragment = parsed
995
+
996
+ # A defect in urlparse determines that there isn't a netloc present in some
997
+ # urls. We previously assumed parsing was overly cautious, and swapped the
998
+ # netloc and path. Due to a lack of tests on the original defect, this is
999
+ # maintained with parse_url for backwards compatibility.
1000
+ netloc = parsed.netloc
1001
+ if not netloc:
1002
+ netloc, path = path, netloc
1003
+
1004
+ if auth:
1005
+ # parse_url doesn't provide the netloc with auth
1006
+ # so we'll add it ourselves.
1007
+ netloc = "@".join([auth, netloc])
1008
+ if scheme is None:
1009
+ scheme = new_scheme
1010
+ if path is None:
1011
+ path = ""
1012
+
1013
+ return urlunparse((scheme, netloc, path, "", query, fragment))
1014
+
1015
+
1016
+ def get_auth_from_url(url):
1017
+ """Given a url with authentication components, extract them into a tuple of
1018
+ username,password.
1019
+
1020
+ :rtype: (str,str)
1021
+ """
1022
+ parsed = urlparse(url)
1023
+
1024
+ try:
1025
+ auth = (unquote(parsed.username), unquote(parsed.password))
1026
+ except (AttributeError, TypeError):
1027
+ auth = ("", "")
1028
+
1029
+ return auth
1030
+
1031
+
1032
+ def check_header_validity(header):
1033
+ """Verifies that header parts don't contain leading whitespace
1034
+ reserved characters, or return characters.
1035
+
1036
+ :param header: tuple, in the format (name, value).
1037
+ """
1038
+ name, value = header
1039
+ _validate_header_part(header, name, 0)
1040
+ _validate_header_part(header, value, 1)
1041
+
1042
+
1043
+ def _validate_header_part(header, header_part, header_validator_index):
1044
+ if isinstance(header_part, str):
1045
+ validator = _HEADER_VALIDATORS_STR[header_validator_index]
1046
+ elif isinstance(header_part, bytes):
1047
+ validator = _HEADER_VALIDATORS_BYTE[header_validator_index]
1048
+ else:
1049
+ raise InvalidHeader(
1050
+ f"Header part ({header_part!r}) from {header} "
1051
+ f"must be of type str or bytes, not {type(header_part)}"
1052
+ )
1053
+
1054
+ if not validator.match(header_part):
1055
+ header_kind = "name" if header_validator_index == 0 else "value"
1056
+ raise InvalidHeader(
1057
+ f"Invalid leading whitespace, reserved character(s), or return"
1058
+ f"character(s) in header {header_kind}: {header_part!r}"
1059
+ )
1060
+
1061
+
1062
+ def urldefragauth(url):
1063
+ """
1064
+ Given a url remove the fragment and the authentication part.
1065
+
1066
+ :rtype: str
1067
+ """
1068
+ scheme, netloc, path, params, query, fragment = urlparse(url)
1069
+
1070
+ # see func:`prepend_scheme_if_needed`
1071
+ if not netloc:
1072
+ netloc, path = path, netloc
1073
+
1074
+ netloc = netloc.rsplit("@", 1)[-1]
1075
+
1076
+ return urlunparse((scheme, netloc, path, params, query, ""))
1077
+
1078
+
1079
+ def rewind_body(prepared_request):
1080
+ """Move file pointer back to its recorded starting position
1081
+ so it can be read again on redirect.
1082
+ """
1083
+ body_seek = getattr(prepared_request.body, "seek", None)
1084
+ if body_seek is not None and isinstance(
1085
+ prepared_request._body_position, integer_types
1086
+ ):
1087
+ try:
1088
+ body_seek(prepared_request._body_position)
1089
+ except OSError:
1090
+ raise UnrewindableBodyError(
1091
+ "An error occurred when rewinding request body for redirect."
1092
+ )
1093
+ else:
1094
+ raise UnrewindableBodyError("Unable to rewind request body for redirect.")