[Python-modules-commits] r17496 - in packages/pydkim/trunk/debian (3 files)

kitterman at users.alioth.debian.org kitterman at users.alioth.debian.org
Fri Jun 17 14:03:07 UTC 2011


    Date: Friday, June 17, 2011 @ 14:03:05
  Author: kitterman
Revision: 17496

pydkim (0.4.2-1) unstable; urgency=low

  * New upstream release
    - Drop debian/patches/dns-namespace.patch, incorporated upstream

 -- Scott Kitterman <scott at kitterman.com>  Fri, 17 Jun 2011 08:36:05 -0500

Modified:
  packages/pydkim/trunk/debian/changelog
  packages/pydkim/trunk/debian/patches/series
Deleted:
  packages/pydkim/trunk/debian/patches/dns-namespace.patch

Modified: packages/pydkim/trunk/debian/changelog
===================================================================
--- packages/pydkim/trunk/debian/changelog	2011-06-17 13:54:46 UTC (rev 17495)
+++ packages/pydkim/trunk/debian/changelog	2011-06-17 14:03:05 UTC (rev 17496)
@@ -1,3 +1,10 @@
+pydkim (0.4.2-1) unstable; urgency=low
+
+  * New upstream release
+    - Drop debian/patches/dns-namespace.patch, incorporated upstream
+
+ -- Scott Kitterman <scott at kitterman.com>  Fri, 17 Jun 2011 08:36:05 -0500
+
 pydkim (0.4.1-1) unstable; urgency=low
 
   * New upstream release

