tony-cli 0.3.1__tar.gz → 0.3.2__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 (29) hide show
  1. {tony_cli-0.3.1/src/tony_cli.egg-info → tony_cli-0.3.2}/PKG-INFO +1 -1
  2. {tony_cli-0.3.1 → tony_cli-0.3.2}/pyproject.toml +1 -1
  3. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/install.py +51 -8
  4. {tony_cli-0.3.1 → tony_cli-0.3.2/src/tony_cli.egg-info}/PKG-INFO +1 -1
  5. {tony_cli-0.3.1 → tony_cli-0.3.2}/LICENSE +0 -0
  6. {tony_cli-0.3.1 → tony_cli-0.3.2}/README.md +0 -0
  7. {tony_cli-0.3.1 → tony_cli-0.3.2}/setup.cfg +0 -0
  8. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/__init__.py +0 -0
  9. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/agent.py +0 -0
  10. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/assets/fonts/Favorit-Bold.woff2 +0 -0
  11. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/assets/fonts/Favorit-Book.woff2 +0 -0
  12. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/assets/fonts/Favorit-Regular.woff2 +0 -0
  13. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/assets/fonts/FavoritMono-Medium.woff2 +0 -0
  14. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/assets/fonts/FavoritMono-Regular.woff2 +0 -0
  15. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/assets/viewer.css +0 -0
  16. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/assets/viewer.js +0 -0
  17. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/fonts.py +0 -0
  18. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/hosted.py +0 -0
  19. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/layout.py +0 -0
  20. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/page.py +0 -0
  21. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/payload.py +0 -0
  22. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/source/__init__.py +0 -0
  23. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/source/local.py +0 -0
  24. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli/uninstall.py +0 -0
  25. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli.egg-info/SOURCES.txt +0 -0
  26. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli.egg-info/dependency_links.txt +0 -0
  27. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli.egg-info/entry_points.txt +0 -0
  28. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli.egg-info/requires.txt +0 -0
  29. {tony_cli-0.3.1 → tony_cli-0.3.2}/src/tony_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tony-cli
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Explains a git diff to whoever now owns it — annotated changes, blast radius, and steppable runtime walkthroughs.
5
5
  Author: Fawwaz Abayomi
6
6
  License: MIT License
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tony-cli"
3
- version = "0.3.1"
3
+ version = "0.3.2"
4
4
  description = "Explains a git diff to whoever now owns it — annotated changes, blast radius, and steppable runtime walkthroughs."
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -57,11 +57,18 @@ def uninstallCommand(kind):
57
57
 
58
58
 
59
59
  def updateCommand(kind):
60
+ """The upgrade, told to ignore its own cache.
61
+
62
+ Every one of these caches the index, and a cache that is minutes stale
63
+ resolves to the version before the one just released — then reports
64
+ "already at latest" and exits 0. An update that runs once a month should
65
+ pay for a fresh lookup rather than confidently do nothing.
66
+ """
60
67
  if kind == "uv":
61
- return ["uv", "tool", "upgrade", PKG]
68
+ return ["uv", "tool", "upgrade", "--refresh", PKG]
62
69
  if kind == "pipx":
63
- return ["pipx", "upgrade", PKG]
64
- return [sys.executable, "-m", "pip", "install", "--upgrade", PKG]
70
+ return ["pipx", "upgrade", PKG, "--pip-args=--no-cache-dir"]
71
+ return [sys.executable, "-m", "pip", "install", "--upgrade", "--no-cache-dir", PKG]
65
72
 
66
73
 
67
74
  def installedVersion():
@@ -73,6 +80,27 @@ def installedVersion():
73
80
  return None
74
81
 
75
82
 
83
+ def installedOnDisk():
84
+ """The version the environment's metadata records, re-read from disk.
85
+
86
+ `installedVersion` answers from what this interpreter imported at startup,
87
+ which is precisely the version an upgrade just replaced. The dist-info
88
+ directory on disk is the only thing in this process that knows what is
89
+ actually installed now.
90
+ """
91
+ import glob
92
+ import sysconfig
93
+
94
+ purelib = sysconfig.get_paths().get("purelib")
95
+ if not purelib:
96
+ return None
97
+ found = glob.glob(os.path.join(purelib, "tony_cli-*.dist-info"))
98
+ if not found:
99
+ return None
100
+ name = os.path.basename(sorted(found)[-1])
101
+ return name[len("tony_cli-"):-len(".dist-info")] or None
102
+
103
+
76
104
  def latestVersion(timeout=10):
77
105
  """The newest version PyPI serves, or None if it cannot be asked.
78
106
 
@@ -128,11 +156,26 @@ def update(argv=()):
128
156
  print(f"tony: {kind} could not update tony.", file=sys.stderr)
129
157
  return result.returncode
130
158
 
131
- # This interpreter still has the old version loaded, so it cannot read the
132
- # new one back. PyPI's answer is the honest thing to report; without it,
133
- # say what happened rather than asserting an outcome.
134
- if latest:
135
- print(f"\ntony: updated {before or '?'} -> {latest}.")
159
+ # What PyPI calls newest is not what just landed on this machine. An
160
+ # installer resolving against a stale index cache prints "already at latest"
161
+ # for a version that is not the latest, and exits 0 — reporting the upgrade
162
+ # from PyPI's answer turns that into a confident lie.
163
+ after = installedOnDisk()
164
+
165
+ if after and before and after == before:
166
+ print(
167
+ f"\ntony: still {after} — {kind} did not install a newer version, "
168
+ f"though PyPI offers {latest or 'a newer one'}.\n"
169
+ f" Try again in a minute; a release takes a moment to reach "
170
+ f"every mirror.\n",
171
+ file=sys.stderr,
172
+ )
173
+ return 1
174
+
175
+ if after and before:
176
+ print(f"\ntony: updated {before} -> {after}.")
177
+ elif after:
178
+ print(f"\ntony: now on {after}.")
136
179
  else:
137
180
  print("\ntony: the installer finished. Check it with `tony --version`.")
138
181
  return 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tony-cli
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Explains a git diff to whoever now owns it — annotated changes, blast radius, and steppable runtime walkthroughs.
5
5
  Author: Fawwaz Abayomi
6
6
  License: MIT License
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes