Skip to content

require padding when decoding base64 on Python 3.15+#428

Open
mgorny wants to merge 1 commit into
pallets:mainfrom
mgorny:py315-base64
Open

require padding when decoding base64 on Python 3.15+#428
mgorny wants to merge 1 commit into
pallets:mainfrom
mgorny:py315-base64

Conversation

@mgorny

@mgorny mgorny commented Jul 3, 2026

Copy link
Copy Markdown

Restore the old behavior of urlsafe_b64decode() to require padding when running on Python 3.15+, in order to fix raising BadData in some cases of malformed input. This fixes the test failures in "bad payload" tests that incidentally surface when using zlib-ng as the compression library.

Fixes #420

Restore the old behavior of `urlsafe_b64decode()` to require padding
when running on Python 3.15+, in order to fix raising `BadData` in some
cases of malformed input.  This fixes the test failures in "bad payload"
tests that incidentally surface when using zlib-ng as the compression
library.

Fixes pallets#420

Signed-off-by: Michał Górny <mgorny@gentoo.org>
giladax pushed a commit to giladax/intent-ai that referenced this pull request Jul 23, 2026
Implements Slice O2: every PR opened on a governed repo gets its verdict
with no human action.

Architecture (webhook-swap ready):
  - PrEvent dataclass (frozen, 7 fields) — the seam between poll and webhooks
  - PrEventSource abstract base; GitHubPollEventSource wraps list_prs today
  - O6 webhook endpoint maps GitHub payloads to the same PrEvent → same
    handler, zero rework at swap time (as designed)

Per new/updated head SHA:
  - Trailer links extracted from mirror (failure-safe; sync_org constructs
    LinkStore like first_results when none injected)
  - Analysis runs via run_analysis (idempotency cache skips repeats)
  - check:analyzed activity_events row emitted (failure-safe, absorbs U4)
  - Optional publish_comment gated by HARD RULE: non-giladax remotes (psf,
    pallets, …) NEVER receive comments; giladax requires publish_enabled:true
    in sync_meta.yaml; default OFF everywhere

Budget discipline: max_prs_per_repo caps per-pass analysis; list_prs capped
at 2 pages; sync_meta.yaml tracks seen SHA set and last_seen_updated_at.

CLI: `python3 -m quire.cli org sync [--loop --interval N] [--max-prs N]`

Live proof (tokenless, ≤20 API calls): one pass detected + analyzed
psf/requests#7586, pallets/itsdangerous#428, #1; verdicts
on the org cards; 3 check:analyzed rows in activity_events; publish guard
asserted OFF for all residents; registry state committed.

Also: github adapter list_prs gains updated_at field (backward-compatible).

Tests: 44 new offline tests (no live GitHub, no live Postgres); backend
707 passed, 1 skipped; app vitest (from app/) 59/59 green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016cmqJ7aie4Kap4ZsZraMF1
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.

Test failures with Python 3.15.0b1: test_bad_payload_exception[zlib] and test_loads_unsafe[zlib]

1 participant