remove py35 compatibility code

as f-strings are heavily used now, compatibility to py35
can be removed

Change-Id: I1ae4912ad4cbde8419b74845217943bd061053f3
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/32754
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
zolliker 2023-12-12 11:40:45 +01:00
parent ba3c64ddac
commit ca2ca5d7cb
3 changed files with 1 additions and 11 deletions

View File

@ -109,8 +109,6 @@ class HasAccessibles(HasProperties):
for aname in new_names:
if aname not in paramOrder:
accessibles.move_to_end(aname)
# note: for python < 3.6 the order of inherited items is not ensured between
# declarations within the same class
cls.accessibles = accessibles
cls.wrappedAttributes = {'isWrapped': True}

View File

@ -27,12 +27,11 @@ import inspect
from frappy.errors import BadValueError, ConfigError, ProgrammingError
from frappy.lib import UniqueObject
from frappy.lib.py35compat import Object
UNSET = UniqueObject('undefined value') #: an unset value, not even None
class HasDescriptors(Object):
class HasDescriptors:
@classmethod
def __init_subclass__(cls):
# when migrating old style declarations, sometimes the trailing comma is not removed

View File

@ -232,13 +232,6 @@ class TCPServer(DualStackTCPServer):
self.log.warning('tried again %d times after "Address already in use"', ntry)
self.log.info("TCPServer initiated")
# py35 compatibility
if not hasattr(socketserver.ThreadingTCPServer, '__exit__'):
def __enter__(self):
return self
def __exit__(self, *args):
self.server_close()
def format_address(addr):
if len(addr) == 2: