Bug 2323170

Summary: python-msal fails to build with Python 3.14: test_no_two_concurrent_receivers_can_listen_on_same_port: AssertionError: OSError not raised
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-msalAssignee: Major Hayden 🤠 <mhayden>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, fti-bugs, jeremy, ksurma, mhayden, mhroncok, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2322407, 2339432, 2339435, 2371679, 2371811, 2371961, 2372025, 2372133    

Description Karolina Surma 2024-11-01 15:00:22 UTC
python-msal fails to build with Python 3.14.0a1.


=================================== 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
=========================== short test summary info ============================
FAILED tests/test_authcode.py::TestAuthCodeReceiver::test_no_two_concurrent_receivers_can_listen_on_same_port

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08198524-python-msal/

For all our attempts to build python-msal with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-msal/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Ben Beasley 2024-11-10 22:13:12 UTC
It’s not immediately obvious to me what is going on here, but I reported it upstream in https://github.com/AzureAD/microsoft-authentication-library-for-python/issues/768.

Comment 2 Aoife Moloney 2025-02-26 13:14:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 3 Ben Beasley 2025-03-14 02:31:03 UTC
https://github.com/python/cpython/issues/127319

Comment 4 Ben Beasley 2025-06-04 11:29:03 UTC
I just asked for status in https://github.com/python/cpython/issues/127319, which has had no activity since November.

Comment 5 Karolina Surma 2025-06-11 16:00:59 UTC
*** Bug 2371990 has been marked as a duplicate of this bug. ***

Comment 6 Jeremy Cline 2025-06-11 19:40:06 UTC
(In reply to Ben Beasley from comment #4)
> I just asked for status in https://github.com/python/cpython/issues/127319,
> which has had no activity since November.

I submitted https://github.com/python/cpython/pull/135405 in case they're inclined to merge what amounts to a revert. Reading through the original issue that led to the behavior change makes me think it wasn't intentional, since it makes no mention of beginning to allow port re-use.