wexample-wex-addon-dev-python 8.1.2__py3-none-any.whl → 8.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -304,6 +304,10 @@ class PythonWorkdir(WithProfilingPythonWorkdirMixin, CodeBaseWorkdir):
304
304
  def update_dependencies(self, dependencies_map: dict[str, str]) -> None:
305
305
  import subprocess
306
306
 
307
+ from wexample_helpers.helpers.retryable_callback_manager import (
308
+ RetryableCallbackManager,
309
+ )
310
+
307
311
  super().update_dependencies(dependencies_map)
308
312
 
309
313
  requirements_path = self.get_path() / "requirements.txt"
@@ -311,25 +315,44 @@ class PythonWorkdir(WithProfilingPythonWorkdirMixin, CodeBaseWorkdir):
311
315
  return
312
316
 
313
317
  pyproject_path = self.get_path() / "pyproject.toml"
314
- result = subprocess.run(
315
- [
316
- "uv",
317
- "pip",
318
- "compile",
319
- str(pyproject_path),
320
- "--output-file",
321
- str(requirements_path),
322
- "--python-version",
323
- "3.11",
324
- "--no-cache",
325
- ],
326
- capture_output=True,
327
- text=True,
328
- )
329
- if result.returncode != 0:
330
- raise RuntimeError(
331
- f"uv pip compile failed for {self.get_path()}:\n{result.stderr}"
318
+
319
+ def _run_uv_compile() -> None:
320
+ result = subprocess.run(
321
+ [
322
+ "uv",
323
+ "pip",
324
+ "compile",
325
+ str(pyproject_path),
326
+ "--output-file",
327
+ str(requirements_path),
328
+ "--python-version",
329
+ "3.11",
330
+ "--no-cache",
331
+ ],
332
+ capture_output=True,
333
+ text=True,
332
334
  )
335
+ if result.returncode != 0:
336
+ raise RuntimeError(
337
+ f"uv pip compile failed for {self.get_path()}:\n{result.stderr}"
338
+ )
339
+
340
+ # Right after a publish, PyPI's index can still serve a stale view of the
341
+ # registry, making uv conclude that the freshly-published version is
342
+ # "unsatisfiable". Retry a few times with backoff to absorb this race.
343
+ # Real dependency conflicts will still fail after retries.
344
+ RetryableCallbackManager(
345
+ callback=_run_uv_compile,
346
+ max_attempts=4,
347
+ backoff_base_seconds=4,
348
+ should_retry_callback=lambda exc, msg, attempt, max_a: (
349
+ "No solution found" in msg or "unsatisfiable" in msg
350
+ ),
351
+ on_retry_callback=lambda attempt, max_a, delay, exc, msg: self.log(
352
+ f"uv pip compile reports unsatisfiable on attempt {attempt}/{max_a} "
353
+ f"(likely PyPI index propagation); retrying in {delay}s…"
354
+ ),
355
+ ).run()
333
356
 
334
357
  def _create_init_children_factory(self) -> ChildrenFileFactoryOption:
335
358
  from wexample_filestate.const.disk import DiskItemType
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wexample-wex-addon-dev-python
3
- Version: 8.1.2
3
+ Version: 8.2.1
4
4
  Summary: Python dev addon for wex
5
5
  Author-Email: weeger <contact@wexample.com>
6
6
  License: MIT
@@ -16,7 +16,7 @@ Requires-Dist: networkx
16
16
  Requires-Dist: pylint
17
17
  Requires-Dist: pyright
18
18
  Requires-Dist: wexample-filestate-python>=6.5.0
19
- Requires-Dist: wexample-wex-addon-app>=16.4.0
19
+ Requires-Dist: wexample-wex-addon-app>=16.6.0
20
20
  Provides-Extra: dev
21
21
  Requires-Dist: pytest; extra == "dev"
22
22
  Requires-Dist: pytest-cov; extra == "dev"
@@ -24,7 +24,7 @@ Description-Content-Type: text/markdown
24
24
 
25
25
  # wex_addon_dev_python
26
26
 
27
- Version: 8.1.2
27
+ Version: 8.2.1
28
28
 
29
29
  Python dev addon for wex
30
30
 
@@ -111,7 +111,7 @@ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the comp
111
111
  - pylint:
112
112
  - pyright:
113
113
  - wexample-filestate-python: >=6.5.0
114
- - wexample-wex-addon-app: >=16.4.0
114
+ - wexample-wex-addon-app: >=16.6.0
115
115
 
116
116
  ## Versioning & Compatibility Policy
117
117
 
@@ -1,6 +1,6 @@
1
- wexample_wex_addon_dev_python-8.1.2.dist-info/METADATA,sha256=mPfAaOYUdehXekjnXIcVFKf1ZR819lFJzHNIA8dxcyQ,11755
2
- wexample_wex_addon_dev_python-8.1.2.dist-info/WHEEL,sha256=Z36eTX6lG3PITRleSd5hAZHCcz52yg3c0JQVxKBbLW0,90
3
- wexample_wex_addon_dev_python-8.1.2.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
1
+ wexample_wex_addon_dev_python-8.2.1.dist-info/METADATA,sha256=bVB-Q_0u-9I5HegMrp-dvxink-ffENVmWz2FFIovRVc,11755
2
+ wexample_wex_addon_dev_python-8.2.1.dist-info/WHEEL,sha256=Z36eTX6lG3PITRleSd5hAZHCcz52yg3c0JQVxKBbLW0,90
3
+ wexample_wex_addon_dev_python-8.2.1.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
4
  wexample_wex_addon_dev_python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  wexample_wex_addon_dev_python/__pycache__/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  wexample_wex_addon_dev_python/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -64,5 +64,5 @@ wexample_wex_addon_dev_python/workdir/mixin/__init__.py,sha256=47DEQpj8HBSa-_TIm
64
64
  wexample_wex_addon_dev_python/workdir/mixin/with_profiling_python_workdir_mixin.py,sha256=rWf_AMq4YM_vvKYZiXyhFeAz2xg0KMt_u-1FJACtvjc,3042
65
65
  wexample_wex_addon_dev_python/workdir/python_package_workdir.py,sha256=Bl3Jf2NqawSCUkH3Fi59QInF3JJVWpkaBzfQ86WFf6I,18835
66
66
  wexample_wex_addon_dev_python/workdir/python_packages_suite_workdir.py,sha256=ICHHewLpsXiheYzGDEahphBryH98ZVezWzSAy6A5w5I,2874
67
- wexample_wex_addon_dev_python/workdir/python_workdir.py,sha256=BCFARcJAAU8pidcB_3m4OIgIC0nmWYvwBW6FBT25HsM,19154
68
- wexample_wex_addon_dev_python-8.1.2.dist-info/RECORD,,
67
+ wexample_wex_addon_dev_python/workdir/python_workdir.py,sha256=hBlqRfJ1eRvUzGFasftnn0SxGw0_Yyoe7AhBDLWntl4,20261
68
+ wexample_wex_addon_dev_python-8.2.1.dist-info/RECORD,,