From: Brian Wellington Date: Fri, 1 May 2020 18:31:23 +0000 (-0700) Subject: Remove "from __future__ import" statements. X-Git-Tag: v2.0.0rc1~289^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44b1c3d8835c12b68571d515c43887c725c75ffa;p=thirdparty%2Fdnspython.git Remove "from __future__ import" statements. None of these are needed anymore. --- diff --git a/dns/edns.py b/dns/edns.py index e8460093..b501590d 100644 --- a/dns/edns.py +++ b/dns/edns.py @@ -17,8 +17,6 @@ """EDNS Options""" -from __future__ import absolute_import - import math import struct diff --git a/dns/message.py b/dns/message.py index 1c8f2dd7..ee9fc84a 100644 --- a/dns/message.py +++ b/dns/message.py @@ -17,8 +17,6 @@ """DNS Messages""" -from __future__ import absolute_import - from io import StringIO import struct import time diff --git a/dns/query.py b/dns/query.py index 725eff19..779b1d85 100644 --- a/dns/query.py +++ b/dns/query.py @@ -17,8 +17,6 @@ """Talk to a DNS server.""" -from __future__ import generators - import errno import os import select diff --git a/dns/rdtypes/ANY/LOC.py b/dns/rdtypes/ANY/LOC.py index fc02dfdd..375de62b 100644 --- a/dns/rdtypes/ANY/LOC.py +++ b/dns/rdtypes/ANY/LOC.py @@ -15,8 +15,6 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -from __future__ import division - import struct import dns.exception diff --git a/dns/zone.py b/dns/zone.py index f97d18d4..556fda05 100644 --- a/dns/zone.py +++ b/dns/zone.py @@ -17,8 +17,6 @@ """DNS Zones.""" -from __future__ import generators - import sys import re import os diff --git a/examples/e164.py b/examples/e164.py index dd56baf5..497fd680 100755 --- a/examples/e164.py +++ b/examples/e164.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -from __future__ import print_function - import dns.e164 n = dns.e164.from_e164("+1 555 1212") print(n) diff --git a/examples/mx.py b/examples/mx.py index 99f494e0..a4bad708 100755 --- a/examples/mx.py +++ b/examples/mx.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -from __future__ import print_function - import dns.resolver answers = dns.resolver.query('nominum.com', 'MX') diff --git a/examples/name.py b/examples/name.py index 7bb0c010..40d0c562 100755 --- a/examples/name.py +++ b/examples/name.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -from __future__ import print_function - import dns.name n = dns.name.from_text('www.dnspython.org') diff --git a/examples/query_specific.py b/examples/query_specific.py index 3e2c4198..23eff30d 100644 --- a/examples/query_specific.py +++ b/examples/query_specific.py @@ -2,8 +2,6 @@ # Two ways of querying a specific nameserver. -from __future__ import print_function - import dns.message import dns.rdataclass import dns.rdatatype diff --git a/examples/receive_notify.py b/examples/receive_notify.py index 960e4cab..c41b3363 100644 --- a/examples/receive_notify.py +++ b/examples/receive_notify.py @@ -3,8 +3,6 @@ # This is just a toy, real code would check that the received message # really was a NOTIFY, and otherwise handle errors. -from __future__ import print_function - import socket import dns.flags diff --git a/examples/reverse.py b/examples/reverse.py index 038a0201..a0293eeb 100755 --- a/examples/reverse.py +++ b/examples/reverse.py @@ -16,8 +16,6 @@ # If this weren't a demo script, there'd be a way of specifying the # origin for each zone instead of constructing it from the filename. -from __future__ import print_function - import dns.zone import dns.ipv4 import os.path diff --git a/examples/reverse_name.py b/examples/reverse_name.py index f2540a14..a87fe344 100755 --- a/examples/reverse_name.py +++ b/examples/reverse_name.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -from __future__ import print_function - import dns.reversename n = dns.reversename.from_address("127.0.0.1") print(n) diff --git a/examples/xfr.py b/examples/xfr.py index ec24b42d..c09aa358 100755 --- a/examples/xfr.py +++ b/examples/xfr.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -from __future__ import print_function - import dns.query import dns.resolver import dns.zone diff --git a/examples/zonediff.py b/examples/zonediff.py index b65f8282..112df409 100755 --- a/examples/zonediff.py +++ b/examples/zonediff.py @@ -21,7 +21,6 @@ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """See diff_zones.__doc__ for more information""" -from __future__ import print_function from typing import cast, Union, Any # pylint: disable=unused-import __all__ = ['diff_zones', 'format_changes_plain', 'format_changes_html'] diff --git a/tests/test_dnssec.py b/tests/test_dnssec.py index f2a060f8..f38637d8 100644 --- a/tests/test_dnssec.py +++ b/tests/test_dnssec.py @@ -15,8 +15,6 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -from __future__ import print_function - import unittest import dns.dnssec diff --git a/tests/test_edns.py b/tests/test_edns.py index 66ea3347..93839473 100644 --- a/tests/test_edns.py +++ b/tests/test_edns.py @@ -16,8 +16,6 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -from __future__ import print_function - import unittest from io import BytesIO diff --git a/tests/test_name.py b/tests/test_name.py index 47cea187..1e6c6ab4 100644 --- a/tests/test_name.py +++ b/tests/test_name.py @@ -16,8 +16,6 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -from __future__ import print_function - from typing import Dict # pylint: disable=unused-import import unittest diff --git a/tests/test_ntoaaton.py b/tests/test_ntoaaton.py index 1b2c476b..2da0da6c 100644 --- a/tests/test_ntoaaton.py +++ b/tests/test_ntoaaton.py @@ -15,8 +15,6 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -from __future__ import print_function - import unittest import binascii