[arch-commits] Commit in python-dnspython/repos (5 files)

Jelle van der Waa jelle at gemini.archlinux.org
Fri Sep 17 08:28:25 UTC 2021


    Date: Friday, September 17, 2021 @ 08:28:25
  Author: jelle
Revision: 1016737

db-move: moved python-dnspython from [community-testing] to [community] (any)

Added:
  python-dnspython/repos/community-any/PKGBUILD
    (from rev 1016736, python-dnspython/repos/community-testing-any/PKGBUILD)
  python-dnspython/repos/community-any/py39.patch
    (from rev 1016736, python-dnspython/repos/community-testing-any/py39.patch)
Deleted:
  python-dnspython/repos/community-any/PKGBUILD
  python-dnspython/repos/community-any/py39.patch
  python-dnspython/repos/community-testing-any/

--------------------------+
 /PKGBUILD                |   48 +++++++++++++++++++++++++++
 /py39.patch              |   79 +++++++++++++++++++++++++++++++++++++++++++++
 community-any/PKGBUILD   |   51 -----------------------------
 community-any/py39.patch |   79 ---------------------------------------------
 4 files changed, 127 insertions(+), 130 deletions(-)

Deleted: community-any/PKGBUILD
===================================================================
--- community-any/PKGBUILD	2021-09-17 04:03:55 UTC (rev 1016736)
+++ community-any/PKGBUILD	2021-09-17 08:28:25 UTC (rev 1016737)
@@ -1,51 +0,0 @@
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Contributor: Mathijs Kadijk <maccain13 at gmail.com>
-
-_name=dnspython
-pkgname=python-dnspython
-# IMPORTANT: stay on 1.16 for https://github.com/eventlet/eventlet/issues/619
-pkgver=1.16.0
-pkgrel=3
-epoch=1
-pkgdesc="A DNS toolkit for Python"
-arch=('any')
-url="http://www.dnspython.org"
-license=('ISC')
-depends=('python')
-makedepends=('python-setuptools')
-checkdepends=('python-idna' 'python-pycryptodome' 'python-ecdsa') # 'python-trio')
-optdepends=('python-ecdsa: DNSSEC support'
-            'python-pycryptodome: DNSSEC support'
-            'python-idna: support for updated IDNA 2008')
-#            'python-trio: async support'
-#            'python-sniffio: async support')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.zip"
-        py39.patch)
-sha256sums=('36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01'
-            '243f735d32f403f6032d4c51b12c1f39c1a8f32d4b5cc9cb4d52c43f07e3296e')
-validpgpkeys=('A580DEE052FEC78D8ACF383DF24B3AFC8CA2F5C7') # Bob Halley <halley at dnspython.org>
-
-prepare() {
-    cd dnspython-${pkgver}
-
-    patch -Np1 -i ../py39.patch
-}
-
-build() {
-    cd dnspython-${pkgver}
-
-    python setup.py build
-}
-
-check() {
-    cd dnspython-${pkgver}
-
-    python setup.py test
-}
-
-package() {
-    cd dnspython-${pkgver}
-
-    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
-    install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
-}

