Skip to content

Commit

Permalink
Remove __future__ imports in tools/
Browse files Browse the repository at this point in the history
The imports being removed are:
 - absolute_import, mandatory since 3.0
 - division, mandatory since 3.0
 - print_function, mandatory since 3.0
 - unicode_literals, mandatory since 3.0
 - with_statement, mandatory since 2.6

See https://docs.python.org/3/library/__future__.html for details.
  • Loading branch information
foolip authored and jgraham committed Jun 8, 2021
1 parent 13447a8 commit b494ad8
Show file tree
Hide file tree
Showing 39 changed files with 0 additions and 72 deletions.
2 changes: 0 additions & 2 deletions tools/lint/fnmatch.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import fnmatch as _stdlib_fnmatch
import os

Expand Down
2 changes: 0 additions & 2 deletions tools/lint/lint.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import print_function, unicode_literals

import abc
import argparse
import ast
Expand Down
2 changes: 0 additions & 2 deletions tools/lint/rules.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import abc
import inspect
import os
Expand Down
3 changes: 0 additions & 3 deletions tools/lint/tests/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from __future__ import unicode_literals


def check_errors(errors):
for e in errors:
error_type, description, path, line_number = e
Expand Down
2 changes: 0 additions & 2 deletions tools/lint/tests/test_path_lints.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import mock
import os

Expand Down
2 changes: 0 additions & 2 deletions tools/manifest/download.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import argparse
import bz2
import gzip
Expand Down
2 changes: 0 additions & 2 deletions tools/runner/report.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# flake8: noqa

from __future__ import print_function

import argparse
import json
import sys
Expand Down
2 changes: 0 additions & 2 deletions tools/serve/serve.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import print_function

import abc
import argparse
import importlib
Expand Down
2 changes: 0 additions & 2 deletions tools/wave/configuration_loader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import json
import os

Expand Down
2 changes: 0 additions & 2 deletions tools/wave/data/session.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals
from ..testing.test_loader import MANUAL, AUTOMATIC

PAUSED = "paused"
Expand Down
2 changes: 0 additions & 2 deletions tools/wave/network/api/results_api_handler.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import json

from .api_handler import ApiHandler
Expand Down
2 changes: 0 additions & 2 deletions tools/wave/network/api/sessions_api_handler.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import json
import threading

Expand Down
3 changes: 0 additions & 3 deletions tools/wave/network/static_handler.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from __future__ import with_statement
from __future__ import absolute_import
from __future__ import unicode_literals
import os


Expand Down
2 changes: 0 additions & 2 deletions tools/wave/testing/event_dispatcher.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

STATUS_EVENT = "status"
RESUME_EVENT = "resume"
TEST_COMPLETED_EVENT = "test_completed"
Expand Down
2 changes: 0 additions & 2 deletions tools/wave/testing/results_manager.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import shutil
import re
Expand Down
3 changes: 0 additions & 3 deletions tools/wave/testing/sessions_manager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from __future__ import division
from __future__ import absolute_import
from __future__ import unicode_literals
import uuid
import time
import os
Expand Down
2 changes: 0 additions & 2 deletions tools/wave/testing/test_loader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import re

Expand Down
3 changes: 0 additions & 3 deletions tools/wave/testing/tests_manager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from __future__ import division
from __future__ import absolute_import
from __future__ import unicode_literals
import re
from threading import Timer

Expand Down
1 change: 0 additions & 1 deletion tools/wave/testing/wpt_report.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import unicode_literals
import subprocess
import os
import ntpath
Expand Down
2 changes: 0 additions & 2 deletions tools/wave/utils/deserializer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals
from ..data.session import Session, UNKNOWN


Expand Down
2 changes: 0 additions & 2 deletions tools/wave/utils/serializer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

def serialize_session(session):
return {
"token": session.token,
Expand Down
2 changes: 0 additions & 2 deletions tools/wave/utils/user_agent_parser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals
from ua_parser import user_agent_parser


Expand Down
1 change: 0 additions & 1 deletion tools/wave/wave_server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import unicode_literals
import os
import logging

Expand Down
2 changes: 0 additions & 2 deletions tools/wptrunner/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.

from __future__ import print_function

import glob
import os
import sys
Expand Down
1 change: 0 additions & 1 deletion tools/wptrunner/wptrunner/browsers/edge.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import time
import subprocess
from .base import Browser, ExecutorBrowser, require_arg
Expand Down
1 change: 0 additions & 1 deletion tools/wptrunner/wptrunner/executors/executorselenium.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
import json
import os
import socket
Expand Down
1 change: 0 additions & 1 deletion tools/wptrunner/wptrunner/executors/executorservo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import base64
import json
import os
Expand Down
1 change: 0 additions & 1 deletion tools/wptrunner/wptrunner/executors/executorwebdriver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
import json
import os
import socket
Expand Down
1 change: 0 additions & 1 deletion tools/wptrunner/wptrunner/manifestupdate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import os
from urllib.parse import urljoin, urlsplit
from collections import namedtuple, defaultdict, deque
Expand Down
1 change: 0 additions & 1 deletion tools/wptrunner/wptrunner/metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import array
import os
from collections import defaultdict, namedtuple
Expand Down
2 changes: 0 additions & 2 deletions tools/wptrunner/wptrunner/testrunner.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import threading
import traceback
from queue import Empty
Expand Down
2 changes: 0 additions & 2 deletions tools/wptrunner/wptrunner/tests/test_testloader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import os
import sys
import tempfile
Expand Down
1 change: 0 additions & 1 deletion tools/wptrunner/wptrunner/wptcommandline.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import, print_function
import argparse
import os
import sys
Expand Down
2 changes: 0 additions & 2 deletions tools/wptrunner/wptrunner/wptmanifest/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

# TODO: keep comments in the tree

from __future__ import unicode_literals

from io import BytesIO

from .node import (Node, AtomNode, BinaryExpressionNode, BinaryOperatorNode,
Expand Down
1 change: 0 additions & 1 deletion tools/wptrunner/wptrunner/wptmanifest/serializer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import unicode_literals
from six import ensure_text

from .node import NodeVisitor, ValueNode, ListNode, BinaryExpressionNode
Expand Down
2 changes: 0 additions & 2 deletions tools/wptrunner/wptrunner/wptrunner.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import print_function, unicode_literals

import json
import os
import sys
Expand Down
2 changes: 0 additions & 2 deletions tools/wptserve/tests/functional/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import print_function

import base64
import logging
import os
Expand Down
2 changes: 0 additions & 2 deletions tools/wptserve/tests/test_replacement_tokenizer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import pytest

from wptserve.pipes import ReplacementTokenizer
Expand Down
2 changes: 0 additions & 2 deletions tools/wptserve/wptserve/ws_h2_handshake.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
https://tools.ietf.org/html/rfc8441
"""

from __future__ import absolute_import

from mod_pywebsocket import common

from mod_pywebsocket.handshake.base import get_mandatory_header
Expand Down

0 comments on commit b494ad8

Please sign in to comment.