Skip to content

Specify Python SDK modernization for 1.0.0 #130

Done

Description

@tylerlong

Problem Statement

The Python SDK has a locked uv workflow and a CPython 3.11+ support contract. Issue #114 lists possible follow-up modernization work. Maintainers need an agreed scope and verification plan for the work that will ship with 1.0.0. Dependency updates should be routine where the SDK can absorb them with small changes. People installing and upgrading the SDK need working callbacks, WebSocket transport, and distributions that match the documented package contract.

Solution

Prepare 1.0.0 from the updated default branch, carrying forward the changes on that branch and the 0.9.3 certificate-bundle fix. Upgrade dependencies by default, simplify verified redundant packaging inputs, refresh test and documentation workflows, and add useful project links. Split the work under #114 into independently deliverable child tickets before implementation. Complete the agreed modernization children before verifying the final release candidate and publishing it. Release planning and validation setup can proceed in parallel.

User Stories

  1. As an SDK user, I want 1.0.0 to carry forward the 0.9.3 certificate-bundle fix, so that upgrading preserves the patched trust bundle.
  2. As an SDK user, I want the release to include the default branch's SDK fixes and OAuth support, so that I can install them from PyPI.
  3. As an SDK user, I want compatible dependencies kept current, so that I can benefit from upstream fixes and install the SDK alongside other packages.
  4. As an SDK user with event callbacks, I want my existing callback code to behave the same after a dependency upgrade, so that I can update the SDK without reworking registration and dispatch.
  5. As a WebSocket SDK user, I want the advertised dependency range to work with a real WebSocket connection, so that installation success also means I can use the client.
  6. As a Python user, I want the release to communicate its CPython 3.11 minimum, so that I can check interpreter compatibility before upgrading.
  7. As a package user, I want both the wheel and source distribution to remain usable, so that I can install the SDK with my usual tools.
  8. As a user of the packaged test helpers, I want the distributions to retain tests and helpers, so that existing imports and uses continue to work.
  9. As a demo user, I want examples to remain available in the repository, so that I can run them from a checkout.
  10. As a contributor, I want the current setup, test, documentation, and build commands documented, so that I can reproduce CI locally.
  11. As a maintainer, I want dependency upgrades and deferred migrations recorded with their verification, so that I can understand which versions the SDK supports and why.
  12. As a maintainer, I want tests to run deterministically without live credentials and to retain the option of running live OAuth smoke tests manually, so that ordinary CI works without secrets.
  13. As a maintainer, I want test and Pages workflows pinned to reviewed action commits, so that their inputs identify the code being run.
  14. As a documentation user, I want the current GitHub Pages site to keep serving API docs, so that existing links stay useful.
  15. As a PyPI user, I want links to the docs and issue tracker, so that I can find usage guidance and report problems.
  16. As a release maintainer, I want both artifacts checked against the planned tag before using the existing publish workflow, so that the files published to PyPI carry the intended version.

