Tests use CliRunner.isolated_filesystem(), which is deprecated and will be removed in Click 9.0
メンテナーはふだん 3 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
まず tests/test_cli.py と tests/test_insert_files.py で isolated_filesystem() を検索します。issue には22件の呼び出しと影響を受けるテストが記載されています。これらのテストで相対パスをどのように使用しているかを読み、必要に応じて pytest のフィクスチャ tmp_path を使うか、そのディレクトリに移動します。テストスイートを実行し、これらの非推奨警告が出ずに成功することを確認します。
索引モデルが issue の本文から書いたものです。
説明
Running the test suite produces 33 DeprecationWarnings from Click:
DeprecationWarning: 'isolated_filesystem' is deprecated and will be removed in Click 9.0. Use 'tempfile.TemporaryDirectory' or pytest's 'tmp_path' fixture with absolute paths instead.
Once Click 9.0 is released, these tests will fail, since sqlite-utils doesn't pin Click below 9.
Steps to reproduce
git clone https://github.com/simonw/sqlite-utils
cd sqlite-utils
uv run pytest
Expected
Test suite passes with no deprecation warnings from the project's own tests.
Actual
1497 passed, 16 skipped, 33 warnings — all 33 warnings are the isolated_filesystem deprecation.
Affected code
22 with runner.isolated_filesystem(): calls (33 test runs once parametrization is counted):
tests/test_cli.py— 19 calls (e.g.test_create_table,test_create_view,test_drop_table,test_enable_wal,test_create_table_strict)tests/test_insert_files.py— 3 calls (test_insert_files,test_insert_files_stdin,test_insert_files_bad_text_encoding_error)
Find them with: grep -n isolated_filesystem tests/*.py
Suggested fix
Replace runner.isolated_filesystem() with pytest's tmp_path fixture (or monkeypatch.chdir(tmp_path) where tests rely on relative paths), as the warning recommends.
Environment
- macOS (Apple Silicon)
- Python 3.13.5 (via uv 0.13.5)
- sqlite-utils 4.2.1, commit [YOUR HASH]
- pytest 9.1.1
- 主要言語
- Python
- スター
- 2.2k
- フォーク
- 215
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
simonw/sqlite-utils のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
simonw/sqlite-utils#928 ·
メンテナーはふだん 3 日以内に返信
-
rows_from_file() splits a single-column CSV file on a letter, or raises csv.Error対応中かも @L4XB が 20 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
simonw/sqlite-utils#907 ·
メンテナーはふだん 3 日以内に返信
-
enable_fts() exhausts iterator columns before populating the index対応中かも @syahra712 が 25 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
simonw/sqlite-utils#902 ·
メンテナーはふだん 3 日以内に返信
-
rows_from_file() ignores ignore_extras= and extras_key= for anything that isn't Format.CSV対応中かも @feiiiiii5 が 37 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
simonw/sqlite-utils#892 ·
メンテナーはふだん 3 日以内に返信
-
Raw numpy scalar values get silently stored as corrupted BLOBs instead of being converted対応中かも @TanbirRamim が 43 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
simonw/sqlite-utils#876 ·
メンテナーはふだん 3 日以内に返信
simonw/sqlite-utils の issue をすべて見る
似ている issue
-
area/test type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Clodmony/starship-coop#70 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
punitarani/fli#270 ·
-
🐛 Bug 🔔 Pending processing
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
jumpserver/jumpserver#17980 ·
メンテナーはふだん 1 日以内に返信
-
community enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
namespace
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
EclipseFdn/open-vsx.org#15341 ·
メンテナーはふだん 1 日以内に返信