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):
|
||||||
|
"""
|
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 14 08:47:39 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/scitokens/scitokens/issues/169
|
||||||
|
+ python-scitokens-no-six.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Oct 29 00:55:58 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
Sat Oct 29 00:55:58 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||||
|
|
||||||
|
@@ -27,6 +27,8 @@ Summary: SciToken reference implementation library
|
|||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://scitokens.org
|
URL: https://scitokens.org
|
||||||
Source: https://github.com/scitokens/scitokens/archive/refs/tags/v%{version}.tar.gz#/%{bname}-%{version}.tar.gz
|
Source: https://github.com/scitokens/scitokens/archive/refs/tags/v%{version}.tar.gz#/%{bname}-%{version}.tar.gz
|
||||||
|
# https://github.com/scitokens/scitokens/issues/169
|
||||||
|
Patch0: python-scitokens-no-six.patch
|
||||||
BuildRequires: %{python_module PyJWT}
|
BuildRequires: %{python_module PyJWT}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
@@ -49,6 +51,7 @@ want to delegate trust for an issuer for managing a storage allocation.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n scitokens-%{version}
|
%setup -q -n scitokens-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
Reference in New Issue
Block a user