Latest Results
Restore ASCII validation and hoist the safe-table build out of __call__
The pure-Python quoter had two problems introduced with the unsafe= kwarg:
- Replacing safe.encode("ascii") with bytes(ord(ch) for ch in safe_chars)
silently dropped the ASCII check on the pre-existing safe= and protected=
kwargs: _Quoter(safe='e-acute') used to raise UnicodeEncodeError and instead
returned normally. The Cython quoter rejects those at construction with
ValueError("Only safe symbols with ORD < 128 are allowed"), so the two
implementations had diverged. Validation now happens in __init__ on both
paths, with the same message.
- The safe-character set was rebuilt on every __call__ (a set(), three
update()s, a difference_update() and a bytes() generator), making short
values ~4.6x slower than before. It only depends on constructor arguments,
so it is now computed once in __init__. The existing benchmarks never
covered this path, so CodSpeed reported no change.
Also adds the missing coverage for unsafe= on both quoters, and pins the
ORD > 127 rejection for safe=, protected= and unsafe=.
test_fuzz__PyQuoter restricted its alphabet to ASCII: it asserted the quoter
accepts "any valid arguments", but non-ASCII table symbols were never valid
(previously they raised lazily at call time in Python and at construction in
Cython).pctablet505:fix-1073-query-reserved-encoding Latest Branches
0%
dependabot/github_actions/github/codeql-action-4.37.8 -9%
pctablet505:fix-1073-query-reserved-encoding -19%
dependabot/pip/requirements/idna-3.19 © 2026 CodSpeed Technology