Author David Ford (FirefighterBlu3)
Recipients David Ford (FirefighterBlu3)
Date 2017-02-15.03:11:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487128296.48.0.945171350707.issue29564@psf.upfronthosting.co.za>
In-reply-to
Content
the following warning is incorrectly reported as initiated at psycopg2/extras.py:314, it actually occurs inside the Twilio python module.

/usr/lib/python3.6/site-packages/psycopg2/extras.py:314: ResourceWarning: unclosed <ssl.SSLSocket fd=10, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('173.12.76.132', 39350), raddr=('52.72.8.76', 443)>
  ts = super(NamedTupleCursor, self).fetchall()
namedtuple_Record:19: ResourceWarning: unclosed <ssl.SSLSocket fd=10, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('173.12.76.132', 57692), raddr=('107.23.182.60', 443)>



This is the snippet of my code which makes the Twilio API call over https (noted by the >>> line).

            # get failed/undelivered
            with (yield from self.aiopg_pool.cursor(cursor_factory=psycopg2.extras.NamedTupleCursor)) as c:
                yield from c.execute(stmt_bad, (id,))
                rows = yield from c.fetchall()

            # make calls to twilio and fetch failure reasons
            for r in rows:
>>>             msg = self._twilio.messages.get(r.delivery_id)
                errors[r.delivery_id] = r.recipient, msg.error_code, msg.error_message


my tool uses crossbar.io's python-autobahn asyncio classes which do not use threading to my knowledge. psycopg2/pool.py does use threading. python-twilio does not use threading either.
History
Date User Action Args
2017-02-15 03:11:36David Ford (FirefighterBlu3)setrecipients: + David Ford (FirefighterBlu3)
2017-02-15 03:11:36David Ford (FirefighterBlu3)setmessageid: <1487128296.48.0.945171350707.issue29564@psf.upfronthosting.co.za>
2017-02-15 03:11:36David Ford (FirefighterBlu3)linkissue29564 messages
2017-02-15 03:11:34David Ford (FirefighterBlu3)create