Skip to content

Release v1.2.2 - #177

Merged
AndreiDrang merged 6 commits into
releasefrom
main
Oct 7, 2026
Merged

AndreiDrang merged 6 commits into
releasefrom
main

Conversation

@AndreiDrang

Copy link
Copy Markdown
Owner

No description provided.

AndreiDrang and others added 6 commits October 7, 2026 21:23
Why:
* instrument polling and error branches were only exercised against the
  live capsolver api, so __get_result and the error paths stayed
  uncovered whenever the live suite cannot run

What:
* cover the full processing/polling lifecycle of SIOCaptchaInstrument
  and AIOCaptchaInstrument with scripted responses at the http boundary:
  ready-at-creation without polling, polling until ready/failed with
  taskId propagation, rejected creation marked failed, invalid status
  codes raising, the 15-attempt silent-server unsolvable default, and
  send_post_request success/error
* cover failed url download returning empty base64 in FileInstrument
* register the new test files in the tests/AGENTS.md layout

Changes:
* tests/test_sio_captcha_instrument.py: new mocked suite (11 test items)
* tests/test_aio_captcha_instrument.py: new mocked suite (11 test items)
* tests/test_instrument.py: add aio download-failure test, use plain membership checks
* tests/AGENTS.md: list the two new test files

Stats:
* 4 files changed
* +389/-2 lines

Co-authored-by: Claude <noreply@anthropic.com>
Why:
* the quoted "CaptchaParams" forward references in both instruments
  resolved to no import, so static analysis flagged them as undefined
* Optional[...] and quoted annotations predate lazy annotation support

What:
* add a TYPE_CHECKING-guarded CaptchaParams import to break the
  annotation-only import cycle with base.py
* add from __future__ import annotations and switch the single
  Optional[dict] parameter to dict | None (lazy, so python 3.8+ stays
  supported)
* unquote the CaptchaParams parameter annotation

no runtime behavior change: the guard never executes and annotations
are never evaluated; the full mocked suite passes identically

Changes:
* src/python3_capsolver/core/sio_captcha_instrument.py: typing hygiene
* src/python3_capsolver/core/aio_captcha_instrument.py: typing hygiene

Stats:
* 2 files changed
* +10/-4 lines

Co-authored-by: Claude <noreply@anthropic.com>
@AndreiDrang
AndreiDrang merged commit c110de8 into release Oct 7, 2026
34 of 36 checks passed
@codecov

codecov Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.79%. Comparing base (9b24330) to head (858cbd4).
⚠️ Report is 61 commits behind head on release.

Additional details and impacted files
@@             Coverage Diff              @@
##           release     #177       +/-   ##
============================================
+ Coverage    88.51%   99.79%   +11.27%     
============================================
  Files           22       22               
  Lines          479      481        +2     
============================================
+ Hits           424      480       +56     
+ Misses          55        1       -54     

☔ 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.

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