Skip to content

Migrate to Pydantic 2 for LNbits 1.7.0 - #13

Merged
motorina0 merged 2 commits into
mainfrom
pydantic2
Oct 29, 2026
Merged

motorina0 merged 2 commits into
mainfrom
pydantic2

Conversation

@motorina0

Copy link
Copy Markdown
Contributor

Makes Inventory compatible with the Pydantic 2 models in LNbits 1.7.0 and sets min_lnbits_version to 1.7.0. Updates model serialization and optional-field defaults.

Sets config.json version to 0.3.0 to match the extension registry and replaces the legacy model Config class.

Depends on the core Pydantic 2 migration: lnbits/lnbits#4253.

Validation used the local LNbits Pydantic 2 checkout and FakeWallet:

  • make all passed.
  • make test ran; this repository has no tests, so pytest returned exit code 5 (no tests collected).
  • Startup migrations completed; the authenticated home page returned HTTP 200 and rendered in the browser.
  • Config JSON validation and git diff --check passed.

The published LNbits package was not used for these checks; this PR targets the upcoming 1.7.0 core.

@motorina0
motorina0 marked this pull request as ready for review October 29, 2026 16:31
@motorina0
motorina0 merged commit 73d760b into main Oct 29, 2026
6 checks passed
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