Tests use CliRunner.isolated_filesystem(), which is deprecated and will be removed in Click 9.0
Maintainers usually reply within 3 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start by searching for isolated_filesystem() in tests/test_cli.py and tests/test_insert_files.py; the issue lists 22 calls and the affected tests. Read how those tests use relative paths, then use pytest's tmp_path fixture or change to that directory where needed. Run the test suite and confirm it passes without these deprecation warnings.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 215
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from simonw/sqlite-utils
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
simonw/sqlite-utils#928 ·
Maintainers usually reply within 3 days
-
rows_from_file() splits a single-column CSV file on a letter, or raises csv.ErrorPossibly taken @L4XB claimed this 19 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
simonw/sqlite-utils#907 ·
Maintainers usually reply within 3 days
-
enable_fts() exhausts iterator columns before populating the indexPossibly taken @syahra712 claimed this 25 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
simonw/sqlite-utils#902 ·
Maintainers usually reply within 3 days
-
rows_from_file() ignores ignore_extras= and extras_key= for anything that isn't Format.CSVPossibly taken @feiiiiii5 claimed this 36 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
simonw/sqlite-utils#892 ·
Maintainers usually reply within 3 days
-
Raw numpy scalar values get silently stored as corrupted BLOBs instead of being convertedPossibly taken @TanbirRamim claimed this 43 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
simonw/sqlite-utils#876 ·
Maintainers usually reply within 3 days
All issues in simonw/sqlite-utils
Similar issues
-
request-theme
Difficulty 1/5 Under an hour Newbie friendliness 78/100
LizardByte/ThemerrDB#9883 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Project-MONAI/MONAI#9258 ·
Maintainers usually reply within 3 days
-
catalog:deprecation
Difficulty 1/5 Under an hour Newbie friendliness 88/100
surendranb/free-inference#31 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
fritzprix/libr-agent#2612 ·
Maintainers usually reply within 1 day
-
needs-triage presubmit-gate
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
gke-labs/kube-agents#5001 ·
Maintainers usually reply within 1 day