[Bug]: [Python] Error and log messages print {placeholders} literally because of missing f-string prefixes

Abierto
#41,600 1 comentario 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 2 días

@rokadepiyush49-rgb ya está trabajando en esto.

Desde el 23/11/2026.

  • #41598 de @rokadepiyush49-rgb — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

P3 python
What happened?

Four messages in the Python SDK are plain strings with {...} placeholders, so they print the placeholder instead of the value:

  1. transforms/core.py, _ContextParam.__init__: passing an already-constructed context manager to DoFn.BundleContextParam or DoFn.SetupContextParam raises TypeError: ... write {class_name}(tempfile.TemporaryDirectory, args=(...)) rather than {class_name}(tempfile.TemporaryDirectory(...)).
  2. transforms/core.py, ParDo.infer_batch_converters: for a DoFn whose get_input_batch_type() returns None, the error is TypeError: process_batch method on {self.fn!r} does not have an input type annoation.
  3. typehints/schemas.py, SchemaTranslation.atomic_value_to_runner_api: ValueError: Unrecognized atomic_type {atomic_type} when encoding value {value}.
  4. runners/worker/data_sampler.py, DataSampler.sampler_for_output: the warning reads Out-of-bounds access for transform "..." and output "{output_index}" OutputSampler. ....

To reproduce the first one:

import contextlib
import apache_beam as beam

beam.DoFn.BundleContextParam(contextlib.nullcontext())

The same kind of bug was fixed in yaml/ by #41165, and #41134 fixes more there.

Issue Priority

Priority: 3 (minor)

Issue Components
  • Component: Python SDK
Lenguaje dominante
Java
Estrellas
8.7k
Forks
4.8k
Merge medio
3 d 16 h
PR fusionados (30 d)
445

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/beam

Todos los issues de apache/beam

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.