kiwi-code 0.0.509__tar.gz → 0.0.511__tar.gz

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 (143) hide show
  1. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/PKG-INFO +1 -1
  2. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/pyproject.toml +1 -1
  3. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/autoupdate.py +22 -8
  4. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_autoupdate.py +13 -7
  5. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/uv.lock +1 -1
  6. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/.github/workflows/publish.yml +0 -0
  7. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/.github/workflows/test.yml +0 -0
  8. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/.gitignore +0 -0
  9. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/.python-version +0 -0
  10. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/Makefile +0 -0
  11. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/README.md +0 -0
  12. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/docs/runtime_audit.html +0 -0
  13. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/docs/social_login_e2e.md +0 -0
  14. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/scripts/set_edition.py +0 -0
  15. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/scripts/ws_auth_check.py +0 -0
  16. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/common/__init__.py +0 -0
  17. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/common/banner.py +0 -0
  18. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/__init__.py +0 -0
  19. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/_edition.py +0 -0
  20. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/auth.py +0 -0
  21. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/autocode.py +0 -0
  22. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/checkpoints.py +0 -0
  23. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/cli.py +0 -0
  24. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/client.py +0 -0
  25. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/commands.py +0 -0
  26. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/edition.py +0 -0
  27. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/human_questions.py +0 -0
  28. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/io_threads.py +0 -0
  29. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/logger.py +0 -0
  30. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/models.py +0 -0
  31. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/oauth.py +0 -0
  32. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/run_activity.py +0 -0
  33. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/runtime_manager.py +0 -0
  34. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/server.py +0 -0
  35. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/subagents.py +0 -0
  36. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_cli/terminal_mode.py +0 -0
  37. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/__init__.py +0 -0
  38. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/__main__.py +0 -0
  39. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/auth.py +0 -0
  40. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/checkpoints.py +0 -0
  41. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/cli.py +0 -0
  42. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/commands.py +0 -0
  43. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/constants.py +0 -0
  44. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/fs/__init__.py +0 -0
  45. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/fs/batch.py +0 -0
  46. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/fs/codelens.py +0 -0
  47. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/fs/context.py +0 -0
  48. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/fs/edits.py +0 -0
  49. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/fs/handler.py +0 -0
  50. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/fs/paths.py +0 -0
  51. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/fs/read.py +0 -0
  52. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/fs/search.py +0 -0
  53. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/fs/text.py +0 -0
  54. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/fs/upload.py +0 -0
  55. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/fs/write.py +0 -0
  56. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/handlers.py +0 -0
  57. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/link.py +0 -0
  58. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/main.py +0 -0
  59. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/restricted.py +0 -0
  60. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/sessions.py +0 -0
  61. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/state.py +0 -0
  62. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/tui_bridge.py +0 -0
  63. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/ui.py +0 -0
  64. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_runtime/uploads.py +0 -0
  65. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/__init__.py +0 -0
  66. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/attention.py +0 -0
  67. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/inline_file_picker.py +0 -0
  68. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/latex_unicode.py +0 -0
  69. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/main.py +0 -0
  70. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/random_words.py +0 -0
  71. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/role_mode.py +0 -0
  72. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/runtime_agent.py +0 -0
  73. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/__init__.py +0 -0
  74. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/attach_content.py +0 -0
  75. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/command_result.py +0 -0
  76. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/detach_files.py +0 -0
  77. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/file_browser.py +0 -0
  78. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/help.py +0 -0
  79. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/id_picker.py +0 -0
  80. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/login.py +0 -0
  81. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/runtime_cleanup.py +0 -0
  82. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/runtime_logs.py +0 -0
  83. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/slash_picker.py +0 -0
  84. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/term_activity_view.py +0 -0
  85. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/term_dashboard.py +0 -0
  86. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/term_dashboard_css.py +0 -0
  87. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/term_dashboard_helpers.py +0 -0
  88. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/term_dashboard_widgets.py +0 -0
  89. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/term_question_widgets.py +0 -0
  90. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/term_status_line.py +0 -0
  91. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/screens/term_subagent_widgets.py +0 -0
  92. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/slash_commands.py +0 -0
  93. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/status_words.py +0 -0
  94. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/term_app.py +0 -0
  95. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/terminal_theme.py +0 -0
  96. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/ui_settings.py +0 -0
  97. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/widgets.py +0 -0
  98. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/src/kiwi_tui/worktrees.py +0 -0
  99. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/test_hello.py +0 -0
  100. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/__init__.py +0 -0
  101. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/conftest.py +0 -0
  102. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_account_server.py +0 -0
  103. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_attention.py +0 -0
  104. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_autocode_actions.py +0 -0
  105. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_batch_fs_tool.py +0 -0
  106. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_checkpoints.py +0 -0
  107. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_cli_help.py +0 -0
  108. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_command_tips.py +0 -0
  109. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_copy_path_fs_tool.py +0 -0
  110. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_fs_edit_fidelity.py +0 -0
  111. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_human_questions.py +0 -0
  112. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_imports.py +0 -0
  113. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_io_threads.py +0 -0
  114. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_login_social.py +0 -0
  115. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_math_and_tables.py +0 -0
  116. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_oauth.py +0 -0
  117. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_read_file_streaming.py +0 -0
  118. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_reexec_kiwi.py +0 -0
  119. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_reply_selection.py +0 -0
  120. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_role_mode_injection.py +0 -0
  121. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_run_activity.py +0 -0
  122. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_run_steering.py +0 -0
  123. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_runtime_cleanup_per_account.py +0 -0
  124. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_runtime_connection.py +0 -0
  125. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_runtime_edit_diffs.py +0 -0
  126. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_runtime_fixes.py +0 -0
  127. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_runtime_imports_on_windows.py +0 -0
  128. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_runtime_log_trimming.py +0 -0
  129. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_runtime_social_login.py +0 -0
  130. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_search_in_files_fs_tool.py +0 -0
  131. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_slash_commands.py +0 -0
  132. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_stats_command.py +0 -0
  133. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_status_line.py +0 -0
  134. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_subagents.py +0 -0
  135. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_term_dashboard_ui.py +0 -0
  136. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_terminal_mode.py +0 -0
  137. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_terminal_theme.py +0 -0
  138. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_toasts.py +0 -0
  139. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_tokens.py +0 -0
  140. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_tui_interactive_runtime.py +0 -0
  141. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_tui_palette.py +0 -0
  142. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_unified_diff.py +0 -0
  143. {kiwi_code-0.0.509 → kiwi_code-0.0.511}/tests/test_worktrees.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: kiwi-code
3
- Version: 0.0.509
3
+ Version: 0.0.511
4
4
  Summary: A textual-based terminal user interface application
5
5
  Project-URL: Homepage, https://kiwicode.ai
6
6
  Author-email: Anurag <anurag@meetkiwi.co>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "kiwi-code"
3
- version = "0.0.509"
3
+ version = "0.0.511"
4
4
  description = "A textual-based terminal user interface application"
5
5
  readme = {file = "README.md", content-type = "text/markdown"}
6
6
  requires-python = ">=3.11,<4.0"
@@ -151,20 +151,27 @@ def installer(package: str, *, prefix: str | None = None, base_prefix: str | Non
151
151
  return None
152
152
  # Each tool leaves a file of its own in the environments it makes; the path is the
153
153
  # fallback (a tool folder can be moved with UV_TOOL_DIR / PIPX_HOME).
154
+ # Each command reads PyPI afresh: pip and uv keep PyPI's list of releases for a while,
155
+ # and a release published since (the one being installed) would not be on it.
154
156
  env, parts = Path(prefix), Path(prefix).parts
155
157
  if (env / "uv-receipt.toml").exists() or ("uv" in parts and "tools" in parts):
156
- return Installer("uv", ("uv", "tool", "upgrade", package), f"uv tool upgrade {package}")
158
+ return Installer(
159
+ "uv", ("uv", "tool", "upgrade", "--reinstall-package", package, package), f"uv tool upgrade {package}",
160
+ )
157
161
  if (env / "pipx_metadata.json").exists() or ("pipx" in parts and "venvs" in parts):
158
- return Installer("pipx", ("pipx", "upgrade", package), f"pipx upgrade {package}")
162
+ return Installer(
163
+ "pipx", ("pipx", "upgrade", "--pip-args=--no-cache-dir", package), f"pipx upgrade {package}",
164
+ )
159
165
  # A plain virtual environment: with its own pip, or (made by `uv venv`) without one.
160
166
  if importlib.util.find_spec("pip") is not None:
161
167
  return Installer(
162
- "pip", (sys.executable, "-m", "pip", "install", "--upgrade", "--quiet", package),
168
+ "pip", (sys.executable, "-m", "pip", "install", "--upgrade", "--no-cache-dir", "--quiet", package),
163
169
  f"pip install --upgrade {package}",
164
170
  )
165
171
  if shutil.which("uv"):
166
172
  return Installer(
167
- "uv pip", ("uv", "pip", "install", "--upgrade", "--quiet", "--python", sys.executable, package),
173
+ "uv pip",
174
+ ("uv", "pip", "install", "--upgrade", "--refresh-package", package, "--quiet", "--python", sys.executable, package),
168
175
  f"uv pip install --upgrade {package}",
169
176
  )
170
177
  return None
@@ -192,6 +199,11 @@ def _version_on_disk(package: str) -> str | None:
192
199
  return None
193
200
 
194
201
 
202
+ def _one_line(text: str, limit: int = 240) -> str:
203
+ text = " ".join(str(text or "").split())
204
+ return text if len(text) <= limit else text[: limit - 1] + "…"
205
+
206
+
195
207
  def update_before_start(current: str, *, interactive: bool) -> bool:
196
208
  """At start, before the TUI: install a newer release found earlier. Whether it was
197
209
  installed (the caller then starts the new version)."""
@@ -212,14 +224,16 @@ def update_before_start(current: str, *, interactive: bool) -> bool:
212
224
  timeout=INSTALL_TIMEOUT,
213
225
  )
