Skip to content

Sort generic mapping values in order_by - #325

Merged
dgilland merged 2 commits into
dgilland:developfrom
Gambit-Checkmate:fix/order-by-mappings
Oct 18, 2026
Merged

dgilland merged 2 commits into
dgilland:developfrom
Gambit-Checkmate:fix/order-by-mappings

Conversation

@Gambit-Checkmate

Copy link
Copy Markdown
Contributor

Summary

Closes #323.

Use the existing Mapping abstraction when extracting order_by input values, matching the declared input contract. UserDict and MappingProxyType currently return sorted keys instead of values.

Regression tests cover dict, UserDict and read-only mappings in ascending/descending order, retaining the original input. Four generic mapping cases failed before the fix; two dict controls passed. Added an unreleased changelog entry.

Full suite: 2,646 passed, 100% coverage.

Validation

  • Full unit and doctest suite, with the repository's 100% coverage gate.
  • Ruff lint and format checks, mypy, Sphinx documentation build (-W), sdist/wheel build, generated chaining types comparison and git diff --check passed.
  • Locally tested on Windows / Python 3.13.13; the other supported Python versions await upstream CI.
  • My AUTHORS entry is already present from prior contributions.

AI disclosure: prepared with OpenAI Codex assistance. Found through code inspection and reproduced locally; no production incident is claimed.

@coveralls

coveralls commented Oct 18, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — Gambit-Checkmate:fix/order-by-mappings into dgilland:develop

@dgilland
dgilland merged commit 09c6be6 into dgilland:develop Oct 18, 2026
5 checks passed
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.

order_by returns keys instead of values for generic mappings

3 participants