-
Notifications
You must be signed in to change notification settings - Fork 21
Fix: python speakeasy pagination #478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ython-speakeasy-pagination
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes Python pagination by addressing field name conflicts with Python built-ins and implementing proper cursor-based pagination with AWS S3 destination support.
Key changes:
- Implemented pagination field fixes through OpenAPI overlay to rename conflicting fields
- Added comprehensive pagination support with cursor navigation and response wrapping
- Added AWS S3 destination type support across all relevant models
Reviewed Changes
Copilot reviewed 52 out of 54 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdks/schemas/pagination-fixes-overlay.yaml | OpenAPI overlay to fix field name conflicts and configure pagination |
| sdks/outpost-python/src/outpost_sdk/utils/eventstreaming.py | Added client reference tracking to prevent garbage collection |
| sdks/outpost-python/src/outpost_sdk/utils/init.py | Added dynamic import retry mechanism and explicit builtins usage |
| sdks/outpost-python/src/outpost_sdk/sdk.py | Enhanced SDK initialization with client references and import handling |
| sdks/outpost-python/src/outpost_sdk/models/listtenanteventsop.py | Added pagination parameters and response models with field aliasing |
| sdks/outpost-python/src/outpost_sdk/models/listtenanteventsbydestinationop.py | Added pagination parameters and response models with field aliasing |
| sdks/outpost-python/src/outpost_sdk/events.py | Implemented pagination logic with cursor navigation and response wrapping |
| Multiple AWS S3 model files | Added support for AWS S3 destination type throughout the model hierarchy |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| return self.list( | ||
| tenant_id=tenant_id, | ||
| destination_id=destination_id, | ||
| status=status, | ||
| next=next_cursor, | ||
| prev=prev, | ||
| limit=limit, | ||
| start=start, | ||
| end=end, | ||
| retries=retries, | ||
| ) |
Copilot
AI
Sep 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The async method list_async is calling the synchronous self.list method instead of self.list_async. This will block the event loop and defeat the purpose of using async/await.
| return self.list_by_destination( | ||
| destination_id=destination_id, | ||
| tenant_id=tenant_id, | ||
| status=status, | ||
| next=next_cursor, | ||
| prev=prev, | ||
| limit=limit, | ||
| start=start, | ||
| end=end, | ||
| retries=retries, | ||
| ) |
Copilot
AI
Sep 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The async method list_by_destination_async is calling the synchronous self.list_by_destination method instead of self.list_by_destination_async. This will block the event loop and defeat the purpose of using async/await.
No description provided.