Skip to content

[Bug] Regression on Python 3.14.0a1: TestAuthCodeReceiver.test_no_two_concurrent_receivers_can_listen_on_same_port fails #768

@musicinmybrain

Description

@musicinmybrain

Describe the bug
With Python 3.14.0a1, TestAuthCodeReceiver.test_no_two_concurrent_receivers_can_listen_on_same_port fails.

To Reproduce
Steps to reproduce the behavior:

$ python3.14 --version
Python 3.14.0a1
$ python3.14 -m venv _e
$ . _e/bin/activate
(_e) $ pip install -e .
(_e) $ pip install -r requirements.txt
(_e) $ python -m pytest

Expected behavior
All tests pass.

What you see instead

========================================================================================== short test summary info ==========================================================================================
FAILED tests/test_authcode.py::TestAuthCodeReceiver::test_no_two_concurrent_receivers_can_listen_on_same_port - AssertionError: OSError not raised
========================================================================== 1 failed, 151 passed, 70 skipped, 42 warnings in 45.61s ==========================================================================

The MSAL Python version you are using

7db6c2c

1.31.0

Additional context

Detailed test output:

================================================================================================= FAILURES ==================================================================================================
_______________________________________________________________ TestAuthCodeReceiver.test_no_two_concurrent_receivers_can_listen_on_same_port _______________________________________________________________

self = <tests.test_authcode.TestAuthCodeReceiver testMethod=test_no_two_concurrent_receivers_can_listen_on_same_port>

    def test_no_two_concurrent_receivers_can_listen_on_same_port(self):
        with AuthCodeReceiver() as receiver:
            expected_error = OSError if sys.version_info[0] > 2 else socket.error
>           with self.assertRaises(expected_error):
E           AssertionError: OSError not raised

tests/test_authcode.py:24: AssertionError

If I repeat the same steps to reproduce using Python 3.13 instead of 3.14, all tests pass.

This was reported dowstream in Fedora Linux as part of early Python 3.14 testing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions