Skip to content

fix(python): use path= instead of url= for path-based pagination#12334

Merged
aditya-arolkar-swe merged 3 commits intomainfrom
devin/1771000193-fix-path-pagination-url
Feb 13, 2026
Merged

fix(python): use path= instead of url= for path-based pagination#12334
aditya-arolkar-swe merged 3 commits intomainfrom
devin/1771000193-fix-path-pagination-url

Conversation

@aditya-arolkar-swe
Copy link
Contributor

Description

Refs #12238

Fixes a bug introduced in #12238 where path-based pagination passes the next page path as url= instead of path= in the generated _fetch_next_page function. The wrapper's HttpClient.request() method has no url parameter — its signature is request(path=None, *, method, base_url=None, ...) — so url=_next_path would raise a TypeError at runtime.

Changes Made

  • Changed url=_next_pathpath=_next_path in PathPagination.init_get_next() so the generated code correctly calls self._client_wrapper.httpx_client.request(method="GET", path=_next_path), which combines the path with the default base URL via _build_url()
  • Updated the pagination-uri-path seed snapshot (both sync and async clients)
  • Bumped Python SDK version to 4.57.2

Note: URI pagination (uri.py) correctly uses base_url=_next_url and is not affected.

Testing

  • Seed snapshot updated for pagination-uri-path fixture
  • Unit tests added/updated

Review Checklist

  • Verify path= matches the HttpClient.request() / AsyncHttpClient.request() signature in generators/python/core_utilities/shared/http_client.py
  • Confirm no other generated files reference url=_next_path (only the one fixture was affected)

Link to Devin run: https://app.devin.ai/sessions/4d78e393305e45d3b89d8cb8535aa00b
Requested by: @aditya-arolkar-swe

Co-Authored-By: adi@buildwithfern.com <aditya.arolkar@berkeley.edu>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@aditya-arolkar-swe aditya-arolkar-swe enabled auto-merge (squash) February 13, 2026 16:42
@aditya-arolkar-swe aditya-arolkar-swe merged commit ac25009 into main Feb 13, 2026
127 of 128 checks passed
@aditya-arolkar-swe aditya-arolkar-swe deleted the devin/1771000193-fix-path-pagination-url branch February 13, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants