Repository navigation
Fix upgrade on vendored projects; correct init's NitroStudio note - #52
Merged
Merged
Conversation
`nitrostack-py upgrade` failed on every project `init` creates: the
dependency pattern also matched `nitrostack = { path = "vendor/nitrostack" }`
in [tool.uv.sources] and produced an invalid pyproject.toml. Spec rewrites
are now limited to [project].dependencies, and the pattern skips paths
ending in /nitrostack.
Fixing that alone isn't enough: a vendored project runs vendor/nitrostack
whatever spec it declares, and uv accepts a spec the vendored copy doesn't
satisfy. For vendored projects, upgrade now replaces vendor/nitrostack
with the target release (copied from the running CLI when it is that
release, otherwise the PyPI wheel, checked against its sha256). The new
tree is built beside the old one and swapped in, so a failed download
leaves the project as it was.
init's next steps said NitroStudio can't open Python projects; it can.
The pizzaz open-shops hint is printed only for the pizzaz template.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
nitrostack-py upgradefails on every projectinitcreates:The dependency pattern also matched
nitrostack = { path = "vendor/nitrostack" }in[tool.uv.sources].Fixing the pattern isn't enough. A vendored project runs
vendor/nitrostack, whatever spec it declares. With"nitrostack>=0.4.2"against a vendored 0.4.1,uv locksucceeds and the project keeps running 0.4.1. So "upgrade" would quietly do nothing.What
pyproject.toml, upgrade only rewrites the spec inside[project].dependencies. The pattern also skips paths that end in/nitrostack.vendor/nitrostack): upgrade replaces the vendored copy with the target release.initdoes.Requires-Dist(without extras) becomes the vendoredpyproject.toml's dependencies.templates, caches) asinit's copy, and refuses archive paths outside the vendor directory.nitrostackthatvendor.pyrequires.--dry-run,--allow-downgradeand "already installed" behave as before.initnext steps.Test
tests/test_cli_upgrade_vendored.py(8 tests), with no network access:main.pyhad 90 existing findings and now has 89; none are new.init --template python-starterproject:upgrade --version 0.4.0 --allow-downgradedownloaded and verified the wheel. Afterinstall, the venv runs 0.4.0 andcalculateworks.upgrade(latest, 0.4.1) copied the running SDK. Afterinstall, the venv runs 0.4.1 andcalculateworks.pyproject.tomlandrequirements.txtstayed valid and unchanged throughout.🤖 Generated with Claude Code