Deleted: packages/pydkim/trunk/debian/patches/dns-namespace.patch
===================================================================
--- packages/pydkim/trunk/debian/patches/dns-namespace.patch	2011-06-17 13:54:46 UTC (rev 17495)
+++ packages/pydkim/trunk/debian/patches/dns-namespace.patch	2011-06-17 14:03:05 UTC (rev 17496)
@@ -1,191 +0,0 @@
-Fix namespace conflict between dns (dnspythong) and dkim/dns.py by renaming
-dkim/dns.py.  Cherrypick from upstream.
-Index: pydkim-0.4.1/dkim/__init__.py
-===================================================================
---- pydkim-0.4.1.orig/dkim/__init__.py	2011-06-16 14:35:15.026408226 -0500
-+++ pydkim-0.4.1/dkim/__init__.py	2011-06-16 14:35:51.798408215 -0500
-@@ -38,7 +38,7 @@
-     RSASSA_PKCS1_v1_5_verify,
-     UnparsableKeyError,
-     )
--from dkim.dns import get_txt
-+from dkim.dnsplug import get_txt
- from dkim.util import (
-     get_default_logger,
-     InvalidTagValueList,
-Index: pydkim-0.4.1/dkim/dns.py
-===================================================================
---- pydkim-0.4.1.orig/dkim/dns.py	2011-06-16 14:34:38.754408238 -0500
-+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
-@@ -1,83 +0,0 @@
--# This software is provided 'as-is', without any express or implied
--# warranty.  In no event will the author be held liable for any damages
--# arising from the use of this software.
--#
--# Permission is granted to anyone to use this software for any purpose,
--# including commercial applications, and to alter it and redistribute it
--# freely, subject to the following restrictions:
--#
--# 1. The origin of this software must not be misrepresented; you must not
--#    claim that you wrote the original software. If you use this software
--#    in a product, an acknowledgment in the product documentation would be
--#    appreciated but is not required.
--# 2. Altered source versions must be plainly marked as such, and must not be
--#    misrepresented as being the original software.
--# 3. This notice may not be removed or altered from any source distribution.
--#
--# Copyright (c) 2008 Greg Hewgill http://hewgill.com
--#
--# This has been modified from the original software.
--# Copyright (c) 2011 William Grant <me at williamgrant.id.au>
--
--
--__all__ = [
--    'get_txt'
--    ]
--
--
--def get_txt_dnspython(name):
--    """Return a TXT record associated with a DNS name."""
--    a = dns.resolver.query(name, dns.rdatatype.TXT)
--    for r in a.response.answer:
--        if r.rdtype == dns.rdatatype.TXT:
--            return b"".join(r.items[0].strings)
--    return None
--
--
--def get_txt_pydns(name):
--    """Return a TXT record associated with a DNS name."""
--    # Older pydns releases don't like a trailing dot.
--    if name.endswith('.'):
--        name = name[:-1]
--    response = DNS.DnsRequest(name, qtype='txt').req()
--    if not response.answers:
--        return None
--    return b''.join(response.answers[0]['data'])
--
--def get_txt_Milter_dns(name):
--    """Return a TXT record associated with a DNS name."""
--    # Older pydns releases don't like a trailing dot.
--    if name.endswith('.'):
--        name = name[:-1]
--    sess = Session()
--    a = sess.dns(name,'TXT')
--    if a: return b''.join(a[0])
--    return None
--
--# Prefer dnspython if it's there, otherwise use pydns.
--try:
--    import dns.resolver
--    _get_txt = get_txt_dnspython
--except ImportError:
--    try:
--        from Milter.dns import Session
--        _get_txt = get_txt_Milter_dns
--    except ImportError:
--        import DNS
--        DNS.DiscoverNameServers()
--        _get_txt = get_txt_pydns
--
--def get_txt(name):
--    """Return a TXT record associated with a DNS name.
--
--    @param name: The bytestring domain name to look up.
--    """
--    # pydns needs Unicode, but DKIM's d= is ASCII (already punycoded).
--    try:
--        unicode_name = name.decode('ascii')
--    except UnicodeDecodeError:
--        return None
--    txt = _get_txt(unicode_name)
--    if txt:
--      txt = txt.encode('utf-8')
--    return txt
-Index: pydkim-0.4.1/dkim/dnsplug.py
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ pydkim-0.4.1/dkim/dnsplug.py	2011-06-15 09:40:41.000000000 -0500
-@@ -0,0 +1,83 @@
-+# This software is provided 'as-is', without any express or implied
-+# warranty.  In no event will the author be held liable for any damages
-+# arising from the use of this software.
-+#
-+# Permission is granted to anyone to use this software for any purpose,
-+# including commercial applications, and to alter it and redistribute it
-+# freely, subject to the following restrictions:
-+#
-+# 1. The origin of this software must not be misrepresented; you must not
-+#    claim that you wrote the original software. If you use this software
-+#    in a product, an acknowledgment in the product documentation would be
-+#    appreciated but is not required.
-+# 2. Altered source versions must be plainly marked as such, and must not be
-+#    misrepresented as being the original software.
-+# 3. This notice may not be removed or altered from any source distribution.
-+#
-+# Copyright (c) 2008 Greg Hewgill http://hewgill.com
-+#
-+# This has been modified from the original software.
-+# Copyright (c) 2011 William Grant <me at williamgrant.id.au>
-+
-+
-+__all__ = [
-+    'get_txt'
-+    ]
-+
-+
-+def get_txt_dnspython(name):
-+    """Return a TXT record associated with a DNS name."""
-+    a = dns.resolver.query(name, dns.rdatatype.TXT)
-+    for r in a.response.answer:
-+        if r.rdtype == dns.rdatatype.TXT:
-+            return b"".join(r.items[0].strings)
-+    return None
-+
-+
-+def get_txt_pydns(name):
-+    """Return a TXT record associated with a DNS name."""
-+    # Older pydns releases don't like a trailing dot.
-+    if name.endswith('.'):
-+        name = name[:-1]
-+    response = DNS.DnsRequest(name, qtype='txt').req()
-+    if not response.answers:
-+        return None
-+    return b''.join(response.answers[0]['data'])
-+
-+def get_txt_Milter_dns(name):
-+    """Return a TXT record associated with a DNS name."""
-+    # Older pydns releases don't like a trailing dot.
-+    if name.endswith('.'):
-+        name = name[:-1]
-+    sess = Session()
-+    a = sess.dns(name,'TXT')
-+    if a: return b''.join(a[0])
-+    return None
-+
-+# Prefer dnspython if it's there, otherwise use pydns.
-+try:
-+    import dns.resolver
-+    _get_txt = get_txt_dnspython
-+except ImportError:
-+    try:
-+        from Milter.dns import Session
-+        _get_txt = get_txt_Milter_dns
-+    except ImportError:
-+        import DNS
-+        DNS.DiscoverNameServers()
-+        _get_txt = get_txt_pydns
-+
-+def get_txt(name):
-+    """Return a TXT record associated with a DNS name.
-+
-+    @param name: The bytestring domain name to look up.
-+    """
-+    # pydns needs Unicode, but DKIM's d= is ASCII (already punycoded).
-+    try:
-+        unicode_name = name.decode('ascii')
-+    except UnicodeDecodeError:
-+        return None
-+    txt = _get_txt(unicode_name)
-+    if txt:
-+      txt = txt.encode('utf-8')
-+    return txt

Modified: packages/pydkim/trunk/debian/patches/series
===================================================================
--- packages/pydkim/trunk/debian/patches/series	2011-06-17 13:54:46 UTC (rev 17495)
+++ packages/pydkim/trunk/debian/patches/series	2011-06-17 14:03:05 UTC (rev 17496)
@@ -1,2 +1 @@
-dns-namespace.patch
 adjust-setup.py.patch




More information about the Python-modules-commits mailing list