Implementation Decisions

  • Use current master as the 1.0.0 baseline. Carry forward the 0.9.3 backport's direct certifi requirement of at least 2026.10.19 and the existing CPython 3.11+ contract.
  • Try current stable releases of observable, websockets, and the development, coverage, documentation, and build dependencies in focused, reviewable changes. Update their declared constraints and resolve the uv lock, including incidental lock updates needed by the upgrades. Include small compatibility fixes. Document a deferral when an upgrade introduces a major break that is hard to migrate. The existing Twine release setup is protected by the release scope below.
  • Evaluate observable 1.x with the SDK's event users and existing observable integration. Upgrade if a manageable change can preserve the callback contract. Exercise registration, removal, one-shot dispatch, and handler-error behavior through the SDK. Record the compatibility findings and the concrete blocker if a migration is deferred.
  • Review the existing websockets proposal in Allow websockets 16 and 17 #122. Widen support to the compatible majors we can verify, and exercise the latest compatible release in the locked environment. Review the API exposed to callers that obtain the underlying connection. Review Bump pdoc from 14.4.0 to 14.5.1 #118 for existing pdoc work when selecting the documentation update.
  • Update and pin actions used by the unit-test, packaging-validation, and Pages workflows to reviewed full commit SHAs with version comments. Update the existing Pages deployment action and retain the current gh-pages source and published destination.
  • Remove superseded setuptools and requirements files only after demonstrating that the supported build and contributor workflows work without them. Record intentional differences in packaging inputs and generated metadata, and retain the shipped SDK code, tests, and helpers. Keep demos in the repository and outside both distributions.
  • Add Documentation and Issue Tracker links to the distribution metadata.
  • Update the contributor documentation within the relevant child tickets for any changed dependency, setup, validation, documentation, or packaging commands. Keep the README and release notes consistent with the CPython minimum and the shipped SDK changes. Document the artifact and version checks in the release instructions.
  • Set the release candidate's package metadata and lock metadata to 1.0.0. Keep the tag-triggered Twine workflow and current PyPI authentication. Use the existing release path once the candidate is verified and publication is authorized.

Testing Decisions

  • Keep the locked unittest and coverage jobs credential-free. Reuse the current mock-based Platform and WebSocket suites. Verify supported SDK behavior and observable callback behavior at the existing API boundaries, including registration and removal, callback payloads, and WebSocket receive-handler error isolation.
  • For every websockets major version proposed for support, run the relevant client tests and a credential-free localhost client/server check through the SDK's real WebSocket transport. Verify connect, message exchange, and close. Include the CPython 3.11 minimum and retain the existing 3.14 hosted coverage. Keep the existing live OAuth smoke scripts manual.
  • Compare wheel and source distribution manifests and metadata before and after packaging cleanup. Build a wheel from the source distribution and install and import the final wheel in a clean environment. Check package identity, interpreter requirement, dependency declarations, the certifi security floor, project links, tests and helpers, and demo exclusion. Update hosted artifact assertions for intentional changes.
  • Verify locked setup, tests, coverage, build, and API documentation generation with the upgraded tools. Check deployment to the established GitHub Pages destination after workflow changes.
  • Before pushing the 1.0.0 tag, build both distributions locally from the intended release commit through the existing build path. Check that the wheel and source distribution filenames and internal metadata report 1.0.0. Verify that the tag resolves to the tested commit, then push it once publication is authorized. Verify both files on PyPI and a fresh PyPI install after publication.

Out of Scope

  • OAuth client credentials feature changes and automatic renewal in Client credential renew token #129. Handle any confirmed bug in existing login behavior as a separately scoped fix.
  • PyPI Trusted Publishing, switching to uv publish, and changes to the working publication workflow or credentials. Revisit publication only if verification finds a defect there. If fixing that defect requires a publishing or authentication change, validate the change with a non-uploading dry run and document how to roll it back.
  • Changes to the existing 0.10.0 tag or GitHub release.
  • Moving GitHub Pages to another deployment model, adding credentialed jobs to deterministic CI, or changing the agreed tests-and-demos distribution policy.

Further Notes

This issue records the agreed scope for #114. Split the maintainer-approved modernization scope into independently deliverable implementation child tickets and link them under #114 before implementation starts. Candidate slices are runtime callback compatibility, WebSocket dependency range, development and documentation tooling, test and Pages workflow maintenance, legacy packaging and metadata, and release planning and validation setup. Put related documentation updates in the child that changes the workflow they describe. Once the approved modernization children are complete, verify the final release candidate, publish after authorization, and verify the PyPI files and clean install.

0.9.3 to master comparison · 0.9.3 publication verification

Activity

  1. added
    ready-for-agent
    on Nov 30, 2026
  2. tylerlong commented on Nov 30, 2026

    @tylerlong
    ContributorAuthor

    Specification work is complete. The approved scope is recorded here, and implementation and verification are tracked in #131 through #137.

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

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions