Follow-up from PR #942 (review item P2, #942 (review)).
Baseline keys in ccdproc/tests/array_escape_baseline.txt include the frame function name of the escape site. Those names are not stable across Python versions:
- List comprehensions have their own frame named
<listcomp> on Python < 3.12, but are inlined into the enclosing function on 3.12+ (PEP 709), so the same escape keys differently depending on the interpreter.
- Generator expressions and lambdas key as
<genexpr> / <lambda> on all versions, which are ambiguous within a file.
The enforce CI job (py312-alldeps-dask-enforce) runs on Python 3.12, so a contributor who regenerates the baseline with CCDPROC_WRITE_ESCAPE_BASELINE=1 on Python 3.11 produces mismatched keys: CI then reports spurious NEW-escape failures (the 3.12 spelling is missing) plus spurious stale entries (the 3.11 spelling is never observed).
Fix options:
- Normalize comprehension-style frame names (
<listcomp>, <setcomp>, <dictcomp>, and possibly <genexpr>/<lambda>) to the enclosing function's name when recording escape sites, so keys match across versions; or
- Document a Python floor (>= 3.12) for baseline regeneration in
docs/array_api.rst and in the baseline file header, and optionally have write mode refuse to run on older interpreters.
Follow-up from PR #942 (review item P2, #942 (review)).
Baseline keys in
ccdproc/tests/array_escape_baseline.txtinclude the frame function name of the escape site. Those names are not stable across Python versions:<listcomp>on Python < 3.12, but are inlined into the enclosing function on 3.12+ (PEP 709), so the same escape keys differently depending on the interpreter.<genexpr>/<lambda>on all versions, which are ambiguous within a file.The enforce CI job (
py312-alldeps-dask-enforce) runs on Python 3.12, so a contributor who regenerates the baseline withCCDPROC_WRITE_ESCAPE_BASELINE=1on Python 3.11 produces mismatched keys: CI then reports spurious NEW-escape failures (the 3.12 spelling is missing) plus spurious stale entries (the 3.11 spelling is never observed).Fix options:
<listcomp>,<setcomp>,<dictcomp>, and possibly<genexpr>/<lambda>) to the enclosing function's name when recording escape sites, so keys match across versions; ordocs/array_api.rstand in the baseline file header, and optionally have write mode refuse to run on older interpreters.