Skip to content

Commit 03eeb79

Browse files
committed
Merge branch 'release-1.28.1' into dev
2 parents 6987458 + cf23892 commit 03eeb79

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

msal/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222

2323
# The __init__.py will import this. Not the other way around.
24-
__version__ = "1.28.0" # When releasing, also check and bump our dependencies's versions if needed
24+
__version__ = "1.28.1" # When releasing, also check and bump our dependencies's versions if needed
2525

2626
logger = logging.getLogger(__name__)
2727
_AUTHORITY_TYPE_CLOUDSHELL = "CLOUDSHELL"

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ broker =
6262
# most existing MSAL Python apps do not have the redirect_uri needed by broker.
6363
# MSAL Python uses a subset of API from PyMsalRuntime 0.13.0+,
6464
# but we still bump the lower bound to 0.13.2+ for its important bugfix (https://github.com/AzureAD/microsoft-authentication-library-for-cpp/pull/3244)
65-
pymsalruntime>=0.13.2,<0.15; python_version>='3.6' and platform_system=='Windows'
65+
pymsalruntime>=0.13.2,<0.17; python_version>='3.6' and platform_system=='Windows'
6666

6767
[options.packages.find]
6868
exclude =

tests/test_e2e.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,12 +480,17 @@ def get_lab_app(
480480
http_client=MinimalHttpClient(timeout=timeout),
481481
**kwargs)
482482

483+
class LabTokenError(RuntimeError):
484+
pass
485+
483486
def get_session(lab_app, scopes): # BTW, this infrastructure tests the confidential client flow
484487
logger.info("Creating session")
485488
result = lab_app.acquire_token_for_client(scopes)
486-
assert result.get("access_token"), \
487-
"Unable to obtain token for lab. Encountered {}: {}".format(
488-
result.get("error"), result.get("error_description"))
489+
if not result.get("access_token"):
490+
raise LabTokenError(
491+
"Unable to obtain token for lab. Encountered {}: {}".format(
492+
result.get("error"), result.get("error_description")
493+
))
489494
session = requests.Session()
490495
session.headers.update({"Authorization": "Bearer %s" % result["access_token"]})
491496
session.hooks["response"].append(lambda r, *args, **kwargs: r.raise_for_status())
@@ -502,7 +507,13 @@ class LabBasedTestCase(E2eTestCase):
502507
@classmethod
503508
def setUpClass(cls):
504509
# https://docs.msidlab.com/accounts/apiaccess.html#code-snippet
505-
cls.session = get_session(get_lab_app(), ["https://msidlab.com/.default"])
510+
try:
511+
cls.session = get_session(get_lab_app(), ["https://msidlab.com/.default"])
512+
except LabTokenError:
513+
cls.session = get_session(get_lab_app(), [
514+
# A lab change since June 10, 2024 which may or may not be reverted
515+
"https://request.msidlab.com/.default",
516+
])
506517

507518
@classmethod
508519
def tearDownClass(cls):

0 commit comments

Comments
 (0)