py2docfx 0.1.16.dev2064350__py3-none-any.whl → 0.1.17__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. py2docfx/convert_prepare/environment.py +1 -3
  2. py2docfx/convert_prepare/get_source.py +1 -6
  3. py2docfx/convert_prepare/package_info.py +1 -1
  4. py2docfx/docfx_yaml/miss_reference.py +1 -1
  5. py2docfx/docfx_yaml/parameter_utils.py +58 -6
  6. py2docfx/docfx_yaml/tests/roots/test-translator-typing/code_with_typing.py +14 -0
  7. py2docfx/docfx_yaml/tests/roots/test-translator-typing/conf.py +18 -0
  8. py2docfx/docfx_yaml/tests/test_translator_typing.py +39 -0
  9. py2docfx/docfx_yaml/utils.py +2 -2
  10. py2docfx/venv/basevenv/Lib/site-packages/certifi/__init__.py +1 -1
  11. py2docfx/venv/basevenv/Lib/site-packages/certifi/core.py +1 -32
  12. py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/cli/__main__.py +62 -2
  13. py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/constant.py +17 -0
  14. py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/legacy.py +1 -3
  15. py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/md.py +19 -14
  16. py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/utils.py +6 -0
  17. py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/version.py +1 -1
  18. py2docfx/venv/basevenv/Lib/site-packages/packaging/__init__.py +1 -1
  19. py2docfx/venv/basevenv/Lib/site-packages/packaging/_elffile.py +1 -2
  20. py2docfx/venv/basevenv/Lib/site-packages/packaging/_manylinux.py +1 -2
  21. py2docfx/venv/basevenv/Lib/site-packages/packaging/_parser.py +1 -2
  22. py2docfx/venv/basevenv/Lib/site-packages/packaging/_tokenizer.py +5 -4
  23. py2docfx/venv/basevenv/Lib/site-packages/packaging/licenses/__init__.py +1 -1
  24. py2docfx/venv/basevenv/Lib/site-packages/packaging/markers.py +53 -22
  25. py2docfx/venv/basevenv/Lib/site-packages/packaging/metadata.py +1 -2
  26. py2docfx/venv/basevenv/Lib/site-packages/packaging/specifiers.py +1 -2
  27. py2docfx/venv/basevenv/Lib/site-packages/packaging/tags.py +39 -0
  28. py2docfx/venv/basevenv/Lib/site-packages/pkg_resources/__init__.py +6 -7
  29. py2docfx/venv/basevenv/Lib/site-packages/pygments/__init__.py +1 -1
  30. py2docfx/venv/basevenv/Lib/site-packages/pygments/lexers/_sql_builtins.py +106 -0
  31. py2docfx/venv/basevenv/Lib/site-packages/pygments/lexers/scripting.py +5 -3
  32. py2docfx/venv/basevenv/Lib/site-packages/pygments/lexers/sql.py +24 -118
  33. py2docfx/venv/basevenv/Lib/site-packages/requests/__version__.py +2 -2
  34. py2docfx/venv/basevenv/Lib/site-packages/requests/compat.py +12 -0
  35. py2docfx/venv/basevenv/Lib/site-packages/requests/models.py +3 -1
  36. py2docfx/venv/basevenv/Lib/site-packages/requests/utils.py +6 -16
  37. py2docfx/venv/basevenv/Lib/site-packages/setuptools/__init__.py +0 -38
  38. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_discovery.py +33 -0
  39. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build_scripts.py +1 -1
  40. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/config.py +0 -2
  41. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_unix.py +63 -0
  42. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py +5 -6
  43. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_entry_points.py +4 -0
  44. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_normalization.py +0 -2
  45. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_path.py +12 -3
  46. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_reqs.py +1 -1
  47. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_scripts.py +361 -0
  48. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_shutil.py +6 -0
  49. py2docfx/venv/basevenv/Lib/site-packages/setuptools/build_meta.py +25 -37
  50. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/bdist_egg.py +9 -11
  51. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/bdist_wheel.py +1 -1
  52. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/build_ext.py +29 -28
  53. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/develop.py +39 -179
  54. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/easy_install.py +17 -2352
  55. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/editable_wheel.py +14 -31
  56. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/egg_info.py +0 -2
  57. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/install.py +3 -55
  58. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/install_scripts.py +5 -11
  59. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/sdist.py +1 -1
  60. py2docfx/venv/basevenv/Lib/site-packages/setuptools/compat/py310.py +11 -0
  61. py2docfx/venv/basevenv/Lib/site-packages/setuptools/dist.py +10 -12
  62. py2docfx/venv/basevenv/Lib/site-packages/setuptools/installer.py +34 -29
  63. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/contexts.py +0 -14
  64. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/fixtures.py +235 -0
  65. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/integration/test_pbr.py +20 -0
  66. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_build_meta.py +0 -24
  67. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_develop.py +1 -64
  68. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_dist.py +2 -2
  69. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_dist_info.py +0 -63
  70. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_editable_install.py +15 -41
  71. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_egg_info.py +3 -2
  72. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_scripts.py +12 -0
  73. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_wheel.py +12 -36
  74. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_windows_wrappers.py +3 -4
  75. py2docfx/venv/basevenv/Lib/site-packages/setuptools/wheel.py +49 -24
  76. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/__init__.py +6 -0
  77. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/arabic_stemmer.py +798 -797
  78. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/armenian_stemmer.py +212 -213
  79. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/basestemmer.py +20 -54
  80. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/basque_stemmer.py +202 -228
  81. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/catalan_stemmer.py +370 -375
  82. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/danish_stemmer.py +63 -61
  83. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/dutch_porter_stemmer.py +466 -0
  84. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/dutch_stemmer.py +1217 -343
  85. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/english_stemmer.py +295 -264
  86. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/esperanto_stemmer.py +588 -0
  87. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/estonian_stemmer.py +850 -0
  88. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/finnish_stemmer.py +144 -143
  89. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/french_stemmer.py +308 -246
  90. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/german_stemmer.py +224 -167
  91. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/greek_stemmer.py +1314 -1313
  92. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/hindi_stemmer.py +39 -38
  93. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/hungarian_stemmer.py +231 -256
  94. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/indonesian_stemmer.py +61 -64
  95. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/irish_stemmer.py +101 -106
  96. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/italian_stemmer.py +272 -272
  97. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/lithuanian_stemmer.py +233 -240
  98. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/nepali_stemmer.py +108 -134
  99. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/norwegian_stemmer.py +108 -63
  100. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/porter_stemmer.py +101 -108
  101. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/portuguese_stemmer.py +241 -250
  102. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/romanian_stemmer.py +332 -296
  103. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/russian_stemmer.py +178 -179
  104. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/serbian_stemmer.py +2331 -2332
  105. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/spanish_stemmer.py +254 -259
  106. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/swedish_stemmer.py +143 -70
  107. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/tamil_stemmer.py +638 -1491
  108. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/turkish_stemmer.py +326 -292
  109. py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/yiddish_stemmer.py +245 -246
  110. py2docfx/venv/basevenv/Lib/site-packages/urllib3/_version.py +2 -2
  111. py2docfx/venv/basevenv/Lib/site-packages/urllib3/connection.py +87 -38
  112. py2docfx/venv/basevenv/Lib/site-packages/urllib3/contrib/emscripten/fetch.py +20 -0
  113. py2docfx/venv/basevenv/Lib/site-packages/urllib3/poolmanager.py +17 -1
  114. py2docfx/venv/basevenv/Lib/site-packages/urllib3/response.py +53 -24
  115. py2docfx/venv/basevenv/Lib/site-packages/urllib3/util/request.py +12 -4
  116. py2docfx/venv/basevenv/Lib/site-packages/urllib3/util/ssl_.py +1 -1
  117. py2docfx/venv/venv1/Lib/site-packages/azure/core/_version.py +1 -1
  118. py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/_base_async.py +1 -1
  119. py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_aiohttp.py +1 -1
  120. py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_base_async.py +2 -1
  121. py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_requests_asyncio.py +1 -1
  122. py2docfx/venv/venv1/Lib/site-packages/azure/core/rest/_aiohttp.py +2 -2
  123. py2docfx/venv/venv1/Lib/site-packages/azure/core/rest/_requests_asyncio.py +1 -1
  124. py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/opentelemetry.py +13 -1
  125. py2docfx/venv/venv1/Lib/site-packages/azure/core/utils/_pipeline_transport_rest_shared_async.py +2 -1
  126. py2docfx/venv/venv1/Lib/site-packages/azure/core/utils/_utils.py +1 -1
  127. py2docfx/venv/venv1/Lib/site-packages/azure/identity/_constants.py +1 -0
  128. py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/default.py +23 -2
  129. py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/environment.py +12 -16
  130. py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/service_fabric.py +22 -1
  131. py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/user_password.py +10 -6
  132. py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/vscode.py +13 -4
  133. py2docfx/venv/venv1/Lib/site-packages/azure/identity/_internal/auth_code_redirect_handler.py +3 -5
  134. py2docfx/venv/venv1/Lib/site-packages/azure/identity/_internal/msal_client.py +2 -1
  135. py2docfx/venv/venv1/Lib/site-packages/azure/identity/_persistent_cache.py +3 -2
  136. py2docfx/venv/venv1/Lib/site-packages/azure/identity/_version.py +1 -1
  137. py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/azd_cli.py +1 -1
  138. py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/azure_cli.py +1 -1
  139. py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/azure_powershell.py +1 -1
  140. py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/chained.py +1 -1
  141. py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/default.py +22 -2
  142. py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/environment.py +2 -2
  143. py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/service_fabric.py +17 -1
  144. py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/vscode.py +4 -4
  145. py2docfx/venv/venv1/Lib/site-packages/certifi/__init__.py +1 -1
  146. py2docfx/venv/venv1/Lib/site-packages/certifi/core.py +1 -32
  147. py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/cli/__main__.py +62 -2
  148. py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/constant.py +17 -0
  149. py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/legacy.py +1 -3
  150. py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/md.py +19 -14
  151. py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/utils.py +6 -0
  152. py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/version.py +1 -1
  153. py2docfx/venv/venv1/Lib/site-packages/cryptography/__about__.py +2 -2
  154. py2docfx/venv/venv1/Lib/site-packages/cryptography/__init__.py +2 -2
  155. py2docfx/venv/venv1/Lib/site-packages/cryptography/fernet.py +2 -1
  156. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/_oid.py +35 -2
  157. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/backends/openssl/backend.py +33 -10
  158. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/__init__.pyi +14 -5
  159. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/ocsp.pyi +2 -2
  160. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/__init__.pyi +3 -0
  161. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/aead.pyi +49 -45
  162. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/ciphers.pyi +2 -2
  163. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed25519.pyi +2 -1
  164. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed448.pyi +2 -1
  165. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/hashes.pyi +10 -1
  166. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/hmac.pyi +3 -2
  167. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/kdf.pyi +8 -2
  168. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/keys.pyi +3 -2
  169. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/poly1305.pyi +6 -4
  170. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/x25519.pyi +2 -1
  171. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/x448.pyi +2 -1
  172. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/pkcs12.pyi +9 -3
  173. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/pkcs7.pyi +7 -6
  174. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/test_support.pyi +2 -1
  175. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/x509.pyi +79 -12
  176. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/openssl/_conditional.py +9 -1
  177. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/openssl/binding.py +2 -1
  178. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/decrepit/ciphers/algorithms.py +5 -0
  179. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/_cipheralgorithm.py +4 -2
  180. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/_serialization.py +1 -2
  181. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/dh.py +12 -0
  182. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/dsa.py +16 -3
  183. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/ec.py +47 -3
  184. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/ed25519.py +16 -3
  185. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/ed448.py +16 -3
  186. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py +14 -0
  187. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/x25519.py +14 -1
  188. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/x448.py +14 -1
  189. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/ciphers/algorithms.py +6 -6
  190. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/ciphers/base.py +5 -4
  191. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/ciphers/modes.py +18 -18
  192. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/hashes.py +5 -1
  193. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/concatkdf.py +5 -4
  194. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/hkdf.py +4 -4
  195. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/kbkdf.py +7 -4
  196. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/pbkdf2.py +1 -1
  197. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/x963kdf.py +1 -1
  198. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/padding.py +7 -121
  199. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/serialization/__init__.py +2 -0
  200. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/serialization/pkcs12.py +21 -1
  201. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/serialization/pkcs7.py +48 -6
  202. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/serialization/ssh.py +68 -18
  203. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/twofactor/hotp.py +3 -2
  204. py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/twofactor/totp.py +2 -1
  205. py2docfx/venv/venv1/Lib/site-packages/cryptography/utils.py +15 -3
  206. py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/__init__.py +3 -0
  207. py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/base.py +39 -6
  208. py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/extensions.py +100 -49
  209. py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/name.py +27 -15
  210. py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/ocsp.py +60 -25
  211. py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/oid.py +2 -0
  212. py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/verification.py +6 -0
  213. py2docfx/venv/venv1/Lib/site-packages/google/api_core/bidi.py +17 -4
  214. py2docfx/venv/venv1/Lib/site-packages/google/api_core/client_info.py +6 -0
  215. py2docfx/venv/venv1/Lib/site-packages/google/api_core/gapic_v1/client_info.py +1 -0
  216. py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_base.py +13 -4
  217. py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_streaming.py +7 -6
  218. py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_streaming_async.py +8 -5
  219. py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_unary.py +7 -6
  220. py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_unary_async.py +7 -6
  221. py2docfx/venv/venv1/Lib/site-packages/google/api_core/version.py +1 -1
  222. py2docfx/venv/venv1/Lib/site-packages/google/auth/_default.py +2 -36
  223. py2docfx/venv/venv1/Lib/site-packages/google/auth/_helpers.py +240 -0
  224. py2docfx/venv/venv1/Lib/site-packages/google/auth/aio/_helpers.py +62 -0
  225. py2docfx/venv/venv1/Lib/site-packages/google/auth/aio/transport/aiohttp.py +6 -0
  226. py2docfx/venv/venv1/Lib/site-packages/google/auth/compute_engine/_metadata.py +5 -1
  227. py2docfx/venv/venv1/Lib/site-packages/google/auth/compute_engine/credentials.py +2 -1
  228. py2docfx/venv/venv1/Lib/site-packages/google/auth/identity_pool.py +91 -2
  229. py2docfx/venv/venv1/Lib/site-packages/google/auth/impersonated_credentials.py +75 -0
  230. py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/__init__.py +1 -0
  231. py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/_aiohttp_requests.py +8 -1
  232. py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/_http_client.py +3 -1
  233. py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/requests.py +4 -1
  234. py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/urllib3.py +15 -5
  235. py2docfx/venv/venv1/Lib/site-packages/google/auth/version.py +1 -1
  236. py2docfx/venv/venv1/Lib/site-packages/google/oauth2/id_token.py +12 -0
  237. py2docfx/venv/venv1/Lib/site-packages/google/oauth2/webauthn_types.py +1 -1
  238. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/__init__.py +1 -1
  239. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/any.py +15 -1
  240. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/any_pb2.py +3 -3
  241. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/api_pb2.py +3 -3
  242. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/compiler/plugin_pb2.py +3 -3
  243. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor.py +15 -2
  244. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor_pb2.py +258 -113
  245. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor_pool.py +22 -8
  246. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/duration_pb2.py +3 -3
  247. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/empty_pb2.py +3 -3
  248. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/field_mask_pb2.py +3 -3
  249. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/decoder.py +106 -23
  250. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/field_mask.py +3 -1
  251. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/python_edition_defaults.py +1 -1
  252. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/python_message.py +21 -18
  253. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/testing_refleaks.py +8 -2
  254. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/well_known_types.py +60 -43
  255. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/json_format.py +4 -5
  256. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/message_factory.py +16 -0
  257. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/runtime_version.py +2 -2
  258. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/source_context_pb2.py +3 -3
  259. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/struct_pb2.py +3 -3
  260. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/text_format.py +11 -7
  261. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/timestamp_pb2.py +3 -3
  262. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/type_pb2.py +3 -3
  263. py2docfx/venv/venv1/Lib/site-packages/google/protobuf/wrappers_pb2.py +3 -3
  264. py2docfx/venv/venv1/Lib/site-packages/google/rpc/error_details_pb2.py +29 -23
  265. py2docfx/venv/venv1/Lib/site-packages/google/rpc/error_details_pb2.pyi +41 -2
  266. py2docfx/venv/venv1/Lib/site-packages/msal/application.py +1 -0
  267. py2docfx/venv/venv1/Lib/site-packages/msal/individual_cache.py +9 -5
  268. py2docfx/venv/venv1/Lib/site-packages/msal/managed_identity.py +4 -5
  269. py2docfx/venv/venv1/Lib/site-packages/msal/sku.py +1 -1
  270. py2docfx/venv/venv1/Lib/site-packages/msal/throttled_http_client.py +58 -30
  271. py2docfx/venv/venv1/Lib/site-packages/opencensus/__init__.py +1 -1
  272. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/__init__.py +1 -1
  273. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/__init__.py +1 -1
  274. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/__init__.py +138 -138
  275. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/exporter.py +93 -93
  276. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/processor.py +63 -63
  277. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/protocol.py +206 -206
  278. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/storage.py +205 -205
  279. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/transport.py +355 -355
  280. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/utils.py +79 -79
  281. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/version.py +15 -15
  282. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/log_exporter/__init__.py +314 -314
  283. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/__init__.py +190 -190
  284. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/__init__.py +62 -62
  285. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/cpu.py +50 -50
  286. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/http_requests.py +176 -176
  287. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/memory.py +42 -42
  288. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/process.py +87 -87
  289. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/statsbeat/__init__.py +1 -1
  290. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/statsbeat/state.py +50 -50
  291. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/statsbeat/statsbeat.py +100 -100
  292. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/statsbeat/statsbeat_metrics.py +480 -480
  293. py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/trace_exporter/__init__.py +236 -236
  294. py2docfx/venv/venv1/Lib/site-packages/packaging/__init__.py +1 -1
  295. py2docfx/venv/venv1/Lib/site-packages/packaging/_elffile.py +1 -2
  296. py2docfx/venv/venv1/Lib/site-packages/packaging/_manylinux.py +1 -2
  297. py2docfx/venv/venv1/Lib/site-packages/packaging/_parser.py +1 -2
  298. py2docfx/venv/venv1/Lib/site-packages/packaging/_tokenizer.py +5 -4
  299. py2docfx/venv/venv1/Lib/site-packages/packaging/licenses/__init__.py +1 -1
  300. py2docfx/venv/venv1/Lib/site-packages/packaging/markers.py +53 -22
  301. py2docfx/venv/venv1/Lib/site-packages/packaging/metadata.py +1 -2
  302. py2docfx/venv/venv1/Lib/site-packages/packaging/specifiers.py +1 -2
  303. py2docfx/venv/venv1/Lib/site-packages/packaging/tags.py +39 -0
  304. py2docfx/venv/venv1/Lib/site-packages/pkg_resources/__init__.py +6 -7
  305. py2docfx/venv/venv1/Lib/site-packages/requests/__version__.py +2 -2
  306. py2docfx/venv/venv1/Lib/site-packages/requests/compat.py +12 -0
  307. py2docfx/venv/venv1/Lib/site-packages/requests/models.py +3 -1
  308. py2docfx/venv/venv1/Lib/site-packages/requests/utils.py +6 -16
  309. py2docfx/venv/venv1/Lib/site-packages/rsa/__init__.py +2 -2
  310. py2docfx/venv/venv1/Lib/site-packages/rsa/asn1.py +52 -52
  311. py2docfx/venv/venv1/Lib/site-packages/rsa/cli.py +321 -321
  312. py2docfx/venv/venv1/Lib/site-packages/rsa/common.py +184 -184
  313. py2docfx/venv/venv1/Lib/site-packages/rsa/core.py +53 -53
  314. py2docfx/venv/venv1/Lib/site-packages/rsa/key.py +858 -858
  315. py2docfx/venv/venv1/Lib/site-packages/rsa/parallel.py +96 -96
  316. py2docfx/venv/venv1/Lib/site-packages/rsa/pem.py +134 -134
  317. py2docfx/venv/venv1/Lib/site-packages/rsa/pkcs1.py +485 -485
  318. py2docfx/venv/venv1/Lib/site-packages/rsa/pkcs1_v2.py +100 -100
  319. py2docfx/venv/venv1/Lib/site-packages/rsa/prime.py +198 -198
  320. py2docfx/venv/venv1/Lib/site-packages/rsa/py.typed +1 -1
  321. py2docfx/venv/venv1/Lib/site-packages/rsa/randnum.py +95 -95
  322. py2docfx/venv/venv1/Lib/site-packages/rsa/transform.py +72 -72
  323. py2docfx/venv/venv1/Lib/site-packages/rsa/util.py +97 -97
  324. py2docfx/venv/venv1/Lib/site-packages/setuptools/__init__.py +0 -38
  325. py2docfx/venv/venv1/Lib/site-packages/setuptools/_discovery.py +33 -0
  326. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build_scripts.py +1 -1
  327. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/config.py +0 -2
  328. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_unix.py +63 -0
  329. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py +5 -6
  330. py2docfx/venv/venv1/Lib/site-packages/setuptools/_entry_points.py +4 -0
  331. py2docfx/venv/venv1/Lib/site-packages/setuptools/_normalization.py +0 -2
  332. py2docfx/venv/venv1/Lib/site-packages/setuptools/_path.py +12 -3
  333. py2docfx/venv/venv1/Lib/site-packages/setuptools/_reqs.py +1 -1
  334. py2docfx/venv/venv1/Lib/site-packages/setuptools/_scripts.py +361 -0
  335. py2docfx/venv/venv1/Lib/site-packages/setuptools/_shutil.py +6 -0
  336. py2docfx/venv/venv1/Lib/site-packages/setuptools/build_meta.py +25 -37
  337. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/bdist_egg.py +9 -11
  338. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/bdist_wheel.py +1 -1
  339. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/build_ext.py +29 -28
  340. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/develop.py +39 -179
  341. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/easy_install.py +17 -2352
  342. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/editable_wheel.py +14 -31
  343. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/egg_info.py +0 -2
  344. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/install.py +3 -55
  345. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/install_scripts.py +5 -11
  346. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/sdist.py +1 -1
  347. py2docfx/venv/venv1/Lib/site-packages/setuptools/compat/py310.py +11 -0
  348. py2docfx/venv/venv1/Lib/site-packages/setuptools/dist.py +10 -12
  349. py2docfx/venv/venv1/Lib/site-packages/setuptools/installer.py +34 -29
  350. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/contexts.py +0 -14
  351. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/fixtures.py +235 -0
  352. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/integration/test_pbr.py +20 -0
  353. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_build_meta.py +0 -24
  354. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_develop.py +1 -64
  355. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_dist.py +2 -2
  356. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_dist_info.py +0 -63
  357. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_editable_install.py +15 -41
  358. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_egg_info.py +3 -2
  359. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_scripts.py +12 -0
  360. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_wheel.py +12 -36
  361. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_windows_wrappers.py +3 -4
  362. py2docfx/venv/venv1/Lib/site-packages/setuptools/wheel.py +49 -24
  363. py2docfx/venv/venv1/Lib/site-packages/typing_extensions.py +357 -703
  364. py2docfx/venv/venv1/Lib/site-packages/urllib3/_version.py +2 -2
  365. py2docfx/venv/venv1/Lib/site-packages/urllib3/connection.py +87 -38
  366. py2docfx/venv/venv1/Lib/site-packages/urllib3/contrib/emscripten/fetch.py +20 -0
  367. py2docfx/venv/venv1/Lib/site-packages/urllib3/poolmanager.py +17 -1
  368. py2docfx/venv/venv1/Lib/site-packages/urllib3/response.py +53 -24
  369. py2docfx/venv/venv1/Lib/site-packages/urllib3/util/request.py +12 -4
  370. py2docfx/venv/venv1/Lib/site-packages/urllib3/util/ssl_.py +1 -1
  371. {py2docfx-0.1.16.dev2064350.dist-info → py2docfx-0.1.17.dist-info}/METADATA +1 -1
  372. {py2docfx-0.1.16.dev2064350.dist-info → py2docfx-0.1.17.dist-info}/RECORD +374 -372
  373. {py2docfx-0.1.16.dev2064350.dist-info → py2docfx-0.1.17.dist-info}/WHEEL +1 -1
  374. py2docfx/venv/basevenv/Lib/site-packages/setuptools/package_index.py +0 -1137
  375. py2docfx/venv/basevenv/Lib/site-packages/setuptools/sandbox.py +0 -536
  376. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/server.py +0 -86
  377. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_easy_install.py +0 -1476
  378. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_packageindex.py +0 -267
  379. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_sandbox.py +0 -134
  380. py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/application.py +0 -119
  381. py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/application.py +0 -121
  382. py2docfx/venv/venv1/Lib/site-packages/setuptools/package_index.py +0 -1137
  383. py2docfx/venv/venv1/Lib/site-packages/setuptools/sandbox.py +0 -536
  384. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/server.py +0 -86
  385. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_easy_install.py +0 -1476
  386. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_packageindex.py +0 -267
  387. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_sandbox.py +0 -134
  388. {py2docfx-0.1.16.dev2064350.dist-info → py2docfx-0.1.17.dist-info}/top_level.txt +0 -0
