3.1.0-alpha: requirements.txt pulls in Prefect 3 (SQLAlchemy>=2.0), conflicts with CKAN 2.10.3 SQLAlchemy 1.4.x
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python, sqlalchemy
- 領域
- backend, build-system
調査の方向性
The conflict comes from requirements.txt (the prefect>=3.7,<3.8 line) and from pyproject.toml, which reads dependencies from that file. Start by checking whether the plugin import chain in plugin.py and cli.py really avoids prefect and SQLAlchemy 2.0, as the report claims. Done means a pip install -e . into a venv pinned to CKAN 2.10.3 keeps sqlalchemy at 1.4.x and the ckan CLI starts. Splitting prefect into an optional extra is the likely fix, but confirm the design with maintainers first.
索引モデルが issue の本文から書いたものです。
説明
Summary
Installing DataPusher+ 3.1.0-alpha into a CKAN venv per the README's "install as a CKAN extension" instructions upgrades SQLAlchemy to 2.x (pulled in transitively by prefect>=3.7,<3.8). This breaks CKAN core, since ckan/model/tag.py still does from sqlalchemy.orm import relation — relation was a deprecated alias for relationship() in SQLAlchemy 1.x and was removed in 2.0.
Environment
CKAN 2.10.3 (pins sqlalchemy[mypy]==1.4.41)
Python 3.10
DataPusher+ installed via:
pip3 install -e 'git+https://github.com/dathere/[email protected]#egg=datapusher-plus'
pip3 install -r 'https://raw.githubusercontent.com/dathere/datapusher-plus/3.1.0-alpha/requirements.txt'
into CKAN's existing venv (/usr/lib/ckan/default), as documented.
Steps to Reproduce
Set up CKAN 2.10.3 in a venv (SQLAlchemy 1.4.41 installed as part of CKAN's own requirements).
Install DataPusher+ 3.1.0-alpha and its requirements.txt into that same venv.
Run any ckan CLI command, e.g. ckan -c /etc/ckan/default/ckan.ini run.
Expected behavior
CKAN CLI starts normally; DataPusher+ is available as a CKAN plugin alongside it.
Actual behavior
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/ckan", line 3, in <module>
from ckan.cli.cli import ckan
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/cli/cli.py", line 12, in <module>
import ckan.plugins as p
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/plugins/__init__.py", line 3, in <module>
from ckan.plugins.core import * # noqa: re-export
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/plugins/core.py", line 21, in <module>
import ckan.plugins.interfaces as interfaces
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/plugins/interfaces.py", line 17, in <module>
from ckan.model.user import User
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/model/__init__.py", line 31, in <module>
from ckan.model.package import (
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/model/package.py", line 492, in <module>
from ckan.model import tag
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/model/tag.py", line 6, in <module>
from sqlalchemy.orm import relation
ImportError: cannot import name 'relation' from 'sqlalchemy.orm'
Root Cause
requirements.txt for 3.1.0-alpha includes:
prefect>=3.7,<3.8
Prefect 3.7.x requires sqlalchemy[asyncio]>=2.0,<3.0 (per PyPI metadata). When this is installed into a CKAN venv, pip upgrades SQLAlchemy from CKAN's pinned 1.4.x (1.4.41 on 2.10.3) to a 2.x release to satisfy Prefect's constraint.
CKAN core ( 2.10.x ) still relies on the SQLAlchemy 1.x relation alias in ckan/model/tag.py, which doesn't exist in SQLAlchemy 2.0. So any CKAN install with DP+ 3.1.0-alpha's full requirements.txt applied in the same environment is currently broken at the ckan CLI level — independent of CKAN version.
Workaround (proposed based on source inspection — needs verification)
Traced the import chain in the 3.1.0-alpha source: plugin.py imports cli.py at module load, but cli.py's prefect/prefect_client imports are all inside command function bodies (prefect_deploy, the worker-status check) — never executed at plugin-registration time (get_commands() just returns [datapusher_plus]). None of plugin.py's other imports (views, helpers, logic.action, logic.auth, config) touch prefect or SQLAlchemy 2.0. So the CKAN-plugin half of DP+ doesn't itself need SQLAlchemy 2.0 — only prefect-deploy / the worker side does.
The catch is that pyproject.tomldeclares dependencies = { file = ["requirements.txt"] } (via dynamic = ["dependencies", ...]), so even pip install -e . pulls in prefect → SQLAlchemy 2.0.
- 主要言語
- Python
- スター
- 47
- フォーク
- 33
- 平均マージ
- 2時間 28分
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dathere/datapusher-plus のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
dathere/datapusher-plus#359 ·
メンテナーはふだん 1 日以内に返信
-
"Total elapsed time" in the JOB DONE line is ~1.79 billion seconds (perf_counter overwrites the time.time() start)対応中かも @tino097 が 14 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
dathere/datapusher-plus#355 ·
メンテナーはふだん 1 日以内に返信
-
FormulaProcessing stage always skipped on CKAN 2.10+: ckan.plugins is a list, stage calls .split() on it対応中かも @tino097 が 14 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
dathere/datapusher-plus#354 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
dathere/datapusher-plus#340 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 53/100
dathere/datapusher-plus#338 ·
メンテナーはふだん 1 日以内に返信
dathere/datapusher-plus の issue をすべて見る
似ている issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
gke-labs/kube-agents#5671 ·
メンテナーはふだん 1 日以内に返信
-
docs(auth): Method B step 4 should tell users to tick "Use this client for an AI-powered agent"オープンdocumentation next-release v0.9.6
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
khuisman/mcp-gee-sweet#1446 ·
メンテナーはふだん 1 日以内に返信
-
model:sonnet runtime:claude security size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
FootprintAI/Containarium#3671 ·
メンテナーはふだん 1 日以内に返信
-
HolidayBase: reassigning `language` does not re-initialize translations or re-populate holidays対応中かも @shikhabhadoria が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vacanza/holidays#4116 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug CLI exec
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信