Skip to content

fix: support minor Python version overrides - #911

Merged
tdstein merged 13 commits into
mainfrom
symphony/posit-dev_rsconnect-python_901-9943c3d04ec86ed8
Nov 6, 2026
Merged

tdstein merged 13 commits into
mainfrom
symphony/posit-dev_rsconnect-python_901-9943c3d04ec86ed8

Conversation

@tdstein

@tdstein tdstein commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A major.minor Python override now requests matching patch releases instead of pinning a fabricated .0 release. Full patch overrides remain exact. The manifest retains the local interpreter version for compatibility; Connect versions before 2025.03.0 require a full patch override.

Evidence

  • Before: --override-python-version 3.11 produced ==3.11.0.
  • After: it produces ==3.11.*; manifest and Connect integration tests cover minor and patch overrides.
  • uv run pytest tests/test_environment.py tests/test_main.py tests/test_validation.py: 243 passed, 12 skipped.
  • just lint: Ruff passes; the recipe ignores existing Pyright errors.

Merge Danger

Door: two-way

Blast Radius: Python deployments

Closes #901

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-11-06 17:47 UTC

@tdstein tdstein left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address the linting errors:

uv run --group test ruff format --check .
Using CPython 3.12.3 interpreter at: /usr/bin/python3
Creating virtual environment at: .venv
   Building rsconnect-python @ file:///home/runner/work/rsconnect-python/rsconnect-python
warning: `build_system.requires = ["uv-build>=0.9.0,<0.13.0"]` does not contain the current uv version 0.13.6
      Built rsconnect-python @ file:///home/runner/work/rsconnect-python/rsconnect-python
Installed 94 packages in 204ms
unformatted: File would be reformatted
    --> tests/test_main.py:2173:34
     |
2172 |             [
     -                 "write-manifest", "api", "--entrypoint", "app:app", "--exclude-renv",
     -                 "--override-python-version", version, str(tmp_path),
2173 +                 "write-manifest",
2174 +                 "api",
2175 +                 "--entrypoint",
2176 +                 "app:app",
2177 +                 "--exclude-renv",
2178 +                 "--override-python-version",
2179 +                 version,
2180 +                 str(tmp_path),
2181 |             ],
     |

@tdstein tdstein changed the title Fix minor-only Python version overrides fix: match patch releases for minor Python overrides Oct 28, 2026
@tdstein tdstein changed the title fix: match patch releases for minor Python overrides Fix Python minor-version override matching Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11113 9854 89% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
rsconnect/environment.py 94% 🟢
rsconnect/main.py 87% 🟢
rsconnect/validation.py 97% 🟢
TOTAL 93% 🟢

updated for commit: 454476c by action🐍

@tdstein
tdstein enabled auto-merge (squash) October 28, 2026 17:14
@tdstein tdstein changed the title Fix Python minor-version override matching fix: match Python patch releases for minor version overrides Oct 28, 2026
@tdstein tdstein changed the title fix: match Python patch releases for minor version overrides fix: preserve major.minor Python version overrides Oct 28, 2026

@joshyam-k joshyam-k left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we update some integration tests to actually test this? that would make me feel better about the change.

tdstein

This comment was marked as outdated.

@tdstein tdstein changed the title fix: preserve major.minor Python version overrides fix: preserve minor-only Python version overrides Oct 29, 2026
@tdstein tdstein changed the title fix: preserve minor-only Python version overrides fix: require patch versions for Python overrides Oct 29, 2026
Comment thread rsconnect/validation.py Resolved
@tdstein tdstein changed the title fix: require patch versions for Python overrides fix: support minor-only Python version overrides Oct 29, 2026
@tdstein
tdstein requested a review from joshyam-k October 29, 2026 18:13
Comment thread rsconnect/environment.py Resolved
Comment thread docs/deploying.md Resolved
Comment thread rsconnect/environment.py Resolved
@tdstein tdstein changed the title fix: support minor-only Python version overrides fix: support minor Python version overrides Nov 6, 2026
@tdstein
tdstein disabled auto-merge November 6, 2026 17:24
Drop the runtime warning about pre-2025.03.0 Connect servers, which
printed even when targeting newer servers. Document the requirement in
the --override-python-version help and the changelog instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tdstein
tdstein merged commit 5635efc into main Nov 6, 2026
27 checks passed
@tdstein
tdstein deleted the symphony/posit-dev_rsconnect-python_901-9943c3d04ec86ed8 branch November 6, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--override-python-version 3.11 is pinned as ==3.11.0, which no Connect installation matches

3 participants