Three symlink tests in test_agent_toolset.py are missing the needs_symlinks marker
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 92/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- testing-qa
Línea de trabajo
Abre test/lib/tools/test_agent_toolset.py y compara las tres pruebas de symlink nombradas con las nueve pruebas que ya usan needs_symlinks. Ejecuta el archivo de pruebas relevante, idealmente en Windows, y confirma que las tres pruebas se omiten con el motivo documentado, mientras las pruebas restantes siguen pasando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
tests/lib/tools/test_agent_toolset.py defines a marker for exactly this situation:
needs_symlinks = pytest.mark.skipif(
sys.platform == "win32", reason="symlink fixtures need a POSIX filesystem"
)
It is applied to nine tests. Three others create symlinks without it, and fail on Windows for any user who is not elevated and does not have Developer Mode enabled:
FAILED tests/lib/tools/test_agent_toolset.py::test_grep_skips_symlinked_files
FAILED tests/lib/tools/test_agent_toolset.py::test_read_through_symlink_escape_is_rejected
FAILED tests/lib/tools/test_agent_toolset.py::test_glob_post_filters_symlink_escape
E OSError: [WinError 1314] A required privilege is not held by the client
All three carry @needs_pydantic_v2 but not @needs_symlinks.
Full file on Windows: 3 failed, 69 passed, 20 skipped. Those three are the only failures — the rest of the suite is clean, and the other symlink tests skip correctly with the existing marker.
Why CI doesn't catch it
The workflows run ubuntu-latest only; no job executes the suite on Windows. So the marker's absence has no observable effect in CI, and the failure appears only on a contributor's machine.
Worth noting the shape of it: the project clearly knows about this — the marker exists and is used nine times. Three tests were simply missed, and nothing could tell you.
Suggested fix (implemented and verified)
Add the existing marker to the three tests:
@needs_symlinks
@needs_pydantic_v2
async def test_read_through_symlink_escape_is_rejected(tmp_path: Path) -> None:
Three added lines, no new machinery. Verified on Windows: 3 failed / 69 passed → 0 failed / 69 passed, with the three now skipping for the documented reason.
Patch: patches/anthropic-sdk-python/0001-tests-mark-three-symlink-tests-with-needs_symlinks.patch
Environment
Windows-11-10.0.26200-SP0
Python 3.13.15
anthropic-sdk-python at HEAD, uv sync dev environment
A note on scope
If you would rather these tests ran on Windows than skipped, the alternative is a try/except OSError that skips only when the platform actually refuses — that preserves coverage on elevated machines and on any future Windows CI job. The marker approach matches what the file already does, which is why the patch takes it.
- Lenguaje dominante
- Python
- Estrellas
- 4k
- Forks
- 905
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- 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 anthropics/anthropic-sdk-python
-
beta_tool validation errors reach the model as "Invalid arguments for function X" with no detailPosiblemente ocupada @mangeshraut712 la tomó hace 12 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anthropics/anthropic-sdk-python#2033 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
`AnthropicBedrock` 2.x sends `anthropic_version: 2026-10-21`, which Bedrock rejects for Claude Sonnet 4.5, Opus 4.5 and Opus 4.6Posiblemente ocupada @charan-rathore la tomó hace 16 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
anthropics/anthropic-sdk-python#2031 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 61/100
anthropics/anthropic-sdk-python#2029 ·
Los mantenedores suelen responder en 1 día
-
Fix test collection and execution errors on Windows (geteuid, FileStore skip, bedrock tempfile lock)Posiblemente ocupada @prasad2512 la tomó hace 20 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
anthropics/anthropic-sdk-python#2027 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Messages.parse (and AsyncMessages.parse) don't take cache_control?Posiblemente ocupada @Alphaxiaoteng la tomó hace 66 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anthropics/anthropic-sdk-python#1907 ·
Los mantenedores suelen responder en 1 día
Todos los issues de anthropics/anthropic-sdk-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
adafruit/Fruit-Jam-OS#98 ·
-
python triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/semantic-kernel#14753 ·
Los mantenedores suelen responder en 5 días
-
area:cli area:configuration documentation priority:low size:small
Dificultad 1/5 1-3 horas Aptitud para principiantes 80/100
RonaldHensbergen/composable-data-stack#1222 ·
Los mantenedores suelen responder en 1 día
-
bug python
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
pvlib/pvlib-python#2939 ·
Los mantenedores suelen responder en 1 día