Allow sqlparse 0.6.x - #1615
Open
pouwerkerk wants to merge 1 commit into
Open
Conversation
DiegoDAF
added a commit
to DiegoDAF/pgcli.daf
that referenced
this pull request
Aug 18, 2026
Our dependency was capped at "sqlparse >=0.3.0,<0.6", which prevented installing 0.6.0 -- the release that fixes four advisories confirmed against OSV: CVE-2026-59893 quadratic regex handling of dollar-quoted SQL literals CVE-2026-71491 quadratic O(n^2) DoS in group_comments CVE-2026-54284 TokenList.__init__ materializes O(subtree) values CVE-2026-59894 SQL string escaping in generated snippets The dollar-quote one matters in practice here: DO $$ ... $$ blocks are routine in the scripts we run through pgcli. Cap raised to <0.7 and the floor to >=0.5.0. Verified against 0.6.0 before bumping: full unit suite (3154 passed) and the whole behave suite (15 features, 61 scenarios, 0 failed) are green, plus a smoke test of the installed binary (plain select, DO $$ block, multi-statement, trailing comment). Upstream is doing the same in dbcli#1615 (issue dbcli#1618).
sqlparse 0.6.0 (2026-08-13) fixes several denial-of-service issues (CVE-2026-59893, CVE-2026-54284, CVE-2026-71491) and a string-escaping bug (CVE-2026-59894). Its only other notable change is dropping Python 3.8/3.9, which pgcli no longer supports either. The <0.6 cap prevented users from installing the fixed release; widen it to <0.7. The full test suite gives identical results on sqlparse 0.5.4 and 0.6.0 (2612 passed, 117 skipped, 1 xfailed, 1 xpassed).
pouwerkerk
force-pushed
the
sqlparse-0.6
branch
from
August 18, 2026 18:12
8e2e12f to
f5a9913
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Widens the
sqlparseconstraint from<0.6to<0.7.sqlparse0.6.0 (released 2026-08-13) fixes several denial-of-service issues and a string-escaping bug:Its only other notable change is dropping Python 3.8/3.9, which
pgclino longer appears to support. With the current<0.6cap, anyone who haspgcliinstalled can't pick up the fixed sqlparse release (Dependabot flags it and the resolver refuses).The
sqlparse.engine.grouping.MAX_GROUPING_DEPTH/MAX_GROUPING_TOKENSknobs thatpgclisets toNonestill exist in 0.6.0 and behave the same.Checklist
changelog.rst.AUTHORSfile (or it's already there).pip install pre-commit && pre-commit install). (No Python source changed in this PR.)2612 passed, 117 skipped, 1 xfailed, 1 xpassed).Fixes #1618.