Repository navigation
Sdk review updates - #18
Merged
Merged
Conversation
- reject whitespace-only client_key in both clients - document ValidationError in solve() and create_task() docstrings and README - mark every task parameter as Required or Optional in docstrings - replace em dash in proxy support table with a plain dash - update README references to renamed example files Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # .github/workflows/tests.yml # examples/README.md
- document YandexSmartCaptchaImageTask in the shared docstring format - add Yandex SmartCaptcha Image to the supported types table - clarify version-specific GeeTest parameters in docstrings - restore comments in async reCAPTCHA v2 examples - replace em dashes in README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use `async with AsyncCaptchaClient(...)` so each example closes its HTTP connection pool, as recommended in the README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Show the same basic, advanced, and language pool scenarios as the sync example, with comments for each task parameter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A single network error or HTTP timeout on getTaskResult used to abort solve() and lose an already created, paid task. Retry such failures on the next poll, up to `poll_retries` (default 3) consecutive times. API errors and createTask are not retried. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Errors from solve() polling and get_task_result() now carry `task_id`, so a timed-out task can still be checked with get_task_result() and the ID can be logged or sent to support. The polling timeout message also names the task. `task_id` is None for errors raised before a task exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run pip-audit on the runtime dependencies, bandit on the package source, and CodeQL security queries on every pull request, on pushes to main, and weekly so newly published advisories are caught without code changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
requests 2.28-2.30 can leak the Proxy-Authorization header on redirects (CVE-2023-32681), which matters for proxy tasks, and later 2.32.x releases fix further advisories. Require requests>=2.32.4, the newest line that still supports Python 3.9, and httpx>=0.27. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repository already has CodeQL default setup enabled, and GitHub rejects SARIF uploads from advanced workflows while it is on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR applies the SDK review updates as a series of focused commits:
py.typedmarker is required;1.0.4to1.0.5.The existing public API documentation was also reviewed. Public clients, methods, task classes, and exceptions already provide Python docstrings, type annotations, parameter descriptions, return values, raised exceptions, and usage examples.
Validation
python -m pytest -q -p no:cacheprovider- 86 passedpython -m ruff check .- passedpython -m build- sdist and wheel built successfullypython -m twine check --strict dist/*- passedRelease
After this PR is merged and the
mainworkflow passes, tag the merge commit asv1.0.5and push the tag. The existing publish workflow will verify the version, publish the package to PyPI, and create the GitHub release.