Skip to content

fix: Keep HttpResponse isinstance checks from consuming streamed responses - #1010

Merged
vdusek merged 3 commits into
masterfrom
fix-http-response-protocol
Aug 17, 2026
Merged

fix: Keep HttpResponse isinstance checks from consuming streamed responses#1010
vdusek merged 3 commits into
masterfrom
fix-http-response-protocol

Conversation

@vdusek

Copy link
Copy Markdown
Contributor

HttpResponse now comes from typing_extensions, whose runtime protocol check looks attributes up statically. The typing implementation on Python 3.11 calls hasattr, which evaluates properties, so isinstance(response, HttpResponse) on an unread streaming response either raised or silently buffered the whole body.

Adds streaming regression tests (unit and integration) and a parametrized built-in-client fixture they run on.

Split out of #1006. Stacked on #1009.

✍️ Drafted by Claude Code

@vdusekvdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Aug 17, 2026
@vdusekvdusek self-assigned this Aug 17, 2026
@codecov

codecovBot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.87%. Comparing base (f57e9e7) to head (08553b3).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@## master #1010 +/- ##
=======================================
Coverage 94.87% 94.87% =======================================
Files 58 58 Lines 5366 5367 +1 =======================================
+ Hits 5091 5092 +1 
Misses 275 275 
FlagCoverage Δ
integration92.09% <100.00%> (-0.13%)⬇️
unit85.14% <100.00%> (+0.48%)⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek
vdusek requested a review from PijukatelAugust 17, 2026 10:05
@vdusek
vdusek marked this pull request as ready for review August 17, 2026 10:05
Base automatically changed from fix-try-import-masking to masterAugust 17, 2026 13:16
@github-actionsgithub-actionsBot added the tested Temporary label used only programatically for some analytics. label Aug 17, 2026
@vdusek
vdusek merged commit 8a2bb7b into masterAug 17, 2026
28 of 33 checks passed
@vdusek
vdusek deleted the fix-http-response-protocol branch August 17, 2026 17:24
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhocAd-hoc unplanned task added during the sprint.t-toolingIssues with this label are in the ownership of the tooling team.testedTemporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@vdusek@Pijukatel@apify-service-account