@anaconda/desktop-bridge-payload-win32-arm64 0.1.21 → 0.1.22

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 (246) hide show
  1. package/THIRD_PARTY_NOTICES +17 -17
  2. package/manifest.json +7 -7
  3. package/package.json +1 -1
  4. package/python/BUILD +1 -1
  5. package/python/DLLs/_asyncio.pyd +0 -0
  6. package/python/DLLs/_bz2.pyd +0 -0
  7. package/python/DLLs/_ctypes.pyd +0 -0
  8. package/python/DLLs/_ctypes_test.pyd +0 -0
  9. package/python/DLLs/_decimal.pyd +0 -0
  10. package/python/DLLs/_elementtree.pyd +0 -0
  11. package/python/DLLs/_hashlib.pyd +0 -0
  12. package/python/DLLs/_lzma.pyd +0 -0
  13. package/python/DLLs/_msi.pyd +0 -0
  14. package/python/DLLs/_multiprocessing.pyd +0 -0
  15. package/python/DLLs/_overlapped.pyd +0 -0
  16. package/python/DLLs/_queue.pyd +0 -0
  17. package/python/DLLs/_socket.pyd +0 -0
  18. package/python/DLLs/_sqlite3.pyd +0 -0
  19. package/python/DLLs/_ssl.pyd +0 -0
  20. package/python/DLLs/_testbuffer.pyd +0 -0
  21. package/python/DLLs/_testcapi.pyd +0 -0
  22. package/python/DLLs/_testconsole.pyd +0 -0
  23. package/python/DLLs/_testimportmultiple.pyd +0 -0
  24. package/python/DLLs/_testinternalcapi.pyd +0 -0
  25. package/python/DLLs/_testmultiphase.pyd +0 -0
  26. package/python/DLLs/_uuid.pyd +0 -0
  27. package/python/DLLs/_zoneinfo.pyd +0 -0
  28. package/python/DLLs/libcrypto-3-arm64.dll +0 -0
  29. package/python/DLLs/libffi-8.dll +0 -0
  30. package/python/DLLs/libssl-3-arm64.dll +0 -0
  31. package/python/DLLs/pyexpat.pyd +0 -0
  32. package/python/DLLs/select.pyd +0 -0
  33. package/python/DLLs/sqlite3.dll +0 -0
  34. package/python/DLLs/unicodedata.pyd +0 -0
  35. package/python/DLLs/winsound.pyd +0 -0
  36. package/python/Lib/site-packages/_ruamel_yaml.cp311-win_arm64.pyd +0 -0
  37. package/python/Lib/site-packages/anaconda_anon_usage-0.8.1.dist-info/RECORD +1 -1
  38. package/python/Lib/site-packages/anaconda_auth-0.15.3.dist-info/RECORD +1 -1
  39. package/python/Lib/site-packages/anaconda_cli_base-0.9.1.dist-info/RECORD +1 -1
  40. package/python/Lib/site-packages/anaconda_desktop_bridge/__main__.py +8 -0
  41. package/python/Lib/site-packages/anaconda_desktop_bridge/__pycache__/__main__.cpython-311.pyc +0 -0
  42. package/python/Lib/site-packages/anaconda_desktop_bridge/__pycache__/errors.cpython-311.pyc +0 -0
  43. package/python/Lib/site-packages/anaconda_desktop_bridge/__pycache__/telemetry.cpython-311.pyc +0 -0
  44. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/__init__.py +2 -0
  45. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/__pycache__/__init__.cpython-311.pyc +0 -0
  46. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/__pycache__/auth_handler.cpython-311.pyc +0 -0
  47. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/__pycache__/auth_plugin.cpython-311.pyc +0 -0
  48. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/__pycache__/lock.cpython-311.pyc +0 -0
  49. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/__pycache__/repo_credentials.cpython-311.pyc +0 -0
  50. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/auth_handler.py +219 -0
  51. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/auth_plugin.py +50 -0
  52. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/lock.py +26 -1
  53. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/operations/__pycache__/channels.cpython-311.pyc +0 -0
  54. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/operations/__pycache__/repodata.cpython-311.pyc +0 -0
  55. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/operations/channels.py +196 -4
  56. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/operations/repodata.py +8 -1
  57. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/repo_credentials.py +224 -0
  58. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/transactions/__pycache__/transaction.cpython-311.pyc +0 -0
  59. package/python/Lib/site-packages/anaconda_desktop_bridge/conda/transactions/transaction.py +23 -0
  60. package/python/Lib/site-packages/anaconda_desktop_bridge/errors.py +24 -0
  61. package/python/Lib/site-packages/anaconda_desktop_bridge/features/__pycache__/conda_tools.cpython-311.pyc +0 -0
  62. package/python/Lib/site-packages/anaconda_desktop_bridge/features/conda_tools.py +8 -0
  63. package/python/Lib/site-packages/anaconda_desktop_bridge/models/__pycache__/conda_tools.cpython-311.pyc +0 -0
  64. package/python/Lib/site-packages/anaconda_desktop_bridge/models/conda_tools.py +46 -1
  65. package/python/Lib/site-packages/anaconda_desktop_bridge/telemetry.py +2 -20
  66. package/python/Lib/site-packages/anaconda_desktop_bridge-0.1.0.dist-info/METADATA +75 -5
  67. package/python/Lib/site-packages/anaconda_desktop_bridge-0.1.0.dist-info/RECORD +16 -13
  68. package/python/Lib/site-packages/anaconda_desktop_bridge-0.1.0.dist-info/uv_cache.json +1 -1
  69. package/python/Lib/site-packages/archspec-0.2.7.dist-info/RECORD +1 -1
  70. package/python/Lib/site-packages/cffi-2.1.1.dist-info/RECORD +1 -1
  71. package/python/Lib/site-packages/charset_normalizer-3.5.2.dist-info/RECORD +1 -1
  72. package/python/Lib/site-packages/conda-26.1.1.dist-info/RECORD +1 -1
  73. package/python/Lib/site-packages/conda_package_handling-2.6.0.dist-info/RECORD +1 -1
  74. package/python/Lib/site-packages/distro-1.9.0.dist-info/RECORD +1 -1
  75. package/python/Lib/site-packages/httpx-0.28.1.dist-info/RECORD +1 -1
  76. package/python/Lib/site-packages/idna-3.20.dist-info/RECORD +1 -1
  77. package/python/Lib/site-packages/jsonpatch-1.47.dist-info/RECORD +2 -2
  78. package/python/Lib/site-packages/keyring-25.7.0.dist-info/RECORD +1 -1
  79. package/python/Lib/site-packages/markdown_it_py-4.3.0.dist-info/RECORD +1 -1
  80. package/python/Lib/site-packages/menuinst/platforms/win_utils/winshortcut.cp311-win_arm64.pyd +0 -0
  81. package/python/Lib/site-packages/menuinst-2.5.1.dist-info/RECORD +2 -2
  82. package/python/Lib/site-packages/platformdirs/__init__.py +155 -128
  83. package/python/Lib/site-packages/platformdirs/__main__.py +10 -10
  84. package/python/Lib/site-packages/platformdirs/__pycache__/__init__.cpython-311.pyc +0 -0
  85. package/python/Lib/site-packages/platformdirs/__pycache__/__main__.cpython-311.pyc +0 -0
  86. package/python/Lib/site-packages/platformdirs/__pycache__/_android.cpython-311.pyc +0 -0
  87. package/python/Lib/site-packages/platformdirs/__pycache__/_runtime.cpython-311.pyc +0 -0
  88. package/python/Lib/site-packages/platformdirs/__pycache__/_xdg.cpython-311.pyc +0 -0
  89. package/python/Lib/site-packages/platformdirs/__pycache__/android.cpython-311.pyc +0 -0
  90. package/python/Lib/site-packages/platformdirs/__pycache__/api.cpython-311.pyc +0 -0
  91. package/python/Lib/site-packages/platformdirs/__pycache__/ios.cpython-311.pyc +0 -0
  92. package/python/Lib/site-packages/platformdirs/__pycache__/macos.cpython-311.pyc +0 -0
  93. package/python/Lib/site-packages/platformdirs/__pycache__/pytest_plugin.cpython-311.pyc +0 -0
  94. package/python/Lib/site-packages/platformdirs/__pycache__/testing.cpython-311.pyc +0 -0
  95. package/python/Lib/site-packages/platformdirs/__pycache__/unix.cpython-311.pyc +0 -0
  96. package/python/Lib/site-packages/platformdirs/__pycache__/version.cpython-311.pyc +0 -0
  97. package/python/Lib/site-packages/platformdirs/__pycache__/windows.cpython-311.pyc +0 -0
  98. package/python/Lib/site-packages/platformdirs/_android.py +67 -0
  99. package/python/Lib/site-packages/platformdirs/_runtime.py +65 -0
  100. package/python/Lib/site-packages/platformdirs/_xdg.py +50 -47
  101. package/python/Lib/site-packages/platformdirs/android.py +64 -112
  102. package/python/Lib/site-packages/platformdirs/api.py +384 -293
  103. package/python/Lib/site-packages/platformdirs/ios.py +40 -40
  104. package/python/Lib/site-packages/platformdirs/macos.py +95 -72
  105. package/python/Lib/site-packages/platformdirs/pytest_plugin.py +5 -4
  106. package/python/Lib/site-packages/platformdirs/testing.py +23 -21
  107. package/python/Lib/site-packages/platformdirs/unix.py +158 -169
  108. package/python/Lib/site-packages/platformdirs/version.py +2 -2
  109. package/python/Lib/site-packages/platformdirs/windows.py +135 -121
  110. package/python/Lib/site-packages/{platformdirs-4.14.5.dist-info → platformdirs-4.14.7.dist-info}/METADATA +1 -1
  111. package/python/Lib/site-packages/platformdirs-4.14.7.dist-info/RECORD +23 -0
  112. package/python/Lib/site-packages/{pydantic_settings-2.16.2.dist-info → platformdirs-4.14.7.dist-info}/WHEEL +1 -1
  113. package/python/Lib/site-packages/platformdirs-4.14.7.dist-info/sboms/platformdirs.cdx.json +14820 -0
  114. package/python/Lib/site-packages/pycosat-0.6.6.dist-info/RECORD +1 -1
  115. package/python/Lib/site-packages/pycosat.cp311-win_arm64.pyd +0 -0
  116. package/python/Lib/site-packages/pydantic_settings/__pycache__/version.cpython-311.pyc +0 -0
  117. package/python/Lib/site-packages/pydantic_settings/sources/providers/__pycache__/cli.cpython-311.pyc +0 -0
  118. package/python/Lib/site-packages/pydantic_settings/sources/providers/__pycache__/nested_secrets.cpython-311.pyc +0 -0
  119. package/python/Lib/site-packages/pydantic_settings/sources/providers/__pycache__/secrets.cpython-311.pyc +0 -0
  120. package/python/Lib/site-packages/pydantic_settings/sources/providers/cli.py +13 -16
  121. package/python/Lib/site-packages/pydantic_settings/sources/providers/nested_secrets.py +32 -18
  122. package/python/Lib/site-packages/pydantic_settings/sources/providers/secrets.py +20 -1
  123. package/python/Lib/site-packages/pydantic_settings/version.py +1 -1
  124. package/python/Lib/site-packages/{pydantic_settings-2.16.2.dist-info → pydantic_settings-2.16.3.dist-info}/METADATA +1 -1
  125. package/python/Lib/site-packages/{pydantic_settings-2.16.2.dist-info → pydantic_settings-2.16.3.dist-info}/RECORD +10 -10
  126. package/python/Lib/site-packages/pygments-2.21.0.dist-info/RECORD +1 -1
  127. package/python/Lib/site-packages/python_dotenv-1.2.4.dist-info/RECORD +1 -1
  128. package/python/Lib/site-packages/ruamel_yaml_clib-0.2.15.dist-info/RECORD +1 -1
  129. package/python/Lib/site-packages/semver/__about__.py +1 -1
  130. package/python/Lib/site-packages/semver/__pycache__/__about__.cpython-311.pyc +0 -0
  131. package/python/Lib/site-packages/semver/__pycache__/version.cpython-311.pyc +0 -0
  132. package/python/Lib/site-packages/semver/version.py +16 -5
  133. package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/METADATA +1 -1
  134. package/python/Lib/site-packages/semver-3.1.2.dist-info/RECORD +17 -0
  135. package/python/Lib/site-packages/sentry_sdk/__pycache__/_types.cpython-311.pyc +0 -0
  136. package/python/Lib/site-packages/sentry_sdk/__pycache__/client.cpython-311.pyc +0 -0
  137. package/python/Lib/site-packages/sentry_sdk/__pycache__/consts.cpython-311.pyc +0 -0
  138. package/python/Lib/site-packages/sentry_sdk/__pycache__/traces.cpython-311.pyc +0 -0
  139. package/python/Lib/site-packages/sentry_sdk/__pycache__/utils.cpython-311.pyc +0 -0
  140. package/python/Lib/site-packages/sentry_sdk/_types.py +27 -3
  141. package/python/Lib/site-packages/sentry_sdk/client.py +1 -1
  142. package/python/Lib/site-packages/sentry_sdk/consts.py +7 -1
  143. package/python/Lib/site-packages/sentry_sdk/crons/__pycache__/decorator.cpython-311.pyc +0 -0
  144. package/python/Lib/site-packages/sentry_sdk/crons/__pycache__/utils.cpython-311.pyc +0 -0
  145. package/python/Lib/site-packages/sentry_sdk/crons/decorator.py +2 -0
  146. package/python/Lib/site-packages/sentry_sdk/crons/utils.py +26 -0
  147. package/python/Lib/site-packages/sentry_sdk/integrations/__pycache__/arq.cpython-311.pyc +0 -0
  148. package/python/Lib/site-packages/sentry_sdk/integrations/__pycache__/gql.cpython-311.pyc +0 -0
  149. package/python/Lib/site-packages/sentry_sdk/integrations/__pycache__/huggingface_hub.cpython-311.pyc +0 -0
  150. package/python/Lib/site-packages/sentry_sdk/integrations/__pycache__/starlette.cpython-311.pyc +0 -0
  151. package/python/Lib/site-packages/sentry_sdk/integrations/__pycache__/trytond.cpython-311.pyc +0 -0
  152. package/python/Lib/site-packages/sentry_sdk/integrations/arq.py +9 -16
  153. package/python/Lib/site-packages/sentry_sdk/integrations/boto3/__init__.py +2 -0
  154. package/python/Lib/site-packages/sentry_sdk/integrations/boto3/__pycache__/__init__.cpython-311.pyc +0 -0
  155. package/python/Lib/site-packages/sentry_sdk/integrations/boto3/__pycache__/_client.cpython-311.pyc +0 -0
  156. package/python/Lib/site-packages/sentry_sdk/integrations/boto3/__pycache__/_instrumentation.cpython-311.pyc +0 -0
  157. package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_client.py +13 -15
  158. package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_instrumentation.py +11 -13
  159. package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_services/__pycache__/base.cpython-311.pyc +0 -0
  160. package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_services/__pycache__/bedrock.cpython-311.pyc +0 -0
  161. package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_services/base.py +16 -7
  162. package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_services/bedrock.py +771 -0
  163. package/python/Lib/site-packages/sentry_sdk/integrations/celery/__init__.py +3 -2
  164. package/python/Lib/site-packages/sentry_sdk/integrations/celery/__pycache__/__init__.cpython-311.pyc +0 -0
  165. package/python/Lib/site-packages/sentry_sdk/integrations/django/__init__.py +1 -1
  166. package/python/Lib/site-packages/sentry_sdk/integrations/django/__pycache__/__init__.cpython-311.pyc +0 -0
  167. package/python/Lib/site-packages/sentry_sdk/integrations/django/__pycache__/signals_handlers.cpython-311.pyc +0 -0
  168. package/python/Lib/site-packages/sentry_sdk/integrations/django/signals_handlers.py +1 -1
  169. package/python/Lib/site-packages/sentry_sdk/integrations/gql.py +28 -3
  170. package/python/Lib/site-packages/sentry_sdk/integrations/huggingface_hub.py +1 -1
  171. package/python/Lib/site-packages/sentry_sdk/integrations/openai_agents/__init__.py +1 -1
  172. package/python/Lib/site-packages/sentry_sdk/integrations/openai_agents/__pycache__/__init__.cpython-311.pyc +0 -0
  173. package/python/Lib/site-packages/sentry_sdk/integrations/starlette.py +2 -2
  174. package/python/Lib/site-packages/sentry_sdk/integrations/trytond.py +1 -1
  175. package/python/Lib/site-packages/sentry_sdk/profiler/__pycache__/continuous_profiler.cpython-311.pyc +0 -0
  176. package/python/Lib/site-packages/sentry_sdk/profiler/__pycache__/transaction_profiler.cpython-311.pyc +0 -0
  177. package/python/Lib/site-packages/sentry_sdk/profiler/continuous_profiler.py +0 -3
  178. package/python/Lib/site-packages/sentry_sdk/profiler/transaction_profiler.py +1 -1
  179. package/python/Lib/site-packages/sentry_sdk/traces.py +1 -1
  180. package/python/Lib/site-packages/sentry_sdk/utils.py +17 -4
  181. package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/METADATA +1 -1
  182. package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/RECORD +31 -31
  183. package/python/Lib/site-packages/tqdm-4.70.1.dist-info/RECORD +1 -1
  184. package/python/Lib/site-packages/typer-0.29.1.dist-info/RECORD +1 -1
  185. package/python/Lib/venv/scripts/nt/python.exe +0 -0
  186. package/python/Lib/venv/scripts/nt/pythonw.exe +0 -0
  187. package/python/Scripts/conda.exe +0 -0
  188. package/python/libs/_asyncio.lib +0 -0
  189. package/python/libs/_bz2.lib +0 -0
  190. package/python/libs/_ctypes.lib +0 -0
  191. package/python/libs/_ctypes_test.lib +0 -0
  192. package/python/libs/_decimal.lib +0 -0
  193. package/python/libs/_elementtree.lib +0 -0
  194. package/python/libs/_hashlib.lib +0 -0
  195. package/python/libs/_lzma.lib +0 -0
  196. package/python/libs/_msi.lib +0 -0
  197. package/python/libs/_multiprocessing.lib +0 -0
  198. package/python/libs/_overlapped.lib +0 -0
  199. package/python/libs/_queue.lib +0 -0
  200. package/python/libs/_socket.lib +0 -0
  201. package/python/libs/_sqlite3.lib +0 -0
  202. package/python/libs/_ssl.lib +0 -0
  203. package/python/libs/_testbuffer.lib +0 -0
  204. package/python/libs/_testcapi.lib +0 -0
  205. package/python/libs/_testconsole.lib +0 -0
  206. package/python/libs/_testimportmultiple.lib +0 -0
  207. package/python/libs/_testinternalcapi.lib +0 -0
  208. package/python/libs/_testmultiphase.lib +0 -0
  209. package/python/libs/_tkinter.lib +0 -0
  210. package/python/libs/_uuid.lib +0 -0
  211. package/python/libs/_zoneinfo.lib +0 -0
  212. package/python/libs/pyexpat.lib +0 -0
  213. package/python/libs/python3.lib +0 -0
  214. package/python/libs/python311.lib +0 -0
  215. package/python/libs/select.lib +0 -0
  216. package/python/libs/sqlite3.lib +0 -0
  217. package/python/libs/unicodedata.lib +0 -0
  218. package/python/libs/winsound.lib +0 -0
  219. package/python/python.exe +0 -0
  220. package/python/python3.dll +0 -0
  221. package/python/python311.dll +0 -0
  222. package/python/pythonw.exe +0 -0
  223. package/python/Lib/site-packages/platformdirs-4.14.5.dist-info/RECORD +0 -20
  224. package/python/Lib/site-packages/semver-3.1.1.dist-info/RECORD +0 -17
  225. package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_services/__pycache__/registry.cpython-311.pyc +0 -0
  226. package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_services/registry.py +0 -22
  227. /package/python/Lib/site-packages/{platformdirs-4.14.5.dist-info → platformdirs-4.14.7.dist-info}/INSTALLER +0 -0
  228. /package/python/Lib/site-packages/{platformdirs-4.14.5.dist-info → platformdirs-4.14.7.dist-info}/REQUESTED +0 -0
  229. /package/python/Lib/site-packages/{platformdirs-4.14.5.dist-info → platformdirs-4.14.7.dist-info}/entry_points.txt +0 -0
  230. /package/python/Lib/site-packages/{platformdirs-4.14.5.dist-info → platformdirs-4.14.7.dist-info}/licenses/LICENSE +0 -0
  231. /package/python/Lib/site-packages/{pydantic_settings-2.16.2.dist-info → pydantic_settings-2.16.3.dist-info}/INSTALLER +0 -0
  232. /package/python/Lib/site-packages/{pydantic_settings-2.16.2.dist-info → pydantic_settings-2.16.3.dist-info}/REQUESTED +0 -0
  233. /package/python/Lib/site-packages/{platformdirs-4.14.5.dist-info → pydantic_settings-2.16.3.dist-info}/WHEEL +0 -0
  234. /package/python/Lib/site-packages/{pydantic_settings-2.16.2.dist-info → pydantic_settings-2.16.3.dist-info}/licenses/LICENSE +0 -0
  235. /package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/INSTALLER +0 -0
  236. /package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/REQUESTED +0 -0
  237. /package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/WHEEL +0 -0
  238. /package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/entry_points.txt +0 -0
  239. /package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/licenses/LICENSE.txt +0 -0
  240. /package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/top_level.txt +0 -0
  241. /package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/INSTALLER +0 -0
  242. /package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/REQUESTED +0 -0
  243. /package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/WHEEL +0 -0
  244. /package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/entry_points.txt +0 -0
  245. /package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/licenses/LICENSE +0 -0
  246. /package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/top_level.txt +0 -0
@@ -2,11 +2,11 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from ._xdg import _expand_user
5
+ from ._xdg import expand_user
6
6
  from .api import PlatformDirsABC
7
7
 
8
8
 
9
- class IOS(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
9
+ class IOS(PlatformDirsABC): # ruff:ignore[too-many-public-methods] # full directory API
10
10
  """Platform directories for iOS and iPadOS.
11
11
 
12
12
  Follows the app container layout from `Apple's File System Programming Guide
@@ -19,20 +19,15 @@ class IOS(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
19
19
 
20
20
  """
21
21
 
22
- @property
23
- def user_data_dir(self) -> str:
24
- """Data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``."""
25
- return self._append_app_name_and_version(_expand_user("~/Library/Application Support"), private=True)
26
-
27
22
  @property
28
23
  def site_data_dir(self) -> str:
29
24
  """Data directory shared by users, same as `user_data_dir`."""
30
25
  return self.user_data_dir
31
26
 
32
27
  @property
33
- def user_config_dir(self) -> str:
34
- """Config directory tied to the user, same as `user_data_dir`."""
35
- return self.user_data_dir
28
+ def user_data_dir(self) -> str:
29
+ """Data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``."""
30
+ return self._append_app_name_and_version(expand_user("~/Library/Application Support"), private=True)
36
31
 
37
32
  @property
38
33
  def site_config_dir(self) -> str:
@@ -40,9 +35,9 @@ class IOS(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
40
35
  return self.user_config_dir
41
36
 
42
37
  @property
43
- def user_cache_dir(self) -> str:
44
- """Cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``."""
45
- return self._append_app_name_and_version(_expand_user("~/Library/Caches"), private=True)
38
+ def user_config_dir(self) -> str:
39
+ """Config directory tied to the user, same as `user_data_dir`."""
40
+ return self.user_data_dir
46
41
 
47
42
  @property
48
43
  def site_cache_dir(self) -> str:
@@ -50,9 +45,9 @@ class IOS(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
50
45
  return self.user_cache_dir
51
46
 
52
47
  @property
53
- def user_state_dir(self) -> str:
54
- """State directory tied to the user, same as `user_data_dir`."""
55
- return self.user_data_dir
48
+ def user_cache_dir(self) -> str:
49
+ """Cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``."""
50
+ return self._append_app_name_and_version(expand_user("~/Library/Caches"), private=True)
56
51
 
57
52
  @property
58
53
  def site_state_dir(self) -> str:
@@ -60,65 +55,70 @@ class IOS(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
60
55
  return self.user_state_dir
61
56
 
62
57
  @property
63
- def user_log_dir(self) -> str:
64
- """Log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``."""
65
- return self._append_app_name_and_version(_expand_user("~/Library/Logs"), private=True)
58
+ def user_state_dir(self) -> str:
59
+ """State directory tied to the user, same as `user_data_dir`."""
60
+ return self.user_data_dir
66
61
 
67
62
  @property
68
63
  def site_log_dir(self) -> str:
69
64
  """Log directory shared by users, same as `user_log_dir`."""
70
65
  return self.user_log_dir
71
66
 
67
+ @property
68
+ def user_log_dir(self) -> str:
69
+ """Log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``."""
70
+ return self._append_app_name_and_version(expand_user("~/Library/Logs"), private=True)
71
+
72
72
  @property
73
73
  def user_documents_dir(self) -> str:
74
74
  """Documents directory tied to the user, e.g. ``~/Documents``."""
75
- return _expand_user("~/Documents")
75
+ return expand_user("~/Documents")
76
76
 
77
77
  # The app container has Documents but no other media folder, so the rest live inside it, as Qt places them.
78
78
  @property
79
79
  def user_downloads_dir(self) -> str:
80
80
  """Downloads directory tied to the user, e.g. ``~/Documents/Downloads``."""
81
- return _expand_user("~/Documents/Downloads")
81
+ return expand_user("~/Documents/Downloads")
82
82
 
83
83
  @property
84
84
  def user_pictures_dir(self) -> str:
85
85
  """Pictures directory tied to the user, e.g. ``~/Documents/Pictures``."""
86
- return _expand_user("~/Documents/Pictures")
86
+ return expand_user("~/Documents/Pictures")
87
87
 
88
88
  @property
89
89
  def user_videos_dir(self) -> str:
90
90
  """Videos directory tied to the user, e.g. ``~/Documents/Movies``."""
91
- return _expand_user("~/Documents/Movies")
91
+ return expand_user("~/Documents/Movies")
92
92
 
93
93
  @property
94
94
  def user_music_dir(self) -> str:
95
95
  """Music directory tied to the user, e.g. ``~/Documents/Music``."""
96
- return _expand_user("~/Documents/Music")
96
+ return expand_user("~/Documents/Music")
97
97
 
98
98
  @property
99
99
  def user_desktop_dir(self) -> str:
100
100
  """Desktop directory tied to the user, e.g. ``~/Documents/Desktop``."""
101
- return _expand_user("~/Documents/Desktop")
101
+ return expand_user("~/Documents/Desktop")
102
102
 
103
103
  @property
104
104
  def user_projects_dir(self) -> str:
105
105
  """Projects directory tied to the user, e.g. ``~/Documents/Projects``."""
106
- return _expand_user("~/Documents/Projects")
106
+ return expand_user("~/Documents/Projects")
107
107
 
108
108
  @property
109
109
  def user_publicshare_dir(self) -> str:
110
110
  """Public share directory tied to the user, e.g. ``~/Documents/Public``."""
111
- return _expand_user("~/Documents/Public")
111
+ return expand_user("~/Documents/Public")
112
112
 
113
113
  @property
114
114
  def user_templates_dir(self) -> str:
115
115
  """Templates directory tied to the user, e.g. ``~/Documents/Templates``."""
116
- return _expand_user("~/Documents/Templates")
116
+ return expand_user("~/Documents/Templates")
117
117
 
118
118
  @property
119
119
  def user_fonts_dir(self) -> str:
120
120
  """Fonts directory tied to the user, e.g. ``~/Library/Fonts``."""
121
- return _expand_user("~/Library/Fonts")
121
+ return expand_user("~/Library/Fonts")
122
122
 
123
123
  @property
124
124
  def user_preference_dir(self) -> str:
@@ -126,20 +126,15 @@ class IOS(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
126
126
  # Apple reserves Library/Preferences for NSUserDefaults and tells apps not to create files there.
127
127
  return self.user_config_dir
128
128
 
129
- @property
130
- def user_bin_dir(self) -> str:
131
- """Bin directory tied to the user, e.g. ``~/.local/bin``."""
132
- return _expand_user("~/.local/bin")
133
-
134
129
  @property
135
130
  def site_bin_dir(self) -> str:
136
131
  """Bin directory shared by users, same as `user_bin_dir`."""
137
132
  return self.user_bin_dir
138
133
 
139
134
  @property
140
- def user_applications_dir(self) -> str:
141
- """Applications directory tied to the user, e.g. ``~/Applications``."""
142
- return _expand_user("~/Applications")
135
+ def user_bin_dir(self) -> str:
136
+ """Bin directory tied to the user, e.g. ``~/.local/bin``."""
137
+ return expand_user("~/.local/bin")
143
138
 
144
139
  @property
145
140
  def site_applications_dir(self) -> str:
@@ -147,15 +142,20 @@ class IOS(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
147
142
  return self.user_applications_dir
148
143
 
149
144
  @property
150
- def user_runtime_dir(self) -> str:
151
- """Runtime directory tied to the user, e.g. ``~/tmp/$appname/$version``."""
152
- return self._append_app_name_and_version(_expand_user("~/tmp"), private=True)
145
+ def user_applications_dir(self) -> str:
146
+ """Applications directory tied to the user, e.g. ``~/Applications``."""
147
+ return expand_user("~/Applications")
153
148
 
154
149
  @property
155
150
  def site_runtime_dir(self) -> str:
156
151
  """Runtime directory shared by users, same as `user_runtime_dir`."""
157
152
  return self.user_runtime_dir
158
153
 
154
+ @property
155
+ def user_runtime_dir(self) -> str:
156
+ """Runtime directory tied to the user, e.g. ``~/tmp/$appname/$version``."""
157
+ return self._append_app_name_and_version(expand_user("~/tmp"), private=True)
158
+
159
159
 
160
160
  __all__ = [
161
161
  "IOS",
@@ -7,11 +7,14 @@ import stat
7
7
  import sys
8
8
  from contextlib import suppress
9
9
  from pathlib import Path
10
- from typing import Final, NoReturn
11
10
 
12
- from ._xdg import XDGMixin, _expand_user
11
+ from ._xdg import XDGMixin, expand_user
13
12
  from .api import PlatformDirsABC
14
13
 
14
+ TYPE_CHECKING = False
15
+ if TYPE_CHECKING:
16
+ from typing import Final, NoReturn
17
+
15
18
  if sys.platform == "win32":
16
19
 
17
20
  def geteuid() -> NoReturn:
@@ -22,7 +25,7 @@ else:
22
25
  from os import geteuid
23
26
 
24
27
 
25
- class _MacOSDefaults(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
28
+ class _MacOSDefaults(PlatformDirsABC): # ruff:ignore[too-many-public-methods] # full directory API
26
29
  """Default platform directories for macOS without XDG environment variable overrides.
27
30
 
28
31
  Follows the guidance from `Apple's File System Programming Guide
@@ -31,47 +34,23 @@ class _MacOSDefaults(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
31
34
 
32
35
  """
33
36
 
34
- def _optionally_create_directory(self, path: str, *, private: bool) -> None:
35
- if self.ensure_exists and (shared := Path(_SITE_CACHE)) in (target := Path(path)).parents:
36
- # Every user can write to /Library/Caches, so another one may have created this entry first.
37
- entry = shared / target.relative_to(shared).parts[0]
38
- with suppress(FileExistsError):
39
- super()._optionally_create_directory(str(entry), private=private)
40
- if problem := self._shared_entry_problem(entry):
41
- msg = f"site cache directory {problem}"
42
- raise PermissionError(msg)
43
- if target == entry:
44
- return
45
- super()._optionally_create_directory(path, private=private)
46
-
47
- @staticmethod
48
- def _shared_entry_problem(path: Path) -> str | None:
49
- info = path.lstat()
50
- if stat.S_ISLNK(info.st_mode):
51
- return f"{path} is a symlink"
52
- if not stat.S_ISDIR(info.st_mode):
53
- return f"{path} is not a directory"
54
- if info.st_uid != 0 and info.st_uid != (euid := geteuid()):
55
- return f"{path} is owned by uid {info.st_uid}, not root or {euid}"
56
- return None
57
-
58
- def _base_user_app_support_dir(self) -> str:
59
- return self._append_app_name_and_version(_expand_user("~/Library/Application Support"), private=True)
60
-
61
- def _base_site_dirs(self) -> list[str]:
62
- path_list = [self._join_app_name_and_version(f"{prefix}/share")] if (prefix := _homebrew_prefix()) else []
63
- path_list.append(self._join_app_name_and_version("/Library/Application Support"))
64
- return path_list
65
-
66
37
  @property
67
38
  def user_data_dir(self) -> str:
68
39
  """Data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``."""
69
40
  return self._base_user_app_support_dir()
70
41
 
42
+ def _base_user_app_support_dir(self) -> str:
43
+ return self._append_app_name_and_version(expand_user("~/Library/Application Support"), private=True)
44
+
71
45
  @property
72
46
  def _site_data_dirs(self) -> list[str]:
73
47
  return self._base_site_dirs()
74
48
 
49
+ def _base_site_dirs(self) -> list[str]:
50
+ path_list = [self._join_app_name_and_version(f"{prefix}/share")] if (prefix := _homebrew_prefix()) else []
51
+ path_list.append(self._join_app_name_and_version("/Library/Application Support"))
52
+ return path_list
53
+
75
54
  @property
76
55
  def user_config_dir(self) -> str:
77
56
  """Config directory tied to the user, same as `user_data_dir`."""
@@ -84,17 +63,18 @@ class _MacOSDefaults(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
84
63
  @property
85
64
  def user_cache_dir(self) -> str:
86
65
  """Cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``."""
87
- return self._append_app_name_and_version(_expand_user("~/Library/Caches"), private=True)
88
-
89
- @property
90
- def _site_cache_dirs(self) -> list[str]:
91
- path_list = [self._join_app_name_and_version(f"{prefix}/var/cache")] if (prefix := _homebrew_prefix()) else []
92
- path_list.append(self._join_app_name_and_version(_SITE_CACHE))
93
- return path_list
66
+ return self._append_app_name_and_version(expand_user("~/Library/Caches"), private=True)
94
67
 
95
68
  @property
96
69
  def site_cache_dir(self) -> str:
97
- """Cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``. If we're using a Python binary managed by `Homebrew <https://brew.sh>`_, the directory will be under the Homebrew prefix, e.g. ``$homebrew_prefix/var/cache/$appname/$version``. If `multipath <platformdirs.api.PlatformDirsABC.multipath>` is enabled, and we're in Homebrew, the response is a multi-path string separated by ":", e.g. ``$homebrew_prefix/var/cache/$appname/$version:/Library/Caches/$appname/$version``.
70
+ """Cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``.
71
+
72
+ If we're using a Python binary managed by `Homebrew <https://brew.sh>`_, the directory will be under the
73
+ Homebrew prefix, e.g. ``$homebrew_prefix/var/cache/$appname/$version``. If
74
+ `multipath <platformdirs.api.PlatformDirsABC.multipath>` is enabled, and we're in Homebrew, the response is a
75
+ multi-path string separated by ":", e.g.
76
+ ``$homebrew_prefix/var/cache/$appname/$version:/Library/Caches/$appname/$version``.
77
+
98
78
 
99
79
  :raises PermissionError: under `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`, if
100
80
  ``/Library/Caches/$appname`` is a symlink, not a directory or owned by a user other than root and the
@@ -103,22 +83,65 @@ class _MacOSDefaults(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
103
83
  """
104
84
  return self._select_site_dirs(self._site_cache_dirs)
105
85
 
86
+ @property
87
+ def _site_cache_dirs(self) -> list[str]:
88
+ path_list = [self._join_app_name_and_version(f"{prefix}/var/cache")] if (prefix := _homebrew_prefix()) else []
89
+ path_list.append(self._join_app_name_and_version(_SITE_CACHE))
90
+ return path_list
91
+
106
92
  @property
107
93
  def user_state_dir(self) -> str:
108
- """State directory tied to the user, same as `user_data_dir` without ``$XDG_DATA_HOME``, e.g. ``~/Library/Application Support/$appname/$version``."""
94
+ """State directory tied to the user, same as `user_data_dir` without ``$XDG_DATA_HOME``.
95
+
96
+ E.g. ``~/Library/Application Support/$appname/$version``.
97
+
98
+ """
109
99
  return self._base_user_app_support_dir()
110
100
 
111
101
  @property
112
102
  def site_state_dir(self) -> str:
113
- """State directory shared by users, the first entry of `site_data_dir` without ``$XDG_DATA_DIRS``, ignoring `multipath <platformdirs.api.PlatformDirsABC.multipath>`."""
103
+ """State directory shared by users, the first entry of `site_data_dir` without ``$XDG_DATA_DIRS``.
104
+
105
+ Ignores `multipath <platformdirs.api.PlatformDirsABC.multipath>`.
106
+
107
+ """
114
108
  path = self._base_site_dirs()[0]
115
109
  self._optionally_create_directory(path, private=False)
116
110
  return path
117
111
 
112
+ # Default platform directories for macOS without XDG environment variable overrides.
113
+ #
114
+ # Follows the guidance from `Apple's File System Programming Guide
115
+ # <https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
116
+ # The XDG env var handling is in :class:`~platformdirs._xdg.XDGMixin`.
117
+ def _optionally_create_directory(self, path: str, *, private: bool) -> None:
118
+ if self.ensure_exists and (shared := Path(_SITE_CACHE)) in (target := Path(path)).parents:
119
+ # Every user can write to /Library/Caches, so another one may have created this entry first.
120
+ entry = shared / target.relative_to(shared).parts[0]
121
+ with suppress(FileExistsError):
122
+ super()._optionally_create_directory(str(entry), private=private)
123
+ if problem := self._shared_entry_problem(entry):
124
+ msg = f"site cache directory {problem}"
125
+ raise PermissionError(msg)
126
+ if target == entry:
127
+ return
128
+ super()._optionally_create_directory(path, private=private)
129
+
130
+ @staticmethod
131
+ def _shared_entry_problem(path: Path) -> str | None:
132
+ info = path.lstat()
133
+ if stat.S_ISLNK(info.st_mode):
134
+ return f"{path} is a symlink"
135
+ if not stat.S_ISDIR(info.st_mode):
136
+ return f"{path} is not a directory"
137
+ if info.st_uid != 0 and info.st_uid != (euid := geteuid()):
138
+ return f"{path} is owned by uid {info.st_uid}, not root or {euid}"
139
+ return None
140
+
118
141
  @property
119
142
  def user_log_dir(self) -> str:
120
143
  """Log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``."""
121
- return self._append_app_name_and_version(_expand_user("~/Library/Logs"), private=True)
144
+ return self._append_app_name_and_version(expand_user("~/Library/Logs"), private=True)
122
145
 
123
146
  @property
124
147
  def site_log_dir(self) -> str:
@@ -128,62 +151,62 @@ class _MacOSDefaults(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
128
151
  @property
129
152
  def user_documents_dir(self) -> str:
130
153
  """Documents directory tied to the user, e.g. ``~/Documents``."""
131
- return _expand_user("~/Documents")
154
+ return expand_user("~/Documents")
132
155
 
133
156
  @property
134
157
  def user_downloads_dir(self) -> str:
135
158
  """Downloads directory tied to the user, e.g. ``~/Downloads``."""
136
- return _expand_user("~/Downloads")
159
+ return expand_user("~/Downloads")
137
160
 
138
161
  @property
139
162
  def user_pictures_dir(self) -> str:
140
163
  """Pictures directory tied to the user, e.g. ``~/Pictures``."""
141
- return _expand_user("~/Pictures")
164
+ return expand_user("~/Pictures")
142
165
 
143
166
  @property
144
167
  def user_videos_dir(self) -> str:
145
168
  """Videos directory tied to the user, e.g. ``~/Movies``."""
146
- return _expand_user("~/Movies")
169
+ return expand_user("~/Movies")
147
170
 
148
171
  @property
149
172
  def user_music_dir(self) -> str:
150
173
  """Music directory tied to the user, e.g. ``~/Music``."""
151
- return _expand_user("~/Music")
174
+ return expand_user("~/Music")
152
175
 
153
176
  @property
154
177
  def user_desktop_dir(self) -> str:
155
178
  """Desktop directory tied to the user, e.g. ``~/Desktop``."""
156
- return _expand_user("~/Desktop")
179
+ return expand_user("~/Desktop")
157
180
 
158
181
  @property
159
182
  def user_projects_dir(self) -> str:
160
183
  """Projects directory tied to the user, e.g. ``~/Projects``."""
161
- return _expand_user("~/Projects")
184
+ return expand_user("~/Projects")
162
185
 
163
186
  @property
164
187
  def user_publicshare_dir(self) -> str:
165
188
  """Public share directory tied to the user, e.g. ``~/Public``."""
166
- return _expand_user("~/Public")
189
+ return expand_user("~/Public")
167
190
 
168
191
  @property
169
192
  def user_templates_dir(self) -> str:
170
193
  """Templates directory tied to the user, e.g. ``~/Templates``."""
171
- return _expand_user("~/Templates")
194
+ return expand_user("~/Templates")
172
195
 
173
196
  @property
174
197
  def user_fonts_dir(self) -> str:
175
198
  """Fonts directory tied to the user, e.g. ``~/Library/Fonts``."""
176
- return _expand_user("~/Library/Fonts")
199
+ return expand_user("~/Library/Fonts")
177
200
 
178
201
  @property
179
202
  def user_preference_dir(self) -> str:
180
203
  """Preference directory tied to the user, e.g. ``~/Library/Preferences/AppName``."""
181
- return self._append_app_name_and_version(_expand_user("~/Library/Preferences"), private=True)
204
+ return self._append_app_name_and_version(expand_user("~/Library/Preferences"), private=True)
182
205
 
183
206
  @property
184
207
  def user_bin_dir(self) -> str:
185
208
  """Bin directory tied to the user, e.g. ``~/.local/bin``."""
186
- return _expand_user("~/.local/bin")
209
+ return expand_user("~/.local/bin")
187
210
 
188
211
  @property
189
212
  def site_bin_dir(self) -> str:
@@ -193,22 +216,28 @@ class _MacOSDefaults(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
193
216
  @property
194
217
  def user_applications_dir(self) -> str:
195
218
  """Applications directory tied to the user, e.g. ``~/Applications``."""
196
- return _expand_user("~/Applications")
219
+ return expand_user("~/Applications")
197
220
 
198
221
  @property
199
222
  def _site_applications_dirs(self) -> list[str]:
200
223
  return ["/Applications"]
201
224
 
202
- @property
203
- def user_runtime_dir(self) -> str:
204
- """Runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``."""
205
- return self._append_app_name_and_version(_expand_user("~/Library/Caches/TemporaryItems"), private=True)
206
-
207
225
  @property
208
226
  def site_runtime_dir(self) -> str:
209
227
  """Runtime directory shared by users, same as `user_runtime_dir`."""
210
228
  return self.user_runtime_dir
211
229
 
230
+ @property
231
+ def user_runtime_dir(self) -> str:
232
+ """Runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``."""
233
+ return self._append_app_name_and_version(expand_user("~/Library/Caches/TemporaryItems"), private=True)
234
+
235
+
236
+ def _homebrew_prefix() -> str | None:
237
+ if match := _HOMEBREW_PYTHON.fullmatch(sys.base_prefix):
238
+ return match["prefix"]
239
+ return None
240
+
212
241
 
213
242
  class MacOS(XDGMixin, _MacOSDefaults):
214
243
  """Platform directories for the macOS operating system.
@@ -226,7 +255,7 @@ class MacOS(XDGMixin, _MacOSDefaults):
226
255
  # Homebrew links each Python formula as a framework build, and a virtual environment keeps it as sys.base_prefix.
227
256
  # Homebrew's sitecustomize rewrites the Cellar keg path to the opt link, so -S or PYTHONHOME leaves the Cellar one.
228
257
  # Homebrew rewrites its own prefix when bottling, so naming one here would make the macOS and Linux bottles differ.
229
- _HOMEBREW_PYTHON: Final = re.compile(
258
+ _HOMEBREW_PYTHON: Final[re.Pattern[str]] = re.compile(
230
259
  r"""
231
260
  (?P<prefix>.+) # $HOMEBREW_PREFIX, as printed by `brew --prefix`
232
261
  /(?:opt/python[^/]* # formula link: python, python3, python@3.13 or python-freethreading
@@ -238,14 +267,8 @@ _HOMEBREW_PYTHON: Final = re.compile(
238
267
  )
239
268
 
240
269
 
241
- def _homebrew_prefix() -> str | None:
242
- if match := _HOMEBREW_PYTHON.fullmatch(sys.base_prefix):
243
- return match["prefix"]
244
- return None
245
-
246
-
247
270
  # Unlike the other /Library site bases, macOS ships this one world-writable and sticky, like /tmp.
248
- _SITE_CACHE: Final = "/Library/Caches"
271
+ _SITE_CACHE: Final[str] = "/Library/Caches"
249
272
 
250
273
 
251
274
  __all__ = [
@@ -2,10 +2,9 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import TYPE_CHECKING
6
-
7
5
  import pytest
8
6
 
7
+ TYPE_CHECKING = False #: :data:`typing.TYPE_CHECKING` without importing :mod:`typing` at runtime
9
8
  if TYPE_CHECKING:
10
9
  from collections.abc import Iterator
11
10
  from pathlib import Path
@@ -15,11 +14,13 @@ if TYPE_CHECKING:
15
14
  def platformdirs_isolated(tmp_path: Path) -> Iterator[Path]:
16
15
  """Redirect every platformdirs directory under ``tmp_path`` with :func:`~platformdirs.testing.isolated_dirs`.
17
16
 
18
- :returns: the isolation root, ``tmp_path``
17
+ :param tmp_path: the directory that holds the redirected directories.
18
+
19
+ :yields: the isolation root, ``tmp_path``
19
20
 
20
21
  """
21
22
  # pytest imports every installed pytest11 plugin at startup, so load the helper only for tests that ask for it.
22
- from platformdirs.testing import isolated_dirs # ruff:ignore[import-outside-top-level]
23
+ from .testing import isolated_dirs # ruff:ignore[import-outside-top-level]
23
24
 
24
25
  with isolated_dirs(tmp_path) as root:
25
26
  yield root
@@ -4,30 +4,16 @@ from __future__ import annotations
4
4
 
5
5
  from contextlib import contextmanager
6
6
  from pathlib import Path
7
- from typing import TYPE_CHECKING, Final
8
7
 
9
8
  import platformdirs
10
- from platformdirs.api import PlatformDirsABC
11
9
 
10
+ from .api import PlatformDirsABC
11
+
12
+ TYPE_CHECKING = False
12
13
  if TYPE_CHECKING:
13
14
  import os
14
15
  from collections.abc import Generator
15
-
16
- _APP_KINDS: Final[frozenset[str]] = frozenset({
17
- "user_data",
18
- "site_data",
19
- "user_config",
20
- "site_config",
21
- "user_cache",
22
- "site_cache",
23
- "user_state",
24
- "site_state",
25
- "user_log",
26
- "site_log",
27
- "user_runtime",
28
- "site_runtime",
29
- "user_preference",
30
- })
16
+ from typing import Final
31
17
 
32
18
 
33
19
  @contextmanager
@@ -44,13 +30,29 @@ def isolated_dirs(root: str | os.PathLike[str]) -> Generator[Path, None, None]:
44
30
 
45
31
  :param root: directory that holds the redirected directories
46
32
 
47
- :returns: the absolute isolation root as a :class:`~pathlib.Path`
33
+ :yields: the absolute isolation root as a :class:`~pathlib.Path`
48
34
 
49
35
  """
36
+ app_kinds: Final[frozenset[str]] = frozenset({
37
+ "user_data",
38
+ "site_data",
39
+ "user_config",
40
+ "site_config",
41
+ "user_cache",
42
+ "site_cache",
43
+ "user_state",
44
+ "site_state",
45
+ "user_log",
46
+ "site_log",
47
+ "user_runtime",
48
+ "site_runtime",
49
+ "user_preference",
50
+ })
51
+
50
52
  base = Path(root).absolute()
51
53
  patches = {
52
54
  name: _redirect(
53
- base / (kind := name.removesuffix("_dir")), app=kind in _APP_KINDS, private=kind.startswith("user_")
55
+ base / (kind := name.removesuffix("_dir")), app=kind in app_kinds, private=kind.startswith("user_")
54
56
  )
55
57
  for name in PlatformDirsABC.__abstractmethods__
56
58
  }
@@ -61,7 +63,7 @@ def isolated_dirs(root: str | os.PathLike[str]) -> Generator[Path, None, None]:
61
63
  if name == "_use_site" or (name.startswith("_site_") and name.endswith("_dirs"))
62
64
  }
63
65
  cls = platformdirs.PlatformDirs
64
- saved = {name: vars(cls)[name] for name in patches if name in vars(cls)}
66
+ saved = {name: cls.__dict__[name] for name in patches if name in cls.__dict__}
65
67
  for name, value in patches.items():
66
68
  setattr(cls, name, value)
67
69
  try: