Skip to content

Conversation

cjwatson
Copy link
Contributor

@cjwatson cjwatson commented Mar 4, 2025

Brief summary of the change made

pallets/click#2523 introduced changes to click.testing that broke some unit tests in SQLFluff: mix_stderr=False is now effectively the default and can no longer be specified explicitly.

In addition, pallets/click#1489 caused the diff-quality plugin to incorrectly believe that SQLFluff is not installed.

Although this Click version hasn't been fully released yet, this adjusts SQLFluff to work with both old and new versions.

Fixes: #6676

Pull Request checklist

  • Please confirm you have completed any of the necessary steps below.

  • Included test cases to demonstrate any code changes, which may be one or more of the following:

    • .yml rule test cases in test/fixtures/rules/std_rule_cases.
    • .sql/.yml parser test cases in test/fixtures/dialects (note YML files can be auto generated with tox -e generate-fixture-yml).
    • Full autofix test cases in test/fixtures/linter/autofix.
    • Other.
  • Added appropriate documentation for the change.

  • Created GitHub issues for any relevant followup/future enhancements if appropriate.

pallets/click#2523 introduced changes to
`click.testing` that broke some unit tests in SQLFluff:
`mix_stderr=False` is now effectively the default and can no longer be
specified explicitly.

In addition, pallets/click#1489 caused the
diff-quality plugin to incorrectly believe that SQLFluff is not
installed.

Although this Click version hasn't been fully released yet, this adjusts
SQLFluff to work with both old and new versions.

Fixes: sqlfluff#6676
Copy link
Contributor

github-actions bot commented Mar 6, 2025

Coverage Results ✅

Name    Stmts   Miss  Cover   Missing
-------------------------------------
TOTAL   19341      0   100%

248 files skipped due to complete coverage.

Copy link
Contributor

@WittierDinosaur WittierDinosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for fixing!

@WittierDinosaur WittierDinosaur added this pull request to the merge queue Mar 7, 2025
Merged via the queue into sqlfluff:main with commit cc30de4 Mar 7, 2025
29 checks passed
@cjwatson cjwatson deleted the click-8.2 branch March 7, 2025 14:12
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.

Tests fail with click 8.2.0
2 participants