Copied: python-dnspython/repos/community-any/PKGBUILD (from rev 1016736, python-dnspython/repos/community-testing-any/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2021-09-17 08:28:25 UTC (rev 1016737)
@@ -0,0 +1,48 @@
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: Mathijs Kadijk <maccain13 at gmail.com>
+
+_name=dnspython
+pkgname=python-dnspython
+pkgver=2.1.0
+pkgrel=1
+epoch=1
+pkgdesc="A DNS toolkit for Python"
+arch=('any')
+url="http://www.dnspython.org"
+license=('ISC')
+depends=('python')
+makedepends=('python-setuptools')
+checkdepends=('python-idna' 'python-cryptography' 'python-trio' 'python-pytest')
+optdepends=('python-cryptography: DNSSEC support'
+            'python-requests-toolbelt: DoH support'
+            'python-idna: support for updated IDNA 2008'
+            'python-curio: async support'
+            'python-trio: async support'
+            'python-sniffio: async support')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.zip")
+sha256sums=('e4a87f0b573201a0f3727fa18a516b055fd1107e0e5477cded4a2de497df1dd4')
+validpgpkeys=('A580DEE052FEC78D8ACF383DF24B3AFC8CA2F5C7') # Bob Halley <halley at dnspython.org>
+
+prepare() {
+    cd dnspython-${pkgver}
+}
+
+build() {
+    cd dnspython-${pkgver}
+
+    python setup.py build
+}
+
+check() {
+    cd dnspython-${pkgver}
+
+    # https://github.com/rthalley/dnspython/issues/622
+    pytest -k 'not test_unpickle'
+}
+
+package() {
+    cd dnspython-${pkgver}
+
+    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+    install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}

Deleted: community-any/py39.patch
===================================================================
--- community-any/py39.patch	2021-09-17 04:03:55 UTC (rev 1016736)
+++ community-any/py39.patch	2021-09-17 08:28:25 UTC (rev 1016737)
@@ -1,79 +0,0 @@
-From f565c1120bc8f823ce2c6e21d5aeea412afaec6e Mon Sep 17 00:00:00 2001
-From: Evangelos Foutras <evangelos at foutrelis.com>
-Date: Thu, 3 Dec 2020 18:17:51 +0200
-Subject: [PATCH] Use base64.decodebytes() and base64.encodebytes().  [Issue
- #338]
-
-This commit also adds test coverage for tsigkeyring, and fixes to_text()
-on python 3, which had never worked properly due to an extra .decode().
-
-(cherry picked from commit f93c8c6ad41d38ccd19335a5a0a396cbaa409caf)
----
- dns/tsigkeyring.py        |  7 ++++---
- tests/test_tsigkeyring.py | 33 +++++++++++++++++++++++++++++++++
- 2 files changed, 37 insertions(+), 3 deletions(-)
- create mode 100644 tests/test_tsigkeyring.py
-
-diff --git a/dns/tsigkeyring.py b/dns/tsigkeyring.py
-index 5e5fe1c..74ff667 100644
---- a/dns/tsigkeyring.py
-+++ b/dns/tsigkeyring.py
-@@ -32,7 +32,7 @@ def from_text(textring):
-     keyring = {}
-     for keytext in textring:
-         keyname = dns.name.from_text(keytext)
--        secret = base64.decodestring(maybe_encode(textring[keytext]))
-+        secret = base64.decodebytes(maybe_encode(textring[keytext]))
-         keyring[keyname] = secret
-     return keyring
- 
-@@ -44,7 +44,8 @@ def to_text(keyring):
- 
-     textring = {}
-     for keyname in keyring:
--        keytext = maybe_decode(keyname.to_text())
--        secret = maybe_decode(base64.encodestring(keyring[keyname]))
-+        keytext = keyname.to_text()
-+        # rstrip to get rid of the \n encoding adds
-+        secret = maybe_decode(base64.encodebytes(keyring[keyname])).rstrip()
-         textring[keytext] = secret
-     return textring
-diff --git a/tests/test_tsigkeyring.py b/tests/test_tsigkeyring.py
-new file mode 100644
-index 0000000..ce8888d
---- /dev/null
-+++ b/tests/test_tsigkeyring.py
-@@ -0,0 +1,33 @@
-+# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
-+
-+import base64
-+import unittest
-+
-+import dns.tsigkeyring
-+
-+text_keyring = {
-+    'keyname.' : 'NjHwPsMKjdN++dOfE5iAiQ=='
-+}
-+
-+rich_keyring = {
-+    dns.name.from_text('keyname.') : \
-+    base64.decodebytes('NjHwPsMKjdN++dOfE5iAiQ=='.encode())
-+}
-+
-+class TSIGKeyRingTestCase(unittest.TestCase):
-+
-+    def test_from_text(self):
-+        """text keyring -> rich keyring"""
-+        rkeyring = dns.tsigkeyring.from_text(text_keyring)
-+        self.assertEqual(rkeyring, rich_keyring)
-+
-+    def test_to_text(self):
-+        """text keyring -> rich keyring -> text keyring"""
-+        tkeyring = dns.tsigkeyring.to_text(rich_keyring)
-+        self.assertEqual(tkeyring, text_keyring)
-+
-+    def test_from_and_to_text(self):
-+        """text keyring -> rich keyring -> text keyring"""
-+        rkeyring = dns.tsigkeyring.from_text(text_keyring)
-+        tkeyring = dns.tsigkeyring.to_text(rkeyring)
-+        self.assertEqual(tkeyring, text_keyring)

Copied: python-dnspython/repos/community-any/py39.patch (from rev 1016736, python-dnspython/repos/community-testing-any/py39.patch)
===================================================================
--- community-any/py39.patch	                        (rev 0)
+++ community-any/py39.patch	2021-09-17 08:28:25 UTC (rev 1016737)
@@ -0,0 +1,79 @@
+From f565c1120bc8f823ce2c6e21d5aeea412afaec6e Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos at foutrelis.com>
+Date: Thu, 3 Dec 2020 18:17:51 +0200
+Subject: [PATCH] Use base64.decodebytes() and base64.encodebytes().  [Issue
+ #338]
+
+This commit also adds test coverage for tsigkeyring, and fixes to_text()
+on python 3, which had never worked properly due to an extra .decode().
+
+(cherry picked from commit f93c8c6ad41d38ccd19335a5a0a396cbaa409caf)
+---
+ dns/tsigkeyring.py        |  7 ++++---
+ tests/test_tsigkeyring.py | 33 +++++++++++++++++++++++++++++++++
+ 2 files changed, 37 insertions(+), 3 deletions(-)
+ create mode 100644 tests/test_tsigkeyring.py
+
+diff --git a/dns/tsigkeyring.py b/dns/tsigkeyring.py
+index 5e5fe1c..74ff667 100644
+--- a/dns/tsigkeyring.py
++++ b/dns/tsigkeyring.py
+@@ -32,7 +32,7 @@ def from_text(textring):
+     keyring = {}
+     for keytext in textring:
+         keyname = dns.name.from_text(keytext)
+-        secret = base64.decodestring(maybe_encode(textring[keytext]))
++        secret = base64.decodebytes(maybe_encode(textring[keytext]))
+         keyring[keyname] = secret
+     return keyring
+ 
+@@ -44,7 +44,8 @@ def to_text(keyring):
+ 
+     textring = {}
+     for keyname in keyring:
+-        keytext = maybe_decode(keyname.to_text())
+-        secret = maybe_decode(base64.encodestring(keyring[keyname]))
++        keytext = keyname.to_text()
++        # rstrip to get rid of the \n encoding adds
++        secret = maybe_decode(base64.encodebytes(keyring[keyname])).rstrip()
+         textring[keytext] = secret
+     return textring
+diff --git a/tests/test_tsigkeyring.py b/tests/test_tsigkeyring.py
+new file mode 100644
+index 0000000..ce8888d
+--- /dev/null
++++ b/tests/test_tsigkeyring.py
+@@ -0,0 +1,33 @@
++# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
++
++import base64
++import unittest
++
++import dns.tsigkeyring
++
++text_keyring = {
++    'keyname.' : 'NjHwPsMKjdN++dOfE5iAiQ=='
++}
++
++rich_keyring = {
++    dns.name.from_text('keyname.') : \
++    base64.decodebytes('NjHwPsMKjdN++dOfE5iAiQ=='.encode())
++}
++
++class TSIGKeyRingTestCase(unittest.TestCase):
++
++    def test_from_text(self):
++        """text keyring -> rich keyring"""
++        rkeyring = dns.tsigkeyring.from_text(text_keyring)
++        self.assertEqual(rkeyring, rich_keyring)
++
++    def test_to_text(self):
++        """text keyring -> rich keyring -> text keyring"""
++        tkeyring = dns.tsigkeyring.to_text(rich_keyring)
++        self.assertEqual(tkeyring, text_keyring)
++
++    def test_from_and_to_text(self):
++        """text keyring -> rich keyring -> text keyring"""
++        rkeyring = dns.tsigkeyring.from_text(text_keyring)
++        tkeyring = dns.tsigkeyring.to_text(rkeyring)
++        self.assertEqual(tkeyring, text_keyring)



More information about the arch-commits mailing list