214
226
  ok = done.returncode == 0
215
- why = (done.stderr or done.stdout or "").strip().splitlines()[-1:] or [""]
227
+ said = _one_line(f"{done.stdout or ''} {done.stderr or ''}")
216
228
  except (OSError, subprocess.SubprocessError) as e:
217
- ok, why = False, [str(e)]
229
+ ok, said = False, _one_line(str(e))
218
230
  if ok and not newer(_version_on_disk(package) or current, current):
219
- ok, why = False, ["the new release did not install"]
231
+ # The installer finished but changed nothing (it may say why: a pinned version,
232
+ # or a list of releases it read before this one was out).
233
+ ok, said = False, f"the new release did not install: {said}" if said else "the new release did not install"
220
234
  if not ok:
221
235
  _write_state(failed=latest, failed_at=time.time())
222
- print(f"Could not update ({why[0]}). Starting v{current}; update with: {tool.manual}", flush=True)
236
+ print(f"Could not update ({said or 'no reason given'}). Starting v{current}; update with: {tool.manual}", flush=True)
223
237
  return False
224
238
  return True
225
239
 
@@ -29,10 +29,11 @@ def home(isolated_home, monkeypatch):
29
29
 
30
30
 
31
31
  def test_each_install_is_updated_with_its_own_tool(home, monkeypatch) -> None:
32
+ # Each reads PyPI afresh: a cached list of releases may not have the new one yet.
32
33
  uv = autoupdate.installer("kiwi-code", prefix=UV_TOOL, base_prefix="/usr", platform="linux")
33
- assert uv.command == ("uv", "tool", "upgrade", "kiwi-code")
34
+ assert uv.command == ("uv", "tool", "upgrade", "--reinstall-package", "kiwi-code", "kiwi-code")
34
35
  pipx = autoupdate.installer("kiwi-code", prefix=PIPX, base_prefix="/usr", platform="darwin")
