From a4d313fb27e5010eced11cc215e64384b9af6937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Tue, 21 Mar 2023 11:17:14 +0100 Subject: [PATCH] Remove no-op __future__ imports These are all no-op (mandatory) since Python 3.0: https://docs.python.org/3/library/__future__.html --- annotation-model/tools/make_tests.py | 2 -- annotation-protocol/tools/protocol-server.py | 2 -- annotation-vocab/tools/vocab_tester.py | 2 -- common/security-features/tools/generate.py | 2 -- common/security-features/tools/spec_validator.py | 2 -- common/security-features/tools/util.py | 2 -- css/css-fonts/support/fonts/makegsubfonts.py | 2 -- .../tools/generate-text-emphasis-line-height-tests.py | 2 -- .../tools/generate-text-emphasis-position-property-tests.py | 2 -- css/css-text-decor/tools/generate-text-emphasis-ruby-tests.py | 2 -- .../tools/generate-text-emphasis-style-property-tests.py | 2 -- .../tools/generate-segment-break-transformation-rules-tests.py | 2 -- dom/nodes/Document-createElement-namespace-tests/generate.py | 2 -- encrypted-media/polyfill/make-polyfill-tests.py | 2 -- html/tools/update_html5lib_tests.py | 2 -- infrastructure/assumptions/tools/ahem-generate-table.py | 2 -- subresource-integrity/tools/generate_javascript.py | 2 -- subresource-integrity/tools/list_hashes.py | 2 -- webdriver/tests/support/helpers.py | 2 -- 19 files changed, 38 deletions(-) diff --git a/annotation-model/tools/make_tests.py b/annotation-model/tools/make_tests.py index e8bb1aec5a77e6..6890baa296170f 100644 --- a/annotation-model/tools/make_tests.py +++ b/annotation-model/tools/make_tests.py @@ -1,8 +1,6 @@ # This tool creates .html test files for the WPT harness from corresponding .test # files that it finds in the tree for this test collection. -from __future__ import print_function - import re import time import json diff --git a/annotation-protocol/tools/protocol-server.py b/annotation-protocol/tools/protocol-server.py index e5d121000177a2..fc8fa749977811 100644 --- a/annotation-protocol/tools/protocol-server.py +++ b/annotation-protocol/tools/protocol-server.py @@ -5,8 +5,6 @@ # Developed by Benjamin Young (@bigbulehat) and Shane McCarron (@halindrome). # Sponsored by Spec-Ops (https://spec-ops.io) -from __future__ import print_function - import os import sys diff --git a/annotation-vocab/tools/vocab_tester.py b/annotation-vocab/tools/vocab_tester.py index 7d9cc5b8a2e535..86453a7a2997d8 100644 --- a/annotation-vocab/tools/vocab_tester.py +++ b/annotation-vocab/tools/vocab_tester.py @@ -3,8 +3,6 @@ # License: Apache2 # Last Modified: 2016-09-02 -from __future__ import print_function - import json from rdflib import ConjunctiveGraph, URIRef from pyld import jsonld diff --git a/common/security-features/tools/generate.py b/common/security-features/tools/generate.py index 176e0ebbebc07a..409b4f195ff72c 100755 --- a/common/security-features/tools/generate.py +++ b/common/security-features/tools/generate.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 -from __future__ import print_function - import argparse import collections import copy diff --git a/common/security-features/tools/spec_validator.py b/common/security-features/tools/spec_validator.py index 3ac3f530169e54..f8a1390ef0d440 100755 --- a/common/security-features/tools/spec_validator.py +++ b/common/security-features/tools/spec_validator.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 -from __future__ import print_function - import json, sys diff --git a/common/security-features/tools/util.py b/common/security-features/tools/util.py index 72541c781429be..5da06f9d51eb08 100644 --- a/common/security-features/tools/util.py +++ b/common/security-features/tools/util.py @@ -1,5 +1,3 @@ -from __future__ import print_function - import os, sys, json, json5, re import collections diff --git a/css/css-fonts/support/fonts/makegsubfonts.py b/css/css-fonts/support/fonts/makegsubfonts.py index e519b4936de26e..b46fa0e632b0ca 100644 --- a/css/css-fonts/support/fonts/makegsubfonts.py +++ b/css/css-fonts/support/fonts/makegsubfonts.py @@ -1,5 +1,3 @@ -from __future__ import print_function - import os import textwrap from xml.etree import ElementTree diff --git a/css/css-text-decor/tools/generate-text-emphasis-line-height-tests.py b/css/css-text-decor/tools/generate-text-emphasis-line-height-tests.py index 12fb6a3ad850b3..e2a4457f38e465 100644 --- a/css/css-text-decor/tools/generate-text-emphasis-line-height-tests.py +++ b/css/css-text-decor/tools/generate-text-emphasis-line-height-tests.py @@ -8,8 +8,6 @@ reftest.list to the stdout. """ -from __future__ import unicode_literals, print_function, absolute_import - TEST_FILE = 'text-emphasis-line-height-{:03}{}.html' TEST_TEMPLATE = ''' diff --git a/css/css-text-decor/tools/generate-text-emphasis-position-property-tests.py b/css/css-text-decor/tools/generate-text-emphasis-position-property-tests.py index 527959068762f5..f2baf023325ad4 100644 --- a/css/css-text-decor/tools/generate-text-emphasis-position-property-tests.py +++ b/css/css-text-decor/tools/generate-text-emphasis-position-property-tests.py @@ -9,8 +9,6 @@ tests it generated in the format of Mozilla reftest.list to the stdout. """ -from __future__ import unicode_literals, print_function, absolute_import - import itertools TEST_FILE = 'text-emphasis-position-property-{:03}{}.html' diff --git a/css/css-text-decor/tools/generate-text-emphasis-ruby-tests.py b/css/css-text-decor/tools/generate-text-emphasis-ruby-tests.py index fdbaec052e4e4b..f1158f5f843fca 100644 --- a/css/css-text-decor/tools/generate-text-emphasis-ruby-tests.py +++ b/css/css-text-decor/tools/generate-text-emphasis-ruby-tests.py @@ -7,8 +7,6 @@ tests it generated in the format of Mozilla reftest.list to the stdout. """ -from __future__ import unicode_literals, print_function, absolute_import - TEST_FILE = 'text-emphasis-ruby-{:03}{}.html' TEST_TEMPLATE = ''' diff --git a/css/css-text-decor/tools/generate-text-emphasis-style-property-tests.py b/css/css-text-decor/tools/generate-text-emphasis-style-property-tests.py index 1b1d6fc16f24b9..b6ad1f7291b2b9 100644 --- a/css/css-text-decor/tools/generate-text-emphasis-style-property-tests.py +++ b/css/css-text-decor/tools/generate-text-emphasis-style-property-tests.py @@ -8,8 +8,6 @@ tests it generated in the format of Mozilla reftest.list to the stdout. """ -from __future__ import unicode_literals, print_function, absolute_import - TEST_FILE = 'text-emphasis-style-property-{:03}{}.html' TEST_TEMPLATE = ''' diff --git a/css/css-text/line-breaking/tools/generate-segment-break-transformation-rules-tests.py b/css/css-text/line-breaking/tools/generate-segment-break-transformation-rules-tests.py index fc894161bda1b4..6689ef5f18259e 100644 --- a/css/css-text/line-breaking/tools/generate-segment-break-transformation-rules-tests.py +++ b/css/css-text/line-breaking/tools/generate-segment-break-transformation-rules-tests.py @@ -18,8 +18,6 @@ tests it generated in the format of Mozilla reftest.list to the stdout. """ -from __future__ import unicode_literals, print_function, absolute_import - TEST_FILE = 'segment-break-transformation-rules-{:03}.html' TEST_TEMPLATE = ''' diff --git a/dom/nodes/Document-createElement-namespace-tests/generate.py b/dom/nodes/Document-createElement-namespace-tests/generate.py index a0bca546c75fdb..20c866bee80b94 100755 --- a/dom/nodes/Document-createElement-namespace-tests/generate.py +++ b/dom/nodes/Document-createElement-namespace-tests/generate.py @@ -1,7 +1,5 @@ #!/usr/bin/python -from __future__ import print_function - import os import sys diff --git a/encrypted-media/polyfill/make-polyfill-tests.py b/encrypted-media/polyfill/make-polyfill-tests.py index 532037e2a33226..97c6fc74e93ba0 100644 --- a/encrypted-media/polyfill/make-polyfill-tests.py +++ b/encrypted-media/polyfill/make-polyfill-tests.py @@ -1,7 +1,5 @@ #!/usr/bin/python -from __future__ import print_function - import os, re, os.path, glob head = re.compile( r"^(\s*)", re.MULTILINE ) diff --git a/html/tools/update_html5lib_tests.py b/html/tools/update_html5lib_tests.py index f1a99416fc8a4a..7ad9bc6f862b72 100644 --- a/html/tools/update_html5lib_tests.py +++ b/html/tools/update_html5lib_tests.py @@ -1,5 +1,3 @@ -from __future__ import print_function - import glob import hashlib import itertools diff --git a/infrastructure/assumptions/tools/ahem-generate-table.py b/infrastructure/assumptions/tools/ahem-generate-table.py index 8790da02e27936..314279f6710595 100644 --- a/infrastructure/assumptions/tools/ahem-generate-table.py +++ b/infrastructure/assumptions/tools/ahem-generate-table.py @@ -1,5 +1,3 @@ -from __future__ import print_function, unicode_literals - import itertools import unicodedata diff --git a/subresource-integrity/tools/generate_javascript.py b/subresource-integrity/tools/generate_javascript.py index 300e1703b17776..fed3e5445fe86a 100644 --- a/subresource-integrity/tools/generate_javascript.py +++ b/subresource-integrity/tools/generate_javascript.py @@ -1,5 +1,3 @@ -from __future__ import print_function - from os import path, listdir from hashlib import sha512, sha256, md5 from base64 import b64encode diff --git a/subresource-integrity/tools/list_hashes.py b/subresource-integrity/tools/list_hashes.py index 5f189ce44b2260..52f46ffd74788e 100644 --- a/subresource-integrity/tools/list_hashes.py +++ b/subresource-integrity/tools/list_hashes.py @@ -1,5 +1,3 @@ -from __future__ import print_function - from os import path, listdir from hashlib import sha512, sha384, sha256, md5 from base64 import b64encode diff --git a/webdriver/tests/support/helpers.py b/webdriver/tests/support/helpers.py index e79a31448a323d..b0c065dca1189b 100644 --- a/webdriver/tests/support/helpers.py +++ b/webdriver/tests/support/helpers.py @@ -1,5 +1,3 @@ -from __future__ import print_function - import collections import math import sys