Skip to content

Remove obsolete Python 2 compatibility scaffolding - #61

Merged
shiny-code-app[bot] merged 1 commit into
mainfrom
work/trim-printnode-60
Oct 21, 2026
Merged

shiny-code-app[bot] merged 1 commit into
mainfrom
work/trim-printnode-60

Conversation

@shiny-code-app

Copy link
Copy Markdown

Removes Python 2 compatibility scaffolding from a library that requires Python >=3.10: the unreachable Unicode conversion, runtime-version forks, and future dependency. 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/*, and git diff --check pass. Python 3.10–3.14 and package CI must pass for the PR head before the checked ready handoff. 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.

@shiny-code-app

Copy link
Copy Markdown
Author

Review result: weighed
Head: 1a984cb

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 future install is not a library defect; applications declare dependencies they import, and the changelog discloses this removal. No unresolved review finding remains.

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 native_prerequisite_or_report_failed); full saved finding-identity comparison adds none, removes 18, and lifecycle cleanup is closed. The broad house-rule Ruff scan reports 476 existing findings repository-wide; touched files improve from 306 to 298 with no new finding identities. Existing typing/style and pytest inference noise stays in the grouped audit report. Whole-project inspection is not claimed; the safe one-off route covered all four changed Python files because no inspection gate is configured.

@shiny-code-app

Copy link
Copy Markdown
Author

Ready for the merge train

Head: 1a984cb

@shiny-code-app

shiny-code-app Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Author

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.

@shiny-code-app
shiny-code-app Bot merged commit b611e2b into main Oct 21, 2026
9 checks passed
@shiny-code-app
shiny-code-app Bot deleted the work/trim-printnode-60 branch October 21, 2026 17:14
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.

Trim audit against DIRECTION and the style guide (October 2026)

0 participants