GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Sort help args to make them reproducible by jspricke · Pull Request #3728 · pallets/click

Conversation

@jspricke

@jspricke jspricke commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

get_help_option_names() uses a set which is not ordered.
The return value is used by mkdocs-click making the
mkdocs-doc package in Debian not reproducible:

https://reproduce.debian.net/all/unstable.html#mkdocs-doc

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@davidism

davidism commented Jul 25, 2026

Copy link
Copy Markdown
Member

I don't think the set or this simple sort are correct. We probably want to apply some specific order, such as long options then short options, or preserve the order they were originally specified. @kdeldycke I think you added this (and maybe I suggested the set in review, can't remember)? What do you think?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kdeldycke

kdeldycke commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

I don't think the set or this simple sort are correct. We probably want to apply some specific order, such as long options then short options, or preserve the order they were originally specified. @kdeldycke I think you added this (and maybe I suggested the set in review, can't remember)? What do you think?

Ah yes, the sort proposed by @jspricke is the right idea. We want stability and predictability. And the set-based arithmetics implemented here 12 years ago (see c2e187b) is sound, but does not preserved order.

So the fix is to replicate the arithmetics, but with order preserving lists/tuples. It sounds like something I solved 2 years ago in #2811 / 70c673d when I added a test_iter_params_for_processing parametrized test to demonstrate the mangling of invocation and declaration orders.

I will amend this PR with something in the same spirit to speed up the process and have it reach the upcoming 8.5.0 release.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kdeldycke kdeldycke added this to the 8.5.0 milestone Jul 31, 2026
@kdeldycke
kdeldycke changed the base branch from stable to main July 31, 2026 10:40
@kdeldycke kdeldycke added bug help output Help text formatting, layout, and --help rendering labels Jul 31, 2026
@kdeldycke @jspricke
Preserve declaration order of help option names
047adef
Co-authored-by: Jochen Sprickerhof <[email protected]>
@kdeldycke
kdeldycke force-pushed the reproducible_help branch from accdfed to 047adef Compare July 31, 2026 11:28
@kdeldycke

kdeldycke commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Just made the changes, this PR is ready to be merged.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kdeldycke
kdeldycke requested review from Rowlando13 and davidism July 31, 2026 11:30
@kdeldycke kdeldycke added tests Click's own test suite and CI workflows and removed bug labels Aug 8, 2026
@Rowlando13
Rowlando13 merged commit 9c4dfda into pallets:main Aug 9, 2026
12 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@jspricke
jspricke deleted the reproducible_help branch August 9, 2026 17:53
sahil7359 added a commit to sahil7359/Quorum that referenced this pull request Aug 14, 2026
@sahil7359
fix: correct GitHub MCP client against the real server, not just its …
2e25734
…docs

The client had never talked to ghcr.io/github/github-mcp-server. First live
connection (against pallets/click#3728) refused to start: the tool names it
was written against (get_pull_request, get_pull_request_diff,
get_pull_request_files, add_pull_request_review_comment) don't exist on the
real v1.9.0 server, which consolidated reads into one method-dispatch tool
(pull_request_read) and writes into a three-call pending-review sequence
(pull_request_review_write -> add_comment_to_pending_review ->
pull_request_review_write). Updated github_client.py and the allowlist to
match, and rebuilt the fake test server to mirror the real tool surface
instead of the granular names that turned out to be fictional.

Also found live: get_file returned a confirmation string instead of file
content. The real server replies with two content blocks - a TextContent
confirmation and a separate EmbeddedResource carrying the actual bytes (or
base64 blob for binary files) - and the client's unwrap logic only ever
looked at the first block. Fixed generally: _call's result unwrapping now
handles multiple TextContent blocks (a second live bug, where a list return
value came back as one block per item and only the first survived), and
get_file specifically extracts the EmbeddedResource. The fake server now
returns the same two-block, mixed-type shape so the regression is covered
by the test suite, not just by the live run that found it.

All four read paths re-verified live after the fix.
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@davidism davidism Awaiting requested review from davidism
@Rowlando13 Rowlando13 Awaiting requested review from Rowlando13

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

help output Help text formatting, layout, and --help rendering tests Click's own test suite and CI workflows

Projects

None yet

Milestone

8.5.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@jspricke @davidism @kdeldycke @Rowlando13
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.