'TransportPool' object has no attribute '_log'
homeworkprod opened this issue · comments
Jochen Kupperschmidt commented
Hey Alice, I came across an error on the current next
branch with Python 3.9 that I couldn't yet figure out.
I so far encountered it in a pytest run, so this is actually pytest output. Maybe not ideal, but I hope it makes sense to you anyway.
myproject/email.py:26: in init_app
app.marrowmailer = Mailer(mailer_config)
venv/lib/python3.9/site-packages/marrow/mailer/__init__.py:47: in __init__
self.manager = Manager(manager_config, partial(Transport, transport_config))
venv/lib/python3.9/site-packages/marrow/mailer/manager/immediate.py:18: in __init__
self.transport = TransportPool(Transport)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <marrow.mailer.manager.util.TransportPool object at 0x7fd3ecd1b220>, factory = functools.partial(<class 'marrow.mailer.transport.mock.MockTransport'>, {'use': 'mock'})
def __init__(self, factory):
self.factory = factory
self.transports = queue.Queue()
> self._log = getLogger(__name__)
E AttributeError: 'TransportPool' object has no attribute '_log'
venv/lib/python3.9/site-packages/marrow/mailer/manager/util.py:23: AttributeError
Thanks for looking into it!
Alice Zoë Bevan–McGregor commented
Jochen Kupperschmidt commented
Thanks! It didn't really occur to me to look at the slots.