Skip to content

build(deps): Bump sqlparse to 0.6.0 and sql-metadata to 3.0.1 - #8398

Merged
phacops merged 2 commits into
masterfrom
dependabot/uv/sqlparse-0.6.0
Aug 27, 2026
Merged

build(deps): Bump sqlparse to 0.6.0 and sql-metadata to 3.0.1#8398
phacops merged 2 commits into
masterfrom
dependabot/uv/sqlparse-0.6.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 26, 2026

Copy link
Copy Markdown
Contributor

sqlparse 0.6.0 fixes several lexer and formatter DoS CVEs, but sql-metadata 2.x cannot resolve against it (sqlparse<0.6.0). This also takes sql-metadata 3.0.1, which swaps the parser from sqlparse to sqlglot.

Snuba-admin validate_ro_query still uses Parser / QueryType to require SELECT. Production table allowlisting continues to use ClickHouse EXPLAIN QUERY TREE; parsed.tables is only the no-connection fallback. After this upgrade sqlparse stays a direct dependency but is unused by application code.

Unsupported statements such as EXPLAIN / DESCRIBE / SHOW now raise sql-metadata's InvalidQueryDefinition instead of InvalidCustomQuery if they reach the parser.

Bumps [sqlparse](https://github.com/andialbrecht/sqlparse) from 0.5.4 to 0.6.0.
- [Changelog](https://github.com/andialbrecht/sqlparse/blob/master/CHANGELOG)
- [Commits](andialbrecht/sqlparse@0.5.4...0.6.0)

---
updated-dependencies:
- dependency-name: sqlparse
  dependency-version: 0.6.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Aug 26, 2026
@dependabot
dependabot Bot requested a review from a team as a code owner August 26, 2026 11:05
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Aug 26, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 391e17f. Configure here.

Comment thread uv.lock
source = { registry = "https://pypi.devinfra.sentry.io/simple" }
wheels = [
{ url = "https://pypi.devinfra.sentry.io/wheels/sql_metadata-2.11.0-py3-none-any.whl", hash = "sha256:2ce9d4519565a972edf786712d3f6fbebf8ddd8e0d7bdb4bf51d64f5ec2e5c88" },
{ url = "https://pypi.devinfra.sentry.io/wheels/sqlglot-30.16.0-py3-none-any.whl", hash = "sha256:f14f119e87bb1397316ab2b3c1f12dddd3b098921185dc69935952111be91788" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Silent sql-metadata major upgrade

High Severity

Raising sqlparse to >=0.6.0 forces sql-metadata from 2.11.0 to 3.0.1 because 2.x requires sqlparse&lt;0.6.0. That major release replaces sqlparse with sqlglot and changes parsing. Admin validate_ro_query relies on Parser / QueryType for ClickHouse SQL (including ARRAY JOIN), so allowlisting and SELECT checks can behave differently or error.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 391e17f. Configure here.

sql-metadata 2.x cannot resolve with sqlparse>=0.6.0, so make the major bump explicit in pyproject.toml.
@phacops phacops changed the title build(deps): bump sqlparse from 0.5.4 to 0.6.0 build(deps): Bump sqlparse to 0.6.0 and sql-metadata to 3.0.1 Aug 27, 2026
@phacops
phacops enabled auto-merge (squash) August 27, 2026 18:36
@phacops
phacops merged commit 4a96bdc into master Aug 27, 2026
67 checks passed
@phacops
phacops deleted the dependabot/uv/sqlparse-0.6.0 branch August 27, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant