[MAINTENANCE] Use the upstream sqlalchemy-redshift dialect instead of the GX fork - #12044
Open
joshua-stauffer wants to merge 1 commit into
Open
[MAINTENANCE] Use the upstream sqlalchemy-redshift dialect instead of the GX fork#12044joshua-stauffer wants to merge 1 commit into
joshua-stauffer wants to merge 1 commit into
Conversation
sqlalchemy-redshift 1.0.0 migrated to SQLAlchemy 2 and Python 3.10+, which is what the GX fork existed to provide. Upstream's migration supersedes the fork's, so the fork no longer earns its maintenance cost. Point the `redshift` extra at sqlalchemy-redshift>=1.0.0 and move it out of the SQLAlchemy 1.x-only group. That grouping was also a live bug: the extra carried a `sqlalchemy<2.0.0` constraint, which forced resolution back to 0.8.14 (released 2023) no matter what floor the requirements file declared. `gx-redshift` becomes a deprecated alias so existing install commands keep working. Its requirements file duplicates the canonical one rather than referencing it, because the requirements parser that builds the extras does not resolve `--requirement` file references; a test keeps the two in sync. No library changes are needed. Upstream exports every symbol the Redshift compatibility module imports, under the same `sqlalchemy_redshift` namespace.
✅ Deploy Preview for niobium-lead-7998 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
joshua-stauffer
marked this pull request as ready for review
August 7, 2026 13:54
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.
Summary
sqlalchemy-redshift1.0.0 (released 2026-04-28) migrated to SQLAlchemy 2 and Python 3.10+ — the reason the GX fork was created in the first place. This dropsgx-sqlalchemy-redshiftin favor of upstream.The fork is 15 commits ahead / 40 behind upstream
main, and its substantive changes are the SQLAlchemy 2 requirement, pypi repackaging, andpkg_resourcesremoval. Upstream 1.0.0 rewrotedialect.pyfar more thoroughly, so its migration supersedes the fork's. Last fork push was 2026-02-03.No library code changes are required. Upstream publishes the same
sqlalchemy_redshiftimport namespace and exports every symbolgreat_expectations/compatibility/aws.pyimports.A latent bug this also fixes
setup.pylistedredshiftinsqla1x_only_keys, so the extra carriedsqlalchemy<2.0.0:That constraint pinned
sqlalchemy-redshiftback to 0.8.14 (April 2023) regardless of the declared floor, sopip install 'great_expectations[redshift]'has been silently installing a three-year-old dialect. Related fallout was already handled once in #11857.Backward compatibility
pip install 'great_expectations[gx-redshift]'is a published, documented command, so the extra is kept as a deprecated alias that resolves identically toredshift. Verified:Its requirements file duplicates
requirements-dev-redshift.txtrather than using--requirement, becauseparse_requirementsinsetup.pydoesn't resolve file references — it would emit the literal--requirement ...string as a requirement.test_deprecated_gx_redshift_extra_matches_redshiftkeeps the duplicate honest.Worth flagging for reviewers: pip has no deprecation mechanism for extras, so there's no warning we can emit. The signal only reaches people reading docs, not people running a pinned install command. The eventual removal should get its own major-version callout rather than riding in quietly.
Changes
setup.pyredshiftmoved fromsqla1x_only_keystosqla_keys;gx-redshiftmarked as a deprecated aliasreqs/requirements-dev-redshift.txt>=1.0.0reqs/requirements-dev-gx-redshift.txtreqs/requirements-dev-sqlalchemy.txt-redshiftfile.github/workflows/ci.ymlredshiftmarker (wasgx-redshift, withredshiftcommented out).github/workflows/data_source_cleanup.ymlinvoke deps -m redshifttests/test_packaging.pydocs/.../_sql.md,_sql_dialect_installation_commands.mdtasks.pyneeded no functional change — aredshiftentry already existed inMARKER_DEPENDENCY_MAPpointing at the right file, and both marker names resolve to the pytest markerredshift.Verification
Run locally:
tests/test_packaging.py+tests/test_markers.py— 4 passed.[redshift]from this branch into a clean env: resolvessqlalchemy 2.0.51/sqlalchemy-redshift 1.0.0,gx-sqlalchemy-redshiftabsent. All 12 symbols incompatibility/aws.pyimport;redshift+psycopg2://resolves tosqlalchemy_redshift.dialect.RedshiftDialect_psycopg2.[gx-redshift]dry-run resolves identically.test_requirements_filesdo not catch drift in these files, since a change lands on both sides of the equality; that's why the alias needed its own guard.)ruff check/ruff format --checkclean; both workflow YAMLs parse.Not verifiable locally: the actual Redshift integration tests need credentials and only run in the
redshiftCI job, which requires a non-draft PR. Leaving this as draft until that job is green — that's the real gate on this change, since it's the only thing that exercises the upstream dialect against a live cluster.Out of scope
The fork's repo and its
gx-sqlalchemy-redshiftPyPI package remain published as-is; retiring those is separate from this change.