diff --git a/src/vpp-api/python/vpp_papi/vpp_format.py b/src/vpp-api/python/vpp_papi/vpp_format.py
index 261683d..0b85eb4 100644
--- a/src/vpp-api/python/vpp_papi/vpp_format.py
+++ b/src/vpp-api/python/vpp_papi/vpp_format.py
@@ -18,10 +18,6 @@
 import ipaddress
 from . import macaddress
 
-try:
-    text_type = unicode
-except NameError:
-    text_type = str
 
 # Copies from vl_api_address_t definition
 ADDRESS_IP4 = 0
@@ -51,7 +47,7 @@
 def format_vl_api_prefix_t(args):
     if isinstance(args, (ipaddress.IPv4Network, ipaddress.IPv6Network)):
         return {'address': format_vl_api_address_t(
-            text_type(args.network_address)),
+            str(args.network_address)),
                 'len': int(args.prefixlen)}
     p, length = args.split('/')
     return {'address': format_vl_api_address_t(p),
@@ -61,7 +57,7 @@
 def format_vl_api_address_with_prefix_t(args):
     if isinstance(args, (ipaddress.IPv4Interface, ipaddress.IPv6Interface)):
         return {'address': format_vl_api_address_t(
-            text_type(args.network_address)),
+            str(args.network_address)),
                 'len': int(args.prefixlen)}
     p, length = args.split('/')
     return {'address': format_vl_api_address_t(p),
diff --git a/src/vpp-api/python/vpp_papi/vpp_papi.py b/src/vpp-api/python/vpp_papi/vpp_papi.py
index 5c375df..e22b88b 100644
--- a/src/vpp-api/python/vpp_papi/vpp_papi.py
+++ b/src/vpp-api/python/vpp_papi/vpp_papi.py
@@ -21,6 +21,7 @@
 import sys
 import multiprocessing as mp
 import os
+import queue
 import logging
 import functools
 import json
@@ -46,11 +47,6 @@
 logger = logging.getLogger('vpp_papi')
 logger.addHandler(logging.NullHandler())
 
-if sys.version[0] == '2':
-    import Queue as queue
-else:
-    import queue as queue
-
 __all__ = ('FuncWrapper', 'VPP', 'VppApiDynamicMethodHolder',
            'VppEnum', 'VppEnumType',
            'VPPIOError', 'VPPRuntimeError', 'VPPValueError',
@@ -72,7 +68,7 @@
 
 
 @metaclass(VppEnumType)
-class VppEnum(object):
+class VppEnum:
     pass
 
 
@@ -84,12 +80,6 @@
         vpp_instance.disconnect()
 
 
-if sys.version[0] == '2':
-    def vpp_iterator(d):
-        return d.iteritems()
-else:
-    def vpp_iterator(d):
-        return d.items()
 
 
 def add_convenience_methods():
@@ -112,11 +102,11 @@
     ipaddress._IPAddressBase.vapi_af_name = property(_vapi_af_name)
 
 
-class VppApiDynamicMethodHolder(object):
+class VppApiDynamicMethodHolder:
     pass
 
 
-class FuncWrapper(object):
+class FuncWrapper:
     def __init__(self, func):
         self._func = func
         self.__name__ = func.__name__
@@ -149,7 +139,7 @@
     pass
 
 
-class VPPApiJSONFiles(object):
+class VPPApiJSONFiles:
     @classmethod
     def find_api_dir(cls, dirs):
         """Attempt to find the best directory in which API definition
@@ -362,7 +352,7 @@
         return messages, services
 
 
-class VPPApiClient(object):
+class VPPApiClient:
     """VPP interface.
 
     This class provides the APIs to VPP.  The APIs are loaded
@@ -464,7 +454,7 @@
     def get_function(self, name):
         return getattr(self._api, name)
 
-    class ContextId(object):
+    class ContextId:
         """Multiprocessing-safe provider of unique context IDs."""
         def __init__(self):
             self.context = mp.Value(ctypes.c_uint, 0)
@@ -506,7 +496,7 @@
         self.id_names = [None] * (self.vpp_dictionary_maxid + 1)
         self.id_msgdef = [None] * (self.vpp_dictionary_maxid + 1)
         self._api = VppApiDynamicMethodHolder()
-        for name, msg in vpp_iterator(self.messages):
+        for name, msg in self.messages.items():
             n = name + '_' + msg.crc[2:]
             i = self.transport.get_msg_index(n)
             if i > 0:
diff --git a/src/vpp-api/python/vpp_papi/vpp_serializer.py b/src/vpp-api/python/vpp_papi/vpp_serializer.py
index d31a0bb..81ce53e 100644
--- a/src/vpp-api/python/vpp_papi/vpp_serializer.py
+++ b/src/vpp-api/python/vpp_papi/vpp_serializer.py
@@ -29,10 +29,9 @@
 #
 logger = logging.getLogger('vpp_papi.serializer')
 
-if sys.version[0] == '2':
-    def check(d): type(d) is dict
-else:
-    def check(d): type(d) is dict or type(d) is bytes
+
+def check(d):
+    return type(d) is dict or type(d) is bytes
 
 
 def conversion_required(data, field_type):
@@ -57,8 +56,7 @@
     return vpp_format.conversion_unpacker_table[field_type](data)
 
 
-# TODO: post 20.01, remove inherit from object.
-class Packer(object):
+class Packer:
     options = {}
 
     def pack(self, data, kwargs):
@@ -384,9 +382,6 @@
     def __bool__(self):
         return True
 
-    # TODO: Remove post 20.01.
-    if sys.version[0] == '2':
-        __nonzero__ = __bool__
 
     def pack(self, data, kwargs=None):
         if data is None:  # Default to zero if not specified
diff --git a/src/vpp-api/python/vpp_papi/vpp_stats.py b/src/vpp-api/python/vpp_papi/vpp_stats.py
index 5eb2b9d..4b7a9bc 100644
--- a/src/vpp-api/python/vpp_papi/vpp_stats.py
+++ b/src/vpp-api/python/vpp_papi/vpp_stats.py
@@ -189,7 +189,7 @@
     pass
 
 
-class VPPStats(object):
+class VPPStats:
     VPPStatsIOError = VPPStatsIOError
 
     default_socketname = '/run/vpp/stats.sock'
diff --git a/src/vpp-api/python/vpp_papi/vpp_transport_shmem.py b/src/vpp-api/python/vpp_papi/vpp_transport_shmem.py
index f1ab728..4719f23 100644
--- a/src/vpp-api/python/vpp_papi/vpp_transport_shmem.py
+++ b/src/vpp-api/python/vpp_papi/vpp_transport_shmem.py
@@ -66,7 +66,7 @@
         super(VppTransportShmemIOError, self).__init__(rv, descr)
 
 
-class VppTransport(object):
+class VppTransport:
     VppTransportShmemIOError = VppTransportShmemIOError
 
     def __init__(self, parent, read_timeout, server_address):
diff --git a/src/vpp-api/python/vpp_papi/vpp_transport_socket.py b/src/vpp-api/python/vpp_papi/vpp_transport_socket.py
index d88082f..a6340d8 100644
--- a/src/vpp-api/python/vpp_papi/vpp_transport_socket.py
+++ b/src/vpp-api/python/vpp_papi/vpp_transport_socket.py
@@ -6,10 +6,7 @@
 import threading
 import select
 import multiprocessing
-try:
-    import queue as queue
-except ImportError:
-    import Queue as queue
+import queue
 import logging
 from . import vpp_papi
 
@@ -22,7 +19,7 @@
     pass
 
 
-class VppTransport(object):
+class VppTransport:
     VppTransportSocketIOError = VppTransportSocketIOError
 
     def __init__(self, parent, read_timeout, server_address):
