!23 Update package oauthlib of version 3.2.0
From: @huangtianhua Reviewed-by: @xiezhipeng1 Signed-off-by: @xiezhipeng1
This commit is contained in:
commit
fb1a6a1490
@ -1,519 +0,0 @@
|
||||
From: Daniele Tricoli <eriol@debian.org>
|
||||
Date: Wed, 17 Jun 2020 01:58:02 +0200
|
||||
Subject: Use unittest.mock instead of external mock
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Backport of upstream fix made by Michał Górny.
|
||||
|
||||
See https://github.com/oauthlib/oauthlib/commit/d4716eb95e9590bb47381a64cda1d57bad8dd907
|
||||
---
|
||||
tests/oauth1/rfc5849/endpoints/test_access_token.py | 2 +-
|
||||
tests/oauth1/rfc5849/endpoints/test_authorization.py | 2 +-
|
||||
tests/oauth1/rfc5849/endpoints/test_base.py | 2 +-
|
||||
tests/oauth1/rfc5849/endpoints/test_request_token.py | 2 +-
|
||||
tests/oauth1/rfc5849/endpoints/test_resource.py | 2 +-
|
||||
tests/oauth1/rfc5849/endpoints/test_signature_only.py | 2 +-
|
||||
tests/oauth2/rfc6749/clients/test_backend_application.py | 2 +-
|
||||
tests/oauth2/rfc6749/clients/test_legacy_application.py | 2 +-
|
||||
tests/oauth2/rfc6749/clients/test_mobile_application.py | 2 +-
|
||||
tests/oauth2/rfc6749/clients/test_service_application.py | 2 +-
|
||||
tests/oauth2/rfc6749/clients/test_web_application.py | 2 +-
|
||||
tests/oauth2/rfc6749/endpoints/test_client_authentication.py | 2 +-
|
||||
tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py | 2 +-
|
||||
tests/oauth2/rfc6749/endpoints/test_error_responses.py | 2 +-
|
||||
tests/oauth2/rfc6749/endpoints/test_extra_credentials.py | 2 +-
|
||||
tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py | 2 +-
|
||||
tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py | 2 +-
|
||||
tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py | 2 +-
|
||||
tests/oauth2/rfc6749/endpoints/test_scope_handling.py | 2 +-
|
||||
tests/oauth2/rfc6749/grant_types/test_authorization_code.py | 2 +-
|
||||
tests/oauth2/rfc6749/grant_types/test_client_credentials.py | 2 +-
|
||||
tests/oauth2/rfc6749/grant_types/test_implicit.py | 2 +-
|
||||
tests/oauth2/rfc6749/grant_types/test_refresh_token.py | 2 +-
|
||||
tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py | 2 +-
|
||||
tests/oauth2/rfc6749/test_parameters.py | 2 +-
|
||||
tests/oauth2/rfc6749/test_server.py | 2 +-
|
||||
tests/oauth2/rfc6749/test_tokens.py | 2 +-
|
||||
tests/openid/connect/core/endpoints/test_claims_handling.py | 2 +-
|
||||
.../connect/core/endpoints/test_openid_connect_params_handling.py | 2 +-
|
||||
tests/openid/connect/core/endpoints/test_userinfo_endpoint.py | 2 +-
|
||||
tests/openid/connect/core/grant_types/test_authorization_code.py | 2 +-
|
||||
tests/openid/connect/core/grant_types/test_base.py | 2 +-
|
||||
tests/openid/connect/core/grant_types/test_dispatchers.py | 2 +-
|
||||
tests/openid/connect/core/grant_types/test_hybrid.py | 2 +-
|
||||
tests/openid/connect/core/grant_types/test_implicit.py | 2 +-
|
||||
tests/openid/connect/core/test_server.py | 2 +-
|
||||
tests/openid/connect/core/test_tokens.py | 2 +-
|
||||
37 files changed, 37 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/tests/oauth1/rfc5849/endpoints/test_access_token.py b/tests/oauth1/rfc5849/endpoints/test_access_token.py
|
||||
index 3499fdb..bc27831 100644
|
||||
--- a/tests/oauth1/rfc5849/endpoints/test_access_token.py
|
||||
+++ b/tests/oauth1/rfc5849/endpoints/test_access_token.py
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-from mock import ANY, MagicMock
|
||||
+from unittest.mock import ANY, MagicMock
|
||||
|
||||
from oauthlib.oauth1 import RequestValidator
|
||||
from oauthlib.oauth1.rfc5849 import Client
|
||||
diff --git a/tests/oauth1/rfc5849/endpoints/test_authorization.py b/tests/oauth1/rfc5849/endpoints/test_authorization.py
|
||||
index e9d3604..5cbebb6 100644
|
||||
--- a/tests/oauth1/rfc5849/endpoints/test_authorization.py
|
||||
+++ b/tests/oauth1/rfc5849/endpoints/test_authorization.py
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-from mock import MagicMock
|
||||
+from unittest.mock import MagicMock
|
||||
|
||||
from oauthlib.oauth1 import RequestValidator
|
||||
from oauthlib.oauth1.rfc5849 import errors
|
||||
diff --git a/tests/oauth1/rfc5849/endpoints/test_base.py b/tests/oauth1/rfc5849/endpoints/test_base.py
|
||||
index 795ddee..24d1ffb 100644
|
||||
--- a/tests/oauth1/rfc5849/endpoints/test_base.py
|
||||
+++ b/tests/oauth1/rfc5849/endpoints/test_base.py
|
||||
@@ -2,7 +2,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from re import sub
|
||||
|
||||
-from mock import MagicMock
|
||||
+from unittest.mock import MagicMock
|
||||
|
||||
from oauthlib.common import CaseInsensitiveDict, safe_string_equals
|
||||
from oauthlib.oauth1 import Client, RequestValidator
|
||||
diff --git a/tests/oauth1/rfc5849/endpoints/test_request_token.py b/tests/oauth1/rfc5849/endpoints/test_request_token.py
|
||||
index 5c9ae88..3764528 100644
|
||||
--- a/tests/oauth1/rfc5849/endpoints/test_request_token.py
|
||||
+++ b/tests/oauth1/rfc5849/endpoints/test_request_token.py
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-from mock import ANY, MagicMock
|
||||
+from unittest.mock import ANY, MagicMock
|
||||
|
||||
from oauthlib.oauth1 import RequestValidator
|
||||
from oauthlib.oauth1.rfc5849 import Client
|
||||
diff --git a/tests/oauth1/rfc5849/endpoints/test_resource.py b/tests/oauth1/rfc5849/endpoints/test_resource.py
|
||||
index b71412a..9fd5422 100644
|
||||
--- a/tests/oauth1/rfc5849/endpoints/test_resource.py
|
||||
+++ b/tests/oauth1/rfc5849/endpoints/test_resource.py
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-from mock import ANY, MagicMock
|
||||
+from unittest.mock import ANY, MagicMock
|
||||
|
||||
from oauthlib.oauth1 import RequestValidator
|
||||
from oauthlib.oauth1.rfc5849 import Client
|
||||
diff --git a/tests/oauth1/rfc5849/endpoints/test_signature_only.py b/tests/oauth1/rfc5849/endpoints/test_signature_only.py
|
||||
index 1d758b1..4c2c04b 100644
|
||||
--- a/tests/oauth1/rfc5849/endpoints/test_signature_only.py
|
||||
+++ b/tests/oauth1/rfc5849/endpoints/test_signature_only.py
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-from mock import ANY, MagicMock
|
||||
+from unittest.mock import ANY, MagicMock
|
||||
|
||||
from oauthlib.oauth1 import RequestValidator
|
||||
from oauthlib.oauth1.rfc5849 import Client
|
||||
diff --git a/tests/oauth2/rfc6749/clients/test_backend_application.py b/tests/oauth2/rfc6749/clients/test_backend_application.py
|
||||
index aa2ba2b..0ae92a5 100644
|
||||
--- a/tests/oauth2/rfc6749/clients/test_backend_application.py
|
||||
+++ b/tests/oauth2/rfc6749/clients/test_backend_application.py
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
from oauthlib import signals
|
||||
from oauthlib.oauth2 import BackendApplicationClient
|
||||
diff --git a/tests/oauth2/rfc6749/clients/test_legacy_application.py b/tests/oauth2/rfc6749/clients/test_legacy_application.py
|
||||
index 21af4a3..eeaa990 100644
|
||||
--- a/tests/oauth2/rfc6749/clients/test_legacy_application.py
|
||||
+++ b/tests/oauth2/rfc6749/clients/test_legacy_application.py
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
from oauthlib import signals
|
||||
from oauthlib.oauth2 import LegacyApplicationClient
|
||||
diff --git a/tests/oauth2/rfc6749/clients/test_mobile_application.py b/tests/oauth2/rfc6749/clients/test_mobile_application.py
|
||||
index 622b275..7595ce9 100644
|
||||
--- a/tests/oauth2/rfc6749/clients/test_mobile_application.py
|
||||
+++ b/tests/oauth2/rfc6749/clients/test_mobile_application.py
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
from oauthlib import signals
|
||||
from oauthlib.oauth2 import MobileApplicationClient
|
||||
diff --git a/tests/oauth2/rfc6749/clients/test_service_application.py b/tests/oauth2/rfc6749/clients/test_service_application.py
|
||||
index dc337cf..ceb48f2 100644
|
||||
--- a/tests/oauth2/rfc6749/clients/test_service_application.py
|
||||
+++ b/tests/oauth2/rfc6749/clients/test_service_application.py
|
||||
@@ -5,7 +5,7 @@ import os
|
||||
from time import time
|
||||
|
||||
import jwt
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
from oauthlib.common import Request
|
||||
from oauthlib.oauth2 import ServiceApplicationClient
|
||||
diff --git a/tests/oauth2/rfc6749/clients/test_web_application.py b/tests/oauth2/rfc6749/clients/test_web_application.py
|
||||
index 092f93e..eb6af27 100644
|
||||
--- a/tests/oauth2/rfc6749/clients/test_web_application.py
|
||||
+++ b/tests/oauth2/rfc6749/clients/test_web_application.py
|
||||
@@ -5,7 +5,7 @@ import datetime
|
||||
import os
|
||||
import warnings
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
from oauthlib import common, signals
|
||||
from oauthlib.oauth2 import (BackendApplicationClient, Client,
|
||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_client_authentication.py b/tests/oauth2/rfc6749/endpoints/test_client_authentication.py
|
||||
index 133da59..799f510 100644
|
||||
--- a/tests/oauth2/rfc6749/endpoints/test_client_authentication.py
|
||||
+++ b/tests/oauth2/rfc6749/endpoints/test_client_authentication.py
|
||||
@@ -13,7 +13,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.oauth2 import (BackendApplicationServer, LegacyApplicationServer,
|
||||
MobileApplicationServer, RequestValidator,
|
||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py b/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py
|
||||
index e7c66b6..6cd25b2 100644
|
||||
--- a/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py
|
||||
+++ b/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py
|
||||
@@ -7,7 +7,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.oauth2 import (MobileApplicationServer, RequestValidator,
|
||||
WebApplicationServer)
|
||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_error_responses.py b/tests/oauth2/rfc6749/endpoints/test_error_responses.py
|
||||
index 2479836..8697e32 100644
|
||||
--- a/tests/oauth2/rfc6749/endpoints/test_error_responses.py
|
||||
+++ b/tests/oauth2/rfc6749/endpoints/test_error_responses.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.common import urlencode
|
||||
from oauthlib.oauth2 import (BackendApplicationServer, LegacyApplicationServer,
|
||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_extra_credentials.py b/tests/oauth2/rfc6749/endpoints/test_extra_credentials.py
|
||||
index a12fcd2..5d78d04 100644
|
||||
--- a/tests/oauth2/rfc6749/endpoints/test_extra_credentials.py
|
||||
+++ b/tests/oauth2/rfc6749/endpoints/test_extra_credentials.py
|
||||
@@ -2,7 +2,7 @@
|
||||
"""
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.oauth2 import (BackendApplicationServer, LegacyApplicationServer,
|
||||
MobileApplicationServer, RequestValidator,
|
||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py b/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py
|
||||
index ae3deae..f9827ce 100644
|
||||
--- a/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py
|
||||
+++ b/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from json import loads
|
||||
|
||||
-from mock import MagicMock
|
||||
+from unittest.mock import MagicMock
|
||||
|
||||
from oauthlib.common import urlencode
|
||||
from oauthlib.oauth2 import RequestValidator, IntrospectEndpoint
|
||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py b/tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py
|
||||
index e823286..472330c 100644
|
||||
--- a/tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py
|
||||
+++ b/tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.oauth2 import (BackendApplicationServer, LegacyApplicationServer,
|
||||
MobileApplicationServer, RequestValidator,
|
||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py b/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py
|
||||
index 17be3a5..aec5acc 100644
|
||||
--- a/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py
|
||||
+++ b/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from json import loads
|
||||
|
||||
-from mock import MagicMock
|
||||
+from unittest.mock import MagicMock
|
||||
|
||||
from oauthlib.common import urlencode
|
||||
from oauthlib.oauth2 import RequestValidator, RevocationEndpoint
|
||||
diff --git a/tests/oauth2/rfc6749/endpoints/test_scope_handling.py b/tests/oauth2/rfc6749/endpoints/test_scope_handling.py
|
||||
index 4f27963..97e00ed 100644
|
||||
--- a/tests/oauth2/rfc6749/endpoints/test_scope_handling.py
|
||||
+++ b/tests/oauth2/rfc6749/endpoints/test_scope_handling.py
|
||||
@@ -7,7 +7,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.oauth2 import (BackendApplicationServer, LegacyApplicationServer,
|
||||
MobileApplicationServer, RequestValidator, Server,
|
||||
diff --git a/tests/oauth2/rfc6749/grant_types/test_authorization_code.py b/tests/oauth2/rfc6749/grant_types/test_authorization_code.py
|
||||
index 2c9db3c..4b45875 100644
|
||||
--- a/tests/oauth2/rfc6749/grant_types/test_authorization_code.py
|
||||
+++ b/tests/oauth2/rfc6749/grant_types/test_authorization_code.py
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.common import Request
|
||||
from oauthlib.oauth2.rfc6749 import errors
|
||||
diff --git a/tests/oauth2/rfc6749/grant_types/test_client_credentials.py b/tests/oauth2/rfc6749/grant_types/test_client_credentials.py
|
||||
index edc6bfe..fbd054f 100644
|
||||
--- a/tests/oauth2/rfc6749/grant_types/test_client_credentials.py
|
||||
+++ b/tests/oauth2/rfc6749/grant_types/test_client_credentials.py
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.common import Request
|
||||
from oauthlib.oauth2.rfc6749.grant_types import ClientCredentialsGrant
|
||||
diff --git a/tests/oauth2/rfc6749/grant_types/test_implicit.py b/tests/oauth2/rfc6749/grant_types/test_implicit.py
|
||||
index 0c18cab..c4bbeda 100644
|
||||
--- a/tests/oauth2/rfc6749/grant_types/test_implicit.py
|
||||
+++ b/tests/oauth2/rfc6749/grant_types/test_implicit.py
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.common import Request
|
||||
from oauthlib.oauth2.rfc6749.grant_types import ImplicitGrant
|
||||
diff --git a/tests/oauth2/rfc6749/grant_types/test_refresh_token.py b/tests/oauth2/rfc6749/grant_types/test_refresh_token.py
|
||||
index 32a0977..ef64c69 100644
|
||||
--- a/tests/oauth2/rfc6749/grant_types/test_refresh_token.py
|
||||
+++ b/tests/oauth2/rfc6749/grant_types/test_refresh_token.py
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.common import Request
|
||||
from oauthlib.oauth2.rfc6749 import errors
|
||||
diff --git a/tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py b/tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py
|
||||
index 82e0524..0373e32 100644
|
||||
--- a/tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py
|
||||
+++ b/tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.common import Request
|
||||
from oauthlib.oauth2.rfc6749 import errors
|
||||
diff --git a/tests/oauth2/rfc6749/test_parameters.py b/tests/oauth2/rfc6749/test_parameters.py
|
||||
index 48b7eac..fdbd1df 100644
|
||||
--- a/tests/oauth2/rfc6749/test_parameters.py
|
||||
+++ b/tests/oauth2/rfc6749/test_parameters.py
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
from oauthlib import signals
|
||||
from oauthlib.oauth2.rfc6749.errors import *
|
||||
diff --git a/tests/oauth2/rfc6749/test_server.py b/tests/oauth2/rfc6749/test_server.py
|
||||
index 2c6ecff..f966547 100644
|
||||
--- a/tests/oauth2/rfc6749/test_server.py
|
||||
+++ b/tests/oauth2/rfc6749/test_server.py
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib import common
|
||||
from oauthlib.oauth2.rfc6749 import errors, tokens
|
||||
diff --git a/tests/oauth2/rfc6749/test_tokens.py b/tests/oauth2/rfc6749/test_tokens.py
|
||||
index e6f49b1..219486e 100644
|
||||
--- a/tests/oauth2/rfc6749/test_tokens.py
|
||||
+++ b/tests/oauth2/rfc6749/test_tokens.py
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.common import Request
|
||||
from oauthlib.oauth2.rfc6749.tokens import (
|
||||
diff --git a/tests/openid/connect/core/endpoints/test_claims_handling.py b/tests/openid/connect/core/endpoints/test_claims_handling.py
|
||||
index 5f39d96..f86a176 100644
|
||||
--- a/tests/openid/connect/core/endpoints/test_claims_handling.py
|
||||
+++ b/tests/openid/connect/core/endpoints/test_claims_handling.py
|
||||
@@ -8,7 +8,7 @@ The claims parameter is an optional query param for the Authorization Request en
|
||||
"""
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.openid import RequestValidator
|
||||
from oauthlib.openid.connect.core.endpoints.pre_configured import Server
|
||||
diff --git a/tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py b/tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py
|
||||
index 517239a..aaedbc2 100644
|
||||
--- a/tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py
|
||||
+++ b/tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.oauth2 import InvalidRequestError
|
||||
from oauthlib.oauth2.rfc6749.endpoints.authorization import \
|
||||
diff --git a/tests/openid/connect/core/endpoints/test_userinfo_endpoint.py b/tests/openid/connect/core/endpoints/test_userinfo_endpoint.py
|
||||
index 4593d79..ff7986b 100644
|
||||
--- a/tests/openid/connect/core/endpoints/test_userinfo_endpoint.py
|
||||
+++ b/tests/openid/connect/core/endpoints/test_userinfo_endpoint.py
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import json
|
||||
|
||||
from oauthlib.openid import RequestValidator
|
||||
diff --git a/tests/openid/connect/core/grant_types/test_authorization_code.py b/tests/openid/connect/core/grant_types/test_authorization_code.py
|
||||
index b721a19..06b1340 100644
|
||||
--- a/tests/openid/connect/core/grant_types/test_authorization_code.py
|
||||
+++ b/tests/openid/connect/core/grant_types/test_authorization_code.py
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.common import Request
|
||||
from oauthlib.oauth2.rfc6749.tokens import BearerToken
|
||||
diff --git a/tests/openid/connect/core/grant_types/test_base.py b/tests/openid/connect/core/grant_types/test_base.py
|
||||
index d506b7e..786b24b 100644
|
||||
--- a/tests/openid/connect/core/grant_types/test_base.py
|
||||
+++ b/tests/openid/connect/core/grant_types/test_base.py
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import time
|
||||
|
||||
from oauthlib.common import Request
|
||||
diff --git a/tests/openid/connect/core/grant_types/test_dispatchers.py b/tests/openid/connect/core/grant_types/test_dispatchers.py
|
||||
index 9e45d65..c746e25 100644
|
||||
--- a/tests/openid/connect/core/grant_types/test_dispatchers.py
|
||||
+++ b/tests/openid/connect/core/grant_types/test_dispatchers.py
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.common import Request
|
||||
|
||||
diff --git a/tests/openid/connect/core/grant_types/test_hybrid.py b/tests/openid/connect/core/grant_types/test_hybrid.py
|
||||
index 0aa0add..336c9f2 100644
|
||||
--- a/tests/openid/connect/core/grant_types/test_hybrid.py
|
||||
+++ b/tests/openid/connect/core/grant_types/test_hybrid.py
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.oauth2.rfc6749 import errors
|
||||
from oauthlib.oauth2.rfc6749.tokens import BearerToken
|
||||
diff --git a/tests/openid/connect/core/grant_types/test_implicit.py b/tests/openid/connect/core/grant_types/test_implicit.py
|
||||
index 1ee805c..c1aadaf 100644
|
||||
--- a/tests/openid/connect/core/grant_types/test_implicit.py
|
||||
+++ b/tests/openid/connect/core/grant_types/test_implicit.py
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.common import Request
|
||||
from oauthlib.oauth2.rfc6749 import errors
|
||||
diff --git a/tests/openid/connect/core/test_server.py b/tests/openid/connect/core/test_server.py
|
||||
index 756c9d0..87b3a9e 100644
|
||||
--- a/tests/openid/connect/core/test_server.py
|
||||
+++ b/tests/openid/connect/core/test_server.py
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.oauth2.rfc6749 import errors
|
||||
from oauthlib.oauth2.rfc6749.endpoints.authorization import AuthorizationEndpoint
|
||||
diff --git a/tests/openid/connect/core/test_tokens.py b/tests/openid/connect/core/test_tokens.py
|
||||
index fde89d6..7dc7433 100644
|
||||
--- a/tests/openid/connect/core/test_tokens.py
|
||||
+++ b/tests/openid/connect/core/test_tokens.py
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from oauthlib.openid.connect.core.tokens import JWTToken
|
||||
|
||||
BIN
oauthlib-3.2.0.tar.gz
Normal file
BIN
oauthlib-3.2.0.tar.gz
Normal file
Binary file not shown.
@ -1,36 +1,60 @@
|
||||
%global modname oauthlib
|
||||
Name: python-oauthlib
|
||||
Version: 3.1.1
|
||||
Release: 2
|
||||
Summary: Python Framework for OAuth1 & OAuth2
|
||||
License: BSD
|
||||
URL: https://github.com/oauthlib/oauthlib
|
||||
Source0: https://github.com/oauthlib/oauthlib/archive/v%{version}.tar.gz
|
||||
|
||||
%global _empty_manifest_terminate_build 0
|
||||
Name: python-oauthlib
|
||||
Version: 3.2.0
|
||||
Release: 1
|
||||
Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
|
||||
License: BSD
|
||||
URL: https://github.com/oauthlib/oauthlib
|
||||
Source0: https://files.pythonhosted.org/packages/6e/7e/a43cec8b2df28b6494a865324f0ac4be213cb2edcf1e2a717547a93279b0/oauthlib-3.2.0.tar.gz
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
AuthLib is a framework which implements the logic of OAuth1 or OAuth2
|
||||
without assuming a specific HTTP request object or web framework. Use
|
||||
it to graft OAuth client support onto your favorite HTTP library, or
|
||||
provide support onto your favourite web framework. If you're a
|
||||
maintainer of such a library, write a thin veneer on top of OAuthLib
|
||||
AuthLib is a framework which implements the logic of OAuth1 or OAuth2
|
||||
without assuming a specific HTTP request object or web framework. Use
|
||||
it to graft OAuth client support onto your favorite HTTP library, or
|
||||
provide support onto your favourite web framework. If you're a
|
||||
maintainer of such a library, write a thin veneer on top of OAuthLib
|
||||
and get OAuth support for very little effort.
|
||||
|
||||
%package -n python3-oauthlib
|
||||
Summary: Python3 package for oauthlib
|
||||
%{?python_provide:%python_provide python3-%{modname}}
|
||||
BuildRequires: python3-devel python3-setuptools python3-mock
|
||||
BuildRequires: python3-blinker python3-jwt python3-cryptography
|
||||
Requires: python3-jwt python3-cryptography
|
||||
|
||||
%package -n python3-oauthlib
|
||||
Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
|
||||
Provides: python-oauthlib
|
||||
# Base build requires
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-pbr
|
||||
BuildRequires: python3-pip
|
||||
BuildRequires: python3-wheel
|
||||
# General requires
|
||||
BuildRequires: python3-cryptography
|
||||
BuildRequires: python3-blinker
|
||||
BuildRequires: python3-cryptography
|
||||
BuildRequires: python3-jwt
|
||||
# General requires
|
||||
Requires: python3-cryptography
|
||||
Requires: python3-blinker
|
||||
Requires: python3-cryptography
|
||||
Requires: python3-jwt
|
||||
%description -n python3-oauthlib
|
||||
Python3 package for oauthlib
|
||||
AuthLib is a framework which implements the logic of OAuth1 or OAuth2
|
||||
without assuming a specific HTTP request object or web framework. Use
|
||||
it to graft OAuth client support onto your favorite HTTP library, or
|
||||
provide support onto your favourite web framework. If you're a
|
||||
maintainer of such a library, write a thin veneer on top of OAuthLib
|
||||
and get OAuth support for very little effort.
|
||||
|
||||
%package help
|
||||
Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
|
||||
Provides: python3-oauthlib-doc
|
||||
%description help
|
||||
AuthLib is a framework which implements the logic of OAuth1 or OAuth2
|
||||
without assuming a specific HTTP request object or web framework. Use
|
||||
it to graft OAuth client support onto your favorite HTTP library, or
|
||||
provide support onto your favourite web framework. If you're a
|
||||
maintainer of such a library, write a thin veneer on top of OAuthLib
|
||||
and get OAuth support for very little effort.
|
||||
|
||||
%prep
|
||||
%autosetup -n oauthlib-%{version} -p1
|
||||
sed -i "s/'unittest2', //" setup.py
|
||||
rm -rf %{modname}.egg-info
|
||||
%autosetup -n oauthlib-%{version}
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
@ -38,18 +62,45 @@ rm -rf %{modname}.egg-info
|
||||
%install
|
||||
%py3_install
|
||||
|
||||
install -d -m755 %{buildroot}/%{_pkgdocdir}
|
||||
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
|
||||
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
|
||||
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
|
||||
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
|
||||
pushd %{buildroot}
|
||||
if [ -d usr/lib ]; then
|
||||
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
|
||||
fi
|
||||
if [ -d usr/lib64 ]; then
|
||||
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
|
||||
fi
|
||||
if [ -d usr/bin ]; then
|
||||
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
|
||||
fi
|
||||
if [ -d usr/sbin ]; then
|
||||
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
|
||||
fi
|
||||
touch doclist.lst
|
||||
if [ -d usr/share/man ]; then
|
||||
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
|
||||
fi
|
||||
popd
|
||||
mv %{buildroot}/filelist.lst .
|
||||
mv %{buildroot}/doclist.lst .
|
||||
|
||||
%check
|
||||
%{__python3} setup.py test
|
||||
|
||||
%files -n python3-oauthlib
|
||||
%defattr(-,root,root)
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/oauthlib/*
|
||||
%{python3_sitelib}/oauthlib-%{version}*
|
||||
%files -n python3-oauthlib -f filelist.lst
|
||||
%dir %{python3_sitelib}/*
|
||||
|
||||
%files help -f doclist.lst
|
||||
%{_docdir}/*
|
||||
|
||||
%changelog
|
||||
* Tue Jul 05 2022 OpenStack_SIG <openstack@openeuler.org> - 3.2.0-1
|
||||
- Upgrade package python3-oauthlib to version 3.2.0
|
||||
|
||||
* Wed May 25 2022 renhongxun <renhongxun@h-partners.com> 3.1.1-2
|
||||
- Type: requirement
|
||||
- ID: NA
|
||||
|
||||
BIN
v3.1.1.tar.gz
BIN
v3.1.1.tar.gz
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user