tvalentyn commented on a change in pull request #14390:
URL: https://github.com/apache/beam/pull/14390#discussion_r613562990



##########
File path: sdks/python/apache_beam/transforms/environments.py
##########
@@ -109,12 +113,25 @@ class Environment(object):
   _urn_to_env_cls = {}  # type: Dict[str, type]
 
   def __init__(self,
-               capabilities,  # type: Iterable[str]
-               artifacts,  # type: 
Iterable[beam_runner_api_pb2.ArtifactInformation]
-              ):
+      capabilities,  # type: Iterable[str]
+      artifacts,  # type: Iterable[beam_runner_api_pb2.ArtifactInformation]
+      resource_hints,  # type: Optional[Mapping[str, bytes]]
+               ):
     # type: (...) -> None
     self._capabilities = capabilities
     self._artifacts = artifacts
+    self._resource_hints = dict(resource_hints) if resource_hints else {}
+
+  def __eq__(self, other):
+    return (
+        self.__class__ == other.__class__

Review comment:
       Wouldn't Docker environments be compared via `__eq__` defined on 
DockerEnvironment subclass that takes the image into account? 




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


Reply via email to