From 07680b77a63d628119ff2eb9cbcab65331262349 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Fri, 5 May 2017 16:40:45 -0700 Subject: [PATCH] Use different method to compute ServicePort.repr Workaround for https://bugs.python.org/issue24931 Signed-off-by: Joffrey F --- compose/config/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/config/types.py b/compose/config/types.py index dd61a8796..5d3bb5cb7 100644 --- a/compose/config/types.py +++ b/compose/config/types.py @@ -306,7 +306,7 @@ class ServicePort(namedtuple('_ServicePort', 'target published protocol mode ext def repr(self): return dict( - [(k, v) for k, v in self._asdict().items() if v is not None] + [(k, v) for k, v in zip(self._fields, self) if v is not None] ) def legacy_repr(self):