[Python-modules-commits] [dkimpy] 01/03: Import dkimpy_0.6.1.orig.tar.gz
Scott Kitterman
kitterman at moszumanska.debian.org
Thu Mar 2 23:39:13 UTC 2017
This is an automated email from the git hooks/post-receive script.
kitterman pushed a commit to branch master
in repository dkimpy.
commit ec31673f633ff352f9bb1e883a47764f6a344ff3
Author: Scott Kitterman <scott at kitterman.com>
Date: Thu Mar 2 17:13:54 2017 -0500
Import dkimpy_0.6.1.orig.tar.gz
---
ChangeLog | 4 ++++
PKG-INFO | 2 +-
README | 2 +-
arcverify.py | 6 +++---
dkim/dnsplug.py | 2 +-
dkim/tests/__init__.py | 2 ++
dkim/tests/{__init__.py => test_dnsplug.py} | 33 ++++++++++++-----------------
setup.py | 2 +-
8 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d904c5a..a93a42f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-01-27 Version 0.6.1
+ - Fixed python3 dns lookup issue
+ - Fixed arcverify.py issue
+
2017-01-23 Version 0.6.0
- Add capability to sign and verify ARC signatures
- Added new script, dknewkey.py, to generate DKIM keys
diff --git a/PKG-INFO b/PKG-INFO
index 9d0c223..3d14410 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: dkimpy
-Version: 0.6.0
+Version: 0.6.1
Summary: DKIM (DomainKeys Identified Mail)
Home-page: https://launchpad.net/dkimpy
Author: Scott Kitterman
diff --git a/README b/README
index 0cb650c..79686d2 100644
--- a/README
+++ b/README
@@ -11,7 +11,7 @@ signing and verification.
VERSION
-This is dkimpy 0.6.0.
+This is dkimpy 0.6.1.
REQUIREMENTS
diff --git a/arcverify.py b/arcverify.py
index f3bc4d5..3ed3b4f 100644
--- a/arcverify.py
+++ b/arcverify.py
@@ -40,10 +40,10 @@ message = sys.stdin.read()
verbose = '-v' in sys.argv
if verbose:
logging.basicConfig(level=10)
- d = dkim.ARC(message)
- cv, results, comment = d.verify()
+ a = dkim.ARC(message)
+ cv, results, comment = a.verify()
else:
- cv, results, comment = arc.verify(message)
+ cv, results, comment = dkim.arc_verify(message)
print("arc verification: cv=%s %s" % (cv, comment))
if verbose:
diff --git a/dkim/dnsplug.py b/dkim/dnsplug.py
index 8f258b0..3a90ac9 100644
--- a/dkim/dnsplug.py
+++ b/dkim/dnsplug.py
@@ -80,6 +80,6 @@ def get_txt(name):
except UnicodeDecodeError:
return None
txt = _get_txt(unicode_name)
- if txt:
+ if type(txt) is str:
txt = txt.encode('utf-8')
return txt
diff --git a/dkim/tests/__init__.py b/dkim/tests/__init__.py
index e0c9d63..40cb64a 100644
--- a/dkim/tests/__init__.py
+++ b/dkim/tests/__init__.py
@@ -30,6 +30,7 @@ def test_suite():
test_dkim,
test_util,
test_arc,
+ test_dnsplug,
)
modules = [
test_canonicalization,
@@ -37,6 +38,7 @@ def test_suite():
test_dkim,
test_util,
test_arc,
+ test_dnsplug,
]
suites = [x.test_suite() for x in modules]
return unittest.TestSuite(suites)
diff --git a/dkim/tests/__init__.py b/dkim/tests/test_dnsplug.py
similarity index 61%
copy from dkim/tests/__init__.py
copy to dkim/tests/test_dnsplug.py
index e0c9d63..102a151 100644
--- a/dkim/tests/__init__.py
+++ b/dkim/tests/test_dnsplug.py
@@ -14,29 +14,22 @@
# misrepresented as being the original software.
# 3. This notice may not be removed or altered from any source distribution.
#
-# Copyright (c) 2011 William Grant <me at williamgrant.id.au>
+# Copyright (c) 2017 Valimail Inc
+# Contact: Gene Shuman <gene at valimail.com>
#
-# This has been modified from the original software.
-# Copyright (c) 2016 Google, Inc.
-# Contact: Brandon Long <blong at google.com>
import unittest
+import dkim.dnsplug
+class TestDNSPlug(unittest.TestCase):
+
+ def test_get_txt(self):
+ dkim.dnsplug._get_txt = {"in": "out"}.get
+ res = dkim.dnsplug.get_txt(b"in")
+
+ self.assertEqual(res, b"out")
def test_suite():
- from dkim.tests import (
- test_canonicalization,
- test_crypto,
- test_dkim,
- test_util,
- test_arc,
- )
- modules = [
- test_canonicalization,
- test_crypto,
- test_dkim,
- test_util,
- test_arc,
- ]
- suites = [x.test_suite() for x in modules]
- return unittest.TestSuite(suites)
+ from unittest import TestLoader
+ return TestLoader().loadTestsFromName(__name__)
+
diff --git a/setup.py b/setup.py
index fa0c3f7..5bb6d5c 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@
from distutils.core import setup
import os
-version = "0.6.0"
+version = "0.6.1"
setup(
name = "dkimpy",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/dkimpy.git
More information about the Python-modules-commits
mailing list