← Back to issue list

Use pydantic instead of jsonschema for legacy project

View original Github issue

Metadata

Project
snapcraft
Number
#5653
Type
issue
State
open
Author
bepri
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed

Current evaluation

Migrate legacy snapcraft project parsing from jsonschema to Pydantic models. Issue was closed as abandoned, but the legacy code (snapcraft_legacy) has since been removed entirely from the codebase, making the issue moot.

Suggested action: close stale

Reason: The issue was already closed as abandoned. Additionally, the legacy code it refers to (snapcraft_legacy) has been completely removed from the codebase (commit ffb164b7a 'chore: remove snapcraft_legacy'), so the migration target no longer exists. The issue is no longer applicable.

Impact: 20 Quick Win: 12.0 Staleness: 85 Complexity: 40 Confidence: 80 Support Request: 0

Issue body

### What needs to get done The legacy code for parsing the project should use Pydantic models instead of validating with the `jsonschema` library. ### Why it needs to get done The current legacy code uses a pinned version of jsonschema that is very difficult to upgrade. Instead of upgrading, the code should just move over to using the more modern pydantic models.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 20
Quick Win: 12.0
Staleness: 85
Complexity: 40
Confidence: 80
Support Request: 0
close stale Migrate legacy snapcraft project parsing from jsonschema to Pydantic models. Issue was closed as abandoned, but the legacy code (snapcraft_legacy) has since been removed entirely from the codebase, making the issue moot.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 50
Confidence: 85
Support Request: 5
keep open Enhancement to replace jsonschema with pydantic for legacy project parsing. Currently triaged and linked to an internal Jira ticket, but has seen no maintainer activity in over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 40
Confidence: 75
Support Request: 5
close stale Enhancement to replace pinned jsonschema with pydantic for legacy project parsing. Triaged but inactive for 329 days with only a Jira sync bot comment.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 45
Confidence: 75
Support Request: 5
keep open Replace jsonschema with Pydantic models for legacy project parsing to resolve dependency upgrade blockers. Triaged with a linked Jira ticket, awaiting implementation.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#5655 (confidence 75%)

    Companion issue for migrating legacy store code from jsonschema to pydantic; same legacy codebase that has since been removed.

Related issues

Issue Project State Summary Similarity
#5654 Use pydantic instead of jsonschema for legacy project snapcraft closed Abandoned. Closed without implementation or associated pull request. The legacy codebase retains the pinned jsonschema dependency, and no migration to Pydantic models was executed.
85%
#5655 Use pydantic instead of jsonschema for legacy store snapcraft open Enhancement to migrate legacy store response parsing (channel_map.py) from pinned jsonschema 2.6.0 to Pydantic models. Triaged by a maintainer with Jira ticket SNAPCRAFT-1203, but no activity for over a year; code at HEAD still uses jsonschema, so the work remains.
80%