Skip to content

fix(NoTicket): vendor sqlparse CASE...END fix to allow PyPI publishing #494

Merged
lorenzhs merged 4 commits intomainfrom
lorenz/monkeypatch-sqlparse
Mar 23, 2026
Merged

fix(NoTicket): vendor sqlparse CASE...END fix to allow PyPI publishing #494
lorenzhs merged 4 commits intomainfrom
lorenz/monkeypatch-sqlparse

Conversation

@lorenzhs
Copy link
Contributor

Replace git dependency on lorenzhs/sqlparse fork with a monkey-patch of StatementSplitter._change_splitlevel in statement_formatter.py.

The upstream sqlparse project isn't very active and the fix for CASE...END level tracking (andialbrecht/sqlparse#839) was not yet released. PyPI rejects packages with VCS dependencies, so vendoring the fix inline unblocks publishing.

The vendored code is identical to the fixed version from that PR, up to formatting, quote style, and comments.

Replace git dependency on lorenzhs/sqlparse fork with a monkey-patch of
StatementSplitter._change_splitlevel in statement_formatter.py.

The upstream sqlparse project isn't very active and the fix for CASE...END level
tracking (andialbrecht/sqlparse#839) was not yet
released.  PyPI rejects packages with VCS dependencies, so vendoring the fix
inline unblocks publishing.
@lorenzhs lorenzhs requested a review from a team as a code owner March 23, 2026 15:52
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
65.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@ludv1x ludv1x self-requested a review March 23, 2026 16:50
@lorenzhs lorenzhs merged commit 7b5fc43 into main Mar 23, 2026
6 of 7 checks passed
@lorenzhs lorenzhs deleted the lorenz/monkeypatch-sqlparse branch March 23, 2026 16:52
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.

2 participants