rokadepiyush49-rgb opened a new pull request, #41598:
URL: https://github.com/apache/beam/pull/41598

   Two error messages in the Python SDK are missing their `f` prefix, so users 
see the placeholders instead of the values:
   
   - `transforms/core.py`: when `DoFn.BundleContextParam` / 
`DoFn.SetupContextParam` gets an already-constructed context manager, the 
`TypeError` reads `write {class_name}(tempfile.TemporaryDirectory, args=(...)) 
rather than {class_name}(...)`. It now names the actual class, e.g. 
`BundleContextParam`.
   - `typehints/schemas.py`: `SchemaTranslation.atomic_value_to_runner_api` 
raised `Unrecognized atomic_type {atomic_type} when encoding value {value}`. It 
now prints the type and the `repr` of the value, matching the decoding message 
just above it in `atomic_value_from_runner_api`.
   
   This is the same kind of bug as #41165, outside `yaml/` (which #41134 
covers).
   
   Tests: added `ContextParamTest` in `core_test.py` (both param classes) and 
`test_unknown_atomic_value_encoding_error_message` in `schemas_test.py`. Both 
fail before the fix and pass after. `core_test.py` and `schemas_test.py` pass 
in full locally (801 passed, 5 skipped), and ruff 0.15.7 and yapf 0.43.0 are 
clean on the changed files.
   
   No `CHANGES.md` entry, since this only changes error message text.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to