Skip to content

fix: fall back when package version metadata is unavailable - #707

Merged
ffumero2003 merged 1 commit into
masterfrom
fix-py-version-metadata-fallback
Nov 21, 2026
Merged

ffumero2003 merged 1 commit into
masterfrom
fix-py-version-metadata-fallback

Conversation

@ffumero2003

Copy link
Copy Markdown
Contributor

Context

Refs #703 (C36 only). Importing a vendored or uninstalled SDK copy raises PackageNotFoundError when distribution metadata is absent.

Changes

  • Fall back to 0.0.0+unknown only when package metadata is missing; retain installed metadata versions.
  • Add a unit regression test and promote the existing C36 subprocess check from an expected failure to a normal regression test.
  • Add a bugfix changelog fragment.

Verification

  • RED: new unit test failed at the metadata lookup with PackageNotFoundError before the implementation change.
  • GREEN: focused unit and subprocess regression checks passed.
  • Full unit suites: API v3: 1,229 passed; v2: 1,234 passed; v1: 1,300 passed; v0: 1,140 passed. Existing skips and expected failures remain.
  • Static suite: 61 passed, 2 expected failures.
  • Ruff lint, changed-file formatting, license checks, nox -s towncrier_check --no-venv, and git diff --check passed.
  • Installed-metadata smoke check passed.
  • Repository-wide formatting check reports unchanged noxfile.py; the same failure reproduces from master. Left untouched to preserve scope.

Live B2 integration tests were not run for this local import change.

@ffumero2003 ffumero2003 self-assigned this Nov 21, 2026
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

This organization requires a seat for paid usage-based reviews, including automatic and on-demand reviews. Ask an admin to assign a seat or enable paid usage-based reviews for users without a seat in Billing.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6dc44247-206c-456d-8da7-cd56f441bbf2
Commits

Reviewing files that changed from the base of the PR and between 84ce6f5 and 0129285.

Files selected for processing: 4

  • b2sdk/version.py
  • changelog.d/+version-metadata-fallback.fixed.md
  • test/static/test_regression_repo_checks.py
  • test/unit/test_version.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@ffumero2003
ffumero2003 merged commit 579a136 into master Nov 21, 2026
29 checks passed
@ffumero2003
ffumero2003 deleted the fix-py-version-metadata-fallback branch November 21, 2026 20:50
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.

1 participant