Skip to content

Commit 4b31506

Browse files
committed
chore: remove legacy code for no longer supported Python versions
1 parent 444937b commit 4b31506

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

social_core/backends/azuread_b2c.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,7 @@
3434
from jwt import decode as jwt_decode
3535
from jwt import get_unverified_header
3636

37-
try:
38-
from jwt.algorithms import RSAAlgorithm
39-
except ImportError:
40-
raise Exception(
41-
# Python 3.3 is not supported because of compatibility in
42-
# Cryptography package in Python3.3 You are welcome to patch
43-
# and open a pull request.
44-
"Cryptography library is required for this backend "
45-
"(AzureADB2COAuth2) to work. Note that this backend is only "
46-
"supported on Python 2 and Python 3.4+."
47-
)
37+
from jwt.algorithms import RSAAlgorithm
4838

4939
from ..exceptions import AuthException, AuthTokenError
5040
from .azuread import AzureADOAuth2

social_core/tests/backends/test_saml.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import json
2-
import os
32
import re
43
import sys
54
import unittest
@@ -10,22 +9,14 @@
109
import requests
1110
from httpretty import HTTPretty
1211

13-
try:
14-
from onelogin.saml2.utils import OneLogin_Saml2_Utils
15-
except ImportError:
16-
# Only available for python 2.7 at the moment, so don't worry if this fails
17-
pass
12+
from onelogin.saml2.utils import OneLogin_Saml2_Utils
1813

1914
from ...exceptions import AuthMissingParameter
2015
from .base import BaseBackendTest
2116

2217
DATA_DIR = path.join(path.dirname(__file__), "data")
2318

2419

25-
@unittest.skipIf(
26-
"TRAVIS" in os.environ,
27-
"Travis-ci segfaults probably due to a bad " "dependencies build",
28-
)
2920
@unittest.skipIf(
3021
"__pypy__" in sys.builtin_module_names, "dm.xmlsec not compatible with pypy"
3122
)

0 commit comments

Comments
 (0)