Skip to content

2.0 migration guide #998

Description

@sigma67

Part of #307. Base branch: ytmusicapi-2. Blocked until the Phase 2 issues have landed.

Scope

Write the 2.0 migration guide covering everything in #307 that a consumer needs to act on:

  • Key presence changed. Every declared field is now always a key; a field the API did not return is present with value None rather than absent. Code branching on if "count" in playlist: or on .get("count") truthiness must compare against None instead. This is the one deliberate break in the effort and needs the most prominent treatment, with before/after examples.
  • pydantic is now a runtime dependency alongside requests.
  • Attribute access is available. song.title works; song["title"] continues to work.
  • Anything the Phase 2 issues turned up that changed shape in passing.

Definition of done

  • A user upgrading from 1.x can find every required change in one place.
  • Linked from the README and the changelog for the 2.0 release.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestv2-modelspydantic response models effort (#307)

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions