Repository navigation
Remove obsolete Python 2 compatibility scaffolding - #61
Conversation
|
Review result: weighed Anthropic review of record: claude-opus-5-5[1m], confirmed by the CLI, reviewed this head read-only and found no defects. I checked the disposition against the diff, full auth/computer tests, and the removed shim's Python 3 implementation. No code changes are needed. The review confirms direction fit, unchanged imports, native exception causes and identical binary payload behavior, with no literal/config change-detector tests added. The observation about a downstream application relying on an undeclared transitive Verification: 86 tests pass on Python 3.13; distributions build and pass twine; an isolated wheel import/construction smoke check passes with only requests as a direct dependency; whitespace check passes. Native PyCharm completed with RED, 195 pre-existing findings (baseline observed 213, verdict UNKNOWN |
|
Ready for the merge train Head: 1a984cb |
|
Launchplane completed the merge-train step for this pull request.
Launchplane finished the merge-train step for this pull request. Launchplane manages this comment and will update it as the train moves. |
Removes Python 2 compatibility scaffolding from a library that requires Python >=3.10: the unreachable Unicode conversion, runtime-version forks, and
futuredependency. Native exception chaining and the existing Python 3 binary conversion preserve request and submission behavior.Closes #60. The grouped audit report records uncertain candidates; this is the one selected removal PR.
Net maintained lines: 25 fewer excluding generated uv.lock; 38 fewer including it (23 added, 61 removed). Production Python shrinks by 31 lines. Six net test lines cover exception causes plus bytes, bytearray and Latin-1 submission inputs; the changelog records the dependency removal. No new runtime concept is added.
Validation:
uv sync --locked,uv run pytest(86 passed on Python 3.13),uv build,uv run twine check dist/*, andgit diff --checkpass. Python 3.10–3.14 and package CI must pass for the PR head before the checkedreadyhandoff. No real API requests or physical print jobs were performed.Static checks are not clean: the audit's house-rule Ruff scan found existing broad typing/style debt; touched-file findings fall from 306 to 298, with import ordering fixed. A wholesale format check would reformat all four touched Python files, so that unrelated rewrite is left in the report. No lint/type gate is configured in repository metadata. Native PyCharm completed the four-file assessment with RED: 195 existing findings, down from 213 observed on the baseline (baseline verdict UNKNOWN,
native_prerequisite_or_report_failed). Comparing full saved finding identities shows no new findings. Remaining warnings are broad pre-existing typing, API-name, unused fake-parameter and lookup issues captured by #60; they are not suppressed. Inspection cleanup is closed. Whole-project inspection is not run: no repository gate is configured, and the safe one-off selection covers the four touched Python files. The weighed Anthropic review is recorded below before handoff. The isolated built-wheel import/construction smoke check also passes with requests as its only direct dependency.Client test notes
Nothing for the Client to test: this removes unreachable Python 2 paths and a compatibility dependency while retaining the supported Python behavior. Mocked request and binary-payload tests cover the touched paths; no hardware or live account was used. This PR does not publish a package release.