From 7c6a6de947752b9310170bfeb52d9a005222cc40 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Thu, 26 Oct 2017 18:43:11 -0500 Subject: [PATCH] Fix testing unknown commands on Python 3.4 --- .../server/linereceiver/tests/test_lineserverchannel.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/zope/server/linereceiver/tests/test_lineserverchannel.py b/src/zope/server/linereceiver/tests/test_lineserverchannel.py index 2d7a5e4..99f3412 100644 --- a/src/zope/server/linereceiver/tests/test_lineserverchannel.py +++ b/src/zope/server/linereceiver/tests/test_lineserverchannel.py @@ -87,6 +87,12 @@ def __repr__(self): def test_unknown_command(self): class Chunnel(Channel): authenticated = True + # Python 3.4 includes a __getattr__ in asyncore.dispatcher + # that does `gettar(self.socket, name)`, but self.socket is only + # set by the constructor in certain circumstances---and we don't + # call the constructor. This leads to a recursion error unless + # we make that attribute available here. + socket = None command = LineCommandParser(None)