@@ -1,95 +1,95 @@
1
- # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu>
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
- # https://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
- """Functions for generating random numbers."""
16
-
17
- # Source inspired by code by Yesudeep Mangalapilly <yesudeep@gmail.com>
18
-
19
- import os
20
- import struct
21
-
22
- from rsa import common, transform
23
-
24
-
25
- def read_random_bits(nbits: int) -> bytes:
26
- """Reads 'nbits' random bits.
27
-
28
- If nbits isn't a whole number of bytes, an extra byte will be appended with
29
- only the lower bits set.
30
- """
31
-
32
- nbytes, rbits = divmod(nbits, 8)
33
-
34
- # Get the random bytes
35
- randomdata = os.urandom(nbytes)
36
-
37
- # Add the remaining random bits
38
- if rbits > 0:
39
- randomvalue = ord(os.urandom(1))
40
- randomvalue >>= 8 - rbits
41
- randomdata = struct.pack("B", randomvalue) + randomdata
42
-
43
- return randomdata
44
-
45
-
46
- def read_random_int(nbits: int) -> int:
47
- """Reads a random integer of approximately nbits bits."""
48
-
49
- randomdata = read_random_bits(nbits)
50
- value = transform.bytes2int(randomdata)
51
-
52
- # Ensure that the number is large enough to just fill out the required
53
- # number of bits.
54
- value |= 1 << (nbits - 1)
55
-
56
- return value
57
-
58
-
59
- def read_random_odd_int(nbits: int) -> int:
60
- """Reads a random odd integer of approximately nbits bits.
61
-
62
- >>> read_random_odd_int(512) & 1
63
- 1
64
- """
65
-
66
- value = read_random_int(nbits)
67
-
68
- # Make sure it's odd
69
- return value | 1
70
-
71
-
72
- def randint(maxvalue: int) -> int:
73
- """Returns a random integer x with 1 <= x <= maxvalue
74
-
75
- May take a very long time in specific situations. If maxvalue needs N bits
76
- to store, the closer maxvalue is to (2 ** N) - 1, the faster this function
77
- is.
78
- """
79
-
80
- bit_size = common.bit_size(maxvalue)
81
-
82
- tries = 0
83
- while True:
84
- value = read_random_int(bit_size)
85
- if value <= maxvalue:
86
- break
87
-
88
- if tries % 10 == 0 and tries:
89
- # After a lot of tries to get the right number of bits but still
90
- # smaller than maxvalue, decrease the number of bits by 1. That'll
91
- # dramatically increase the chances to get a large enough number.
92
- bit_size -= 1
93
- tries += 1
94
-
95
- return value
1
+ # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu>
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
+ # https://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
+ """Functions for generating random numbers."""
16
+
17
+ # Source inspired by code by Yesudeep Mangalapilly <yesudeep@gmail.com>
18
+
19
+ import os
20
+ import struct
21
+
22
+ from rsa import common, transform
23
+
24
+
25
+ def read_random_bits(nbits: int) -> bytes:
26
+ """Reads 'nbits' random bits.
27
+
28
+ If nbits isn't a whole number of bytes, an extra byte will be appended with
29
+ only the lower bits set.
30
+ """
31
+
32
+ nbytes, rbits = divmod(nbits, 8)
33
+
34
+ # Get the random bytes
35
+ randomdata = os.urandom(nbytes)
36
+
37
+ # Add the remaining random bits
38
+ if rbits > 0:
39
+ randomvalue = ord(os.urandom(1))
40
+ randomvalue >>= 8 - rbits
41
+ randomdata = struct.pack("B", randomvalue) + randomdata
42
+
43
+ return randomdata
44
+
45
+
46
+ def read_random_int(nbits: int) -> int:
47
+ """Reads a random integer of approximately nbits bits."""
48
+
49
+ randomdata = read_random_bits(nbits)
50
+ value = transform.bytes2int(randomdata)
51
+
52
+ # Ensure that the number is large enough to just fill out the required
53
+ # number of bits.
54
+ value |= 1 << (nbits - 1)
55
+
56
+ return value
57
+
58
+
59
+ def read_random_odd_int(nbits: int) -> int:
60
+ """Reads a random odd integer of approximately nbits bits.
61
+
62
+ >>> read_random_odd_int(512) & 1
63
+ 1
64
+ """
65
+
66
+ value = read_random_int(nbits)
67
+
68
+ # Make sure it's odd
69
+ return value | 1
70
+
71
+
72
+ def randint(maxvalue: int) -> int:
73
+ """Returns a random integer x with 1 <= x <= maxvalue
74
+
75
+ May take a very long time in specific situations. If maxvalue needs N bits
76
+ to store, the closer maxvalue is to (2 ** N) - 1, the faster this function
77
+ is.
78
+ """
79
+
80
+ bit_size = common.bit_size(maxvalue)
81
+
82
+ tries = 0
83
+ while True:
84
+ value = read_random_int(bit_size)
85
+ if value <= maxvalue:
86
+ break
87
+
88
+ if tries % 10 == 0 and tries:
89
+ # After a lot of tries to get the right number of bits but still
90
+ # smaller than maxvalue, decrease the number of bits by 1. That'll
91
+ # dramatically increase the chances to get a large enough number.
92
+ bit_size -= 1
93
+ tries += 1
94
+
95
+ return value
@@ -1,72 +1,72 @@
1
- # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu>
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
- # https://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
- """Data transformation functions.
16
-
17
- From bytes to a number, number to bytes, etc.
18
- """
19
-
20
- import math
21
-
22
-
23
- def bytes2int(raw_bytes: bytes) -> int:
24
- r"""Converts a list of bytes or an 8-bit string to an integer.
25
-
26
- When using unicode strings, encode it to some encoding like UTF8 first.
27
-
28
- >>> (((128 * 256) + 64) * 256) + 15
29
- 8405007
30
- >>> bytes2int(b'\x80@\x0f')
31
- 8405007
32
-
33
- """
34
- return int.from_bytes(raw_bytes, "big", signed=False)
35
-
36
-
37
- def int2bytes(number: int, fill_size: int = 0) -> bytes:
38
- """
39
- Convert an unsigned integer to bytes (big-endian)::
40
-
41
- Does not preserve leading zeros if you don't specify a fill size.
42
-
43
- :param number:
44
- Integer value
45
- :param fill_size:
46
- If the optional fill size is given the length of the resulting
47
- byte string is expected to be the fill size and will be padded
48
- with prefix zero bytes to satisfy that length.
49
- :returns:
50
- Raw bytes (base-256 representation).
51
- :raises:
52
- ``OverflowError`` when fill_size is given and the number takes up more
53
- bytes than fit into the block. This requires the ``overflow``
54
- argument to this function to be set to ``False`` otherwise, no
55
- error will be raised.
56
- """
57
-
58
- if number < 0:
59
- raise ValueError("Number must be an unsigned integer: %d" % number)
60
-
61
- bytes_required = max(1, math.ceil(number.bit_length() / 8))
62
-
63
- if fill_size > 0:
64
- return number.to_bytes(fill_size, "big")
65
-
66
- return number.to_bytes(bytes_required, "big")
67
-
68
-
69
- if __name__ == "__main__":
70
- import doctest
71
-
72
- doctest.testmod()
1
+ # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu>
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
+ # https://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
+ """Data transformation functions.
16
+
17
+ From bytes to a number, number to bytes, etc.
18
+ """
19
+
20
+ import math
21
+
22
+
23
+ def bytes2int(raw_bytes: bytes) -> int:
24
+ r"""Converts a list of bytes or an 8-bit string to an integer.
25
+
26
+ When using unicode strings, encode it to some encoding like UTF8 first.
27
+
28
+ >>> (((128 * 256) + 64) * 256) + 15
29
+ 8405007
30
+ >>> bytes2int(b'\x80@\x0f')
31
+ 8405007
32
+
33
+ """
34
+ return int.from_bytes(raw_bytes, "big", signed=False)
35
+
36
+
37
+ def int2bytes(number: int, fill_size: int = 0) -> bytes:
38
+ """
39
+ Convert an unsigned integer to bytes (big-endian)::
40
+
41
+ Does not preserve leading zeros if you don't specify a fill size.
42
+
43
+ :param number:
44
+ Integer value
45
+ :param fill_size:
46
+ If the optional fill size is given the length of the resulting
47
+ byte string is expected to be the fill size and will be padded
48
+ with prefix zero bytes to satisfy that length.
49
+ :returns:
50
+ Raw bytes (base-256 representation).
51
+ :raises:
52
+ ``OverflowError`` when fill_size is given and the number takes up more
53
+ bytes than fit into the block. This requires the ``overflow``
54
+ argument to this function to be set to ``False`` otherwise, no
55
+ error will be raised.
56
+ """
57
+
58
+ if number < 0:
59
+ raise ValueError("Number must be an unsigned integer: %d" % number)
60
+
61
+ bytes_required = max(1, math.ceil(number.bit_length() / 8))
62
+
63
+ if fill_size > 0:
64
+ return number.to_bytes(fill_size, "big")
65
+
66
+ return number.to_bytes(bytes_required, "big")
67
+
68
+
69
+ if __name__ == "__main__":
70
+ import doctest
71
+
72
+ doctest.testmod()
@@ -1,97 +1,97 @@
1
- # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu>
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
- # https://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
- """Utility functions."""
16
-
17
- import sys
18
- from optparse import OptionParser
19
-
20
- import rsa.key
21
-
22
-
23
- def private_to_public() -> None:
24
- """Reads a private key and outputs the corresponding public key."""
25
-
26
- # Parse the CLI options
27
- parser = OptionParser(
28
- usage="usage: %prog [options]",
29
- description="Reads a private key and outputs the "
30
- "corresponding public key. Both private and public keys use "
31
- "the format described in PKCS#1 v1.5",
32
- )
33
-
34
- parser.add_option(
35
- "-i",
36
- "--input",
37
- dest="infilename",
38
- type="string",
39
- help="Input filename. Reads from stdin if not specified",
40
- )
41
- parser.add_option(
42
- "-o",
43
- "--output",
44
- dest="outfilename",
45
- type="string",
46
- help="Output filename. Writes to stdout of not specified",
47
- )
48
-
49
- parser.add_option(
50
- "--inform",
51
- dest="inform",
52
- help="key format of input - default PEM",
53
- choices=("PEM", "DER"),
54
- default="PEM",
55
- )
56
-
57
- parser.add_option(
58
- "--outform",
59
- dest="outform",
60
- help="key format of output - default PEM",
61
- choices=("PEM", "DER"),
62
- default="PEM",
63
- )
64
-
65
- (cli, cli_args) = parser.parse_args(sys.argv)
66
-
67
- # Read the input data
68
- if cli.infilename:
69
- print(
70
- "Reading private key from %s in %s format" % (cli.infilename, cli.inform),
71
- file=sys.stderr,
72
- )
73
- with open(cli.infilename, "rb") as infile:
74
- in_data = infile.read()
75
- else:
76
- print("Reading private key from stdin in %s format" % cli.inform, file=sys.stderr)
77
- in_data = sys.stdin.read().encode("ascii")
78
-
79
- assert type(in_data) == bytes, type(in_data)
80
-
81
- # Take the public fields and create a public key
82
- priv_key = rsa.key.PrivateKey.load_pkcs1(in_data, cli.inform)
83
- pub_key = rsa.key.PublicKey(priv_key.n, priv_key.e)
84
-
85
- # Save to the output file
86
- out_data = pub_key.save_pkcs1(cli.outform)
87
-
88
- if cli.outfilename:
89
- print(
90
- "Writing public key to %s in %s format" % (cli.outfilename, cli.outform),
91
- file=sys.stderr,
92
- )
93
- with open(cli.outfilename, "wb") as outfile:
94
- outfile.write(out_data)
95
- else:
96
- print("Writing public key to stdout in %s format" % cli.outform, file=sys.stderr)
97
- sys.stdout.write(out_data.decode("ascii"))
1
+ # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu>
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
+ # https://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
+ """Utility functions."""
16
+
17
+ import sys
18
+ from optparse import OptionParser
19
+
20
+ import rsa.key
21
+
22
+
23
+ def private_to_public() -> None:
24
+ """Reads a private key and outputs the corresponding public key."""
25
+
26
+ # Parse the CLI options
27
+ parser = OptionParser(
28
+ usage="usage: %prog [options]",
29
+ description="Reads a private key and outputs the "
30
+ "corresponding public key. Both private and public keys use "
31
+ "the format described in PKCS#1 v1.5",
32
+ )
33
+
34
+ parser.add_option(
35
+ "-i",
36
+ "--input",
37
+ dest="infilename",
38
+ type="string",
39
+ help="Input filename. Reads from stdin if not specified",
40
+ )
41
+ parser.add_option(
42
+ "-o",
43
+ "--output",
44
+ dest="outfilename",
45
+ type="string",
46
+ help="Output filename. Writes to stdout of not specified",
47
+ )
48
+
49
+ parser.add_option(
50
+ "--inform",
51
+ dest="inform",
52
+ help="key format of input - default PEM",
53
+ choices=("PEM", "DER"),
54
+ default="PEM",
55
+ )
56
+
57
+ parser.add_option(
58
+ "--outform",
59
+ dest="outform",
60
+ help="key format of output - default PEM",
61
+ choices=("PEM", "DER"),
62
+ default="PEM",
63
+ )
64
+
65
+ (cli, cli_args) = parser.parse_args(sys.argv)
66
+
67
+ # Read the input data
68
+ if cli.infilename:
69
+ print(
70
+ "Reading private key from %s in %s format" % (cli.infilename, cli.inform),
71
+ file=sys.stderr,
72
+ )
73
+ with open(cli.infilename, "rb") as infile:
74
+ in_data = infile.read()
75
+ else:
76
+ print("Reading private key from stdin in %s format" % cli.inform, file=sys.stderr)
77
+ in_data = sys.stdin.read().encode("ascii")
78
+
79
+ assert type(in_data) == bytes, type(in_data)
80
+
81
+ # Take the public fields and create a public key
82
+ priv_key = rsa.key.PrivateKey.load_pkcs1(in_data, cli.inform)
83
+ pub_key = rsa.key.PublicKey(priv_key.n, priv_key.e)
84
+
85
+ # Save to the output file
86
+ out_data = pub_key.save_pkcs1(cli.outform)
87
+
88
+ if cli.outfilename:
89
+ print(
90
+ "Writing public key to %s in %s format" % (cli.outfilename, cli.outform),
91
+ file=sys.stderr,
92
+ )
93
+ with open(cli.outfilename, "wb") as outfile:
94
+ outfile.write(out_data)
95
+ else:
96
+ print("Writing public key to stdout in %s format" % cli.outform, file=sys.stderr)
97
+ sys.stdout.write(out_data.decode("ascii"))
@@ -9,7 +9,6 @@ from __future__ import annotations
9
9
 
10
10
  import functools
11
11
  import os
12
- import re
13
12
  import sys
14
13
  from abc import abstractmethod
15
14
  from collections.abc import Mapping
@@ -30,7 +29,6 @@ from .version import __version__ as __version__
30
29
  from .warnings import SetuptoolsDeprecationWarning
31
30
 
32
31
  import distutils.core
33
- from distutils.errors import DistutilsOptionError
34
32
 
35
33
  __all__ = [
36
34
  'setup',
@@ -175,42 +173,6 @@ class Command(_Command):
175
173
  super().__init__(dist)
176
174
  vars(self).update(kw)
177
175
 
178
- def _ensure_stringlike(self, option, what, default=None):
179
- val = getattr(self, option)
180
- if val is None:
181
- setattr(self, option, default)
182
- return default
183
- elif not isinstance(val, str):
184
- raise DistutilsOptionError(f"'{option}' must be a {what} (got `{val}`)")
185
- return val
186
-
187
- def ensure_string_list(self, option: str) -> None:
188
- r"""Ensure that 'option' is a list of strings. If 'option' is
189
- currently a string, we split it either on /,\s*/ or /\s+/, so
190
- "foo bar baz", "foo,bar,baz", and "foo, bar baz" all become
191
- ["foo", "bar", "baz"].
192
-
193
- ..
194
- TODO: This method seems to be similar to the one in ``distutils.cmd``
195
- Probably it is just here for backward compatibility with old Python versions?
196
-
197
- :meta private:
198
- """
199
- val = getattr(self, option)
200
- if val is None:
201
- return
202
- elif isinstance(val, str):
203
- setattr(self, option, re.split(r',\s*|\s+', val))
204
- else:
205
- if isinstance(val, list):
206
- ok = all(isinstance(v, str) for v in val)
207
- else:
208
- ok = False
209
- if not ok:
210
- raise DistutilsOptionError(
211
- f"'{option}' must be a list of strings (got {val!r})"
212
- )
213
-
214
176
  @overload
215
177
  def reinitialize_command(
216
178
  self, command: str, reinit_subcommands: bool = False, **kw
@@ -0,0 +1,33 @@
1
+ import functools
2
+ import operator
3
+
4
+ import packaging.requirements
5
+
6
+
7
+ # from coherent.build.discovery
8
+ def extras_from_dep(dep):
9
+ try:
10
+ markers = packaging.requirements.Requirement(dep).marker._markers
11
+ except AttributeError:
12
+ markers = ()
13
+ return set(
14
+ marker[2].value
15
+ for marker in markers
16
+ if isinstance(marker, tuple) and marker[0].value == 'extra'
17
+ )
18
+
19
+
20
+ def extras_from_deps(deps):
21
+ """
22
+ >>> extras_from_deps(['requests'])
23
+ set()
24
+ >>> extras_from_deps(['pytest; extra == "test"'])
25
+ {'test'}
26
+ >>> sorted(extras_from_deps([
27
+ ... 'requests',
28
+ ... 'pytest; extra == "test"',
29
+ ... 'pytest-cov; extra == "test"',
30
+ ... 'sphinx; extra=="doc"']))
31
+ ['doc', 'test']
32
+ """
33
+ return functools.reduce(operator.or_, map(extras_from_dep, deps), set())
@@ -106,7 +106,7 @@ class build_scripts(Command):
106
106
  log.info("copying and adjusting %s -> %s", script, self.build_dir)
107
107
  if not self.dry_run:
108
108
  post_interp = shebang_match.group(1) or ''
109
- shebang = f"#!python{post_interp}\n"
109
+ shebang = "#!" + self.executable + post_interp + "\n"
110
110
  self._validate_shebang(shebang, f.encoding)
111
111
  with open(outfile, "w", encoding=f.encoding) as outf:
112
112
  outf.write(shebang)
@@ -89,8 +89,6 @@ class config(Command):
89
89
  """Check that 'self.compiler' really is a CCompiler object;
90
90
  if not, make it one.
91
91
  """
92
- # We do this late, and only on-demand, because this is an expensive
93
- # import.
94
92
  if not isinstance(self.compiler, CCompiler):
95
93
  self.compiler = new_compiler(
96
94
  compiler=self.compiler, dry_run=self.dry_run, force=True