forked from pool/python-scitokens
Accepting request 1035594 from home:pgajdos:python
- added patches fix https://github.com/scitokens/scitokens/issues/169 + python-scitokens-no-six.patch OBS-URL: https://build.opensuse.org/request/show/1035594 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-scitokens?expand=0&rev=9
This commit is contained in:
78
python-scitokens-no-six.patch
Normal file
78
python-scitokens-no-six.patch
Normal file
@@ -0,0 +1,78 @@
|
||||
Index: scitokens-1.7.2/requirements.txt
|
||||
===================================================================
|
||||
--- scitokens-1.7.2.orig/requirements.txt
|
||||
+++ scitokens-1.7.2/requirements.txt
|
||||
@@ -1,3 +1,2 @@
|
||||
cryptography
|
||||
PyJWT>=1.6.1
|
||||
-six
|
||||
Index: scitokens-1.7.2/setup.py
|
||||
===================================================================
|
||||
--- scitokens-1.7.2.orig/setup.py
|
||||
+++ scitokens-1.7.2/setup.py
|
||||
@@ -64,7 +64,6 @@ setuptools.setup(
|
||||
install_requires=[
|
||||
'cryptography',
|
||||
'PyJWT>=1.6.1',
|
||||
- 'six',
|
||||
'setuptools'
|
||||
],
|
||||
# classifiers
|
||||
Index: scitokens-1.7.2/src/scitokens/scitokens.py
|
||||
===================================================================
|
||||
--- scitokens-1.7.2.orig/src/scitokens/scitokens.py
|
||||
+++ scitokens-1.7.2/src/scitokens/scitokens.py
|
||||
@@ -12,7 +12,6 @@ import os
|
||||
import jwt
|
||||
from . import urltools
|
||||
import logging
|
||||
-from six import string_types
|
||||
|
||||
LOGGER = logging.getLogger("scitokens")
|
||||
import uuid
|
||||
@@ -697,7 +696,7 @@ class Enforcer(object):
|
||||
return True
|
||||
|
||||
def _validate_scope(self, value):
|
||||
- if not isinstance(value, string_types):
|
||||
+ if not isinstance(value, str):
|
||||
raise InvalidAuthorizationResource("Scope is invalid. Must be a space separated string")
|
||||
if self._test_access:
|
||||
if not self._test_path:
|
||||
Index: scitokens-1.7.2/src/scitokens/utils/config.py
|
||||
===================================================================
|
||||
--- scitokens-1.7.2.orig/src/scitokens/utils/config.py
|
||||
+++ scitokens-1.7.2/src/scitokens/utils/config.py
|
||||
@@ -5,8 +5,7 @@ Module for configuration management
|
||||
|
||||
|
||||
# Config parser is renamed in python 3
|
||||
-from six.moves import configparser
|
||||
-import six
|
||||
+import configparser
|
||||
import logging
|
||||
import logging.handlers
|
||||
|
||||
@@ -30,7 +29,7 @@ def set_config(config = None):
|
||||
"""
|
||||
global configuration # pylint: disable=C0103
|
||||
|
||||
- if isinstance(config, six.string_types):
|
||||
+ if isinstance(config, str):
|
||||
configuration = configparser.ConfigParser(CONFIG_DEFAULTS)
|
||||
configuration.read([config])
|
||||
elif isinstance(config, configparser.RawConfigParser):
|
||||
Index: scitokens-1.7.2/tests/test_config.py
|
||||
===================================================================
|
||||
--- scitokens-1.7.2.orig/tests/test_config.py
|
||||
+++ scitokens-1.7.2/tests/test_config.py
|
||||
@@ -8,8 +8,7 @@ import tempfile
|
||||
import logging
|
||||
import scitokens
|
||||
import scitokens.utils.config
|
||||
-
|
||||
-from six.moves import configparser
|
||||
+import configparser
|
||||
|
||||
class TestConfig(unittest.TestCase):
|
||||
"""
|
Reference in New Issue
Block a user