Repository navigation
Backport #32378 to 1.13: cap pygtrie below 2.6 so import airflow works on Python 3.10 - #32431
Conversation
…thon 3.10 (#32378) pygtrie 2.6.0 (released 2026-09-01T11:06Z) annotates with typing.Self, which only exists on 3.11+, yet publishes no requires-python floor -- so pip and uv happily install it on 3.10, where `import pygtrie` raises AttributeError: module 'typing' has no attribute 'Self' apache-airflow-core and apache-airflow-task-sdk both require pygtrie>=2.5.0 with no ceiling, and airflow._shared.logging.structlog imports it at module level. That module is reached from airflow/__init__.py through configuration.initialize_secrets_backends(), so the AttributeError surfaces as ImportError: cannot import name 'Connection' from 'airflow.models' which took out every py-tests run that resolved dependencies after 11:06Z on the 3.10 lane -- unit tests and integration shard-3 alike. 3.11 and 3.12 were unaffected because they have typing.Self. Cap it in VERSIONS and apply it both to the airflow plugin extra and to the test extra, which is where CI actually pulls Airflow in. Drop the cap once pygtrie declares its floor or 3.10 support is dropped. (cherry picked from commit 0fab248)
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ ApprovedBackports the OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
Backport of #32378 to
1.13. Original issue: #32377.pygtrie 2.6.0(published 2026-09-01T11:06Z) annotates withtyping.Self(PEP 673, Python 3.11+) but declares norequires-pythonfloor, so pip and uv install it on 3.10, where it is unimportable:apache-airflow-coreandapache-airflow-task-sdkboth requirepygtrie>=2.5.0with no ceiling, andairflow._shared.logging.structlogimports it at module level — reached fromairflow/__init__.pyviaconfiguration.initialize_secrets_backends(). TheAttributeErrortherefore surfaces as:which on
maintook outpython / Unit Tests & Static Checks (3.10)andpython / Integration Tests (shard-3, 3.10), turningpy-tests-statusred and evicting every PR touchingingestion/from the merge queue.Why
1.13needs it. This branch pinsapache-airflow==3.3.1(so it pullsapache-airflow-core/task-sdkand their uncappedpygtrie>=2.5.0), runsMAIN_PYTHON_VERSION: "3.10"with a["3.10","3.11","3.12"]matrix, and does not carry the cap.pygtrie 2.6.0is now PyPI's latest, so any fresh resolution here selects it. The breakage is currently latent only because recent runs on this base have had their Python jobs path-filtered toskipped; the first PR that touchesingestion/and actually runs the suite will be blocked.Cherry-picked clean, no conflicts — identical three-line change (cap in
VERSIONS, applied to theairflowplugin extra and to thetestextra, which is where CI actually pulls Airflow in).Type of change:
High-level design:
N/A — dependency cap backport.
Tests:
Use cases covered
ingestion[test]resolves on Python 3.10 with an importablepygtrieimport airflowworks, so the Airflow connector unit tests and integration shard-3 collectUnit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
Full resolver dry-run of the affected extra against this branch on Python 3.10 — no conflict:
ruff checkandruff format --checkclean. This PR's ownpy-testsrun on 3.10 is the real regression test.UI screen recording / screenshots:
Not applicable.
Checklist:
import airflow(cannot import name 'Connection' from 'airflow.models') #32377) and forward-fix (Fixes #32377: cap pygtrie below 2.6 soimport airflowworks on Python 3.10 #32378) above.