Repository navigation
Conversation
|
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Write generated requirements back to requirements.txt instead of requirements-connect.txt, and warn before replacing an existing file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
Every Python
deployandwrite-manifestcommand now picks its dependency source the same way:A selected source that's invalid fails the command. It never falls back to the next source.
Connect installs from a requirements-format
package_file, so anything that isn't an unchanged requirements file is converted and written torequirements.txt, overwriting it with a warning:warn_usernow ends a pendingCreating …...feedback line first, so warnings print on their own line.Closes #975
Evidence
tests/test_dependency_selection.pyruns every combination ofrequirements.txt×pyproject.toml×uv.lock, plus overrides, stale locks, and overwrite warnings:Before: on
main, these tests give31 failed, 12 passed. For example,test_source_precedence[True-True-True]picksrequirements.txtoveruv.lock.After: all pass.
Overwrite warning:
Full suite: 2,023 passed, 20 skipped. 8 failures in
test_quickstart.py::test_quickstart_mode_file_setcome from uv's cache (.cache/uv/…) landing in the sandboxed project directory; the requirements files match.Ruff passes.
Merge Danger
Door: Two-way
The code reverts cleanly. But deployments made after this merges may already be running different pinned dependencies, and overwritten
requirements.txtfiles are only recoverable from version control.Blast Radius: Python deployments
uv.lockandrequirements.txtnow deploys fromuv.lock, andwrite-manifestoverwritesrequirements.txtwith the export. Connect may install different package versions than before.pyproject.tomlwith[project].dependenciesnext to a hand-writtenrequirements.txt.requirements.txtis the configured source but rsconnect normalizes it (e.g. drops anrsconnect-pythonline), the file is rewritten with the normalized contents.--force-generatetogether with--requirements-fileis now an error. Previously the file was ignored with a warning.uv.lockfails the deploy and tells you to runuv lock. An unsupported lockfile (poetry.lock,Pipfile.lock,pdm.lock), a malformedrequirements.txt, or an invalid[project].dependenciesalso fails.requirements.txtturned out to be missing.🤖 Generated with Claude Code