tvalentyn commented on code in PR #38355:
URL: https://github.com/apache/beam/pull/38355#discussion_r3183012199


##########
sdks/python/apache_beam/runners/worker/sdk_worker.py:
##########
@@ -1454,7 +1454,12 @@ def wait(self, timeout=None):
 
   def get(self, timeout=None):
     # type: (Optional[float]) -> T
-    return self._func(*(arg.get(timeout) for arg in self._args))
+    # List comprehension, not generator: *(gen) causes CPython to build the
+    # argument tuple incrementally via _PyTuple_Resize, which asserts
+    # Py_REFCNT(v)==1. A GC cycle between yields can increment that refcount,
+    # raising SystemError (Objects/tupleobject.c:927). *[list] allocates the

Review Comment:
   The reference Objects/tupleobject.c:927 will become stale; ideally, we will 
reference the Cpython issue and add details there.
   Alternatively, if this is already fixed, in cpython you could link to a line 
of code at a particular commit so the link persists and mention which python 
versions are affected.



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