REFRAMED (owner, 2026-08-17). The
--no-shimsargument was the wrong justification and is withdrawn."
--no-shimsassumes the programmer knows what they are doing, and at that point we have no responsibility for the results. We do a best effort. Complicating our own code sounds wrong. The target is 'just works', not 'also works if the programmer chooses to opt out'."Correct, and it kills the case as originally written: an opt-in audit flag does not earn complexity in the path every build takes. Do NOT harden the flag — no refusal machinery, no scanning for suspiciously-named library files, no guarantee that survives a determined programmer. It refuses the
mimic_substitution and that is the whole of its claim; its help text should say that rather than imply "no compatibility code was used".The decision nevertheless stands, on the owner's OWN earlier ruling (
feature-nilpy-dotted-package-imports, "Decided (Rene, 2026-07-26)"):"resolution is a MAPPING, and the unit keeps OUR name… No file in the tree carries the upstream name, the tree says what each shim is."
A
lib/**/six.pyis a file in our tree carrying the upstream name. It contradicts that ruling directly, with no reference to any flag.mimic_six.pyis the same rule applied to a shim that happens to be written in Python.So the change is one extra probe —
mimic_<name>.pyalongsidemimic_<name>.pas— because the shim slot being Pascal-only is an accident of when it was written, not a design.--no-shimscontinuing to mean something is a SIDE EFFECT of the naming staying consistent, not the reason to do it.Default behaviour is unchanged: we keep mimicking whatever we cannot compile yet, and
tkandreportlabkeep working exactly as they do.
RAISED 45 -> 70 (coordinator, 2026-08-17): this is now the critical path for the NilPy corpus campaign. Track N measured the 58-file ladder at HEAD and the walls are not frontend bugs — they are missing modules:
sixalone gates 15 of 58 files, webencodings-as-a-unit 7,xml_dom3,warnings3. Three independent measurements now say the same thing: Track N is not the bottleneck; the shims are. Three N fixes landed today and the compile count did not move (4 on pinned, 4 at HEAD) — they moved walls deeper rather than past. So nobody can build the shims until this decision lands, and the campaign that the week's theme rests on is waiting on one answer.
How should a Python-SHAPED shim be shipped?
- Track U (decision). Raised 2026-08-17 by frank3 (Track B) from
[[feature-nilpy-six-and-warnings-shims]], which is parked in
unfinished/behind it. - Measured on
pinnedv344.
The fork
six is a file of Python-level aliases — text_type = str,
string_types = (str,), integer_types = (int,). In CPython it is itself pure
Python. Two facts collide:
- The shim slot is Pascal-only.
parser.inc:33210probeslib/pcl/mimic_<name>.pas, thenlib/rtl/mimic_<name>.pas, and nothing else. Expressing "thestrtype object, as a value" from Pascal is not something any existing shim does. - A NilPy
.pyin a library root already works — verified, output byte-identical to CPython:
…but it silently defeatsfrom six import text_type, PY3, binary_type, unichr, viewkeys print(text_type("x"), PY3, unichr(65), sorted(viewkeys({"a": 1}))) pxx / CPython: x True A ['a']--no-shims. That flag exists so "a build that succeeds provably used no compatibility shim" (defs.inc:1571), and it refuses only themimic_substitution. Alib/**/six.pyis a real library module by the resolver's own rules, so it satisfiesimport sixunder--no-shimsand falsifies exactly the guarantee the flag sells.
Options
A. Write mimic_six.pas in Pascal. Honours --no-shims with no compiler
change. But it has to express Python type objects as values from Pascal, which
no shim does today, for a file whose entire content is Python aliases. Highest
friction, and the result would be the least readable file in lib/.
B. Ship lib/pcl/six.py as a NilPy library module. Works today, zero
compiler change, and it is what the module actually is — CPython's six is a
pure-Python file too. Cost: --no-shims stops meaning what it says, silently,
for every shim shipped this way afterwards.
C. (recommended) Let the shim lookup also probe mimic_<name>.py. A small
Track N/A change beside the existing .pas probes. Then a Python-shaped shim is
written in Python, lives in the shim namespace, and --no-shims refuses it like
any other — the flag's guarantee is preserved by construction rather than by
everyone remembering the convention. It also removes the standing trap in B,
where any future lib/**/<stdlib-name>.py quietly becomes an unrefusable shim.
Why this is a decision and not just work
B is the path of least resistance and is wrong in a way that is invisible:
nothing goes red, --no-shims keeps exiting 0, and it simply stops proving
what it claims. That is the "the property holds and nothing enforces it" shape
this repo has hit twice this week. It should be chosen deliberately or not at
all.
What is NOT open
The six content itself — the name list, its scoping to what html5lib and
tinycss2 actually import, and the viewkeys-is-a-function trap — is settled in
the parent ticket and is unaffected by this. Only where the file goes.
DECIDED (Rene, 2026-08-17)
"
--no-shimsis just 'unsupported'. Define it: we will not provide shims. Done. And not sneakily load other shims."
Two rulings, and the second is what settles the open question.
1. The flag's meaning is simply "unsupported". It says we provide no shims for this build. Nothing more is promised and nothing is hardened — no refusal machinery, no scanning for suspiciously-named library files, no guarantee that survives a determined programmer. Past the opt-out, the results are the programmer's. Its help text should state what it actually checks.
2. A shim must be RECOGNISABLE as a shim. "Not sneakily load other shims" is
the operative half: a lib/**/six.py that satisfies import six while the build
reports no shims is not a broken guarantee, it is a dishonest tree. This is
the same rule as the 2026-07-26 ruling — no file in the tree carries the upstream
name, the tree says what each shim is — and it holds whether or not any flag
exists.
So: Python-shaped shims are named mimic_<name>.py and found by the same lookup
as mimic_<name>.pas. The shim slot being Pascal-only is an accident of when it
was written. --no-shims continuing to mean something is a consequence of the
tree being honest, never the justification.
Re-filed as feature-a-the-shim-slot-should-find-a-python-shaped-shim (A,
p70) — the lookup is PyMimicShimExists in parser.inc, shared ground, so it is
Track A work rather than N's.