Skip to content

Fix Python 3.9 import for row validation - #6

Merged
tp-li-dev merged 2 commits into
mainfrom
fix/py39-row-validator-annotations
Sep 27, 2026
Merged

tp-li-dev merged 2 commits into
mainfrom
fix/py39-row-validator-annotations

Conversation

@tp-li-dev

Copy link
Copy Markdown
Contributor

原因

src/nyansqlite/_row_validation.py が SchemaValidator | None をPython 3.9でimport時に評価し、TypeError: unsupported operand type(s) for | でテスト開始前に落ちていました。

修正

from __future__ import annotations を追加し、注釈の評価を延期します。実行時の検証処理には変更ありません。

検証

  • ローカルPython 3.12: 103 tests passed (--benchmark-disable)
  • Ruff: passed
  • Python 3.9 の確認はこのPRのCIで実施
  • v1.1.6の前回pushでは全体CIが失敗したため、PyPI publishはskipされました。この修正がmainで通ると、既存リリースワークフローがv1.1.6の公開へ進みます。

github-actions Bot added a commit that referenced this pull request Sep 27, 2026
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🔍 CI Results — ✅ All CI checks passed

Stage Status
🧹 Lint (ruff) ✅ success
🔍 Type (mypy) ✅ success
🧪 Tests ✅ success

Commit: 9501ff6655efc5cf87afb30d864b37f009854d2d

@github-actions

Copy link
Copy Markdown
Contributor

🛡️ Security Scan Results

スキャナ 役割 結果 Findings
CodeQL Python深層データフロー解析 ✅ success Security Tab参照
Bandit Python静的解析 ✅ success 6件
Semgrep Pythonセマンティック解析 ✅ success 0件
Trivy 依存関係 / IaC / シークレット ✅ success 0件
Bun Audit Node.js依存関係 ✅ success (ログ参照)
Grype 深堀り脆弱性スキャン ✅ success 0件
🐍 Bandit Findings(6件)― クリックして展開
[MEDIUM] Possible SQL injection vector through string-based query construction.
  File: src/nyansqlite/core.py:291

[MEDIUM] Possible SQL injection vector through string-based query construction.
  File: src/nyansqlite/core.py:414

[MEDIUM] Possible SQL injection vector through string-based query construction.
  File: src/nyansqlite/core.py:576

[MEDIUM] Possible SQL injection vector through string-based query construction.
  File: src/nyansqlite/core_aio.py:284

[MEDIUM] Possible SQL injection vector through string-based query construction.
  File: src/nyansqlite/core_aio.py:454

[MEDIUM] Possible SQL injection vector through string-based query construction.
  File: src/nyansqlite/core_aio.py:625

✅ 全チェックが通過しました!

🔍 詳細・行ハイライトはリポジトリの Security → Code scanning タブで確認できます。

@tp-li-dev
tp-li-dev marked this pull request as ready for review September 27, 2026 09:46
@tp-li-dev
tp-li-dev merged commit 60b0c42 into main Sep 27, 2026
81 of 82 checks passed
github-actions Bot added a commit that referenced this pull request Sep 27, 2026
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.

1 participant