test_track_literals depends on a garbage collection
@sergey-miryanov ya está trabajando en esto.
Desde el 13/8/2026.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
Bug report
_not_tracked_instantly() requires the tuple to be untracked without a collection. This holds for tuples created at run time, but tuple constants are created tracked and are only untracked by _PyTuple_MaybeUntrack(), which is called only from the collector.
$ ./python -c "import gc; print(gc.is_tracked((1,)))"
True
So test_track_literals passes only if a collection happens between importing the module and running the test. Under regrtest it does not:
$ ./python -m test test_tuple -m test_track_literals
AssertionError: True is not false : (1,)
while ./python -m unittest test.test_tuple.TupleTest.test_track_literals passes.
Untracking tuple constants when the code object is created would let the test keep the stronger check.
Linked PRs
- gh-156419
- gh-156423
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.
Evaluación
Este issue todavía no se ha evaluado.