Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
5e97c58274
!36 update to v3.2.2
From: @xiezhipeng1 
Reviewed-by: @licihua 
Signed-off-by: @licihua
2023-01-19 07:59:06 +00:00
Zhipeng Xie
c94ec0ee4b update to 3.2.2
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2023-01-19 14:39:38 +08:00
openeuler-ci-bot
5cef6e15bc
!28 fix CVE-2022-36087
From: @zhuofeng6 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2022-09-27 01:34:05 +00:00
xiaofeng
28063d5a03 修改版本号信息 2022-09-26 18:36:32 +08:00
xiaofeng
6e5395ada9 更新补丁 2022-09-26 18:19:16 +08:00
xiaofeng
9168526f4d 更新日期 2022-09-26 18:10:07 +08:00
xiaofeng
81a51383ab fix cve-2022-36087 2022-09-26 18:08:44 +08:00
openeuler-ci-bot
fb1a6a1490
!23 Update package oauthlib of version 3.2.0
From: @huangtianhua 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2022-07-08 09:23:11 +00:00
huangtianhua
ac1003311e Update package oauthlib of version 3.2.0 2022-07-05 09:55:10 +08:00
openeuler-ci-bot
3f4224c47b
!22 Remove useless python3-nose from BuildRequires
From: @renxichen 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2022-05-30 11:24:29 +00:00
rwx403335
4215e1907b remove useless python3-nose from BuildRequires 2022-05-25 15:13:54 +08:00
4 changed files with 100 additions and 549 deletions

View File

@ -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.2.tar.gz Normal file

Binary file not shown.

View File

@ -1,36 +1,61 @@
%global modname oauthlib %global _empty_manifest_terminate_build 0
Name: python-oauthlib Name: python-oauthlib
Version: 3.1.1 Version: 3.2.2
Release: 1 Release: 1
Summary: Python Framework for OAuth1 & OAuth2 Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
License: BSD License: BSD
URL: https://github.com/oauthlib/oauthlib URL: https://github.com/oauthlib/oauthlib
Source0: https://github.com/oauthlib/oauthlib/archive/v%{version}.tar.gz Source0: https://github.com/oauthlib/oauthlib/archive/refs/tags/v%{version}.tar.gz#/oauthlib-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
%description %description
AuthLib is a framework which implements the logic of OAuth1 or OAuth2 AuthLib is a framework which implements the logic of OAuth1 or OAuth2
without assuming a specific HTTP request object or web framework. Use without assuming a specific HTTP request object or web framework. Use
it to graft OAuth client support onto your favorite HTTP library, or it to graft OAuth client support onto your favorite HTTP library, or
provide support onto your favourite web framework. If you're a provide support onto your favourite web framework. If you're a
maintainer of such a library, write a thin veneer on top of OAuthLib maintainer of such a library, write a thin veneer on top of OAuthLib
and get OAuth support for very little effort. and get OAuth support for very little effort.
%package -n python3-oauthlib %package -n python3-oauthlib
Summary: Python3 package for oauthlib Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
%{?python_provide:%python_provide python3-%{modname}} Provides: python-oauthlib
BuildRequires: python3-devel python3-setuptools python3-nose python3-mock # Base build requires
BuildRequires: python3-blinker python3-jwt python3-cryptography BuildRequires: python3-devel
Requires: python3-jwt python3-cryptography 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 %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 %prep
%autosetup -n oauthlib-%{version} -p1 %autosetup -n oauthlib-%{version} -p1
sed -i "s/'unittest2', //" setup.py
rm -rf %{modname}.egg-info
%build %build
%py3_build %py3_build
@ -38,18 +63,63 @@ rm -rf %{modname}.egg-info
%install %install
%py3_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 %check
%{__python3} setup.py test %{__python3} setup.py test
%files -n python3-oauthlib %files -n python3-oauthlib -f filelist.lst
%defattr(-,root,root) %dir %{python3_sitelib}/*
%doc README.rst
%license LICENSE
%{python3_sitelib}/oauthlib/*
%{python3_sitelib}/oauthlib-%{version}*
%files help -f doclist.lst
%{_docdir}/*
%changelog %changelog
* Thu Jan 19 2023 Zhipeng Xie <xiezhipeng1@huawei.com> - 3.2.2-1
- Type: requirement
- CVE: NA
- SUG: NA
- DESC: update to 3.2.2
* Mon Sep 26 2022 zhuofeng<zhuofeng2@huawei.com> - 3.2.0-2
- Type:CVE
- CVE:CVE-2022-36087
- SUG:NA
- DESC:fix CVE-2022-36087
* 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
- SUG: NA
- DESC: remove useless python3-nose from BuildRequires
* Fri Dec 17 2021 renhongxun <renhongxun@huawei.com> - 3.1.1-1 * Fri Dec 17 2021 renhongxun <renhongxun@huawei.com> - 3.1.1-1
- Type: bugfix - Type: bugfix
- ID: NA - ID: NA

Binary file not shown.