@scrypted/server 0.0.138 → 0.0.139

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.

Potentially problematic release.


This version of @scrypted/server might be problematic. Click here for more details.

Files changed (771) hide show
  1. package/.venv/bin/Activate.ps1 +241 -0
  2. package/.venv/bin/activate +66 -0
  3. package/.venv/bin/activate.csh +25 -0
  4. package/.venv/bin/activate.fish +64 -0
  5. package/.venv/bin/pip +8 -0
  6. package/.venv/bin/pip3 +8 -0
  7. package/.venv/bin/pip3.9 +8 -0
  8. package/.venv/lib/python3.9/site-packages/_distutils_hack/__init__.py +198 -0
  9. package/.venv/lib/python3.9/site-packages/_distutils_hack/override.py +1 -0
  10. package/.venv/lib/python3.9/site-packages/distutils-precedence.pth +1 -0
  11. package/.venv/lib/python3.9/site-packages/pgi/__init__.py +62 -0
  12. package/.venv/lib/python3.9/site-packages/pgi/_compat.py +74 -0
  13. package/.venv/lib/python3.9/site-packages/pgi/callback.py +15 -0
  14. package/.venv/lib/python3.9/site-packages/pgi/cffilib/__init__.py +12 -0
  15. package/.venv/lib/python3.9/site-packages/pgi/cffilib/_compat.py +25 -0
  16. package/.venv/lib/python3.9/site-packages/pgi/cffilib/_utils.py +119 -0
  17. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/__init__.py +60 -0
  18. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/_cdef.py +574 -0
  19. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/_ffi.py +25 -0
  20. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/error.py +13 -0
  21. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/giarginfo.py +73 -0
  22. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/giargument.py +36 -0
  23. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/gibaseinfo.py +113 -0
  24. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/gicallableinfo.py +75 -0
  25. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/giconstantinfo.py +22 -0
  26. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/gienuminfo.py +59 -0
  27. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/gifieldinfo.py +40 -0
  28. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/gifunctioninfo.py +64 -0
  29. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/giinterfaceinfo.py +93 -0
  30. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/giobjectinfo.py +143 -0
  31. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/gipropertyinfo.py +28 -0
  32. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/giregisteredtypeinfo.py +27 -0
  33. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/girepository.py +143 -0
  34. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/gisignalinfo.py +55 -0
  35. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/gistructinfo.py +55 -0
  36. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/gitypeinfo.py +66 -0
  37. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/gitypelib.py +40 -0
  38. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gir/giunioninfo.py +66 -0
  39. package/.venv/lib/python3.9/site-packages/pgi/cffilib/glib/__init__.py +8 -0
  40. package/.venv/lib/python3.9/site-packages/pgi/cffilib/glib/_cdef.py +101 -0
  41. package/.venv/lib/python3.9/site-packages/pgi/cffilib/glib/glib.py +260 -0
  42. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gobject/__init__.py +15 -0
  43. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gobject/_cdef.py +45 -0
  44. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gobject/_ffi.py +26 -0
  45. package/.venv/lib/python3.9/site-packages/pgi/cffilib/gobject/gobject.py +27 -0
  46. package/.venv/lib/python3.9/site-packages/pgi/clib/__init__.py +11 -0
  47. package/.venv/lib/python3.9/site-packages/pgi/clib/_compat.py +20 -0
  48. package/.venv/lib/python3.9/site-packages/pgi/clib/_utils.py +213 -0
  49. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/__init__.py +71 -0
  50. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/error.py +13 -0
  51. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/giarginfo.py +65 -0
  52. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/giargument.py +58 -0
  53. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/gibaseinfo.py +152 -0
  54. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/gicallableinfo.py +203 -0
  55. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/giconstantinfo.py +35 -0
  56. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/gienuminfo.py +64 -0
  57. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/gifieldinfo.py +46 -0
  58. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/giinterfaceinfo.py +83 -0
  59. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/giobjectinfo.py +134 -0
  60. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/gipropertyinfo.py +36 -0
  61. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/giregisteredtypeinfo.py +34 -0
  62. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/girepository.py +200 -0
  63. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/gistructinfo.py +55 -0
  64. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/gitypeinfo.py +97 -0
  65. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/gitypelib.py +56 -0
  66. package/.venv/lib/python3.9/site-packages/pgi/clib/gir/giunioninfo.py +60 -0
  67. package/.venv/lib/python3.9/site-packages/pgi/clib/glib.py +336 -0
  68. package/.venv/lib/python3.9/site-packages/pgi/clib/gobject.py +405 -0
  69. package/.venv/lib/python3.9/site-packages/pgi/codegen/__init__.py +28 -0
  70. package/.venv/lib/python3.9/site-packages/pgi/codegen/arguments.py +640 -0
  71. package/.venv/lib/python3.9/site-packages/pgi/codegen/backend.py +95 -0
  72. package/.venv/lib/python3.9/site-packages/pgi/codegen/cbargs.py +152 -0
  73. package/.venv/lib/python3.9/site-packages/pgi/codegen/cbreturn.py +77 -0
  74. package/.venv/lib/python3.9/site-packages/pgi/codegen/cffi_backend.py +424 -0
  75. package/.venv/lib/python3.9/site-packages/pgi/codegen/construct.py +222 -0
  76. package/.venv/lib/python3.9/site-packages/pgi/codegen/ctypes_backend/__init__.py +11 -0
  77. package/.venv/lib/python3.9/site-packages/pgi/codegen/ctypes_backend/main.py +184 -0
  78. package/.venv/lib/python3.9/site-packages/pgi/codegen/ctypes_backend/types_basic.py +705 -0
  79. package/.venv/lib/python3.9/site-packages/pgi/codegen/ctypes_backend/types_container.py +236 -0
  80. package/.venv/lib/python3.9/site-packages/pgi/codegen/ctypes_backend/types_interface.py +402 -0
  81. package/.venv/lib/python3.9/site-packages/pgi/codegen/ctypes_backend/types_other.py +93 -0
  82. package/.venv/lib/python3.9/site-packages/pgi/codegen/ctypes_backend/utils.py +168 -0
  83. package/.venv/lib/python3.9/site-packages/pgi/codegen/fieldgen.py +114 -0
  84. package/.venv/lib/python3.9/site-packages/pgi/codegen/fields.py +244 -0
  85. package/.venv/lib/python3.9/site-packages/pgi/codegen/funcgen.py +376 -0
  86. package/.venv/lib/python3.9/site-packages/pgi/codegen/null_backend.py +110 -0
  87. package/.venv/lib/python3.9/site-packages/pgi/codegen/returnvalues.py +443 -0
  88. package/.venv/lib/python3.9/site-packages/pgi/codegen/siggen.py +157 -0
  89. package/.venv/lib/python3.9/site-packages/pgi/codegen/utils.py +248 -0
  90. package/.venv/lib/python3.9/site-packages/pgi/const.py +9 -0
  91. package/.venv/lib/python3.9/site-packages/pgi/constant.py +32 -0
  92. package/.venv/lib/python3.9/site-packages/pgi/debug.py +31 -0
  93. package/.venv/lib/python3.9/site-packages/pgi/enum.py +244 -0
  94. package/.venv/lib/python3.9/site-packages/pgi/field.py +58 -0
  95. package/.venv/lib/python3.9/site-packages/pgi/finalizer.py +3 -0
  96. package/.venv/lib/python3.9/site-packages/pgi/foreign/__init__.py +71 -0
  97. package/.venv/lib/python3.9/site-packages/pgi/foreign/_base.py +43 -0
  98. package/.venv/lib/python3.9/site-packages/pgi/foreign/cairo.py +41 -0
  99. package/.venv/lib/python3.9/site-packages/pgi/function.py +12 -0
  100. package/.venv/lib/python3.9/site-packages/pgi/gerror.py +58 -0
  101. package/.venv/lib/python3.9/site-packages/pgi/gtype.py +168 -0
  102. package/.venv/lib/python3.9/site-packages/pgi/importer.py +189 -0
  103. package/.venv/lib/python3.9/site-packages/pgi/module.py +141 -0
  104. package/.venv/lib/python3.9/site-packages/pgi/obj.py +519 -0
  105. package/.venv/lib/python3.9/site-packages/pgi/overrides/GLib.py +1013 -0
  106. package/.venv/lib/python3.9/site-packages/pgi/overrides/GObject.py +583 -0
  107. package/.venv/lib/python3.9/site-packages/pgi/overrides/Gdk.py +454 -0
  108. package/.venv/lib/python3.9/site-packages/pgi/overrides/Gio.py +237 -0
  109. package/.venv/lib/python3.9/site-packages/pgi/overrides/Gtk.py +2412 -0
  110. package/.venv/lib/python3.9/site-packages/pgi/overrides/Pango.py +53 -0
  111. package/.venv/lib/python3.9/site-packages/pgi/overrides/Poppler.py +61 -0
  112. package/.venv/lib/python3.9/site-packages/pgi/overrides/__init__.py +327 -0
  113. package/.venv/lib/python3.9/site-packages/pgi/overrides/keysyms.py +54 -0
  114. package/.venv/lib/python3.9/site-packages/pgi/properties.py +313 -0
  115. package/.venv/lib/python3.9/site-packages/pgi/propertyhelper.py +12 -0
  116. package/.venv/lib/python3.9/site-packages/pgi/repository/__init__.py +10 -0
  117. package/.venv/lib/python3.9/site-packages/pgi/signalhelper.py +18 -0
  118. package/.venv/lib/python3.9/site-packages/pgi/signals.py +122 -0
  119. package/.venv/lib/python3.9/site-packages/pgi/static.py +189 -0
  120. package/.venv/lib/python3.9/site-packages/pgi/structure.py +131 -0
  121. package/.venv/lib/python3.9/site-packages/pgi/util.py +342 -0
  122. package/.venv/lib/python3.9/site-packages/pgi-0.0.11.2.dist-info/COPYING +502 -0
  123. package/.venv/lib/python3.9/site-packages/pgi-0.0.11.2.dist-info/INSTALLER +1 -0
  124. package/.venv/lib/python3.9/site-packages/pgi-0.0.11.2.dist-info/METADATA +22 -0
  125. package/.venv/lib/python3.9/site-packages/pgi-0.0.11.2.dist-info/RECORD +229 -0
  126. package/.venv/lib/python3.9/site-packages/pgi-0.0.11.2.dist-info/REQUESTED +0 -0
  127. package/.venv/lib/python3.9/site-packages/pgi-0.0.11.2.dist-info/WHEEL +5 -0
  128. package/.venv/lib/python3.9/site-packages/pgi-0.0.11.2.dist-info/top_level.txt +1 -0
  129. package/.venv/lib/python3.9/site-packages/pip/__init__.py +13 -0
  130. package/.venv/lib/python3.9/site-packages/pip/__main__.py +31 -0
  131. package/.venv/lib/python3.9/site-packages/pip/_internal/__init__.py +19 -0
  132. package/.venv/lib/python3.9/site-packages/pip/_internal/build_env.py +293 -0
  133. package/.venv/lib/python3.9/site-packages/pip/_internal/cache.py +264 -0
  134. package/.venv/lib/python3.9/site-packages/pip/_internal/cli/__init__.py +4 -0
  135. package/.venv/lib/python3.9/site-packages/pip/_internal/cli/autocompletion.py +163 -0
  136. package/.venv/lib/python3.9/site-packages/pip/_internal/cli/base_command.py +214 -0
  137. package/.venv/lib/python3.9/site-packages/pip/_internal/cli/cmdoptions.py +1010 -0
  138. package/.venv/lib/python3.9/site-packages/pip/_internal/cli/command_context.py +27 -0
  139. package/.venv/lib/python3.9/site-packages/pip/_internal/cli/main.py +70 -0
  140. package/.venv/lib/python3.9/site-packages/pip/_internal/cli/main_parser.py +87 -0
  141. package/.venv/lib/python3.9/site-packages/pip/_internal/cli/parser.py +292 -0
  142. package/.venv/lib/python3.9/site-packages/pip/_internal/cli/progress_bars.py +250 -0
  143. package/.venv/lib/python3.9/site-packages/pip/_internal/cli/req_command.py +469 -0
  144. package/.venv/lib/python3.9/site-packages/pip/_internal/cli/spinners.py +157 -0
  145. package/.venv/lib/python3.9/site-packages/pip/_internal/cli/status_codes.py +6 -0
  146. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/__init__.py +127 -0
  147. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/cache.py +223 -0
  148. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/check.py +53 -0
  149. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/completion.py +96 -0
  150. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/configuration.py +266 -0
  151. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/debug.py +202 -0
  152. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/download.py +139 -0
  153. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/freeze.py +97 -0
  154. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/hash.py +59 -0
  155. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/help.py +41 -0
  156. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/index.py +138 -0
  157. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/install.py +770 -0
  158. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/list.py +361 -0
  159. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/search.py +174 -0
  160. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/show.py +235 -0
  161. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/uninstall.py +105 -0
  162. package/.venv/lib/python3.9/site-packages/pip/_internal/commands/wheel.py +177 -0
  163. package/.venv/lib/python3.9/site-packages/pip/_internal/configuration.py +367 -0
  164. package/.venv/lib/python3.9/site-packages/pip/_internal/distributions/__init__.py +21 -0
  165. package/.venv/lib/python3.9/site-packages/pip/_internal/distributions/base.py +36 -0
  166. package/.venv/lib/python3.9/site-packages/pip/_internal/distributions/installed.py +22 -0
  167. package/.venv/lib/python3.9/site-packages/pip/_internal/distributions/sdist.py +129 -0
  168. package/.venv/lib/python3.9/site-packages/pip/_internal/distributions/wheel.py +31 -0
  169. package/.venv/lib/python3.9/site-packages/pip/_internal/exceptions.py +402 -0
  170. package/.venv/lib/python3.9/site-packages/pip/_internal/index/__init__.py +2 -0
  171. package/.venv/lib/python3.9/site-packages/pip/_internal/index/collector.py +536 -0
  172. package/.venv/lib/python3.9/site-packages/pip/_internal/index/package_finder.py +993 -0
  173. package/.venv/lib/python3.9/site-packages/pip/_internal/index/sources.py +224 -0
  174. package/.venv/lib/python3.9/site-packages/pip/_internal/locations/__init__.py +446 -0
  175. package/.venv/lib/python3.9/site-packages/pip/_internal/locations/_distutils.py +169 -0
  176. package/.venv/lib/python3.9/site-packages/pip/_internal/locations/_sysconfig.py +219 -0
  177. package/.venv/lib/python3.9/site-packages/pip/_internal/locations/base.py +52 -0
  178. package/.venv/lib/python3.9/site-packages/pip/_internal/main.py +12 -0
  179. package/.venv/lib/python3.9/site-packages/pip/_internal/metadata/__init__.py +51 -0
  180. package/.venv/lib/python3.9/site-packages/pip/_internal/metadata/base.py +330 -0
  181. package/.venv/lib/python3.9/site-packages/pip/_internal/metadata/pkg_resources.py +146 -0
  182. package/.venv/lib/python3.9/site-packages/pip/_internal/models/__init__.py +2 -0
  183. package/.venv/lib/python3.9/site-packages/pip/_internal/models/candidate.py +34 -0
  184. package/.venv/lib/python3.9/site-packages/pip/_internal/models/direct_url.py +220 -0
  185. package/.venv/lib/python3.9/site-packages/pip/_internal/models/format_control.py +80 -0
  186. package/.venv/lib/python3.9/site-packages/pip/_internal/models/index.py +28 -0
  187. package/.venv/lib/python3.9/site-packages/pip/_internal/models/link.py +288 -0
  188. package/.venv/lib/python3.9/site-packages/pip/_internal/models/scheme.py +31 -0
  189. package/.venv/lib/python3.9/site-packages/pip/_internal/models/search_scope.py +129 -0
  190. package/.venv/lib/python3.9/site-packages/pip/_internal/models/selection_prefs.py +51 -0
  191. package/.venv/lib/python3.9/site-packages/pip/_internal/models/target_python.py +110 -0
  192. package/.venv/lib/python3.9/site-packages/pip/_internal/models/wheel.py +89 -0
  193. package/.venv/lib/python3.9/site-packages/pip/_internal/network/__init__.py +2 -0
  194. package/.venv/lib/python3.9/site-packages/pip/_internal/network/auth.py +323 -0
  195. package/.venv/lib/python3.9/site-packages/pip/_internal/network/cache.py +69 -0
  196. package/.venv/lib/python3.9/site-packages/pip/_internal/network/download.py +184 -0
  197. package/.venv/lib/python3.9/site-packages/pip/_internal/network/lazy_wheel.py +210 -0
  198. package/.venv/lib/python3.9/site-packages/pip/_internal/network/session.py +454 -0
  199. package/.venv/lib/python3.9/site-packages/pip/_internal/network/utils.py +96 -0
  200. package/.venv/lib/python3.9/site-packages/pip/_internal/network/xmlrpc.py +60 -0
  201. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/__init__.py +0 -0
  202. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/build/__init__.py +0 -0
  203. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/build/metadata.py +30 -0
  204. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/build/metadata_editable.py +34 -0
  205. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/build/metadata_legacy.py +67 -0
  206. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/build/wheel.py +37 -0
  207. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/build/wheel_editable.py +46 -0
  208. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/build/wheel_legacy.py +105 -0
  209. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/check.py +149 -0
  210. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/freeze.py +254 -0
  211. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/install/__init__.py +2 -0
  212. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/install/editable_legacy.py +46 -0
  213. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/install/legacy.py +125 -0
  214. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/install/wheel.py +738 -0
  215. package/.venv/lib/python3.9/site-packages/pip/_internal/operations/prepare.py +632 -0
  216. package/.venv/lib/python3.9/site-packages/pip/_internal/pyproject.py +183 -0
  217. package/.venv/lib/python3.9/site-packages/pip/_internal/req/__init__.py +94 -0
  218. package/.venv/lib/python3.9/site-packages/pip/_internal/req/constructors.py +466 -0
  219. package/.venv/lib/python3.9/site-packages/pip/_internal/req/req_file.py +536 -0
  220. package/.venv/lib/python3.9/site-packages/pip/_internal/req/req_install.py +891 -0
  221. package/.venv/lib/python3.9/site-packages/pip/_internal/req/req_set.py +189 -0
  222. package/.venv/lib/python3.9/site-packages/pip/_internal/req/req_tracker.py +124 -0
  223. package/.venv/lib/python3.9/site-packages/pip/_internal/req/req_uninstall.py +633 -0
  224. package/.venv/lib/python3.9/site-packages/pip/_internal/resolution/__init__.py +0 -0
  225. package/.venv/lib/python3.9/site-packages/pip/_internal/resolution/base.py +20 -0
  226. package/.venv/lib/python3.9/site-packages/pip/_internal/resolution/legacy/__init__.py +0 -0
  227. package/.venv/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py +467 -0
  228. package/.venv/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/__init__.py +0 -0
  229. package/.venv/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/base.py +141 -0
  230. package/.venv/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py +540 -0
  231. package/.venv/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/factory.py +701 -0
  232. package/.venv/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +155 -0
  233. package/.venv/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/provider.py +215 -0
  234. package/.venv/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/reporter.py +68 -0
  235. package/.venv/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/requirements.py +166 -0
  236. package/.venv/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py +251 -0
  237. package/.venv/lib/python3.9/site-packages/pip/_internal/self_outdated_check.py +182 -0
  238. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/__init__.py +0 -0
  239. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/_log.py +38 -0
  240. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/appdirs.py +52 -0
  241. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/compat.py +63 -0
  242. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/compatibility_tags.py +165 -0
  243. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/datetime.py +11 -0
  244. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/deprecation.py +120 -0
  245. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/direct_url_helpers.py +87 -0
  246. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/distutils_args.py +42 -0
  247. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/egg_link.py +75 -0
  248. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/encoding.py +36 -0
  249. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/entrypoints.py +27 -0
  250. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/filesystem.py +182 -0
  251. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/filetypes.py +27 -0
  252. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/glibc.py +88 -0
  253. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/hashes.py +144 -0
  254. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/inject_securetransport.py +35 -0
  255. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/logging.py +358 -0
  256. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/misc.py +689 -0
  257. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/models.py +39 -0
  258. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/packaging.py +84 -0
  259. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/parallel.py +103 -0
  260. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/pkg_resources.py +33 -0
  261. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/setuptools_build.py +167 -0
  262. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/subprocess.py +289 -0
  263. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py +246 -0
  264. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/unpacking.py +258 -0
  265. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/urls.py +62 -0
  266. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/virtualenv.py +104 -0
  267. package/.venv/lib/python3.9/site-packages/pip/_internal/utils/wheel.py +182 -0
  268. package/.venv/lib/python3.9/site-packages/pip/_internal/vcs/__init__.py +15 -0
  269. package/.venv/lib/python3.9/site-packages/pip/_internal/vcs/bazaar.py +93 -0
  270. package/.venv/lib/python3.9/site-packages/pip/_internal/vcs/git.py +513 -0
  271. package/.venv/lib/python3.9/site-packages/pip/_internal/vcs/mercurial.py +153 -0
  272. package/.venv/lib/python3.9/site-packages/pip/_internal/vcs/subversion.py +318 -0
  273. package/.venv/lib/python3.9/site-packages/pip/_internal/vcs/versioncontrol.py +693 -0
  274. package/.venv/lib/python3.9/site-packages/pip/_internal/wheel_builder.py +375 -0
  275. package/.venv/lib/python3.9/site-packages/pip/_vendor/__init__.py +111 -0
  276. package/.venv/lib/python3.9/site-packages/pip/_vendor/cachecontrol/__init__.py +11 -0
  277. package/.venv/lib/python3.9/site-packages/pip/_vendor/cachecontrol/_cmd.py +57 -0
  278. package/.venv/lib/python3.9/site-packages/pip/_vendor/cachecontrol/adapter.py +133 -0
  279. package/.venv/lib/python3.9/site-packages/pip/_vendor/cachecontrol/cache.py +39 -0
  280. package/.venv/lib/python3.9/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +2 -0
  281. package/.venv/lib/python3.9/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +146 -0
  282. package/.venv/lib/python3.9/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +33 -0
  283. package/.venv/lib/python3.9/site-packages/pip/_vendor/cachecontrol/compat.py +29 -0
  284. package/.venv/lib/python3.9/site-packages/pip/_vendor/cachecontrol/controller.py +376 -0
  285. package/.venv/lib/python3.9/site-packages/pip/_vendor/cachecontrol/filewrapper.py +80 -0
  286. package/.venv/lib/python3.9/site-packages/pip/_vendor/cachecontrol/heuristics.py +135 -0
  287. package/.venv/lib/python3.9/site-packages/pip/_vendor/cachecontrol/serialize.py +188 -0
  288. package/.venv/lib/python3.9/site-packages/pip/_vendor/cachecontrol/wrapper.py +29 -0
  289. package/.venv/lib/python3.9/site-packages/pip/_vendor/certifi/__init__.py +3 -0
  290. package/.venv/lib/python3.9/site-packages/pip/_vendor/certifi/__main__.py +12 -0
  291. package/.venv/lib/python3.9/site-packages/pip/_vendor/certifi/cacert.pem +4257 -0
  292. package/.venv/lib/python3.9/site-packages/pip/_vendor/certifi/core.py +76 -0
  293. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/__init__.py +83 -0
  294. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/big5freq.py +386 -0
  295. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/big5prober.py +47 -0
  296. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/chardistribution.py +233 -0
  297. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/charsetgroupprober.py +107 -0
  298. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/charsetprober.py +145 -0
  299. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/cli/__init__.py +1 -0
  300. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/cli/chardetect.py +84 -0
  301. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/codingstatemachine.py +88 -0
  302. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/compat.py +36 -0
  303. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/cp949prober.py +49 -0
  304. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/enums.py +76 -0
  305. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/escprober.py +101 -0
  306. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/escsm.py +246 -0
  307. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/eucjpprober.py +92 -0
  308. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/euckrfreq.py +195 -0
  309. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/euckrprober.py +47 -0
  310. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/euctwfreq.py +387 -0
  311. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/euctwprober.py +46 -0
  312. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/gb2312freq.py +283 -0
  313. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/gb2312prober.py +46 -0
  314. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/hebrewprober.py +292 -0
  315. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/jisfreq.py +325 -0
  316. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/jpcntx.py +233 -0
  317. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/langbulgarianmodel.py +4650 -0
  318. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/langgreekmodel.py +4398 -0
  319. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/langhebrewmodel.py +4383 -0
  320. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/langhungarianmodel.py +4650 -0
  321. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/langrussianmodel.py +5718 -0
  322. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/langthaimodel.py +4383 -0
  323. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/langturkishmodel.py +4383 -0
  324. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/latin1prober.py +145 -0
  325. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/mbcharsetprober.py +91 -0
  326. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/mbcsgroupprober.py +54 -0
  327. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/mbcssm.py +572 -0
  328. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/metadata/__init__.py +0 -0
  329. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/metadata/languages.py +310 -0
  330. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/sbcharsetprober.py +145 -0
  331. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/sbcsgroupprober.py +83 -0
  332. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/sjisprober.py +92 -0
  333. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/universaldetector.py +286 -0
  334. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/utf8prober.py +82 -0
  335. package/.venv/lib/python3.9/site-packages/pip/_vendor/chardet/version.py +9 -0
  336. package/.venv/lib/python3.9/site-packages/pip/_vendor/colorama/__init__.py +6 -0
  337. package/.venv/lib/python3.9/site-packages/pip/_vendor/colorama/ansi.py +102 -0
  338. package/.venv/lib/python3.9/site-packages/pip/_vendor/colorama/ansitowin32.py +258 -0
  339. package/.venv/lib/python3.9/site-packages/pip/_vendor/colorama/initialise.py +80 -0
  340. package/.venv/lib/python3.9/site-packages/pip/_vendor/colorama/win32.py +152 -0
  341. package/.venv/lib/python3.9/site-packages/pip/_vendor/colorama/winterm.py +169 -0
  342. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/__init__.py +23 -0
  343. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/_backport/__init__.py +6 -0
  344. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/_backport/misc.py +41 -0
  345. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/_backport/shutil.py +764 -0
  346. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg +84 -0
  347. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/_backport/sysconfig.py +786 -0
  348. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/_backport/tarfile.py +2607 -0
  349. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/compat.py +1122 -0
  350. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/database.py +1339 -0
  351. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/index.py +509 -0
  352. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/locators.py +1300 -0
  353. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/manifest.py +393 -0
  354. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/markers.py +147 -0
  355. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/metadata.py +1058 -0
  356. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/resources.py +358 -0
  357. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/scripts.py +429 -0
  358. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/t32.exe +0 -0
  359. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/t64-arm.exe +0 -0
  360. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/t64.exe +0 -0
  361. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/util.py +1969 -0
  362. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/version.py +739 -0
  363. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/w32.exe +0 -0
  364. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/w64-arm.exe +0 -0
  365. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/w64.exe +0 -0
  366. package/.venv/lib/python3.9/site-packages/pip/_vendor/distlib/wheel.py +1053 -0
  367. package/.venv/lib/python3.9/site-packages/pip/_vendor/distro.py +1386 -0
  368. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/__init__.py +35 -0
  369. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/_ihatexml.py +289 -0
  370. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/_inputstream.py +918 -0
  371. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/_tokenizer.py +1735 -0
  372. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/_trie/__init__.py +5 -0
  373. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/_trie/_base.py +40 -0
  374. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/_trie/py.py +67 -0
  375. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/_utils.py +159 -0
  376. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/constants.py +2946 -0
  377. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/filters/__init__.py +0 -0
  378. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py +29 -0
  379. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/filters/base.py +12 -0
  380. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py +73 -0
  381. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/filters/lint.py +93 -0
  382. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/filters/optionaltags.py +207 -0
  383. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/filters/sanitizer.py +916 -0
  384. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/filters/whitespace.py +38 -0
  385. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/html5parser.py +2795 -0
  386. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/serializer.py +409 -0
  387. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py +30 -0
  388. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py +54 -0
  389. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treeadapters/sax.py +50 -0
  390. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py +88 -0
  391. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treebuilders/base.py +417 -0
  392. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treebuilders/dom.py +239 -0
  393. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treebuilders/etree.py +343 -0
  394. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py +392 -0
  395. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py +154 -0
  396. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treewalkers/base.py +252 -0
  397. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treewalkers/dom.py +43 -0
  398. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treewalkers/etree.py +131 -0
  399. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.py +215 -0
  400. package/.venv/lib/python3.9/site-packages/pip/_vendor/html5lib/treewalkers/genshi.py +69 -0
  401. package/.venv/lib/python3.9/site-packages/pip/_vendor/idna/__init__.py +44 -0
  402. package/.venv/lib/python3.9/site-packages/pip/_vendor/idna/codec.py +117 -0
  403. package/.venv/lib/python3.9/site-packages/pip/_vendor/idna/compat.py +16 -0
  404. package/.venv/lib/python3.9/site-packages/pip/_vendor/idna/core.py +409 -0
  405. package/.venv/lib/python3.9/site-packages/pip/_vendor/idna/idnadata.py +2050 -0
  406. package/.venv/lib/python3.9/site-packages/pip/_vendor/idna/intranges.py +58 -0
  407. package/.venv/lib/python3.9/site-packages/pip/_vendor/idna/package_data.py +2 -0
  408. package/.venv/lib/python3.9/site-packages/pip/_vendor/idna/uts46data.py +8438 -0
  409. package/.venv/lib/python3.9/site-packages/pip/_vendor/msgpack/__init__.py +54 -0
  410. package/.venv/lib/python3.9/site-packages/pip/_vendor/msgpack/_version.py +1 -0
  411. package/.venv/lib/python3.9/site-packages/pip/_vendor/msgpack/exceptions.py +48 -0
  412. package/.venv/lib/python3.9/site-packages/pip/_vendor/msgpack/ext.py +193 -0
  413. package/.venv/lib/python3.9/site-packages/pip/_vendor/msgpack/fallback.py +1087 -0
  414. package/.venv/lib/python3.9/site-packages/pip/_vendor/packaging/__about__.py +26 -0
  415. package/.venv/lib/python3.9/site-packages/pip/_vendor/packaging/__init__.py +25 -0
  416. package/.venv/lib/python3.9/site-packages/pip/_vendor/packaging/_manylinux.py +301 -0
  417. package/.venv/lib/python3.9/site-packages/pip/_vendor/packaging/_musllinux.py +136 -0
  418. package/.venv/lib/python3.9/site-packages/pip/_vendor/packaging/_structures.py +67 -0
  419. package/.venv/lib/python3.9/site-packages/pip/_vendor/packaging/markers.py +304 -0
  420. package/.venv/lib/python3.9/site-packages/pip/_vendor/packaging/requirements.py +146 -0
  421. package/.venv/lib/python3.9/site-packages/pip/_vendor/packaging/specifiers.py +828 -0
  422. package/.venv/lib/python3.9/site-packages/pip/_vendor/packaging/tags.py +484 -0
  423. package/.venv/lib/python3.9/site-packages/pip/_vendor/packaging/utils.py +136 -0
  424. package/.venv/lib/python3.9/site-packages/pip/_vendor/packaging/version.py +504 -0
  425. package/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/__init__.py +6 -0
  426. package/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/build.py +127 -0
  427. package/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/check.py +207 -0
  428. package/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/colorlog.py +115 -0
  429. package/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/compat.py +51 -0
  430. package/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/dirtools.py +44 -0
  431. package/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/envbuild.py +171 -0
  432. package/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/__init__.py +17 -0
  433. package/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py +363 -0
  434. package/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/meta.py +92 -0
  435. package/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/wrappers.py +375 -0
  436. package/.venv/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py +3296 -0
  437. package/.venv/lib/python3.9/site-packages/pip/_vendor/pkg_resources/py31compat.py +23 -0
  438. package/.venv/lib/python3.9/site-packages/pip/_vendor/platformdirs/__init__.py +329 -0
  439. package/.venv/lib/python3.9/site-packages/pip/_vendor/platformdirs/__main__.py +44 -0
  440. package/.venv/lib/python3.9/site-packages/pip/_vendor/platformdirs/android.py +117 -0
  441. package/.venv/lib/python3.9/site-packages/pip/_vendor/platformdirs/api.py +155 -0
  442. package/.venv/lib/python3.9/site-packages/pip/_vendor/platformdirs/macos.py +62 -0
  443. package/.venv/lib/python3.9/site-packages/pip/_vendor/platformdirs/unix.py +180 -0
  444. package/.venv/lib/python3.9/site-packages/pip/_vendor/platformdirs/version.py +4 -0
  445. package/.venv/lib/python3.9/site-packages/pip/_vendor/platformdirs/windows.py +180 -0
  446. package/.venv/lib/python3.9/site-packages/pip/_vendor/progress/__init__.py +189 -0
  447. package/.venv/lib/python3.9/site-packages/pip/_vendor/progress/bar.py +93 -0
  448. package/.venv/lib/python3.9/site-packages/pip/_vendor/progress/colors.py +79 -0
  449. package/.venv/lib/python3.9/site-packages/pip/_vendor/progress/counter.py +47 -0
  450. package/.venv/lib/python3.9/site-packages/pip/_vendor/progress/spinner.py +45 -0
  451. package/.venv/lib/python3.9/site-packages/pip/_vendor/pyparsing.py +7107 -0
  452. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/__init__.py +154 -0
  453. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/__version__.py +14 -0
  454. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/_internal_utils.py +42 -0
  455. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/adapters.py +533 -0
  456. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/api.py +159 -0
  457. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/auth.py +305 -0
  458. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/certs.py +18 -0
  459. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/compat.py +76 -0
  460. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/cookies.py +549 -0
  461. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/exceptions.py +127 -0
  462. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/help.py +132 -0
  463. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/hooks.py +34 -0
  464. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/models.py +966 -0
  465. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/packages.py +16 -0
  466. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/sessions.py +781 -0
  467. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/status_codes.py +123 -0
  468. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/structures.py +105 -0
  469. package/.venv/lib/python3.9/site-packages/pip/_vendor/requests/utils.py +1013 -0
  470. package/.venv/lib/python3.9/site-packages/pip/_vendor/resolvelib/__init__.py +26 -0
  471. package/.venv/lib/python3.9/site-packages/pip/_vendor/resolvelib/compat/__init__.py +0 -0
  472. package/.venv/lib/python3.9/site-packages/pip/_vendor/resolvelib/compat/collections_abc.py +6 -0
  473. package/.venv/lib/python3.9/site-packages/pip/_vendor/resolvelib/providers.py +133 -0
  474. package/.venv/lib/python3.9/site-packages/pip/_vendor/resolvelib/reporters.py +37 -0
  475. package/.venv/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py +483 -0
  476. package/.venv/lib/python3.9/site-packages/pip/_vendor/resolvelib/structs.py +165 -0
  477. package/.venv/lib/python3.9/site-packages/pip/_vendor/six.py +998 -0
  478. package/.venv/lib/python3.9/site-packages/pip/_vendor/tenacity/__init__.py +517 -0
  479. package/.venv/lib/python3.9/site-packages/pip/_vendor/tenacity/_asyncio.py +92 -0
  480. package/.venv/lib/python3.9/site-packages/pip/_vendor/tenacity/_utils.py +68 -0
  481. package/.venv/lib/python3.9/site-packages/pip/_vendor/tenacity/after.py +46 -0
  482. package/.venv/lib/python3.9/site-packages/pip/_vendor/tenacity/before.py +41 -0
  483. package/.venv/lib/python3.9/site-packages/pip/_vendor/tenacity/before_sleep.py +58 -0
  484. package/.venv/lib/python3.9/site-packages/pip/_vendor/tenacity/nap.py +43 -0
  485. package/.venv/lib/python3.9/site-packages/pip/_vendor/tenacity/retry.py +213 -0
  486. package/.venv/lib/python3.9/site-packages/pip/_vendor/tenacity/stop.py +96 -0
  487. package/.venv/lib/python3.9/site-packages/pip/_vendor/tenacity/tornadoweb.py +59 -0
  488. package/.venv/lib/python3.9/site-packages/pip/_vendor/tenacity/wait.py +191 -0
  489. package/.venv/lib/python3.9/site-packages/pip/_vendor/tomli/__init__.py +6 -0
  490. package/.venv/lib/python3.9/site-packages/pip/_vendor/tomli/_parser.py +703 -0
  491. package/.venv/lib/python3.9/site-packages/pip/_vendor/tomli/_re.py +83 -0
  492. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/__init__.py +85 -0
  493. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/_collections.py +337 -0
  494. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/_version.py +2 -0
  495. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/connection.py +569 -0
  496. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/connectionpool.py +1078 -0
  497. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
  498. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py +36 -0
  499. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
  500. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +519 -0
  501. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +397 -0
  502. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/contrib/appengine.py +314 -0
  503. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py +130 -0
  504. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +511 -0
  505. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +922 -0
  506. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/contrib/socks.py +216 -0
  507. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/exceptions.py +323 -0
  508. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/fields.py +274 -0
  509. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/filepost.py +98 -0
  510. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/packages/__init__.py +5 -0
  511. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
  512. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +51 -0
  513. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/packages/six.py +1077 -0
  514. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/packages/ssl_match_hostname/__init__.py +24 -0
  515. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/packages/ssl_match_hostname/_implementation.py +160 -0
  516. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/poolmanager.py +536 -0
  517. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/request.py +170 -0
  518. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/response.py +821 -0
  519. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/__init__.py +49 -0
  520. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/connection.py +150 -0
  521. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/proxy.py +57 -0
  522. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/queue.py +22 -0
  523. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/request.py +143 -0
  524. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/response.py +107 -0
  525. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/retry.py +602 -0
  526. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/ssl_.py +495 -0
  527. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/ssltransport.py +221 -0
  528. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/timeout.py +268 -0
  529. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/url.py +432 -0
  530. package/.venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/wait.py +153 -0
  531. package/.venv/lib/python3.9/site-packages/pip/_vendor/vendor.txt +22 -0
  532. package/.venv/lib/python3.9/site-packages/pip/_vendor/webencodings/__init__.py +342 -0
  533. package/.venv/lib/python3.9/site-packages/pip/_vendor/webencodings/labels.py +231 -0
  534. package/.venv/lib/python3.9/site-packages/pip/_vendor/webencodings/mklabels.py +59 -0
  535. package/.venv/lib/python3.9/site-packages/pip/_vendor/webencodings/tests.py +153 -0
  536. package/.venv/lib/python3.9/site-packages/pip/_vendor/webencodings/x_user_defined.py +325 -0
  537. package/.venv/lib/python3.9/site-packages/pip/py.typed +4 -0
  538. package/.venv/lib/python3.9/site-packages/pip-21.3.1.dist-info/INSTALLER +1 -0
  539. package/.venv/lib/python3.9/site-packages/pip-21.3.1.dist-info/LICENSE.txt +20 -0
  540. package/.venv/lib/python3.9/site-packages/pip-21.3.1.dist-info/METADATA +93 -0
  541. package/.venv/lib/python3.9/site-packages/pip-21.3.1.dist-info/RECORD +819 -0
  542. package/.venv/lib/python3.9/site-packages/pip-21.3.1.dist-info/REQUESTED +0 -0
  543. package/.venv/lib/python3.9/site-packages/pip-21.3.1.dist-info/WHEEL +5 -0
  544. package/.venv/lib/python3.9/site-packages/pip-21.3.1.dist-info/entry_points.txt +5 -0
  545. package/.venv/lib/python3.9/site-packages/pip-21.3.1.dist-info/top_level.txt +1 -0
  546. package/.venv/lib/python3.9/site-packages/pkg_resources/__init__.py +3303 -0
  547. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/__init__.py +0 -0
  548. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/appdirs.py +608 -0
  549. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/__about__.py +26 -0
  550. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/__init__.py +25 -0
  551. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/_manylinux.py +301 -0
  552. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/_musllinux.py +136 -0
  553. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/_structures.py +67 -0
  554. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/markers.py +304 -0
  555. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/requirements.py +146 -0
  556. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/specifiers.py +828 -0
  557. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/tags.py +484 -0
  558. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/utils.py +136 -0
  559. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/version.py +504 -0
  560. package/.venv/lib/python3.9/site-packages/pkg_resources/_vendor/pyparsing.py +5742 -0
  561. package/.venv/lib/python3.9/site-packages/pkg_resources/extern/__init__.py +73 -0
  562. package/.venv/lib/python3.9/site-packages/pkg_resources/tests/data/my-test-package-source/setup.py +6 -0
  563. package/.venv/lib/python3.9/site-packages/setuptools/__init__.py +244 -0
  564. package/.venv/lib/python3.9/site-packages/setuptools/_deprecation_warning.py +7 -0
  565. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/__init__.py +24 -0
  566. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/_collections.py +56 -0
  567. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/_msvccompiler.py +561 -0
  568. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/archive_util.py +256 -0
  569. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/bcppcompiler.py +393 -0
  570. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/ccompiler.py +1123 -0
  571. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/cmd.py +403 -0
  572. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/__init__.py +31 -0
  573. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/bdist.py +143 -0
  574. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/bdist_dumb.py +123 -0
  575. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/bdist_msi.py +749 -0
  576. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/bdist_rpm.py +579 -0
  577. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/bdist_wininst.py +377 -0
  578. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/build.py +157 -0
  579. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/build_clib.py +209 -0
  580. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py +755 -0
  581. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/build_py.py +392 -0
  582. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/build_scripts.py +152 -0
  583. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/check.py +148 -0
  584. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/clean.py +76 -0
  585. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/config.py +344 -0
  586. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/install.py +775 -0
  587. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/install_data.py +79 -0
  588. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/install_egg_info.py +84 -0
  589. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/install_headers.py +47 -0
  590. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/install_lib.py +217 -0
  591. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/install_scripts.py +60 -0
  592. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/py37compat.py +30 -0
  593. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/register.py +304 -0
  594. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/sdist.py +494 -0
  595. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/command/upload.py +214 -0
  596. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/config.py +130 -0
  597. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/core.py +249 -0
  598. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/cygwinccompiler.py +362 -0
  599. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/debug.py +5 -0
  600. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/dep_util.py +92 -0
  601. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/dir_util.py +210 -0
  602. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/dist.py +1257 -0
  603. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/errors.py +97 -0
  604. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/extension.py +240 -0
  605. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/fancy_getopt.py +457 -0
  606. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/file_util.py +238 -0
  607. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/filelist.py +355 -0
  608. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/log.py +81 -0
  609. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/msvc9compiler.py +788 -0
  610. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/msvccompiler.py +643 -0
  611. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/py35compat.py +19 -0
  612. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/py38compat.py +7 -0
  613. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/spawn.py +106 -0
  614. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/sysconfig.py +567 -0
  615. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/text_file.py +286 -0
  616. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/unixccompiler.py +325 -0
  617. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/util.py +548 -0
  618. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/version.py +363 -0
  619. package/.venv/lib/python3.9/site-packages/setuptools/_distutils/versionpredicate.py +169 -0
  620. package/.venv/lib/python3.9/site-packages/setuptools/_imp.py +82 -0
  621. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/__init__.py +0 -0
  622. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/more_itertools/__init__.py +4 -0
  623. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/more_itertools/more.py +3825 -0
  624. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/more_itertools/recipes.py +620 -0
  625. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/ordered_set.py +488 -0
  626. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/packaging/__about__.py +26 -0
  627. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/packaging/__init__.py +25 -0
  628. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/packaging/_manylinux.py +301 -0
  629. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/packaging/_musllinux.py +136 -0
  630. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/packaging/_structures.py +67 -0
  631. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/packaging/markers.py +304 -0
  632. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/packaging/requirements.py +146 -0
  633. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/packaging/specifiers.py +828 -0
  634. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/packaging/tags.py +484 -0
  635. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/packaging/utils.py +136 -0
  636. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/packaging/version.py +504 -0
  637. package/.venv/lib/python3.9/site-packages/setuptools/_vendor/pyparsing.py +5742 -0
  638. package/.venv/lib/python3.9/site-packages/setuptools/archive_util.py +205 -0
  639. package/.venv/lib/python3.9/site-packages/setuptools/build_meta.py +290 -0
  640. package/.venv/lib/python3.9/site-packages/setuptools/cli-32.exe +0 -0
  641. package/.venv/lib/python3.9/site-packages/setuptools/cli-64.exe +0 -0
  642. package/.venv/lib/python3.9/site-packages/setuptools/cli-arm64.exe +0 -0
  643. package/.venv/lib/python3.9/site-packages/setuptools/cli.exe +0 -0
  644. package/.venv/lib/python3.9/site-packages/setuptools/command/__init__.py +8 -0
  645. package/.venv/lib/python3.9/site-packages/setuptools/command/alias.py +78 -0
  646. package/.venv/lib/python3.9/site-packages/setuptools/command/bdist_egg.py +456 -0
  647. package/.venv/lib/python3.9/site-packages/setuptools/command/bdist_rpm.py +40 -0
  648. package/.venv/lib/python3.9/site-packages/setuptools/command/build_clib.py +101 -0
  649. package/.venv/lib/python3.9/site-packages/setuptools/command/build_ext.py +328 -0
  650. package/.venv/lib/python3.9/site-packages/setuptools/command/build_py.py +242 -0
  651. package/.venv/lib/python3.9/site-packages/setuptools/command/develop.py +193 -0
  652. package/.venv/lib/python3.9/site-packages/setuptools/command/dist_info.py +36 -0
  653. package/.venv/lib/python3.9/site-packages/setuptools/command/easy_install.py +2304 -0
  654. package/.venv/lib/python3.9/site-packages/setuptools/command/egg_info.py +755 -0
  655. package/.venv/lib/python3.9/site-packages/setuptools/command/install.py +132 -0
  656. package/.venv/lib/python3.9/site-packages/setuptools/command/install_egg_info.py +62 -0
  657. package/.venv/lib/python3.9/site-packages/setuptools/command/install_lib.py +122 -0
  658. package/.venv/lib/python3.9/site-packages/setuptools/command/install_scripts.py +69 -0
  659. package/.venv/lib/python3.9/site-packages/setuptools/command/launcher manifest.xml +15 -0
  660. package/.venv/lib/python3.9/site-packages/setuptools/command/py36compat.py +134 -0
  661. package/.venv/lib/python3.9/site-packages/setuptools/command/register.py +18 -0
  662. package/.venv/lib/python3.9/site-packages/setuptools/command/rotate.py +64 -0
  663. package/.venv/lib/python3.9/site-packages/setuptools/command/saveopts.py +22 -0
  664. package/.venv/lib/python3.9/site-packages/setuptools/command/sdist.py +196 -0
  665. package/.venv/lib/python3.9/site-packages/setuptools/command/setopt.py +149 -0
  666. package/.venv/lib/python3.9/site-packages/setuptools/command/test.py +252 -0
  667. package/.venv/lib/python3.9/site-packages/setuptools/command/upload.py +17 -0
  668. package/.venv/lib/python3.9/site-packages/setuptools/command/upload_docs.py +202 -0
  669. package/.venv/lib/python3.9/site-packages/setuptools/config.py +751 -0
  670. package/.venv/lib/python3.9/site-packages/setuptools/dep_util.py +25 -0
  671. package/.venv/lib/python3.9/site-packages/setuptools/depends.py +176 -0
  672. package/.venv/lib/python3.9/site-packages/setuptools/dist.py +1156 -0
  673. package/.venv/lib/python3.9/site-packages/setuptools/errors.py +40 -0
  674. package/.venv/lib/python3.9/site-packages/setuptools/extension.py +55 -0
  675. package/.venv/lib/python3.9/site-packages/setuptools/extern/__init__.py +73 -0
  676. package/.venv/lib/python3.9/site-packages/setuptools/glob.py +167 -0
  677. package/.venv/lib/python3.9/site-packages/setuptools/gui-32.exe +0 -0
  678. package/.venv/lib/python3.9/site-packages/setuptools/gui-64.exe +0 -0
  679. package/.venv/lib/python3.9/site-packages/setuptools/gui-arm64.exe +0 -0
  680. package/.venv/lib/python3.9/site-packages/setuptools/gui.exe +0 -0
  681. package/.venv/lib/python3.9/site-packages/setuptools/installer.py +104 -0
  682. package/.venv/lib/python3.9/site-packages/setuptools/launch.py +36 -0
  683. package/.venv/lib/python3.9/site-packages/setuptools/logging.py +30 -0
  684. package/.venv/lib/python3.9/site-packages/setuptools/monkey.py +177 -0
  685. package/.venv/lib/python3.9/site-packages/setuptools/msvc.py +1805 -0
  686. package/.venv/lib/python3.9/site-packages/setuptools/namespaces.py +107 -0
  687. package/.venv/lib/python3.9/site-packages/setuptools/package_index.py +1127 -0
  688. package/.venv/lib/python3.9/site-packages/setuptools/py34compat.py +13 -0
  689. package/.venv/lib/python3.9/site-packages/setuptools/sandbox.py +530 -0
  690. package/.venv/lib/python3.9/site-packages/setuptools/script (dev).tmpl +6 -0
  691. package/.venv/lib/python3.9/site-packages/setuptools/script.tmpl +3 -0
  692. package/.venv/lib/python3.9/site-packages/setuptools/tests/integration/__init__.py +0 -0
  693. package/.venv/lib/python3.9/site-packages/setuptools/tests/integration/helpers.py +61 -0
  694. package/.venv/lib/python3.9/site-packages/setuptools/tests/integration/test_pip_install_sdist.py +218 -0
  695. package/.venv/lib/python3.9/site-packages/setuptools/unicode_utils.py +42 -0
  696. package/.venv/lib/python3.9/site-packages/setuptools/version.py +6 -0
  697. package/.venv/lib/python3.9/site-packages/setuptools/wheel.py +213 -0
  698. package/.venv/lib/python3.9/site-packages/setuptools/windows_support.py +29 -0
  699. package/.venv/lib/python3.9/site-packages/setuptools-60.5.0.dist-info/INSTALLER +1 -0
  700. package/.venv/lib/python3.9/site-packages/setuptools-60.5.0.dist-info/LICENSE +19 -0
  701. package/.venv/lib/python3.9/site-packages/setuptools-60.5.0.dist-info/METADATA +142 -0
  702. package/.venv/lib/python3.9/site-packages/setuptools-60.5.0.dist-info/RECORD +308 -0
  703. package/.venv/lib/python3.9/site-packages/setuptools-60.5.0.dist-info/REQUESTED +0 -0
  704. package/.venv/lib/python3.9/site-packages/setuptools-60.5.0.dist-info/WHEEL +5 -0
  705. package/.venv/lib/python3.9/site-packages/setuptools-60.5.0.dist-info/entry_points.txt +56 -0
  706. package/.venv/lib/python3.9/site-packages/setuptools-60.5.0.dist-info/top_level.txt +3 -0
  707. package/.venv/pyvenv.cfg +3 -0
  708. package/dist/http-interfaces.js +8 -4
  709. package/dist/http-interfaces.js.map +1 -1
  710. package/dist/plugin/media.js +10 -0
  711. package/dist/plugin/media.js.map +1 -1
  712. package/dist/plugin/plugin-console.js +13 -3
  713. package/dist/plugin/plugin-console.js.map +1 -1
  714. package/dist/plugin/plugin-device.js +1 -1
  715. package/dist/plugin/plugin-device.js.map +1 -1
  716. package/dist/plugin/plugin-host-api.js +1 -1
  717. package/dist/plugin/plugin-host-api.js.map +1 -1
  718. package/dist/plugin/plugin-host.js +36 -127
  719. package/dist/plugin/plugin-host.js.map +1 -1
  720. package/dist/plugin/plugin-remote-worker.js +5 -42
  721. package/dist/plugin/plugin-remote-worker.js.map +1 -1
  722. package/dist/plugin/plugin-remote.js +3 -3
  723. package/dist/plugin/plugin-remote.js.map +1 -1
  724. package/dist/plugin/runtime/child-process-worker.js +42 -0
  725. package/dist/plugin/runtime/child-process-worker.js.map +1 -0
  726. package/dist/plugin/runtime/node-fork-worker.js +51 -0
  727. package/dist/plugin/runtime/node-fork-worker.js.map +1 -0
  728. package/dist/plugin/runtime/node-thread-worker.js +73 -0
  729. package/dist/plugin/runtime/node-thread-worker.js.map +1 -0
  730. package/dist/plugin/runtime/python-worker.js +54 -0
  731. package/dist/plugin/runtime/python-worker.js.map +1 -0
  732. package/dist/plugin/runtime/runtime-worker.js +3 -0
  733. package/dist/plugin/runtime/runtime-worker.js.map +1 -0
  734. package/dist/plugin/system.js +3 -3
  735. package/dist/plugin/system.js.map +1 -1
  736. package/dist/rpc.js +79 -55
  737. package/dist/rpc.js.map +1 -1
  738. package/dist/runtime.js +1 -6
  739. package/dist/runtime.js.map +1 -1
  740. package/dist/scrypted-main.js +14 -7
  741. package/dist/scrypted-main.js.map +1 -1
  742. package/dist/scrypted-plugin-main.js +31 -4
  743. package/dist/scrypted-plugin-main.js.map +1 -1
  744. package/dist/scrypted-server-main.js +1 -1
  745. package/dist/scrypted-server-main.js.map +1 -1
  746. package/dist/threading.js +99 -0
  747. package/dist/threading.js.map +1 -0
  748. package/package.json +5 -3
  749. package/python/plugin-remote.py +31 -2
  750. package/python/rpc.py +6 -0
  751. package/src/http-interfaces.ts +10 -5
  752. package/src/plugin/media.ts +14 -1
  753. package/src/plugin/plugin-console.ts +15 -6
  754. package/src/plugin/plugin-device.ts +2 -2
  755. package/src/plugin/plugin-host-api.ts +2 -2
  756. package/src/plugin/plugin-host.ts +42 -146
  757. package/src/plugin/plugin-remote-websocket.ts +1 -1
  758. package/src/plugin/plugin-remote-worker.ts +7 -44
  759. package/src/plugin/plugin-remote.ts +5 -5
  760. package/src/plugin/runtime/child-process-worker.ts +49 -0
  761. package/src/plugin/runtime/node-fork-worker.ts +54 -0
  762. package/src/plugin/runtime/node-thread-worker.ts +76 -0
  763. package/src/plugin/runtime/python-worker.ts +67 -0
  764. package/src/plugin/runtime/runtime-worker.ts +28 -0
  765. package/src/plugin/system.ts +4 -4
  766. package/src/rpc.ts +92 -66
  767. package/src/runtime.ts +1 -8
  768. package/src/scrypted-main.ts +15 -7
  769. package/src/scrypted-plugin-main.ts +31 -5
  770. package/src/scrypted-server-main.ts +1 -1
  771. package/src/threading.ts +108 -0
