Skip to content

Merge stable into develop - #1242

Merged
ajtmccarty merged 1 commit into
developfrom
stable
Aug 13, 2026
Merged

Merge stable into develop#1242
ajtmccarty merged 1 commit into
developfrom
stable

Conversation

@infrahub-github-bot-app

@infrahub-github-bot-app infrahub-github-bot-app Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Merging stable into develop after merging pull request #1241.


Summary by cubic

Return types for Timestamp.add(), Timestamp.subtract(), and Timestamp.add_delta() now use Self instead of Timestamp, aligning annotations with runtime behavior and eliminating casts for subclasses. Runtime behavior and deprecation warnings are unchanged.

  • Import Self from typing_extensions to support Python 3.10.
  • No migration required; you can remove any explicit casts around these method calls on subclasses.

Written for commit 91bcbcb. Summary will update on new commits.

Review in cubic

)

add(), subtract() and add_delta() all construct self.__class__, so a
subclass gets an instance of itself back at runtime. The annotations said
Timestamp, so subclasses (such as Infrahub's own Timestamp) had to cast
before touching anything they add on top.

Self comes from typing_extensions rather than typing, since typing.Self
is 3.11+ and the SDK supports 3.10.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 13, 2026

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 91bcbcb
Status: ✅  Deploy successful!
Preview URL: https://98a484f6.infrahub-sdk-python.pages.dev

View logs

@infrahub-github-bot-app
infrahub-github-bot-app Bot requested a review from a team as a code owner August 13, 2026 13:22
@ajtmccarty
ajtmccarty merged commit 1f846da into develop Aug 13, 2026
36 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