From c265a58eea8bb7abbdaa4cdbc0f25cafb1d78626 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 18 Aug 2015 21:16:59 -0400 Subject: Turn off tying the -E test suite option to debugging the database logger. SQLAlchemy is generally pretty chatty and usually not necessary to debug. Set use_poll=True in asyncore.loop() which improves Python 3.5 compatibility. We were getting OSErrors in stop() when using select under Python 3.5. --- src/mailman/runners/lmtp.py | 2 +- src/mailman/testing/layers.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mailman/runners/lmtp.py b/src/mailman/runners/lmtp.py index ca737d005..39f92f228 100644 --- a/src/mailman/runners/lmtp.py +++ b/src/mailman/runners/lmtp.py @@ -255,7 +255,7 @@ class LMTPRunner(Runner, smtpd.SMTPServer): def run(self): """See `IRunner`.""" - asyncore.loop() + asyncore.loop(use_poll=True) def stop(self): """See `IRunner`.""" diff --git a/src/mailman/testing/layers.py b/src/mailman/testing/layers.py index 3328efefc..d19d50c04 100644 --- a/src/mailman/testing/layers.py +++ b/src/mailman/testing/layers.py @@ -158,8 +158,11 @@ class ConfigLayer(MockAndMonkeyLayer): get_handler(sub_name).reopen(path) log.setLevel(logging.DEBUG) # If stderr debugging is enabled, make sure subprocesses are also - # more verbose. - if cls.stderr: + # more verbose. In general though, we still don't want SQLAlchemy + # debugging because it's just too verbose. Unfortunately, if you + # do want that level of debugging you currently have to manually + # modify this conditional. + if cls.stderr and sub_name != 'database': test_config += expand(dedent(""" [logging.$name] propagate: yes -- cgit v1.3.1