def METHOD_NAME(self, url):
    super_on_connect = super().METHOD_NAME(url)
    # pull the info we need from the URL early.  Even though URL
    # is immutable, we don't want any in-place changes to the URL
    # to affect things
    passphrase = url.password or ""
    url_query = dict(url.query)
    def on_connect(conn):
        cursor = conn.cursor()
        cursor.execute('pragma key="%s"' % passphrase)
        for prag in self.pragmas:
            value = url_query.get(prag, None)
            if value is not None:
                cursor.execute('pragma %s="%s"' % (prag, value))
        cursor.close()
        if super_on_connect:
            super_on_connect(conn)
    return on_connect