Preserve quoted-printable escapes across write boundaries

AR
4d ago
+45-2

A valid quoted-printable stream can silently decode differently depending on upload chunking. When a write ends with =3D=, the current decoder retains the last two bytes instead of caching from the incomplete equals sign. It splits a completed escape, so subsequent writes cannot recover the original bytes. For example, =3D=3D should decode to == regardless of where it is split.

Cache from the position of the incomplete escape in the final two bytes, leaving completed preceding escapes intact. Add decoder and public FormParser field/file regressions across every two-write split, including soft line breaks.

Validation:

  • Six new regression cases failed on pristine main and pass with this change.
  • Full local suite: 165 passed, with 100% statement coverage under repository exclusions.
  • Ruff and mypy passed.
  • 22,278 valid-stream/chunking comparisons matched one-shot binascii decoding after the fix; the base differed in 4,219.
  • Targeted decoder and callback checks passed on Python 3.11 through 3.15. Full hosted CI and platform matrix remain unverified.

Scope note: malformed doubled-equals input has pre-existing chunk-dependent recovery. One malformed partition changes output under this fix; this PR does not claim uniform decoding of invalid encodings.

AI assistance was used to investigate, implement, test, and review this change.