@@ -0,0 +1,1386 @@
1
+ # Copyright 2015,2016,2017 Nir Cohen
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """
16
+ The ``distro`` package (``distro`` stands for Linux Distribution) provides
17
+ information about the Linux distribution it runs on, such as a reliable
18
+ machine-readable distro ID, or version information.
19
+
20
+ It is the recommended replacement for Python's original
21
+ :py:func:`platform.linux_distribution` function, but it provides much more
22
+ functionality. An alternative implementation became necessary because Python
23
+ 3.5 deprecated this function, and Python 3.8 removed it altogether. Its
24
+ predecessor function :py:func:`platform.dist` was already deprecated since
25
+ Python 2.6 and removed in Python 3.8. Still, there are many cases in which
26
+ access to OS distribution information is needed. See `Python issue 1322
27
+ <https://bugs.python.org/issue1322>`_ for more information.
28
+ """
29
+
30
+ import argparse
31
+ import json
32
+ import logging
33
+ import os
34
+ import re
35
+ import shlex
36
+ import subprocess
37
+ import sys
38
+ import warnings
39
+
40
+ __version__ = "1.6.0"
41
+
42
+ # Use `if False` to avoid an ImportError on Python 2. After dropping Python 2
43
+ # support, can use typing.TYPE_CHECKING instead. See:
44
+ # https://docs.python.org/3/library/typing.html#typing.TYPE_CHECKING
45
+ if False: # pragma: nocover
46
+ from typing import (
47
+ Any,
48
+ Callable,
49
+ Dict,
50
+ Iterable,
51
+ Optional,
52
+ Sequence,
53
+ TextIO,
54
+ Tuple,
55
+ Type,
56
+ TypedDict,
57
+ Union,
58
+ )
59
+
60
+ VersionDict = TypedDict(
61
+ "VersionDict", {"major": str, "minor": str, "build_number": str}
62
+ )
63
+ InfoDict = TypedDict(
64
+ "InfoDict",
65
+ {
66
+ "id": str,
67
+ "version": str,
68
+ "version_parts": VersionDict,
69
+ "like": str,
70
+ "codename": str,
71
+ },
72
+ )
73
+
74
+
75
+ _UNIXCONFDIR = os.environ.get("UNIXCONFDIR", "/etc")
76
+ _UNIXUSRLIBDIR = os.environ.get("UNIXUSRLIBDIR", "/usr/lib")
77
+ _OS_RELEASE_BASENAME = "os-release"
78
+
79
+ #: Translation table for normalizing the "ID" attribute defined in os-release
80
+ #: files, for use by the :func:`distro.id` method.
81
+ #:
82
+ #: * Key: Value as defined in the os-release file, translated to lower case,
83
+ #: with blanks translated to underscores.
84
+ #:
85
+ #: * Value: Normalized value.
86
+ NORMALIZED_OS_ID = {
87
+ "ol": "oracle", # Oracle Linux
88
+ }
89
+
90
+ #: Translation table for normalizing the "Distributor ID" attribute returned by
91
+ #: the lsb_release command, for use by the :func:`distro.id` method.
92
+ #:
93
+ #: * Key: Value as returned by the lsb_release command, translated to lower
94
+ #: case, with blanks translated to underscores.
95
+ #:
96
+ #: * Value: Normalized value.
97
+ NORMALIZED_LSB_ID = {
98
+ "enterpriseenterpriseas": "oracle", # Oracle Enterprise Linux 4
99
+ "enterpriseenterpriseserver": "oracle", # Oracle Linux 5
100
+ "redhatenterpriseworkstation": "rhel", # RHEL 6, 7 Workstation
101
+ "redhatenterpriseserver": "rhel", # RHEL 6, 7 Server
102
+ "redhatenterprisecomputenode": "rhel", # RHEL 6 ComputeNode
103
+ }
104
+
105
+ #: Translation table for normalizing the distro ID derived from the file name
106
+ #: of distro release files, for use by the :func:`distro.id` method.
107
+ #:
108
+ #: * Key: Value as derived from the file name of a distro release file,
109
+ #: translated to lower case, with blanks translated to underscores.
110
+ #:
111
+ #: * Value: Normalized value.
112
+ NORMALIZED_DISTRO_ID = {
113
+ "redhat": "rhel", # RHEL 6.x, 7.x
114
+ }
115
+
116
+ # Pattern for content of distro release file (reversed)
117
+ _DISTRO_RELEASE_CONTENT_REVERSED_PATTERN = re.compile(
118
+ r"(?:[^)]*\)(.*)\()? *(?:STL )?([\d.+\-a-z]*\d) *(?:esaeler *)?(.+)"
119
+ )
120
+
121
+ # Pattern for base file name of distro release file
122
+ _DISTRO_RELEASE_BASENAME_PATTERN = re.compile(r"(\w+)[-_](release|version)$")
123
+
124
+ # Base file names to be ignored when searching for distro release file
125
+ _DISTRO_RELEASE_IGNORE_BASENAMES = (
126
+ "debian_version",
127
+ "lsb-release",
128
+ "oem-release",
129
+ _OS_RELEASE_BASENAME,
130
+ "system-release",
131
+ "plesk-release",
132
+ "iredmail-release",
133
+ )
134
+
135
+
136
+ def linux_distribution(full_distribution_name=True):
137
+ # type: (bool) -> Tuple[str, str, str]
138
+ """
139
+ .. deprecated:: 1.6.0
140
+
141
+ :func:`distro.linux_distribution()` is deprecated. It should only be
142
+ used as a compatibility shim with Python's
143
+ :py:func:`platform.linux_distribution()`. Please use :func:`distro.id`,
144
+ :func:`distro.version` and :func:`distro.name` instead.
145
+
146
+ Return information about the current OS distribution as a tuple
147
+ ``(id_name, version, codename)`` with items as follows:
148
+
149
+ * ``id_name``: If *full_distribution_name* is false, the result of
150
+ :func:`distro.id`. Otherwise, the result of :func:`distro.name`.
151
+
152
+ * ``version``: The result of :func:`distro.version`.
153
+
154
+ * ``codename``: The result of :func:`distro.codename`.
155
+
156
+ The interface of this function is compatible with the original
157
+ :py:func:`platform.linux_distribution` function, supporting a subset of
158
+ its parameters.
159
+
160
+ The data it returns may not exactly be the same, because it uses more data
161
+ sources than the original function, and that may lead to different data if
162
+ the OS distribution is not consistent across multiple data sources it
163
+ provides (there are indeed such distributions ...).
164
+
165
+ Another reason for differences is the fact that the :func:`distro.id`
166
+ method normalizes the distro ID string to a reliable machine-readable value
167
+ for a number of popular OS distributions.
168
+ """
169
+ warnings.warn(
170
+ "distro.linux_distribution() is deprecated. It should only be used as a "
171
+ "compatibility shim with Python's platform.linux_distribution(). Please use "
172
+ "distro.id(), distro.version() and distro.name() instead.",
173
+ DeprecationWarning,
174
+ stacklevel=2,
175
+ )
176
+ return _distro.linux_distribution(full_distribution_name)
177
+
178
+
179
+ def id():
180
+ # type: () -> str
181
+ """
182
+ Return the distro ID of the current distribution, as a
183
+ machine-readable string.
184
+
185
+ For a number of OS distributions, the returned distro ID value is
186
+ *reliable*, in the sense that it is documented and that it does not change
187
+ across releases of the distribution.
188
+
189
+ This package maintains the following reliable distro ID values:
190
+
191
+ ============== =========================================
192
+ Distro ID Distribution
193
+ ============== =========================================
194
+ "ubuntu" Ubuntu
195
+ "debian" Debian
196
+ "rhel" RedHat Enterprise Linux
197
+ "centos" CentOS
198
+ "fedora" Fedora
199
+ "sles" SUSE Linux Enterprise Server
200
+ "opensuse" openSUSE
201
+ "amazon" Amazon Linux
202
+ "arch" Arch Linux
203
+ "cloudlinux" CloudLinux OS
204
+ "exherbo" Exherbo Linux
205
+ "gentoo" GenToo Linux
206
+ "ibm_powerkvm" IBM PowerKVM
207
+ "kvmibm" KVM for IBM z Systems
208
+ "linuxmint" Linux Mint
209
+ "mageia" Mageia
210
+ "mandriva" Mandriva Linux
211
+ "parallels" Parallels
212
+ "pidora" Pidora
213
+ "raspbian" Raspbian
214
+ "oracle" Oracle Linux (and Oracle Enterprise Linux)
215
+ "scientific" Scientific Linux
216
+ "slackware" Slackware
217
+ "xenserver" XenServer
218
+ "openbsd" OpenBSD
219
+ "netbsd" NetBSD
220
+ "freebsd" FreeBSD
221
+ "midnightbsd" MidnightBSD
222
+ ============== =========================================
223
+
224
+ If you have a need to get distros for reliable IDs added into this set,
225
+ or if you find that the :func:`distro.id` function returns a different
226
+ distro ID for one of the listed distros, please create an issue in the
227
+ `distro issue tracker`_.
228
+
229
+ **Lookup hierarchy and transformations:**
230
+
231
+ First, the ID is obtained from the following sources, in the specified
232
+ order. The first available and non-empty value is used:
233
+
234
+ * the value of the "ID" attribute of the os-release file,
235
+
236
+ * the value of the "Distributor ID" attribute returned by the lsb_release
237
+ command,
238
+
239
+ * the first part of the file name of the distro release file,
240
+
241
+ The so determined ID value then passes the following transformations,
242
+ before it is returned by this method:
243
+
244
+ * it is translated to lower case,
245
+
246
+ * blanks (which should not be there anyway) are translated to underscores,
247
+
248
+ * a normalization of the ID is performed, based upon
249
+ `normalization tables`_. The purpose of this normalization is to ensure
250
+ that the ID is as reliable as possible, even across incompatible changes
251
+ in the OS distributions. A common reason for an incompatible change is
252
+ the addition of an os-release file, or the addition of the lsb_release
253
+ command, with ID values that differ from what was previously determined
254
+ from the distro release file name.
255
+ """
256
+ return _distro.id()
257
+
258
+
259
+ def name(pretty=False):
260
+ # type: (bool) -> str
261
+ """
262
+ Return the name of the current OS distribution, as a human-readable
263
+ string.
264
+
265
+ If *pretty* is false, the name is returned without version or codename.
266
+ (e.g. "CentOS Linux")
267
+
268
+ If *pretty* is true, the version and codename are appended.
269
+ (e.g. "CentOS Linux 7.1.1503 (Core)")
270
+
271
+ **Lookup hierarchy:**
272
+
273
+ The name is obtained from the following sources, in the specified order.
274
+ The first available and non-empty value is used:
275
+
276
+ * If *pretty* is false:
277
+
278
+ - the value of the "NAME" attribute of the os-release file,
279
+
280
+ - the value of the "Distributor ID" attribute returned by the lsb_release
281
+ command,
282
+
283
+ - the value of the "<name>" field of the distro release file.
284
+
285
+ * If *pretty* is true:
286
+
287
+ - the value of the "PRETTY_NAME" attribute of the os-release file,
288
+
289
+ - the value of the "Description" attribute returned by the lsb_release
290
+ command,
291
+
292
+ - the value of the "<name>" field of the distro release file, appended
293
+ with the value of the pretty version ("<version_id>" and "<codename>"
294
+ fields) of the distro release file, if available.
295
+ """
296
+ return _distro.name(pretty)
297
+
298
+
299
+ def version(pretty=False, best=False):
300
+ # type: (bool, bool) -> str
301
+ """
302
+ Return the version of the current OS distribution, as a human-readable
303
+ string.
304
+
305
+ If *pretty* is false, the version is returned without codename (e.g.
306
+ "7.0").
307
+
308
+ If *pretty* is true, the codename in parenthesis is appended, if the
309
+ codename is non-empty (e.g. "7.0 (Maipo)").
310
+
311
+ Some distributions provide version numbers with different precisions in
312
+ the different sources of distribution information. Examining the different
313
+ sources in a fixed priority order does not always yield the most precise
314
+ version (e.g. for Debian 8.2, or CentOS 7.1).
315
+
316
+ The *best* parameter can be used to control the approach for the returned
317
+ version:
318
+
319
+ If *best* is false, the first non-empty version number in priority order of
320
+ the examined sources is returned.
321
+
322
+ If *best* is true, the most precise version number out of all examined
323
+ sources is returned.
324
+
325
+ **Lookup hierarchy:**
326
+
327
+ In all cases, the version number is obtained from the following sources.
328
+ If *best* is false, this order represents the priority order:
329
+
330
+ * the value of the "VERSION_ID" attribute of the os-release file,
331
+ * the value of the "Release" attribute returned by the lsb_release
332
+ command,
333
+ * the version number parsed from the "<version_id>" field of the first line
334
+ of the distro release file,
335
+ * the version number parsed from the "PRETTY_NAME" attribute of the
336
+ os-release file, if it follows the format of the distro release files.
337
+ * the version number parsed from the "Description" attribute returned by
338
+ the lsb_release command, if it follows the format of the distro release
339
+ files.
340
+ """
341
+ return _distro.version(pretty, best)
342
+
343
+
344
+ def version_parts(best=False):
345
+ # type: (bool) -> Tuple[str, str, str]
346
+ """
347
+ Return the version of the current OS distribution as a tuple
348
+ ``(major, minor, build_number)`` with items as follows:
349
+
350
+ * ``major``: The result of :func:`distro.major_version`.
351
+
352
+ * ``minor``: The result of :func:`distro.minor_version`.
353
+
354
+ * ``build_number``: The result of :func:`distro.build_number`.
355
+
356
+ For a description of the *best* parameter, see the :func:`distro.version`
357
+ method.
358
+ """
359
+ return _distro.version_parts(best)
360
+
361
+
362
+ def major_version(best=False):
363
+ # type: (bool) -> str
364
+ """
365
+ Return the major version of the current OS distribution, as a string,
366
+ if provided.
367
+ Otherwise, the empty string is returned. The major version is the first
368
+ part of the dot-separated version string.
369
+
370
+ For a description of the *best* parameter, see the :func:`distro.version`
371
+ method.
372
+ """
373
+ return _distro.major_version(best)
374
+
375
+
376
+ def minor_version(best=False):
377
+ # type: (bool) -> str
378
+ """
379
+ Return the minor version of the current OS distribution, as a string,
380
+ if provided.
381
+ Otherwise, the empty string is returned. The minor version is the second
382
+ part of the dot-separated version string.
383
+
384
+ For a description of the *best* parameter, see the :func:`distro.version`
385
+ method.
386
+ """
387
+ return _distro.minor_version(best)
388
+
389
+
390
+ def build_number(best=False):
391
+ # type: (bool) -> str
392
+ """
393
+ Return the build number of the current OS distribution, as a string,
394
+ if provided.
395
+ Otherwise, the empty string is returned. The build number is the third part
396
+ of the dot-separated version string.
397
+
398
+ For a description of the *best* parameter, see the :func:`distro.version`
399
+ method.
400
+ """
401
+ return _distro.build_number(best)
402
+
403
+
404
+ def like():
405
+ # type: () -> str
406
+ """
407
+ Return a space-separated list of distro IDs of distributions that are
408
+ closely related to the current OS distribution in regards to packaging
409
+ and programming interfaces, for example distributions the current
410
+ distribution is a derivative from.
411
+
412
+ **Lookup hierarchy:**
413
+
414
+ This information item is only provided by the os-release file.
415
+ For details, see the description of the "ID_LIKE" attribute in the
416
+ `os-release man page
417
+ <http://www.freedesktop.org/software/systemd/man/os-release.html>`_.
418
+ """
419
+ return _distro.like()
420
+
421
+
422
+ def codename():
423
+ # type: () -> str
424
+ """
425
+ Return the codename for the release of the current OS distribution,
426
+ as a string.
427
+
428
+ If the distribution does not have a codename, an empty string is returned.
429
+
430
+ Note that the returned codename is not always really a codename. For
431
+ example, openSUSE returns "x86_64". This function does not handle such
432
+ cases in any special way and just returns the string it finds, if any.
433
+
434
+ **Lookup hierarchy:**
435
+
436
+ * the codename within the "VERSION" attribute of the os-release file, if
437
+ provided,
438
+
439
+ * the value of the "Codename" attribute returned by the lsb_release
440
+ command,
441
+
442
+ * the value of the "<codename>" field of the distro release file.
443
+ """
444
+ return _distro.codename()
445
+
446
+
447
+ def info(pretty=False, best=False):
448
+ # type: (bool, bool) -> InfoDict
449
+ """
450
+ Return certain machine-readable information items about the current OS
451
+ distribution in a dictionary, as shown in the following example:
452
+
453
+ .. sourcecode:: python
454
+
455
+ {
456
+ 'id': 'rhel',
457
+ 'version': '7.0',
458
+ 'version_parts': {
459
+ 'major': '7',
460
+ 'minor': '0',
461
+ 'build_number': ''
462
+ },
463
+ 'like': 'fedora',
464
+ 'codename': 'Maipo'
465
+ }
466
+
467
+ The dictionary structure and keys are always the same, regardless of which
468
+ information items are available in the underlying data sources. The values
469
+ for the various keys are as follows:
470
+
471
+ * ``id``: The result of :func:`distro.id`.
472
+
473
+ * ``version``: The result of :func:`distro.version`.
474
+
475
+ * ``version_parts -> major``: The result of :func:`distro.major_version`.
476
+
477
+ * ``version_parts -> minor``: The result of :func:`distro.minor_version`.
478
+
479
+ * ``version_parts -> build_number``: The result of
480
+ :func:`distro.build_number`.
481
+
482
+ * ``like``: The result of :func:`distro.like`.
483
+
484
+ * ``codename``: The result of :func:`distro.codename`.
485
+
486
+ For a description of the *pretty* and *best* parameters, see the
487
+ :func:`distro.version` method.
488
+ """
489
+ return _distro.info(pretty, best)
490
+
491
+
492
+ def os_release_info():
493
+ # type: () -> Dict[str, str]
494
+ """
495
+ Return a dictionary containing key-value pairs for the information items
496
+ from the os-release file data source of the current OS distribution.
497
+
498
+ See `os-release file`_ for details about these information items.
499
+ """
500
+ return _distro.os_release_info()
501
+
502
+
503
+ def lsb_release_info():
504
+ # type: () -> Dict[str, str]
505
+ """
506
+ Return a dictionary containing key-value pairs for the information items
507
+ from the lsb_release command data source of the current OS distribution.
508
+
509
+ See `lsb_release command output`_ for details about these information
510
+ items.
511
+ """
512
+ return _distro.lsb_release_info()
513
+
514
+
515
+ def distro_release_info():
516
+ # type: () -> Dict[str, str]
517
+ """
518
+ Return a dictionary containing key-value pairs for the information items
519
+ from the distro release file data source of the current OS distribution.
520
+
521
+ See `distro release file`_ for details about these information items.
522
+ """
523
+ return _distro.distro_release_info()
524
+
525
+
526
+ def uname_info():
527
+ # type: () -> Dict[str, str]
528
+ """
529
+ Return a dictionary containing key-value pairs for the information items
530
+ from the distro release file data source of the current OS distribution.
531
+ """
532
+ return _distro.uname_info()
533
+
534
+
535
+ def os_release_attr(attribute):
536
+ # type: (str) -> str
537
+ """
538
+ Return a single named information item from the os-release file data source
539
+ of the current OS distribution.
540
+
541
+ Parameters:
542
+
543
+ * ``attribute`` (string): Key of the information item.
544
+
545
+ Returns:
546
+
547
+ * (string): Value of the information item, if the item exists.
548
+ The empty string, if the item does not exist.
549
+
550
+ See `os-release file`_ for details about these information items.
551
+ """
552
+ return _distro.os_release_attr(attribute)
553
+
554
+
555
+ def lsb_release_attr(attribute):
556
+ # type: (str) -> str
557
+ """
558
+ Return a single named information item from the lsb_release command output
559
+ data source of the current OS distribution.
560
+
561
+ Parameters:
562
+
563
+ * ``attribute`` (string): Key of the information item.
564
+
565
+ Returns:
566
+
567
+ * (string): Value of the information item, if the item exists.
568
+ The empty string, if the item does not exist.
569
+
570
+ See `lsb_release command output`_ for details about these information
571
+ items.
572
+ """
573
+ return _distro.lsb_release_attr(attribute)
574
+
575
+
576
+ def distro_release_attr(attribute):
577
+ # type: (str) -> str
578
+ """
579
+ Return a single named information item from the distro release file
580
+ data source of the current OS distribution.
581
+
582
+ Parameters:
583
+
584
+ * ``attribute`` (string): Key of the information item.
585
+
586
+ Returns:
587
+
588
+ * (string): Value of the information item, if the item exists.
589
+ The empty string, if the item does not exist.
590
+
591
+ See `distro release file`_ for details about these information items.
592
+ """
593
+ return _distro.distro_release_attr(attribute)
594
+
595
+
596
+ def uname_attr(attribute):
597
+ # type: (str) -> str
598
+ """
599
+ Return a single named information item from the distro release file
600
+ data source of the current OS distribution.
601
+
602
+ Parameters:
603
+
604
+ * ``attribute`` (string): Key of the information item.
605
+
606
+ Returns:
607
+
608
+ * (string): Value of the information item, if the item exists.
609
+ The empty string, if the item does not exist.
610
+ """
611
+ return _distro.uname_attr(attribute)
612
+
613
+
614
+ try:
615
+ from functools import cached_property
616
+ except ImportError:
617
+ # Python < 3.8
618
+ class cached_property(object): # type: ignore
619
+ """A version of @property which caches the value. On access, it calls the
620
+ underlying function and sets the value in `__dict__` so future accesses
621
+ will not re-call the property.
622
+ """
623
+
624
+ def __init__(self, f):
625
+ # type: (Callable[[Any], Any]) -> None
626
+ self._fname = f.__name__
627
+ self._f = f
628
+
629
+ def __get__(self, obj, owner):
630
+ # type: (Any, Type[Any]) -> Any
631
+ assert obj is not None, "call {} on an instance".format(self._fname)
632
+ ret = obj.__dict__[self._fname] = self._f(obj)
633
+ return ret
634
+
635
+
636
+ class LinuxDistribution(object):
637
+ """
638
+ Provides information about a OS distribution.
639
+
640
+ This package creates a private module-global instance of this class with
641
+ default initialization arguments, that is used by the
642
+ `consolidated accessor functions`_ and `single source accessor functions`_.
643
+ By using default initialization arguments, that module-global instance
644
+ returns data about the current OS distribution (i.e. the distro this
645
+ package runs on).
646
+
647
+ Normally, it is not necessary to create additional instances of this class.
648
+ However, in situations where control is needed over the exact data sources
649
+ that are used, instances of this class can be created with a specific
650
+ distro release file, or a specific os-release file, or without invoking the
651
+ lsb_release command.
652
+ """
653
+
654
+ def __init__(
655
+ self,
656
+ include_lsb=True,
657
+ os_release_file="",
658
+ distro_release_file="",
659
+ include_uname=True,
660
+ root_dir=None,
661
+ ):
662
+ # type: (bool, str, str, bool, Optional[str]) -> None
663
+ """
664
+ The initialization method of this class gathers information from the
665
+ available data sources, and stores that in private instance attributes.
666
+ Subsequent access to the information items uses these private instance
667
+ attributes, so that the data sources are read only once.
668
+
669
+ Parameters:
670
+
671
+ * ``include_lsb`` (bool): Controls whether the
672
+ `lsb_release command output`_ is included as a data source.
673
+
674
+ If the lsb_release command is not available in the program execution
675
+ path, the data source for the lsb_release command will be empty.
676
+
677
+ * ``os_release_file`` (string): The path name of the
678
+ `os-release file`_ that is to be used as a data source.
679
+
680
+ An empty string (the default) will cause the default path name to
681
+ be used (see `os-release file`_ for details).
682
+
683
+ If the specified or defaulted os-release file does not exist, the
684
+ data source for the os-release file will be empty.
685
+
686
+ * ``distro_release_file`` (string): The path name of the
687
+ `distro release file`_ that is to be used as a data source.
688
+
689
+ An empty string (the default) will cause a default search algorithm
690
+ to be used (see `distro release file`_ for details).
691
+
692
+ If the specified distro release file does not exist, or if no default
693
+ distro release file can be found, the data source for the distro
694
+ release file will be empty.
695
+
696
+ * ``include_uname`` (bool): Controls whether uname command output is
697
+ included as a data source. If the uname command is not available in
698
+ the program execution path the data source for the uname command will
699
+ be empty.
700
+
701
+ * ``root_dir`` (string): The absolute path to the root directory to use
702
+ to find distro-related information files.
703
+
704
+ Public instance attributes:
705
+
706
+ * ``os_release_file`` (string): The path name of the
707
+ `os-release file`_ that is actually used as a data source. The
708
+ empty string if no distro release file is used as a data source.
709
+
710
+ * ``distro_release_file`` (string): The path name of the
711
+ `distro release file`_ that is actually used as a data source. The
712
+ empty string if no distro release file is used as a data source.
713
+
714
+ * ``include_lsb`` (bool): The result of the ``include_lsb`` parameter.
715
+ This controls whether the lsb information will be loaded.
716
+
717
+ * ``include_uname`` (bool): The result of the ``include_uname``
718
+ parameter. This controls whether the uname information will
719
+ be loaded.
720
+
721
+ Raises:
722
+
723
+ * :py:exc:`IOError`: Some I/O issue with an os-release file or distro
724
+ release file.
725
+
726
+ * :py:exc:`subprocess.CalledProcessError`: The lsb_release command had
727
+ some issue (other than not being available in the program execution
728
+ path).
729
+
730
+ * :py:exc:`UnicodeError`: A data source has unexpected characters or
731
+ uses an unexpected encoding.
732
+ """
733
+ self.root_dir = root_dir
734
+ self.etc_dir = os.path.join(root_dir, "etc") if root_dir else _UNIXCONFDIR
735
+ self.usr_lib_dir = (
736
+ os.path.join(root_dir, "usr/lib") if root_dir else _UNIXUSRLIBDIR
737
+ )
738
+
739
+ if os_release_file:
740
+ self.os_release_file = os_release_file
741
+ else:
742
+ etc_dir_os_release_file = os.path.join(self.etc_dir, _OS_RELEASE_BASENAME)
743
+ usr_lib_os_release_file = os.path.join(
744
+ self.usr_lib_dir, _OS_RELEASE_BASENAME
745
+ )
746
+
747
+ # NOTE: The idea is to respect order **and** have it set
748
+ # at all times for API backwards compatibility.
749
+ if os.path.isfile(etc_dir_os_release_file) or not os.path.isfile(
750
+ usr_lib_os_release_file
751
+ ):
752
+ self.os_release_file = etc_dir_os_release_file
753
+ else:
754
+ self.os_release_file = usr_lib_os_release_file
755
+
756
+ self.distro_release_file = distro_release_file or "" # updated later
757
+ self.include_lsb = include_lsb
758
+ self.include_uname = include_uname
759
+
760
+ def __repr__(self):
761
+ # type: () -> str
762
+ """Return repr of all info"""
763
+ return (
764
+ "LinuxDistribution("
765
+ "os_release_file={self.os_release_file!r}, "
766
+ "distro_release_file={self.distro_release_file!r}, "
767
+ "include_lsb={self.include_lsb!r}, "
768
+ "include_uname={self.include_uname!r}, "
769
+ "_os_release_info={self._os_release_info!r}, "
770
+ "_lsb_release_info={self._lsb_release_info!r}, "
771
+ "_distro_release_info={self._distro_release_info!r}, "
772
+ "_uname_info={self._uname_info!r})".format(self=self)
773
+ )
774
+
775
+ def linux_distribution(self, full_distribution_name=True):
776
+ # type: (bool) -> Tuple[str, str, str]
777
+ """
778
+ Return information about the OS distribution that is compatible
779
+ with Python's :func:`platform.linux_distribution`, supporting a subset
780
+ of its parameters.
781
+
782
+ For details, see :func:`distro.linux_distribution`.
783
+ """
784
+ return (
785
+ self.name() if full_distribution_name else self.id(),
786
+ self.version(),
787
+ self.codename(),
788
+ )
789
+
790
+ def id(self):
791
+ # type: () -> str
792
+ """Return the distro ID of the OS distribution, as a string.
793
+
794
+ For details, see :func:`distro.id`.
795
+ """
796
+
797
+ def normalize(distro_id, table):
798
+ # type: (str, Dict[str, str]) -> str
799
+ distro_id = distro_id.lower().replace(" ", "_")
800
+ return table.get(distro_id, distro_id)
801
+
802
+ distro_id = self.os_release_attr("id")
803
+ if distro_id:
804
+ return normalize(distro_id, NORMALIZED_OS_ID)
805
+
806
+ distro_id = self.lsb_release_attr("distributor_id")
807
+ if distro_id:
808
+ return normalize(distro_id, NORMALIZED_LSB_ID)
809
+
810
+ distro_id = self.distro_release_attr("id")
811
+ if distro_id:
812
+ return normalize(distro_id, NORMALIZED_DISTRO_ID)
813
+
814
+ distro_id = self.uname_attr("id")
815
+ if distro_id:
816
+ return normalize(distro_id, NORMALIZED_DISTRO_ID)
817
+
818
+ return ""
819
+
820
+ def name(self, pretty=False):
821
+ # type: (bool) -> str
822
+ """
823
+ Return the name of the OS distribution, as a string.
824
+
825
+ For details, see :func:`distro.name`.
826
+ """
827
+ name = (
828
+ self.os_release_attr("name")
829
+ or self.lsb_release_attr("distributor_id")
830
+ or self.distro_release_attr("name")
831
+ or self.uname_attr("name")
832
+ )
833
+ if pretty:
834
+ name = self.os_release_attr("pretty_name") or self.lsb_release_attr(
835
+ "description"
836
+ )
837
+ if not name:
838
+ name = self.distro_release_attr("name") or self.uname_attr("name")
839
+ version = self.version(pretty=True)
840
+ if version:
841
+ name = name + " " + version
842
+ return name or ""
843
+
844
+ def version(self, pretty=False, best=False):
845
+ # type: (bool, bool) -> str
846
+ """
847
+ Return the version of the OS distribution, as a string.
848
+
849
+ For details, see :func:`distro.version`.
850
+ """
851
+ versions = [
852
+ self.os_release_attr("version_id"),
853
+ self.lsb_release_attr("release"),
854
+ self.distro_release_attr("version_id"),
855
+ self._parse_distro_release_content(self.os_release_attr("pretty_name")).get(
856
+ "version_id", ""
857
+ ),
858
+ self._parse_distro_release_content(
859
+ self.lsb_release_attr("description")
860
+ ).get("version_id", ""),
861
+ self.uname_attr("release"),
862
+ ]
863
+ version = ""
864
+ if best:
865
+ # This algorithm uses the last version in priority order that has
866
+ # the best precision. If the versions are not in conflict, that
867
+ # does not matter; otherwise, using the last one instead of the
868
+ # first one might be considered a surprise.
869
+ for v in versions:
870
+ if v.count(".") > version.count(".") or version == "":
871
+ version = v
872
+ else:
873
+ for v in versions:
874
+ if v != "":
875
+ version = v
876
+ break
877
+ if pretty and version and self.codename():
878
+ version = "{0} ({1})".format(version, self.codename())
879
+ return version
880
+
881
+ def version_parts(self, best=False):
882
+ # type: (bool) -> Tuple[str, str, str]
883
+ """
884
+ Return the version of the OS distribution, as a tuple of version
885
+ numbers.
886
+
887
+ For details, see :func:`distro.version_parts`.
888
+ """
889
+ version_str = self.version(best=best)
890
+ if version_str:
891
+ version_regex = re.compile(r"(\d+)\.?(\d+)?\.?(\d+)?")
892
+ matches = version_regex.match(version_str)
893
+ if matches:
894
+ major, minor, build_number = matches.groups()
895
+ return major, minor or "", build_number or ""
896
+ return "", "", ""
897
+
898
+ def major_version(self, best=False):
899
+ # type: (bool) -> str
900
+ """
901
+ Return the major version number of the current distribution.
902
+
903
+ For details, see :func:`distro.major_version`.
904
+ """
905
+ return self.version_parts(best)[0]
906
+
907
+ def minor_version(self, best=False):
908
+ # type: (bool) -> str
909
+ """
910
+ Return the minor version number of the current distribution.
911
+
912
+ For details, see :func:`distro.minor_version`.
913
+ """
914
+ return self.version_parts(best)[1]
915
+
916
+ def build_number(self, best=False):
917
+ # type: (bool) -> str
918
+ """
919
+ Return the build number of the current distribution.
920
+
921
+ For details, see :func:`distro.build_number`.
922
+ """
923
+ return self.version_parts(best)[2]
924
+
925
+ def like(self):
926
+ # type: () -> str
927
+ """
928
+ Return the IDs of distributions that are like the OS distribution.
929
+
930
+ For details, see :func:`distro.like`.
931
+ """
932
+ return self.os_release_attr("id_like") or ""
933
+
934
+ def codename(self):
935
+ # type: () -> str
936
+ """
937
+ Return the codename of the OS distribution.
938
+
939
+ For details, see :func:`distro.codename`.
940
+ """
941
+ try:
942
+ # Handle os_release specially since distros might purposefully set
943
+ # this to empty string to have no codename
944
+ return self._os_release_info["codename"]
945
+ except KeyError:
946
+ return (
947
+ self.lsb_release_attr("codename")
948
+ or self.distro_release_attr("codename")
949
+ or ""
950
+ )
951
+
952
+ def info(self, pretty=False, best=False):
953
+ # type: (bool, bool) -> InfoDict
954
+ """
955
+ Return certain machine-readable information about the OS
956
+ distribution.
957
+
958
+ For details, see :func:`distro.info`.
959
+ """
960
+ return dict(
961
+ id=self.id(),
962
+ version=self.version(pretty, best),
963
+ version_parts=dict(
964
+ major=self.major_version(best),
965
+ minor=self.minor_version(best),
966
+ build_number=self.build_number(best),
967
+ ),
968
+ like=self.like(),
969
+ codename=self.codename(),
970
+ )
971
+
972
+ def os_release_info(self):
973
+ # type: () -> Dict[str, str]
974
+ """
975
+ Return a dictionary containing key-value pairs for the information
976
+ items from the os-release file data source of the OS distribution.
977
+
978
+ For details, see :func:`distro.os_release_info`.
979
+ """
980
+ return self._os_release_info
981
+
982
+ def lsb_release_info(self):
983
+ # type: () -> Dict[str, str]
984
+ """
985
+ Return a dictionary containing key-value pairs for the information
986
+ items from the lsb_release command data source of the OS
987
+ distribution.
988
+
989
+ For details, see :func:`distro.lsb_release_info`.
990
+ """
991
+ return self._lsb_release_info
992
+
993
+ def distro_release_info(self):
994
+ # type: () -> Dict[str, str]
995
+ """
996
+ Return a dictionary containing key-value pairs for the information
997
+ items from the distro release file data source of the OS
998
+ distribution.
999
+
1000
+ For details, see :func:`distro.distro_release_info`.
1001
+ """
1002
+ return self._distro_release_info
1003
+
1004
+ def uname_info(self):
1005
+ # type: () -> Dict[str, str]
1006
+ """
1007
+ Return a dictionary containing key-value pairs for the information
1008
+ items from the uname command data source of the OS distribution.
1009
+
1010
+ For details, see :func:`distro.uname_info`.
1011
+ """
1012
+ return self._uname_info
1013
+
1014
+ def os_release_attr(self, attribute):
1015
+ # type: (str) -> str
1016
+ """
1017
+ Return a single named information item from the os-release file data
1018
+ source of the OS distribution.
1019
+
1020
+ For details, see :func:`distro.os_release_attr`.
1021
+ """
1022
+ return self._os_release_info.get(attribute, "")
1023
+
1024
+ def lsb_release_attr(self, attribute):
1025
+ # type: (str) -> str
1026
+ """
1027
+ Return a single named information item from the lsb_release command
1028
+ output data source of the OS distribution.
1029
+
1030
+ For details, see :func:`distro.lsb_release_attr`.
1031
+ """
1032
+ return self._lsb_release_info.get(attribute, "")
1033
+
1034
+ def distro_release_attr(self, attribute):
1035
+ # type: (str) -> str
1036
+ """
1037
+ Return a single named information item from the distro release file
1038
+ data source of the OS distribution.
1039
+
1040
+ For details, see :func:`distro.distro_release_attr`.
1041
+ """
1042
+ return self._distro_release_info.get(attribute, "")
1043
+
1044
+ def uname_attr(self, attribute):
1045
+ # type: (str) -> str
1046
+ """
1047
+ Return a single named information item from the uname command
1048
+ output data source of the OS distribution.
1049
+
1050
+ For details, see :func:`distro.uname_attr`.
1051
+ """
1052
+ return self._uname_info.get(attribute, "")
1053
+
1054
+ @cached_property
1055
+ def _os_release_info(self):
1056
+ # type: () -> Dict[str, str]
1057
+ """
1058
+ Get the information items from the specified os-release file.
1059
+
1060
+ Returns:
1061
+ A dictionary containing all information items.
1062
+ """
1063
+ if os.path.isfile(self.os_release_file):
1064
+ with open(self.os_release_file) as release_file:
1065
+ return self._parse_os_release_content(release_file)
1066
+ return {}
1067
+
1068
+ @staticmethod
1069
+ def _parse_os_release_content(lines):
1070
+ # type: (TextIO) -> Dict[str, str]
1071
+ """
1072
+ Parse the lines of an os-release file.
1073
+
1074
+ Parameters:
1075
+
1076
+ * lines: Iterable through the lines in the os-release file.
1077
+ Each line must be a unicode string or a UTF-8 encoded byte
1078
+ string.
1079
+
1080
+ Returns:
1081
+ A dictionary containing all information items.
1082
+ """
1083
+ props = {}
1084
+ lexer = shlex.shlex(lines, posix=True)
1085
+ lexer.whitespace_split = True
1086
+
1087
+ # The shlex module defines its `wordchars` variable using literals,
1088
+ # making it dependent on the encoding of the Python source file.
1089
+ # In Python 2.6 and 2.7, the shlex source file is encoded in
1090
+ # 'iso-8859-1', and the `wordchars` variable is defined as a byte
1091
+ # string. This causes a UnicodeDecodeError to be raised when the
1092
+ # parsed content is a unicode object. The following fix resolves that
1093
+ # (... but it should be fixed in shlex...):
1094
+ if sys.version_info[0] == 2 and isinstance(lexer.wordchars, bytes):
1095
+ lexer.wordchars = lexer.wordchars.decode("iso-8859-1")
1096
+
1097
+ tokens = list(lexer)
1098
+ for token in tokens:
1099
+ # At this point, all shell-like parsing has been done (i.e.
1100
+ # comments processed, quotes and backslash escape sequences
1101
+ # processed, multi-line values assembled, trailing newlines
1102
+ # stripped, etc.), so the tokens are now either:
1103
+ # * variable assignments: var=value
1104
+ # * commands or their arguments (not allowed in os-release)
1105
+ if "=" in token:
1106
+ k, v = token.split("=", 1)
1107
+ props[k.lower()] = v
1108
+ else:
1109
+ # Ignore any tokens that are not variable assignments
1110
+ pass
1111
+
1112
+ if "version_codename" in props:
1113
+ # os-release added a version_codename field. Use that in
1114
+ # preference to anything else Note that some distros purposefully
1115
+ # do not have code names. They should be setting
1116
+ # version_codename=""
1117
+ props["codename"] = props["version_codename"]
1118
+ elif "ubuntu_codename" in props:
1119
+ # Same as above but a non-standard field name used on older Ubuntus
1120
+ props["codename"] = props["ubuntu_codename"]
1121
+ elif "version" in props:
1122
+ # If there is no version_codename, parse it from the version
1123
+ match = re.search(r"(\(\D+\))|,(\s+)?\D+", props["version"])
1124
+ if match:
1125
+ codename = match.group()
1126
+ codename = codename.strip("()")
1127
+ codename = codename.strip(",")
1128
+ codename = codename.strip()
1129
+ # codename appears within paranthese.
1130
+ props["codename"] = codename
1131
+
1132
+ return props
1133
+
1134
+ @cached_property
1135
+ def _lsb_release_info(self):
1136
+ # type: () -> Dict[str, str]
1137
+ """
1138
+ Get the information items from the lsb_release command output.
1139
+
1140
+ Returns:
1141
+ A dictionary containing all information items.
1142
+ """
1143
+ if not self.include_lsb:
1144
+ return {}
1145
+ with open(os.devnull, "wb") as devnull:
1146
+ try:
1147
+ cmd = ("lsb_release", "-a")
1148
+ stdout = subprocess.check_output(cmd, stderr=devnull)
1149
+ # Command not found or lsb_release returned error
1150
+ except (OSError, subprocess.CalledProcessError):
1151
+ return {}
1152
+ content = self._to_str(stdout).splitlines()
1153
+ return self._parse_lsb_release_content(content)
1154
+
1155
+ @staticmethod
1156
+ def _parse_lsb_release_content(lines):
1157
+ # type: (Iterable[str]) -> Dict[str, str]
1158
+ """
1159
+ Parse the output of the lsb_release command.
1160
+
1161
+ Parameters:
1162
+
1163
+ * lines: Iterable through the lines of the lsb_release output.
1164
+ Each line must be a unicode string or a UTF-8 encoded byte
1165
+ string.
1166
+
1167
+ Returns:
1168
+ A dictionary containing all information items.
1169
+ """
1170
+ props = {}
1171
+ for line in lines:
1172
+ kv = line.strip("\n").split(":", 1)
1173
+ if len(kv) != 2:
1174
+ # Ignore lines without colon.
1175
+ continue
1176
+ k, v = kv
1177
+ props.update({k.replace(" ", "_").lower(): v.strip()})
1178
+ return props
1179
+
1180
+ @cached_property
1181
+ def _uname_info(self):
1182
+ # type: () -> Dict[str, str]
1183
+ with open(os.devnull, "wb") as devnull:
1184
+ try:
1185
+ cmd = ("uname", "-rs")
1186
+ stdout = subprocess.check_output(cmd, stderr=devnull)
1187
+ except OSError:
1188
+ return {}
1189
+ content = self._to_str(stdout).splitlines()
1190
+ return self._parse_uname_content(content)
1191
+
1192
+ @staticmethod
1193
+ def _parse_uname_content(lines):
1194
+ # type: (Sequence[str]) -> Dict[str, str]
1195
+ props = {}
1196
+ match = re.search(r"^([^\s]+)\s+([\d\.]+)", lines[0].strip())
1197
+ if match:
1198
+ name, version = match.groups()
1199
+
1200
+ # This is to prevent the Linux kernel version from
1201
+ # appearing as the 'best' version on otherwise
1202
+ # identifiable distributions.
1203
+ if name == "Linux":
1204
+ return {}
1205
+ props["id"] = name.lower()
1206
+ props["name"] = name
1207
+ props["release"] = version
1208
+ return props
1209
+
1210
+ @staticmethod
1211
+ def _to_str(text):
1212
+ # type: (Union[bytes, str]) -> str
1213
+ encoding = sys.getfilesystemencoding()
1214
+ encoding = "utf-8" if encoding == "ascii" else encoding
1215
+
1216
+ if sys.version_info[0] >= 3:
1217
+ if isinstance(text, bytes):
1218
+ return text.decode(encoding)
1219
+ else:
1220
+ if isinstance(text, unicode): # noqa
1221
+ return text.encode(encoding)
1222
+
1223
+ return text
1224
+
1225
+ @cached_property
1226
+ def _distro_release_info(self):
1227
+ # type: () -> Dict[str, str]
1228
+ """
1229
+ Get the information items from the specified distro release file.
1230
+
1231
+ Returns:
1232
+ A dictionary containing all information items.
1233
+ """
1234
+ if self.distro_release_file:
1235
+ # If it was specified, we use it and parse what we can, even if
1236
+ # its file name or content does not match the expected pattern.
1237
+ distro_info = self._parse_distro_release_file(self.distro_release_file)
1238
+ basename = os.path.basename(self.distro_release_file)
1239
+ # The file name pattern for user-specified distro release files
1240
+ # is somewhat more tolerant (compared to when searching for the
1241
+ # file), because we want to use what was specified as best as
1242
+ # possible.
1243
+ match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
1244
+ if "name" in distro_info and "cloudlinux" in distro_info["name"].lower():
1245
+ distro_info["id"] = "cloudlinux"
1246
+ elif match:
1247
+ distro_info["id"] = match.group(1)
1248
+ return distro_info
1249
+ else:
1250
+ try:
1251
+ basenames = os.listdir(self.etc_dir)
1252
+ # We sort for repeatability in cases where there are multiple
1253
+ # distro specific files; e.g. CentOS, Oracle, Enterprise all
1254
+ # containing `redhat-release` on top of their own.
1255
+ basenames.sort()
1256
+ except OSError:
1257
+ # This may occur when /etc is not readable but we can't be
1258
+ # sure about the *-release files. Check common entries of
1259
+ # /etc for information. If they turn out to not be there the
1260
+ # error is handled in `_parse_distro_release_file()`.
1261
+ basenames = [
1262
+ "SuSE-release",
1263
+ "arch-release",
1264
+ "base-release",
1265
+ "centos-release",
1266
+ "fedora-release",
1267
+ "gentoo-release",
1268
+ "mageia-release",
1269
+ "mandrake-release",
1270
+ "mandriva-release",
1271
+ "mandrivalinux-release",
1272
+ "manjaro-release",
1273
+ "oracle-release",
1274
+ "redhat-release",
1275
+ "sl-release",
1276
+ "slackware-version",
1277
+ ]
1278
+ for basename in basenames:
1279
+ if basename in _DISTRO_RELEASE_IGNORE_BASENAMES:
1280
+ continue
1281
+ match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
1282
+ if match:
1283
+ filepath = os.path.join(self.etc_dir, basename)
1284
+ distro_info = self._parse_distro_release_file(filepath)
1285
+ if "name" in distro_info:
1286
+ # The name is always present if the pattern matches
1287
+ self.distro_release_file = filepath
1288
+ distro_info["id"] = match.group(1)
1289
+ if "cloudlinux" in distro_info["name"].lower():
1290
+ distro_info["id"] = "cloudlinux"
1291
+ return distro_info
1292
+ return {}
1293
+
1294
+ def _parse_distro_release_file(self, filepath):
1295
+ # type: (str) -> Dict[str, str]
1296
+ """
1297
+ Parse a distro release file.
1298
+
1299
+ Parameters:
1300
+
1301
+ * filepath: Path name of the distro release file.
1302
+
1303
+ Returns:
1304
+ A dictionary containing all information items.
1305
+ """
1306
+ try:
1307
+ with open(filepath) as fp:
1308
+ # Only parse the first line. For instance, on SLES there
1309
+ # are multiple lines. We don't want them...
1310
+ return self._parse_distro_release_content(fp.readline())
1311
+ except (OSError, IOError):
1312
+ # Ignore not being able to read a specific, seemingly version
1313
+ # related file.
1314
+ # See https://github.com/python-distro/distro/issues/162
1315
+ return {}
1316
+
1317
+ @staticmethod
1318
+ def _parse_distro_release_content(line):
1319
+ # type: (str) -> Dict[str, str]
1320
+ """
1321
+ Parse a line from a distro release file.
1322
+
1323
+ Parameters:
1324
+ * line: Line from the distro release file. Must be a unicode string
1325
+ or a UTF-8 encoded byte string.
1326
+
1327
+ Returns:
1328
+ A dictionary containing all information items.
1329
+ """
1330
+ matches = _DISTRO_RELEASE_CONTENT_REVERSED_PATTERN.match(line.strip()[::-1])
1331
+ distro_info = {}
1332
+ if matches:
1333
+ # regexp ensures non-None
1334
+ distro_info["name"] = matches.group(3)[::-1]
1335
+ if matches.group(2):
1336
+ distro_info["version_id"] = matches.group(2)[::-1]
1337
+ if matches.group(1):
1338
+ distro_info["codename"] = matches.group(1)[::-1]
1339
+ elif line:
1340
+ distro_info["name"] = line.strip()
1341
+ return distro_info
1342
+
1343
+
1344
+ _distro = LinuxDistribution()
1345
+
1346
+
1347
+ def main():
1348
+ # type: () -> None
1349
+ logger = logging.getLogger(__name__)
1350
+ logger.setLevel(logging.DEBUG)
1351
+ logger.addHandler(logging.StreamHandler(sys.stdout))
1352
+
1353
+ parser = argparse.ArgumentParser(description="OS distro info tool")
1354
+ parser.add_argument(
1355
+ "--json", "-j", help="Output in machine readable format", action="store_true"
1356
+ )
1357
+
1358
+ parser.add_argument(
1359
+ "--root-dir",
1360
+ "-r",
1361
+ type=str,
1362
+ dest="root_dir",
1363
+ help="Path to the root filesystem directory (defaults to /)",
1364
+ )
1365
+
1366
+ args = parser.parse_args()
1367
+
1368
+ if args.root_dir:
1369
+ dist = LinuxDistribution(
1370
+ include_lsb=False, include_uname=False, root_dir=args.root_dir
1371
+ )
1372
+ else:
1373
+ dist = _distro
1374
+
1375
+ if args.json:
1376
+ logger.info(json.dumps(dist.info(), indent=4, sort_keys=True))
1377
+ else:
1378
+ logger.info("Name: %s", dist.name(pretty=True))
1379
+ distribution_version = dist.version(pretty=True)
1380
+ logger.info("Version: %s", distribution_version)
1381
+ distribution_codename = dist.codename()
1382
+ logger.info("Codename: %s", distribution_codename)
1383
+
1384
+
1385
+ if __name__ == "__main__":
1386
+ main()