Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-aiodns for openSUSE:Factory 
checked in at 2021-07-10 22:53:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-aiodns (Old)
 and      /work/SRC/openSUSE:Factory/.python-aiodns.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-aiodns"

Sat Jul 10 22:53:48 2021 rev:6 rq:902289 version:3.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-aiodns/python-aiodns.changes      
2020-07-09 13:21:38.457700723 +0200
+++ /work/SRC/openSUSE:Factory/.python-aiodns.new.2625/python-aiodns.changes    
2021-07-10 22:53:56.640017169 +0200
@@ -1,0 +2,26 @@
+Wed Jun 16 13:48:13 UTC 2021 - John Paul Adrian Glaubitz 
<[email protected]>
+
+- Update to 3.0.0
+  * Release wheels and source to PyPI with GH actions
+  * Try to make tests more resilient
+  * Don't build universal wheels
+  * Migrate CI to GH Actions
+  * Fix TXT CHAOS test
+  * Add support for CAA queries
+  * Support Python >= 3.6
+  * Bump pycares dependency
+  * Drop tasks.py
+  * Allow specifying dnsclass for queries
+  * Set URL to https
+  * Add license args in setup.py
+  * Converted Type Annotations to Py3 syntax Closes
+  * Only run mypy on cpython versions
+  * Also fix all type errors with latest mypy - pycares seems to have
+    no typing / stubs so lets ignore it via `mypy.ini`
+  * setup: typing exists since Python 3.5
+  * Fix type annotation of gethostbyname()
+  * Updated README
+- Drop patches for issues fixed upstream
+  * python-aiodns-2.0.0-fix-typing-dependency.patch
+
+-------------------------------------------------------------------

Old:
----
  aiodns-2.0.0.tar.gz
  python-aiodns-2.0.0-fix-typing-dependency.patch

New:
----
  aiodns-3.0.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-aiodns.spec ++++++
--- /var/tmp/diff_new_pack.ZqLdPP/_old  2021-07-10 22:53:57.240012538 +0200
+++ /var/tmp/diff_new_pack.ZqLdPP/_new  2021-07-10 22:53:57.244012507 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-aiodns
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -22,17 +22,15 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-aiodns
-Version:        2.0.0
+Version:        3.0.0
 Release:        0
 Summary:        Simple DNS resolver for asyncio
 License:        MIT
 Group:          Development/Libraries/Python
 URL:            https://github.com/saghul/aiodns/releases
 Source0:        
https://github.com/saghul/aiodns/archive/aiodns-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM python-aiodns-2.0.0-fix-typing-dependency.patch 
gh#saghul/aiodns/issues/71 -- [email protected]
-Patch0:         python-aiodns-2.0.0-fix-typing-dependency.patch
 BuildRequires:  %{python_module setuptools}
-Requires:       python-pycares >= 3.0.0
+Requires:       python-pycares >= 4.0.0
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 %if %{with tests}
@@ -48,7 +46,6 @@
 
 %prep
 %setup -q -n aiodns-aiodns-%{version}
-%patch0 -p1
 
 %build
 %python_build

++++++ aiodns-2.0.0.tar.gz -> aiodns-3.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiodns-aiodns-2.0.0/.github/workflows/ci.yml 
new/aiodns-aiodns-3.0.0/.github/workflows/ci.yml
--- old/aiodns-aiodns-2.0.0/.github/workflows/ci.yml    1970-01-01 
01:00:00.000000000 +0100
+++ new/aiodns-aiodns-3.0.0/.github/workflows/ci.yml    2021-05-14 
10:49:48.000000000 +0200
@@ -0,0 +1,27 @@
+name: CI
+
+on: [pull_request]
+
+jobs:
+  build:
+    name: Test on ${{ matrix.os }} / Python ${{ matrix.python-version }}
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-20.04, windows-2019, macos-10.15]
+        python-version: [ '3.6', '3.7', '3.8', '3.9', 'pypy-3.6', 'pypy-3.7' ]
+    steps:
+    - uses: actions/checkout@v2
+      with:
+        submodules: true
+    - name: Setup Python
+      uses: actions/setup-python@v2
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Build package
+      run: python setup.py install
+    - name: Run tests
+      run: python tests.py
+    - name: Run mypy tests
+      run: python mypy_run.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aiodns-aiodns-2.0.0/.github/workflows/release-wheels.yml 
new/aiodns-aiodns-3.0.0/.github/workflows/release-wheels.yml
--- old/aiodns-aiodns-2.0.0/.github/workflows/release-wheels.yml        
1970-01-01 01:00:00.000000000 +0100
+++ new/aiodns-aiodns-3.0.0/.github/workflows/release-wheels.yml        
2021-05-14 10:49:48.000000000 +0200
@@ -0,0 +1,55 @@
+name: Release Wheels
+
+on:
+  release:
+    types:
+      - published
+
+jobs:
+  build_wheels:
+    name: Build wheels
+    runs-on: ubuntu-20.04
+
+    steps:
+      - uses: actions/checkout@v2
+      - uses: actions/setup-python@v2
+        name: Install Python
+        with:
+          python-version: '3.8'
+      - run: pip install wheel
+      - name: Build wheels
+        run: python setup.py bdist_wheel
+      - uses: actions/upload-artifact@v2
+        with:
+          path: dist/*.whl
+
+  build_sdist:
+    name: Build source distribution
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+      - uses: actions/setup-python@v2
+        name: Install Python
+        with:
+          python-version: '3.8'
+      - name: Build sdist
+        run: python setup.py sdist
+      - uses: actions/upload-artifact@v2
+        with:
+          path: dist/*.tar.gz
+
+  upload_pypi:
+    needs: [build_wheels, build_sdist]
+    runs-on: ubuntu-20.04
+    # upload to PyPI when a GitHub Release is created
+    if: github.event_name == 'release' && github.event.action == 'published'
+    steps:
+      - uses: actions/download-artifact@v2
+        with:
+          name: artifact
+          path: dist
+
+      - uses: pypa/gh-action-pypi-publish@master
+        with:
+          user: __token__
+          password: ${{ secrets.pypi_password }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiodns-aiodns-2.0.0/.gitignore 
new/aiodns-aiodns-3.0.0/.gitignore
--- old/aiodns-aiodns-2.0.0/.gitignore  2019-03-02 13:01:34.000000000 +0100
+++ new/aiodns-aiodns-3.0.0/.gitignore  2021-05-14 10:49:48.000000000 +0200
@@ -18,4 +18,4 @@
 .tox/
 deps/
 docs/_build/
-
+.mypy_cache/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiodns-aiodns-2.0.0/.travis.yml 
new/aiodns-aiodns-3.0.0/.travis.yml
--- old/aiodns-aiodns-2.0.0/.travis.yml 2019-03-02 13:01:34.000000000 +0100
+++ new/aiodns-aiodns-3.0.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-language: python
-sudo: false
-
-matrix:
-  include:
-    - python: 3.5
-    - python: 3.6
-    - python: 3.7
-      dist: xenial
-      sudo: true
-    - python: pypy3
-branches:
-  only:
-    - master
-
-before_install:
-  - pip install -U setuptools pip wheel
-
-install:
-  - python -V
-  - pip install .
-
-script:
-  - ./tests.py
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiodns-aiodns-2.0.0/ChangeLog 
new/aiodns-aiodns-3.0.0/ChangeLog
--- old/aiodns-aiodns-2.0.0/ChangeLog   2019-03-02 13:01:34.000000000 +0100
+++ new/aiodns-aiodns-3.0.0/ChangeLog   2021-05-14 10:49:48.000000000 +0200
@@ -1,3 +1,24 @@
+3.0.0
+=====
+- Release wheels and source to PyPI with GH actions
+- Try to make tests more resilient
+- Don't build universal wheels
+- Migrate CI to GH Actions
+- Fix TXT CHAOS test
+- Add support for CAA queries
+- Support Python >= 3.6
+- Bump pycares dependency
+- Drop tasks.py
+- Allow specifying dnsclass for queries
+- Set URL to https
+- Add license args in setup.py
+- Converted Type Annotations to Py3 syntax Closes
+- Only run mypy on cpython versions
+- Also fix all type errors with latest mypy - pycares seems to have no typing 
/ stubs so lets ignore it via `mypy.ini`
+- setup: typing exists since Python 3.5
+- Fix type annotation of gethostbyname()
+- Updated README
+
 2.0.0
 =====
 (changes since version 1.x)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiodns-aiodns-2.0.0/README.rst 
new/aiodns-aiodns-3.0.0/README.rst
--- old/aiodns-aiodns-2.0.0/README.rst  2019-03-02 13:01:34.000000000 +0100
+++ new/aiodns-aiodns-3.0.0/README.rst  2021-05-14 10:49:48.000000000 +0200
@@ -2,8 +2,11 @@
 Simple DNS resolver for asyncio
 ===============================
 
-.. image:: https://secure.travis-ci.org/saghul/aiodns.png?branch=master
-    :target: http://travis-ci.org/saghul/aiodns
+.. image:: https://badge.fury.io/py/aiodns.png
+    :target: https://pypi.org/project/aiodns/
+
+.. image:: https://github.com/saghul/aiodns/workflows/CI/badge.svg
+    :target: https://github.com/saghul/aiodns/actions
 
 aiodns provides a simple way for doing asynchronous DNS resolutions using 
`pycares <https://github.com/saghul/pycares>`_.
 
@@ -11,7 +14,7 @@
 Example
 =======
 
-::
+.. code:: python
 
     import asyncio
     import aiodns
@@ -26,7 +29,7 @@
     result = loop.run_until_complete(coro)
 
 
-The following query types are supported: A, AAAA, ANY, CNAME, MX, NAPTR, NS, 
PTR, SOA, SRV, TXT.
+The following query types are supported: A, AAAA, ANY, CAA, CNAME, MX, NAPTR, 
NS, PTR, SOA, SRV, TXT.
 
 
 API
@@ -37,7 +40,8 @@
 * ``query(host, type)``: Do a DNS resolution of the given type for the given 
hostname. It returns an
   instance of ``asyncio.Future``. The actual result of the DNS query is taken 
directly from pycares.
   As of version 1.0.0 of aiodns (and pycares, for that matter) results are 
always namedtuple-like
-  objects with different attributes. Please check `the documentation 
<http://pycares.readthedocs.org/en/latest/channel.html#pycares.Channel.query>`_
+  objects with different attributes. Please check the `documentation 
+  
<http://pycares.readthedocs.org/en/latest/channel.html#pycares.Channel.query>`_
   for the result fields.
 * ``gethostbyname(host, socket_family)``: Do a DNS resolution for the given
   hostname and the desired type of address family (i.e. ``socket.AF_INET``).
@@ -72,7 +76,7 @@
 Python versions
 ===============
 
-Python >= 3.5 are supported.
+Python >= 3.6 are supported.
 
 
 Contributing
@@ -81,4 +85,3 @@
 If you'd like to contribute, fork the project, make a patch and send a pull
 request. Have a look at the surrounding code and please, make yours look
 alike :-)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiodns-aiodns-2.0.0/aiodns/__init__.py 
new/aiodns-aiodns-3.0.0/aiodns/__init__.py
--- old/aiodns-aiodns-2.0.0/aiodns/__init__.py  2019-03-02 13:01:34.000000000 
+0100
+++ new/aiodns-aiodns-3.0.0/aiodns/__init__.py  2021-05-14 10:49:48.000000000 
+0200
@@ -2,18 +2,19 @@
 import asyncio
 import functools
 import pycares
+import socket
 
 from typing import (
     Any,
     List,
     Optional,
+    Set
 )
 
-# TODO: Work out mypy no attribute error and remove ignore
-from . import error # type: ignore
+from . import error
 
 
-__version__ = '2.0.0'
+__version__ = '3.0.0'
 
 __all__ = ('DNSResolver', 'error')
 
@@ -24,6 +25,7 @@
 query_type_map = {'A'     : pycares.QUERY_TYPE_A,
                   'AAAA'  : pycares.QUERY_TYPE_AAAA,
                   'ANY'   : pycares.QUERY_TYPE_ANY,
+                  'CAA'   : pycares.QUERY_TYPE_CAA,
                   'CNAME' : pycares.QUERY_TYPE_CNAME,
                   'MX'    : pycares.QUERY_TYPE_MX,
                   'NAPTR' : pycares.QUERY_TYPE_NAPTR,
@@ -34,10 +36,17 @@
                   'TXT'   : pycares.QUERY_TYPE_TXT
         }
 
+query_class_map = {'IN'    : pycares.QUERY_CLASS_IN,
+                   'CHAOS' : pycares.QUERY_CLASS_CHAOS,
+                   'HS'    : pycares.QUERY_CLASS_HS,
+                   'NONE'  : pycares.QUERY_CLASS_NONE,
+                   'ANY'   : pycares.QUERY_CLASS_ANY
+                   }
 
 class DNSResolver:
-    def __init__(self, nameservers=None, loop=None, **kwargs):
-        # type: (Optional[List[str]], Optional[asyncio.AbstractEventLoop], 
Any) -> None
+    def __init__(self, nameservers: Optional[List[str]] = None,
+                 loop: Optional[asyncio.AbstractEventLoop] = None,
+                 **kwargs: Any) -> None:
         self.loop = loop or asyncio.get_event_loop()
         assert self.loop is not None
         kwargs.pop('sock_state_cb', None)
@@ -46,21 +55,18 @@
             self.nameservers = nameservers
         self._read_fds = set() # type: Set[int]
         self._write_fds = set() # type: Set[int]
-        self._timer = None
+        self._timer = None  # type: Optional[asyncio.TimerHandle]
 
     @property
-    def nameservers(self):
-        # type: () -> pycares.Channel
+    def nameservers(self) -> pycares.Channel:
         return self._channel.servers
 
     @nameservers.setter
-    def nameservers(self, value):
-        # type: (List[str]) -> None
+    def nameservers(self, value: List[str]) -> None:
         self._channel.servers = value
 
     @staticmethod
-    def _callback(fut, result, errorno):
-        # type: (asyncio.Future, Any, int) -> None
+    def _callback(fut: asyncio.Future, result: Any, errorno: int) -> None:
         if fut.cancelled():
             return
         if errorno is not None:
@@ -68,37 +74,38 @@
         else:
             fut.set_result(result)
 
-    def query(self, host, qtype):
-        # type: (str, str) -> asyncio.Future
+    def query(self, host: str, qtype: str, qclass: str=None) -> asyncio.Future:
         try:
             qtype = query_type_map[qtype]
         except KeyError:
             raise ValueError('invalid query type: {}'.format(qtype))
-        fut = asyncio.Future(loop=self.loop)
+        if qclass is not None:
+            try:
+                qclass = query_class_map[qclass]
+            except KeyError:
+                raise ValueError('invalid query class: {}'.format(qclass))
+
+        fut = asyncio.Future(loop=self.loop)  # type: asyncio.Future
         cb = functools.partial(self._callback, fut)
-        self._channel.query(host, qtype, cb)
+        self._channel.query(host, qtype, cb, query_class=qclass)
         return fut
 
-    def gethostbyname(self, host, family):
-        # type: (str, str) -> asyncio.Future
-        fut = asyncio.Future(loop=self.loop)
+    def gethostbyname(self, host: str, family: socket.AddressFamily) -> 
asyncio.Future:
+        fut = asyncio.Future(loop=self.loop)  # type: asyncio.Future
         cb = functools.partial(self._callback, fut)
         self._channel.gethostbyname(host, family, cb)
         return fut
 
-    def gethostbyaddr(self, name):
-        # type: (str) -> asyncio.Future
-        fut = asyncio.Future(loop=self.loop)
+    def gethostbyaddr(self, name: str) -> asyncio.Future:
+        fut = asyncio.Future(loop=self.loop)  # type: asyncio.Future
         cb = functools.partial(self._callback, fut)
         self._channel.gethostbyaddr(name, cb)
         return fut
 
-    def cancel(self):
-        # type: () -> None
+    def cancel(self) -> None:
         self._channel.cancel()
 
-    def _sock_state_cb(self, fd, readable, writable):
-        # type: (int, bool, bool) -> None
+    def _sock_state_cb(self, fd: int, readable: bool, writable: bool) -> None:
         if readable or writable:
             if readable:
                 self.loop.add_reader(fd, self._handle_event, fd, READ)
@@ -122,8 +129,7 @@
                 self._timer.cancel()
                 self._timer = None
 
-    def _handle_event(self, fd, event):
-        # type: (int, Any) -> None
+    def _handle_event(self, fd: int, event: Any) -> None:
         read_fd = pycares.ARES_SOCKET_BAD
         write_fd = pycares.ARES_SOCKET_BAD
         if event == READ:
@@ -132,11 +138,9 @@
             write_fd = fd
         self._channel.process_fd(read_fd, write_fd)
 
-    def _timer_cb(self):
-        # type: () -> None
+    def _timer_cb(self) -> None:
         if self._read_fds or self._write_fds:
             self._channel.process_fd(pycares.ARES_SOCKET_BAD, 
pycares.ARES_SOCKET_BAD)
             self._timer = self.loop.call_later(1.0, self._timer_cb)
         else:
             self._timer = None
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiodns-aiodns-2.0.0/mypy.ini 
new/aiodns-aiodns-3.0.0/mypy.ini
--- old/aiodns-aiodns-2.0.0/mypy.ini    1970-01-01 01:00:00.000000000 +0100
+++ new/aiodns-aiodns-3.0.0/mypy.ini    2021-05-14 10:49:48.000000000 +0200
@@ -0,0 +1,2 @@
+[mypy]
+ignore_missing_imports = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiodns-aiodns-2.0.0/mypy_run.py 
new/aiodns-aiodns-3.0.0/mypy_run.py
--- old/aiodns-aiodns-2.0.0/mypy_run.py 1970-01-01 01:00:00.000000000 +0100
+++ new/aiodns-aiodns-3.0.0/mypy_run.py 2021-05-14 10:49:48.000000000 +0200
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+
+from subprocess import run
+import sys
+
+# Check if we're not cpython - Exit cleanly if so
+if sys.implementation.name != "cpython":
+    sys.exit(0)
+
+# We only want to install if we're cpython too
+install_success = run("pip install mypy", shell=True).returncode
+if install_success:
+    print("mypy install failed", file=sys.stderr)
+    sys.exit(install_success)
+
+sys.exit(run("mypy aiodns", shell=True).returncode)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiodns-aiodns-2.0.0/setup.cfg 
new/aiodns-aiodns-3.0.0/setup.cfg
--- old/aiodns-aiodns-2.0.0/setup.cfg   2019-03-02 13:01:34.000000000 +0100
+++ new/aiodns-aiodns-3.0.0/setup.cfg   2021-05-14 10:49:48.000000000 +0200
@@ -1,2 +1 @@
 [bdist_wheel]
-universal = 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiodns-aiodns-2.0.0/setup.py 
new/aiodns-aiodns-3.0.0/setup.py
--- old/aiodns-aiodns-2.0.0/setup.py    2019-03-02 13:01:34.000000000 +0100
+++ new/aiodns-aiodns-3.0.0/setup.py    2021-05-14 10:49:48.000000000 +0200
@@ -15,10 +15,12 @@
       version          = get_version(),
       author           = "Sa??l Ibarra Corretg??",
       author_email     = "[email protected]",
-      url              = "http://github.com/saghul/aiodns";,
+      url              = "https://github.com/saghul/aiodns";,
       description      = "Simple DNS resolver for asyncio",
+      license          = "MIT",
       long_description = codecs.open("README.rst", encoding="utf-8").read(),
-      install_requires = ['pycares>=3.0.0', 'typing; python_version<"3.7"'],
+      long_description_content_type = "text/x-rst",
+      install_requires = ['pycares>=4.0.0'],
       packages         = ['aiodns'],
       platforms        = ["POSIX", "Microsoft Windows"],
       classifiers      = [
@@ -29,8 +31,9 @@
           "Operating System :: Microsoft :: Windows",
           "Programming Language :: Python",
           "Programming Language :: Python :: 3",
-          "Programming Language :: Python :: 3.5",
           "Programming Language :: Python :: 3.6",
-          "Programming Language :: Python :: 3.7"
+          "Programming Language :: Python :: 3.7",
+          "Programming Language :: Python :: 3.8",
+          "Programming Language :: Python :: 3.9"
       ]
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiodns-aiodns-2.0.0/tasks.py 
new/aiodns-aiodns-3.0.0/tasks.py
--- old/aiodns-aiodns-2.0.0/tasks.py    2019-03-02 13:01:34.000000000 +0100
+++ new/aiodns-aiodns-3.0.0/tasks.py    1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-
-import re
-from invoke import task
-
-
-def get_version():
-    return 
re.search(r"""__version__\s+=\s+(?P<quote>['"])(?P<version>.+?)(?P=quote)""", 
open('aiodns/__init__.py').read()).group('version')
-
-
-@task
-def release(c):
-    version = get_version()
-
-    c.run("git tag -a aiodns-{0} -m \"aiodns {0} release\"".format(version))
-    c.run("git push --tags")
-
-    c.run("python setup.py sdist")
-    c.run("python setup.py bdist_wheel")
-    c.run("twine upload -r pypi dist/aiodns-{0}*".format(version))
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiodns-aiodns-2.0.0/tests.py 
new/aiodns-aiodns-3.0.0/tests.py
--- old/aiodns-aiodns-2.0.0/tests.py    2019-03-02 13:01:34.000000000 +0100
+++ new/aiodns-aiodns-3.0.0/tests.py    2021-05-14 10:49:48.000000000 +0200
@@ -13,7 +13,8 @@
     def setUp(self):
         self.loop = asyncio.new_event_loop()
         self.addCleanup(self.loop.close)
-        self.resolver = aiodns.DNSResolver(loop=self.loop)
+        self.resolver = aiodns.DNSResolver(loop=self.loop, timeout=5.0)
+        self.resolver.nameservers = ['8.8.8.8']
 
     def tearDown(self):
         self.resolver = None
@@ -84,6 +85,16 @@
     def test_query_bad_type(self):
         self.assertRaises(ValueError, self.resolver.query, 'google.com', 'XXX')
 
+    def test_query_txt_chaos(self):
+        self.resolver = aiodns.DNSResolver(loop=self.loop)
+        self.resolver.nameservers = ['1.1.1.1']
+        f = self.resolver.query('id.server', 'TXT', 'CHAOS')
+        result = self.loop.run_until_complete(f)
+        self.assertTrue(result)
+
+    def test_query_bad_class(self):
+        self.assertRaises(ValueError, self.resolver.query, 'google.com', 'A', 
"INVALIDCLASS")
+
     def test_query_timeout(self):
         self.resolver = aiodns.DNSResolver(timeout=0.1, loop=self.loop)
         self.resolver.nameservers = ['1.2.3.4']
@@ -147,4 +158,3 @@
 
 if __name__ == '__main__':
     unittest.main(verbosity=2)
-

Reply via email to