Skip to content

MIT-618: add the UltraPlot matplotlib 3.11.2 GitHub task (batch 10) - #172

Merged
ZachFara merged 3 commits into
feature/eval-setupfrom
feat/MIT-618-batch10
Nov 11, 2026
Merged

ZachFara merged 3 commits into
feature/eval-setupfrom
feat/MIT-618-batch10

Conversation

@ZachFara

@ZachFara ZachFara commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

What changed

Adds one verified GitHub task to tools/eval/github_tasks.py, which now holds 10. Adds its version word to the grader test.

Task Repo License Upstream release upstream_change
gh-ultraplot-colormap-contains Ultraplot/UltraPlot MIT matplotlib 3.11.2, 2026-09-11 matplotlib-3.11.2-colormap-registry-contains
  • Pairs: 0. This is a new upstream_change with one task. No candidate turned up for the two keys that could take a pair.
  • Upstream change: PERF: Avoid difflib lookup in ColormapRegistry.register matplotlib/matplotlib#32172 ("PERF: Avoid difflib lookup in ColormapRegistry.register"), opened and merged 2026-08-05. It was backported to 3.11.x as eb3e50c, authored and committed 2026-08-05, and released in 3.11.2 on 2026-09-11.
    • It gives ColormapRegistry its own __contains__ in lib/matplotlib/cm.py, which checks the registry's dict. That is the PERF part: register's name in self no longer goes through __getitem__ and its difflib suggestions.
    • Before, in was Mapping.__contains__, which calls __getitem__. So a subclass's __getitem__ decided membership.
    • It is a point release after the cutoff. The change merged after June, and 3.11.0 is not used.
  • Issue: Matplotlib v3.11.2 compatibility cmap None Ultraplot/UltraPlot#831, opened 2026-09-29. On 3.11.2, a plain ax.scatter fails with "None is not a valid value for cmap". It works on 3.11.1.
  • Fix: Fix lookup issue with newer matplotlib Ultraplot/UltraPlot#832, squash-merged 2026-09-30. The base is the squash commit's parent, 74e28e2.
    • The fix changes code: ColormapDatabase.__contains__ in ultraplot/colors.py. It also adds a test.
    • Only ultraplot/tests/test_colormap.py is laid over.

Why

Ticket: MIT-618 (batch 10, the scientific and numeric libraries). Zach wants 20 GitHub tasks.

How it was tested

Containerized runs, one container at a time, through the same repos.materialize / prepare / run_tests path that check uses. Nothing ran on the host.

Run Result
Base, matplotlib 3.11.2 1 failed, 1 passed
Fix, matplotlib 3.11.2 passed
Base, matplotlib 3.11.1 passed (previous version, checked)

Size: the checkout is 35 MB and the .venv is 144 MB.

Key base-failure line (the full output was captured in the container):

>       assert "Fire" in uplt.colormaps
E       AssertionError: assert 'Fire' in <ultraplot.colors.ColormapDatabase object at 0x...>
ultraplot/tests/test_colormap.py:20: AssertionError

Leak review:

  • I read the whole laid-over test file at the fix sha. Its only comment is about an older rainbow reversal bug (issue 294). The new test's name, test_colormap_name_sensitivty, describes only the behaviour. Nothing names matplotlib, its registry or membership.
  • The fix's source comment says "Work around for mpl 3.11.2", but the agent never sees the fix tree.
  • The error doesn't name its fix. The task is not claimed hard-set: the obvious fix wasn't tried.

Cause-word checks (grader v2 runner.mentions, run mechanically). There were 0 hits against all of these:

  • the full base output;
  • the laid-over test file;
  • the base ultraplot/colors.py;
  • the symptom words, in both directions;
  • the edited function name (__contains__) and the test name;
  • three sentences a symptom-only fix would write, e.g. "ColormapDatabase now defines __contains__, which lowercases the key and accepts _r and _s suffixes".

Notes on the cause words:

  • Every phrase states what changed in matplotlib: ColormapRegistry gained its own __contains__, or membership stopped going through __getitem__. The full set: colormapregistry defines __contains__, colormapregistry now defines, colormapregistry now has, colormapregistry gained, __contains__ no longer calls __getitem__, __contains__ no longer goes through __getitem__, no longer falls back to __getitem__, __contains__ bypasses __getitem__, __contains__ skips __getitem__, 3.11.2.
  • Review round: colormapregistry.__contains__ and colormapregistry's __contains__ were dropped as bare object nouns, because a symptom-only fix says "overrides ColormapRegistry.contains". __contains__ checks _cmaps was dropped because it describes what a __contains__ checks, and the fix's own one checks the translated key. The new set got 0 hits from mentions against the base output, the laid-over test file, the base ultraplot/colors.py and the symptom words.
  • 9 cause words are not versions.
  • No bare __contains__: the fix adds it. No bare __getitem__: a base docstring cites it.
  • No bare "ColormapRegistry": it is in the base's class line.
  • colormap was dropped from the symptom words, because it sits inside the cause phrases.

New version word: 3.11.2. It is added to the expected set in test_the_cause_words_grader_v2_skips_are_exactly_the_versions.

make check passes (1534 tests). origin/feature/eval-setup was merged first and had no new commits.

Rejected candidates

Learned

  • Matplotlib's 3.11.x point releases carry real behaviour changes in backports whose titles look like performance work. ColormapRegistry.__contains__ (3.11.2) breaks any registry subclass that overrides only __getitem__. To find such changes, list commits by path between tags: gh api "repos/matplotlib/matplotlib/commits?sha=v3.11.2&path=lib/matplotlib/cm.py&since=...".
  • In this area, the GitHub repo size (size in gh api repos/...) overstates the checkout. UltraPlot's repo is 241 MB, but its checkout at a commit is 35 MB (gh api repos/<r>/git/trees/<sha>?recursive=1 and sum the blob sizes). Check the tree before rejecting a repo on size.
  • Plotly 7's downstream breakages are mostly removals of things deprecated before the cutoff (figure factories, mapbox, Kaleido < 1). Its plotly.js 4 colour-string and marker.size validation changes are the novel ones, but the downstream fixes found so far are in repos that need a compiler.
  • duckdb 2.0's unfinished-result change can't make a task: its error states both the cause and the fix.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qc1CQTb8r67J32HpkhS43y

@ZachFara
ZachFara merged commit 297710b into feature/eval-setup Nov 11, 2026
2 checks passed
@ZachFara
ZachFara deleted the feat/MIT-618-batch10 branch November 11, 2026 00:07
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.

1 participant