Anurag-S1ngh opened a new pull request, #41341: URL: https://github.com/apache/beam/pull/41341
## Summary The coder property tests generated field names with an ad-hoc text strategy and then filtered most of them out with `assume`: duplicate names, Python keywords, and names starting with a digit or underscore. `apache_beam.typehints.testing.strategies.field_names()` already generates valid, non-keyword Python identifiers, so the test now uses it. Changes in `sdks/python/apache_beam/coders/coders_property_based_test.py`: - Use `typehints_strategies.field_names()` for field names and drop the three `assume()` filters. - Enforce unique names with `unique_by`, keyed on the NFKC-normalized name. Python normalizes identifiers with NFKC, so names such as `A𝐀` and `AA` collide as NamedTuple fields. - Construct generated rows positionally. `typing.NamedTuple` normalizes field names, so keyword construction failed when a generated name normalized to a different identifier. Addresses #23436 ## Testing - `pytest sdks/python/apache_beam/coders/` (217 passed, 11 skipped) - An additional scratch run generated 300 schemas and verified that normalized field names stay unique and that each row round-trips through `RowCoder` - `yapf` 0.43.0 reports no changes for the modified file -- 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]
