Fix(sqlglotc): pin sqlglot to the exact matching version#7730
Merged
Conversation
tobymao
approved these changes
Jun 10, 2026
eef5cbf to
a29f0e2
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
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.
Upgrading
sqlglotwithout upgradingsqlglotccurrently breaks silently: the stale compiledtokenizer_coreextension shadows the newertokenizer_core.py, so the compiledTokenTypeenumlacks newly added members while the pure (never-compiled)
tokens.pyreferences them. The result isan import-time crash whose message on Python ≤ 3.11 is just the bare member name, e.g.
AttributeError: LLRR_ARROWafter<<->>support landed in v30.9.0 — reproducible withsqlglot==30.10.0+sqlglotc==30.8.0on Python 3.11.The coupling today is one-directional: the
sqlglotc=={version}pin only lives in sqlglot's[c]extra, and pip does not remember extras on upgrade, so
pip install -U sqlglotleaves an oldsqlglotcbehind.This makes the pin bidirectional by having
sqlglotcdeclaresqlglot==<its own version>in itsmetadata:
PKG-INFO.devversions) skip the pin, since no matching sqlglot release exists on PyPI;local development uses
build_ext --inplaceand never installs the dist anywayWith this, resolvers keep the two packages in lockstep: uv/poetry refuse to create a skewed
environment, and pip surfaces a clear conflict naming both packages instead of a cryptic one-word
AttributeErrorat import time.Verified by generating metadata through
setup.py egg_infofor both branches: a git checkout at adev version emits no pin, and a simulated sdist rebuild emits
sqlglot==30.10.0inrequires.txt.