1996fanrui opened a new pull request, #30125:
URL: https://github.com/apache/flink/pull/30125

   ## What is the purpose of the change
   
   Backport of #29286 to release-2.2.
   
   The commit is cherry-picked from the release-1.20 backport (773d25b275f), 
because release-2.2 still has the Hugo docs 
(`docs/content{,.zh}/docs/dev/python/datastream/operators/process_function.md`) 
that the release-1.20 backport changes, while the master commit 6f899c995b4 
changes `flink-python/docs/user_guide/datastream/process_function.rst`, which 
does not exist on release-2.2. The `flink-python/pyflink` part of this backport 
is byte-identical to the master commit 6f899c995b4.
   
   ## Verifying this change
   
   Build: `./mvnw install -DskipTests -Dfast -Pskip-webui-build -pl 
flink-python,flink-dist -am` (JDK 17): `BUILD SUCCESS`. Python 3.11 with the 
`dev` dependency group of `flink-python/pyproject.toml`.
   
   - `python -m pytest pyflink/datastream/tests/test_data_stream.py -k 
test_keyed_co_process` in `flink-python` (JDK 17): `12 passed, 117 deselected`. 
This covers `test_keyed_co_process`, `test_keyed_co_process_side_output` and 
the new `test_keyed_co_process_without_on_timer_override` in 
`ProcessDataStreamStreamingTests`, `ProcessDataStreamBatchTests`, 
`EmbeddedDataStreamStreamTests` and `EmbeddedDataStreamBatchTests`.
   - Reverted-fix run: with 
`pyflink/fn_execution/datastream/embedded/operations.py` and 
`pyflink/fn_execution/datastream/process/operations.py` restored to 
release-2.2, `python -m pytest pyflink/datastream/tests/test_data_stream.py -k 
test_keyed_co_process_without_on_timer_override` (JDK 17): `4 failed, 125 
deselected`, each with `AttributeError: 'MyCoProcessFunction' object has no 
attribute 'on_timer'`. The fix was restored afterwards.
   - `python -m flake8 --config=tox.ini` on the four changed Python files 
(flake8 7.2.0): no findings.
   - `./mvnw -q -pl flink-python spotless:check checkstyle:check` (JDK 17): 
passed.
   
   ## Difference from the original
   
   | Original commit | Conflict | Byte-identical | Changes |
   | --- | --- | --- | --- |
   | 773d25b275f | No | No | Only context lines differ: in 
`test_data_stream.py`, the context of `test_co_broadcast_process` uses `ds: 
DataStream = ...` annotations on release-2.2 instead of the `# type: 
DataStream` comment on release-1.20. Against the master commit 6f899c995b4, the 
`flink-python/pyflink` changes are byte-identical. |
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code (Claude Opus 5.5)
   


-- 
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