KevinGG commented on pull request #14073: URL: https://github.com/apache/beam/pull/14073#issuecomment-786819678
> I was under the impression that deepcopy "just worked" on user classes by deep copying the attributes. Does that not work well with our types? Deepcopy works for [nested] primitive types. Something like a PipelineOption can be deepcopied without any issue. If a type has no copier (`__deepcopy__`) defined and python couldn't figure out how to deepcopy it, python resorts to the pickler. It pickles the object and then unpickle it to make a deepcopy. Some types are not picklable, for example, an RLock. Additionally, most of the python pipeline components are not picklable because the code disallows pickling by overriding the `__reduce__` function. So if you deepcopy a pipeline, nothing really is copied and you get a str. This PR explicitly defines the copiers for different components in the pipeline. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
