Skip to content

Adapt test suite to pygments 2.20#1889

Merged
rolandwalker merged 1 commit into
dbcli:mainfrom
terjeros:main
May 16, 2026
Merged

Adapt test suite to pygments 2.20#1889
rolandwalker merged 1 commit into
dbcli:mainfrom
terjeros:main

Conversation

@terjeros
Copy link
Copy Markdown
Contributor

@terjeros terjeros commented May 14, 2026

Description

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the AUTHORS file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

@rolandwalker
Copy link
Copy Markdown
Contributor

Hi! Thanks! What would be the disadvantage to upgrading Pygments in pyproject.toml, and making the test changes unconditional?

@terjeros
Copy link
Copy Markdown
Contributor Author

That's related to an other issue I want to discuss, lately mycli has to much stricter pinning of module versions. This makes testing simpler and might increase quality of package for some users.

However, it creates real problems for Linux distributions and others (like Homebrew for macOS) that want to ship mycli together other software, strict pinning of large set of modules often causes conflicts.

For example will Fedora 45 (coming in Oct 2026) be using pygments 2.20.0, while Fedora 43 and 44 will stay on pygments 2.19.x. Each Fedora release have 18 months of support so it's not that of a problem, however consider Ubuntu 26.04 LTS which has 10 years of support.

In short, being less strict in pinning will mean newer releases of mycli is more likely to used and attract more users in general.

@rolandwalker
Copy link
Copy Markdown
Contributor

Thank you for surfacing that larger issue. Could you start a separate Issue or Discussion on pinning in general?

@terjeros
Copy link
Copy Markdown
Contributor Author

Yeah, I will create a dedicated issue for this

@rolandwalker
Copy link
Copy Markdown
Contributor

Since two of the tests modified in this PR are testing the order of the completions as well as the content, checking sorted() vs sorted() isn't ideal — now the order check is gone. Instead, we should lay out the full expected order for Pygments 2.20+, including the new keywords, and have the alternative path delete the new keywords from the expected list when the Pygments version is 2.19 or below.

Would you like to do that, or should I handle?

@terjerosten
Copy link
Copy Markdown

Please handle this

@rolandwalker rolandwalker merged commit 9f0ca3b into dbcli:main May 16, 2026
8 checks passed
@rolandwalker
Copy link
Copy Markdown
Contributor

@terjeros the version check is tidied up in #1891, with the same core functionality. I look forward to a separate discussion on pinning, since it seems like you have some knowledge we lack regarding packaging.

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.

3 participants