imp / importlib incompatibility
Motivation
----------

The fallback load of `imp` is not good enough, this would only start working on Python 3.9.
diff --git a/lib/rucio/client/baseclient.py b/lib/rucio/client/baseclient.py
index 80cfa576b..f90d67c20 100644
--- a/lib/rucio/client/baseclient.py
+++ b/lib/rucio/client/baseclient.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright 2012-2020 CERN
+# Copyright 2012-2021 CERN
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
 # - Thomas Beermann <thomas.beermann@cern.ch>, 2012-2020
 # - Vincent Garonne <vincent.garonne@cern.ch>, 2012-2018
 # - Yun-Pin Sun <winter0128@gmail.com>, 2013
-# - Mario Lassnig <mario.lassnig@cern.ch>, 2013-2020
+# - Mario Lassnig <mario.lassnig@cern.ch>, 2013-2021
 # - Cedric Serfon <cedric.serfon@cern.ch>, 2014-2020
 # - Ralph Vigne <ralph.vigne@cern.ch>, 2015
 # - Joaquín Bogado <jbogado@linti.unlp.edu.ar>, 2015-2018
@@ -46,7 +46,14 @@ try:
     import importlib
     importlib.util.find_spec('')
 except AttributeError:
+    pass
+
+# Fallback until Python <3.9
+# Must be removed with Python 3.9
+try:
     import imp
+except AttributeError:
+    pass
 
 import os
 import random
diff --git a/lib/rucio/common/utils.py b/lib/rucio/common/utils.py
index 7047046ed..b03bb2f45 100644
--- a/lib/rucio/common/utils.py
+++ b/lib/rucio/common/utils.py
@@ -39,7 +39,14 @@ try:
     import importlib
     importlib.util.find_spec('')
 except AttributeError:
+    pass
+
+# Fallback until Python <3.9
+# Must be removed with Python 3.9
+try:
     import imp
+except AttributeError:
+    pass
 
 import base64
 import copy
['lib/rucio/client/baseclient.py', 'lib/rucio/common/utils.py']