Fix test collection and execution errors on Windows (geteuid, FileStore skip, bedrock tempfile lock)
Los mantenedores suelen responder en 1 día
@prasad2512 ya está trabajando en esto.
Desde el 19/10/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
Línea de trabajo
Empieza en tests/lib/tools/test_file_store.py y tests/lib/tools/memory_sync/test_delete_discipline.py, donde los decoradores de os.geteuid necesitan comprobaciones de plataforma; compara sus marcadores de omisión con tests/lib/tools/memory_sync/test_memory_sync.py. Luego revisa mock_aws_config en tests/lib/test_bedrock.py y las tres pruebas de symlinks mencionadas en tests/lib/tools/test_agent_toolset.py. El trabajo estará terminado cuando se hayan corregido los fallos específicos de Windows durante la recopilación y ejecución, tal como se describe, y las pruebas afectadas se recopilen y ejecuten.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Running the test suite on Windows (or collecting tests with pytest) encounters multiple crashes and collection failures due to POSIX assumptions in tests:
-
AttributeError: module 'os' has no attribute 'geteuid'during test collection:
Intests/lib/tools/test_file_store.py:207, 317andtests/lib/tools/memory_sync/test_delete_discipline.py:168:@pytest.mark.skipif(os.geteuid() == 0, reason="permission checks do not bind root")Because
os.geteuiddoes not exist on Windows, evaluating it in the decorator during pytest module import crashes collection immediately:AttributeError: module 'os' has no attribute 'geteuid'This prevents pytest from discovering or running any subsequent tests.
-
Unskipped POSIX-only
FileStoresuites:
FileStoreexplicitly requires_O_NOFOLLOW != 0(_platform_supported()) and raisesRuntimeError("FileStore requires O_NOFOLLOW support on this platform")on non-POSIX platforms.test_file_store.pycarries:pytestmark = pytest.mark.skipif(os.name != "posix", reason="FileStore refuses non-POSIX platforms")However,
tests/lib/tools/memory_sync/test_memory_sync.pyandtests/lib/tools/memory_sync/test_delete_discipline.pywere missing this file-level marker, causing 38 test failures on Windows. -
tempfile.NamedTemporaryFilefile-locking contention inmock_aws_config:
Intests/lib/test_bedrock.py:65:with tempfile.NamedTemporaryFile(mode="w+", delete=True) as temp_file: ... monkeypatch.setenv("AWS_CONFIG_FILE", str(temp_file.name)) yieldOn Windows, an open
NamedTemporaryFile(delete=True)cannot be opened by a second handle (boto3.Session).boto3encounters aPermissionError[Errno 13], which botocore catches and translates tobotocore.exceptions.ProfileNotFound, causing 4 test failures:test_region_infer_from_profiletest_region_infer_from_specified_profile[default profile]test_region_infer_from_specified_profile[custom profile]test_region_infer_from_aws_profile_argument[profiles0]
-
Missing
@needs_symlinksmarker on symlink tests:
Intests/lib/tools/test_agent_toolset.py, three tests (test_read_through_symlink_escape_is_rejected,test_glob_post_filters_symlink_escape, andtest_grep_skips_symlinked_files) create symlinks without carrying the@needs_symlinksmarker, failing on Windows machines where symlink privileges are restricted (OSError: [WinError 1314]).
Expected Behavior
- Guard
os.geteuid()withos.name != "posix"so non-POSIX platforms skip cleanly without collection crashes. - Mark memory sync suites to skip on non-POSIX platforms matching
test_file_store.py. - Use pytest's
tmp_pathfixture formock_aws_configintest_bedrock.pyto avoid Windows file-locking contention. - Apply
@needs_symlinksto the remaining symlink tests intest_agent_toolset.py.
- 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
-
Three symlink tests in test_agent_toolset.py are missing the needs_symlinks markerPosiblemente ocupada @okxint la tomó hace 62 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
anthropics/anthropic-sdk-python#1915 · 3 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 77/100
-
needs-triage tooling
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
neilsh/stunt-reel#317 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
TandoorRecipes/recipes#4926 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
PyTomography/PyTomography#431 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
igormcsouza/tether#278 ·
Los mantenedores suelen responder en 1 día