uranusjr commented on a change in pull request #20217:
URL: https://github.com/apache/airflow/pull/20217#discussion_r768307032



##########
File path: airflow/utils/context.py
##########
@@ -124,6 +142,11 @@ def __reduce_ex__(self, protocol: int) -> Tuple[Any, ...]:
         items = [(key, self[key]) for key in self._context]
         return dict, (items,)
 
+    def __copy__(self) -> "Context":
+        new = type(self)(copy.copy(self._context))
+        new._deprecation_replacements = self._deprecation_replacements.copy()
+        return new
+
     def __getitem__(self, key: str) -> Any:
         with contextlib.suppress(KeyError):
             warnings.warn(_create_deprecation_warning(key, 
self._deprecation_replacements[key]), stacklevel=2)

Review comment:
       Thanks! I’m not quite sure why Jinja2 seemingly made one call stack 
disappear, but it is what it is.




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