aboutsummaryrefslogtreecommitdiffstats
path: root/pathod
diff options
context:
space:
mode:
Diffstat (limited to 'pathod')
-rw-r--r--pathod/language/__init__.py1
-rw-r--r--pathod/language/base.py4
-rw-r--r--pathod/language/generators.py6
-rw-r--r--pathod/language/http.py2
-rw-r--r--pathod/language/http2.py2
-rw-r--r--pathod/language/message.py2
-rw-r--r--pathod/log.py2
-rw-r--r--pathod/pathoc.py3
-rw-r--r--pathod/pathoc_cmdline.py1
-rw-r--r--pathod/pathod.py3
-rw-r--r--pathod/protocols/http.py2
-rw-r--r--pathod/protocols/http2.py7
-rw-r--r--pathod/utils.py2
13 files changed, 16 insertions, 21 deletions
diff --git a/pathod/language/__init__.py b/pathod/language/__init__.py
index 15c2895b..b7897ed2 100644
--- a/pathod/language/__init__.py
+++ b/pathod/language/__init__.py
@@ -1,4 +1,3 @@
-from __future__ import absolute_import
import itertools
import time
diff --git a/pathod/language/base.py b/pathod/language/base.py
index bdcc6d2f..11f0899d 100644
--- a/pathod/language/base.py
+++ b/pathod/language/base.py
@@ -10,7 +10,7 @@ from netlib import human
from . import generators, exceptions
-class Settings(object):
+class Settings:
def __init__(
self,
@@ -60,7 +60,7 @@ v_naked_literal = pp.MatchFirst(
)
-class Token(object):
+class Token:
"""
A token in the specification language. Tokens are immutable. The token
diff --git a/pathod/language/generators.py b/pathod/language/generators.py
index 4040e099..4e19ecd9 100644
--- a/pathod/language/generators.py
+++ b/pathod/language/generators.py
@@ -18,7 +18,7 @@ DATATYPES = dict(
)
-class TransformGenerator(object):
+class TransformGenerator:
"""
Perform a byte-by-byte transform another generator - that is, for each
@@ -54,7 +54,7 @@ def rand_byte(chars):
return bytes([random.choice(chars)])
-class RandomGenerator(object):
+class RandomGenerator:
def __init__(self, dtype, length):
self.dtype = dtype
@@ -73,7 +73,7 @@ class RandomGenerator(object):
return "%s random from %s" % (self.length, self.dtype)
-class FileGenerator(object):
+class FileGenerator:
def __init__(self, path):
self.path = path
diff --git a/pathod/language/http.py b/pathod/language/http.py
index 46027ca3..8b5fa828 100644
--- a/pathod/language/http.py
+++ b/pathod/language/http.py
@@ -53,7 +53,7 @@ class Method(base.OptionsOrValue):
]
-class _HeaderMixin(object):
+class _HeaderMixin:
unique_name = None
def format_header(self, key, value):
diff --git a/pathod/language/http2.py b/pathod/language/http2.py
index 519ee699..35fc5ba8 100644
--- a/pathod/language/http2.py
+++ b/pathod/language/http2.py
@@ -40,7 +40,7 @@ def get_header(val, headers):
return None
-class _HeaderMixin(object):
+class _HeaderMixin:
unique_name = None
def values(self, settings):
diff --git a/pathod/language/message.py b/pathod/language/message.py
index fea4f4de..03b4a2cf 100644
--- a/pathod/language/message.py
+++ b/pathod/language/message.py
@@ -5,7 +5,7 @@ from netlib import strutils
LOG_TRUNCATE = 1024
-class Message(object):
+class Message:
__metaclass__ = abc.ABCMeta
logattrs = []
diff --git a/pathod/log.py b/pathod/log.py
index 1a709dc6..37100bb1 100644
--- a/pathod/log.py
+++ b/pathod/log.py
@@ -13,7 +13,7 @@ def write_raw(fp, lines, timestamp=True):
fp.flush()
-class LogCtx(object):
+class LogCtx:
def __init__(self, fp, hex, timestamp, rfile, wfile):
self.lines = []
diff --git a/pathod/pathoc.py b/pathod/pathoc.py
index f122c14f..e3b4d1ae 100644
--- a/pathod/pathoc.py
+++ b/pathod/pathoc.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
import contextlib
import sys
import os
@@ -34,7 +33,7 @@ class PathocError(Exception):
pass
-class SSLInfo(object):
+class SSLInfo:
def __init__(self, certchain, cipher, alp):
self.certchain, self.cipher, self.alp = certchain, cipher, alp
diff --git a/pathod/pathoc_cmdline.py b/pathod/pathoc_cmdline.py
index 4199e37a..ab330505 100644
--- a/pathod/pathoc_cmdline.py
+++ b/pathod/pathoc_cmdline.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
import sys
import argparse
import os
diff --git a/pathod/pathod.py b/pathod/pathod.py
index e882b73e..0f659d40 100644
--- a/pathod/pathod.py
+++ b/pathod/pathod.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
import copy
import logging
import os
@@ -30,7 +29,7 @@ class PathodError(Exception):
pass
-class SSLOptions(object):
+class SSLOptions:
def __init__(
self,
confdir=CONFDIR,
diff --git a/pathod/protocols/http.py b/pathod/protocols/http.py
index 2ede2591..17930320 100644
--- a/pathod/protocols/http.py
+++ b/pathod/protocols/http.py
@@ -4,7 +4,7 @@ from netlib.http import http1
from .. import language
-class HTTPProtocol(object):
+class HTTPProtocol:
def __init__(self, pathod_handler):
self.pathod_handler = pathod_handler
diff --git a/pathod/protocols/http2.py b/pathod/protocols/http2.py
index 78fe6111..69f49c63 100644
--- a/pathod/protocols/http2.py
+++ b/pathod/protocols/http2.py
@@ -1,4 +1,3 @@
-from __future__ import (absolute_import, print_function, division)
import itertools
import time
@@ -15,14 +14,14 @@ import netlib.http.request
from .. import language
-class TCPHandler(object):
+class TCPHandler:
def __init__(self, rfile, wfile=None):
self.rfile = rfile
self.wfile = wfile
-class HTTP2StateProtocol(object):
+class HTTP2StateProtocol:
ERROR_CODES = utils.BiDi(
NO_ERROR=0x0,
@@ -403,7 +402,7 @@ class HTTP2StateProtocol(object):
return stream_id, headers, body
-class HTTP2Protocol(object):
+class HTTP2Protocol:
def __init__(self, pathod_handler):
self.pathod_handler = pathod_handler
diff --git a/pathod/utils.py b/pathod/utils.py
index 9b220e9a..2d077c48 100644
--- a/pathod/utils.py
+++ b/pathod/utils.py
@@ -3,7 +3,7 @@ import sys
import netlib.utils
-class MemBool(object):
+class MemBool:
"""
Truth-checking with a memory, for use in chained if statements.