Repository navigation
feat: expose expirationDate on activate and floating checkout - #2
Merged
Merged
Conversation
Add expirationDate (ISO 8601 string, or None when the license never expires) to ActivateKeyResponse and FloatingCheckoutResponse, document it in the method docstrings, README and CHANGELOG, and add contract tests for a date value and None.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
keymint/types.py: addedexpirationDate: str | NonetoActivateKeyResponseandFloatingCheckoutResponse, and noted thatexpiresAton checkout is the seat lease.keymint/__init__.py:activate_key/floating_checkoutdocstrings now describe the field.README.md: new "License Expiry" section covering reading the expiry, computing days left,Nonemeaning it never expires, and storing the last value.CHANGELOG.md: "Unreleased" entry.tests/test_contracts.py: parametrized tests for activate and checkout with a date value andNone.Responses are still the raw API dicts, so the field was already present at runtime. This change types and documents it, with no behavior change.
Contract (live in production)
POST /key/activatesuccess:expirationDateis an ISO 8601 string (e.g."2027-03-01T00:00:00.000Z") ornullwhen the license never expires.POST /key/checkoutsuccess: the sameexpirationDate(the license expiry), separate fromexpiresAt(the floating seat lease).Tests
ruff check .: all checks passedpytest -q tests/test_contracts.py: 7 passedpython -m build: sdist and wheel builtRun locally on Python 3.14 (CI uses 3.12).
Version
The previous release bumped the version together with its changelog entry. This PR leaves the version at 2.5.0 and files the change under "Unreleased", so bump it (e.g. 2.6.0) when you cut a release.