8000 Tags · dholth/httpx2-pycurl · GitHub
[go: up one dir, main page]

Skip to content
{"props":{"color_mode":"dark","logged_in":false,"marketing_page":false,"home_path":"/","login_path":"/login?return_to=https%3A%2F%2FgitHub.com%2Fdholth%2Fhttpx2-pycurl%2Ftags","signup_path":"/signup?ref_cta=Sign+up\u0026ref_loc=header+logged+out\u0026ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Freleases%2Ftag_history\u0026source=header-repo\u0026source_repo=dholth%2Fhttpx2-pycurl","signup_enabled":true,"is_signup_controller":false,"show_search_and_nav":true,"hide_search":false,"private_mode_enabled":false,"should_use_dotcom_links":true,"auth_hydro_click":"{\"event_type\":\"authentication.click\",\"payload\":{\"location_in_page\":\"site header menu\",\"repository_id\":null,\"auth_type\":\"SIGN_UP\",\"originating_url\":\"https://gitHub.com/dholth/httpx2-pycurl/tags\",\"user_id\":null}}","auth_hydro_click_hmac":"4b81d4a679950d75563e1dce5d21f87db098b576e1def1338f478e2aec52ba7d"}}

Tags

Tags

0.0.7

Toggle 0.0.7's commit message
bump version, clarify benchmarks were run against httpx

0.0.6

Toggle 0.0.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Improve cleanup on .close(); bump version (#16)

* improve cleanup on .close(); bump version

0.0.5

Toggle 0.0.5's commit message
bump version

0.0.4

Toggle 0.0.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Improve streaming response handling (#10)

* add bad response to test server

* add broken response to test server, add failing test

* Map pycurl E_PARTIAL_FILE error to httpx.RemoteProtocolError

When a server closes the connection before sending the full Content-Length,
pycurl returns error code 18 (E_PARTIAL_FILE). Map this to httpx.RemoteProtocolError
for consistent behavior with httpx's native AsyncHTTPTransport.

Update test_response_closed_early to expect RemoteProtocolError instead of
silently consuming partial data. The test now validates that both transports
properly signal protocol violations when Content-Length mismatches occur.

* accept RemoteProtocolError only in test

* check for expected partial response

* Allow partial response data before streaming error is raised

When a transfer fails (e.g., connection closes mid-stream, partial file error),
defer raising the exception until the consumer tries to read more data. This allows
partial data that was already received via write_callback to be consumed before
the error is signaled.

Key changes:
- Catch pycurl.error in perform() and store it as perform_error
- Queue the error in the async stream before the END_OF_STREAM sentinel
- Check for Exception type in _AsyncQueueStream.__aiter__() to raise queued errors
- Only raise immediately if no response started (status_code == 0) or for non-streaming

This enables behavior like httpx's AsyncHTTPTransport where partial responses
can be read even when Content-Length mismatches indicate a protocol error.

For test_response_closed_early:
- Both transports now properly signal protocol errors via stream iteration
- Partial data is readable before the error is raised
- Test validates that pycurl behavior matches httpx behavior

* always expect partial response; remove unused timer

0.0.3

Toggle 0.0.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Implement ConnectTimeout; simplify _parse_status_line (#7)

* implement ConnectTimeout; simplify _parse_status_line

* run more httpx tests in workflow

* bump version

* update README

* update changelog

0.0.2

Toggle 0.0.2's commit message
bump version

0.0.1

Toggle 0.0.1's commit message
workflows

0