dabla commented on code in PR #62922:
URL: https://github.com/apache/airflow/pull/62922#discussion_r4026699445


##########
task-sdk/src/airflow/sdk/bases/operator.py:
##########
@@ -1115,6 +1118,12 @@ def __init__(
 
         super().__init__()
         self.task_group = task_group
+        # task_concurrency only has meaning for Dynamic Task Iteration (as the 
sub-task thread
+        # count, see IterableOperator.max_workers). A directly instantiated 
operator can never
+        # reach that code path, so reject it here rather than silently 
accepting a dead value.
+        if task_concurrency is not None:
+            raise TypeError("unexpected argument: task_concurrency")
+        self.task_concurrency = task_concurrency

Review Comment:
   Fixed in 01cb15ceb1. The assignment after the `TypeError` and the 
`task_concurrency` entry in the serialized-fields exclusion are both gone; the 
rejection stays. Reads still resolve to the class-level `None` default.
   
   ---
   Drafted-by: Claude Fable 5.1; reviewed by @dabla before posting



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