If you feed it bytes, it works fine: >>> print(message) b'Authentication-Results: lists.example.org; arc=none; spf=pass smtp.mfrom=jqd@d1.example; dkim=pass (1024-bit key) header.i=@d1.example; dmarc=pass\nReceived: from localhost\nMessage-ID: <exam...@example.com>\nDate: Mon, 01 Jan 2011 01:02:03 +0400\nFrom: Test User <t...@example.com>\nTo: someb...@example.com\nSubject: Testing\n\nThis is a test message.\n' >>> sig = dkim.dkim_sign(message, b"test", b"example.com", key)
** Changed in: dkimpy Status: New => Invalid ** Changed in: dkimpy (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1782416 Title: Python3 Compat Problem: "Cannot use a bytes pattern on a string-like object" To manage notifications about this bug go to: https://bugs.launchpad.net/dkimpy/+bug/1782416/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs