Tests use CliRunner.isolated_filesystem(), which is deprecated and will be removed in Click 9.0
Los mantenedores suelen responder en 3 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
Línea de trabajo
Empieza buscando isolated_filesystem() en tests/test_cli.py y tests/test_insert_files.py; el issue enumera 22 llamadas y las pruebas afectadas. Lee cómo usan rutas relativas esas pruebas y luego usa el fixture tmp_path de pytest o cambia a ese directorio cuando sea necesario. Ejecuta la suite de pruebas y confirma que pasa sin estas advertencias de obsolescencia.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 2.2k
- Forks
- 215
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de simonw/sqlite-utils
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
simonw/sqlite-utils#928 ·
Los mantenedores suelen responder en 3 días
-
rows_from_file() splits a single-column CSV file on a letter, or raises csv.ErrorPosiblemente ocupada @L4XB la tomó hace 19 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
simonw/sqlite-utils#907 ·
Los mantenedores suelen responder en 3 días
-
enable_fts() exhausts iterator columns before populating the indexPosiblemente ocupada @syahra712 la tomó hace 25 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
simonw/sqlite-utils#902 ·
Los mantenedores suelen responder en 3 días
-
rows_from_file() ignores ignore_extras= and extras_key= for anything that isn't Format.CSVPosiblemente ocupada @feiiiiii5 la tomó hace 36 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
simonw/sqlite-utils#892 ·
Los mantenedores suelen responder en 3 días
-
Raw numpy scalar values get silently stored as corrupted BLOBs instead of being convertedPosiblemente ocupada @TanbirRamim la tomó hace 43 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
simonw/sqlite-utils#876 ·
Los mantenedores suelen responder en 3 días
Todos los issues de simonw/sqlite-utils
Issues similares
-
[MOVIE]: Airport '77 (1977)Abiertorequest-theme
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
LizardByte/ThemerrDB#9883 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Project-MONAI/MONAI#9258 ·
Los mantenedores suelen responder en 3 días
-
catalog:deprecation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
surendranb/free-inference#31 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
fritzprix/libr-agent#2612 ·
Los mantenedores suelen responder en 1 día
-
needs-triage presubmit-gate
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
gke-labs/kube-agents#5001 ·
Los mantenedores suelen responder en 1 día