Skip to content

Commit 2690517

Browse files
committed
refactor: remove py2 imports
1 parent 2c0a291 commit 2690517

File tree

6 files changed

+1
-44
lines changed

6 files changed

+1
-44
lines changed

src/DIRAC/FrameworkSystem/DB/AuthDB.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
""" AuthDB class is a front-end to the AuthDB MySQL Database (via SQLAlchemy)
22
"""
3-
from __future__ import absolute_import
4-
from __future__ import division
5-
from __future__ import print_function
6-
73
import json
84
import time
95
import pprint
@@ -13,16 +9,13 @@
139
from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
1410
from sqlalchemy.ext.declarative import declarative_base
1511

16-
import authlib
1712
from authlib.jose import KeySet, JsonWebKey
1813
from authlib.common.security import generate_token
1914

2015
from DIRAC import S_OK, S_ERROR
2116
from DIRAC.Core.Base.SQLAlchemyDB import SQLAlchemyDB
2217
from DIRAC.FrameworkSystem.private.authorization.utils.Tokens import OAuth2Token
2318

24-
__RCSID__ = "$Id$"
25-
2619

2720
Model = declarative_base()
2821

src/DIRAC/FrameworkSystem/private/authorization/AuthServer.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
""" This class provides authorization server activity. """
2-
from __future__ import absolute_import
3-
from __future__ import division
4-
from __future__ import print_function
5-
62
import re
73
import six
84
import json

src/DIRAC/FrameworkSystem/private/authorization/utils/Clients.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
from __future__ import absolute_import
2-
from __future__ import division
3-
from __future__ import print_function
4-
51
import six
62
import time
7-
import pprint
83

9-
from DIRAC import gConfig, gLogger
4+
from DIRAC import gLogger
105
from authlib.oauth2.rfc6749.util import scope_to_list, list_to_scope
116
from authlib.integrations.sqla_oauth2 import OAuth2ClientMixin
127
from DIRAC.ConfigurationSystem.Client.Utilities import getAuthorizationServerMetadata
138

14-
__RCSID__ = "$Id$"
159

1610
# Description of default DIRAC OAuth2 clients
1711
DEFAULT_CLIENTS = {

src/DIRAC/FrameworkSystem/private/authorization/utils/Requests.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
from __future__ import absolute_import
2-
from __future__ import division
3-
from __future__ import print_function
4-
51
import re
62

73
from tornado.escape import json_decode
@@ -10,8 +6,6 @@
106
from authlib.oauth2.rfc6749.util import scope_to_list
117
from urllib.parse import quote
128

13-
__RCSID__ = "$Id$"
14-
159

1610
class OAuth2Request(_OAuth2Request):
1711
"""OAuth2 request object"""

src/DIRAC/FrameworkSystem/scripts/dirac_login.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
#!/usr/bin/env python
2-
########################################################################
3-
# File : dirac-login.py
4-
# Author : Andrii Lytovchenko
5-
########################################################################
62
"""
73
With this command you can log in to DIRAC.
84
@@ -20,10 +16,6 @@
2016
# Return token
2117
$ dirac-login dirac_user --token
2218
"""
23-
from __future__ import division
24-
from __future__ import absolute_import
25-
from __future__ import print_function
26-
2719
import os
2820
import sys
2921
import copy
@@ -45,8 +37,6 @@
4537
getTokenFileLocation,
4638
)
4739

48-
__RCSID__ = "$Id$"
49-
5040

5141
class Params(object):
5242
"""This class describes the input parameters"""

src/DIRAC/FrameworkSystem/scripts/dirac_logout.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
#!/usr/bin/env python
2-
########################################################################
3-
# File : dirac-logout.py
4-
# Author : Andrii Lytovchenko
5-
########################################################################
62
"""
73
Logout
84
95
Example:
106
$ dirac-logout
117
"""
12-
from __future__ import division
13-
from __future__ import absolute_import
14-
from __future__ import print_function
15-
168
import os
179
import sys
1810

@@ -28,8 +20,6 @@
2820
BEARER_TOKEN_ENV,
2921
)
3022

31-
__RCSID__ = "$Id$"
32-
3323

3424
class Params(object):
3525
def __init__(self):

0 commit comments

Comments
 (0)