35
- assert pipx.command == ("pipx", "upgrade", "kiwi-code")
36
+ assert pipx.command == ("pipx", "upgrade", "--pip-args=--no-cache-dir", "kiwi-code")
36
37
  monkeypatch.setattr(autoupdate.importlib.util, "find_spec", lambda name: object()) # has pip
37
38
  venv = autoupdate.installer("kiwi-code", prefix="/proj/.venv", base_prefix="/usr", platform="linux")
38
39
  assert venv.name == "pip" and venv.command[-1] == "kiwi-code" and "--upgrade" in venv.command
@@ -105,7 +106,11 @@ class _Installs:
105
106
 
106
107
  def run(self, command, **kwargs):
107
108
  self.ran.append(command)
108
- return subprocess.CompletedProcess(command, self.returncode, "", "error: no network")
109
+ if self.returncode:
110
+ return subprocess.CompletedProcess(command, self.returncode, "", "error: no network")
111
+ return subprocess.CompletedProcess(
112
+ command, 0, "kiwi-code is already at latest version 0.0.5 (location:\n/home/u/venvs/kiwi-code)\n", "",
113
+ )
109
114
 
110
115
 
111
116
  def test_at_start_a_pending_release_is_installed(home, monkeypatch, capsys) -> None:
@@ -113,7 +118,7 @@ def test_at_start_a_pending_release_is_installed(home, monkeypatch, capsys) -> N
113
118
  installs = _Installs(monkeypatch)
114
119
 
115
120
  assert autoupdate.update_before_start("0.0.5", interactive=True) is True
116
- assert installs.ran == [["uv", "tool", "upgrade", autoupdate.package_name()]]
121
+ assert installs.ran == [["uv", "tool", "upgrade", autoupdate.package_name()]] # as _Installs names it
117
122
  assert "v0.0.5 → v0.0.6" in capsys.readouterr().out
118
123
 
119
124
 
@@ -138,6 +143,9 @@ def test_a_failed_update_starts_the_old_version_and_waits_a_day(home, monkeypatc
138
143
  assert autoupdate.update_before_start("0.0.5", interactive=True) is False
139
144
  out = capsys.readouterr().out
140
145
  assert "Could not update" in out and "Starting v0.0.5" in out and "uv tool upgrade" in out
146
+ # What the installer said, on one line: why nothing changed.
147
+ assert ("error: no network" if returncode else
148
+ "did not install: kiwi-code is already at latest version 0.0.5 (location: /home/u/venvs/kiwi-code)") in out
141
149
  assert autoupdate.pending("0.0.5") is None # not tried again at the next start
142
150
 
143
151
 
@@ -163,9 +171,7 @@ def test_the_package_is_the_one_built_not_the_backend_pointed_at(home, monkeypat
163
171
  monkeypatch.setattr(edition, "BUILD_EDITION", "kiwi-code")
164
172
  monkeypatch.setenv("KIWI_EDITION", "kiwi-ai")
165
173
  assert autoupdate.package_name() == "kiwi-code"
166
- assert autoupdate.installer("kiwi-code", prefix=PIPX, base_prefix="/usr", platform="linux").command == (
167
- "pipx", "upgrade", "kiwi-code",
168
- )
174
+ assert autoupdate.installer("kiwi-code", prefix=PIPX, base_prefix="/usr", platform="linux").command[-1] == "kiwi-code"
169
175
 
170
176
 
171
177
  def test_each_package_keeps_its_own_releases_in_the_shared_home(home, monkeypatch) -> None:
@@ -412,7 +412,7 @@ wheels = [
412
412
 
413
413
  [[package]]
414
414
  name = "kiwi-code"
415
- version = "0.0.509"
415
+ version = "0.0.511"
416
416
  source = { editable = "." }
417
417
  dependencies = [
418
418
  { name = "codeglass" },
File without changes
File without changes
File without changes
File without changes
File without changes