Bug 2263017 - python-aiosmtpd fails to build with Python 3.13: aiosmtpd/tests/test_server.py::TestUnthreaded::test_unixsocket AssertionError: assert Path(controller.unix_socket).exists()
Summary: python-aiosmtpd fails to build with Python 3.13: aiosmtpd/tests/test_server.p...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-aiosmtpd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Aurelien Bompard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2291610 (view as bug list)
Depends On:
Blocks: F41FTBFS F41FailsToInstall PYTHON3.13 2291557 2291558 2291678 2291702 2291767 2291880
TreeView+ depends on / blocked
 
Reported: 2024-02-06 16:02 UTC by Karolina Surma
Modified: 2024-10-27 04:25 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-06-28 23:09:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github aio-libs aiosmtpd issues 403 0 None open assert_smtp_socket fails with Python 3.13.0a3 2024-02-06 16:41:28 UTC

Description Karolina Surma 2024-02-06 16:02:59 UTC
python-aiosmtpd fails to build with Python 3.13.0a3.

=================================== FAILURES ===================================
________________________ TestUnthreaded.test_unixsocket ________________________

self = <aiosmtpd.tests.test_server.TestUnthreaded object at 0x7f9b025449b0>
safe_socket_dir = PosixPath('/tmp/tmpmdp0502n')
autostop_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
runner = <function TestUnthreaded.runner.<locals>.starter at 0x7f9b026cdb20>

    @pytest.mark.skipif(in_cygwin(), reason="Cygwin AF_UNIX is problematic")
    @pytest.mark.skipif(in_win32(), reason="Win32 does not yet fully implement AF_UNIX")
    def test_unixsocket(self, safe_socket_dir, autostop_loop, runner):
        sockfile = safe_socket_dir / "smtp"
        cont = UnixSocketUnthreadedController(
            Sink(), unix_socket=sockfile, loop=autostop_loop
        )
        cont.begin()
        # Make sure event loop is not running (will be started in thread)
        assert autostop_loop.is_running() is False
        runner(autostop_loop)
        # Make sure event loop is up and running (started within thread)
        assert autostop_loop.is_running() is True
        # Check we can connect
        assert_smtp_socket(cont)
        # Wait until thread ends, which it will be when the loop autostops
        runner.join(timeout=AUTOSTOP_DELAY)
        assert runner.is_alive() is False
        catchup_delay()
        assert autostop_loop.is_running() is False
        # At this point, the loop _has_ stopped, but the task is still listening
        assert assert_smtp_socket(cont) is False
        # Stop the task
        cont.end()
        catchup_delay()
        # Now the listener has gone away
        # noinspection PyTypeChecker
        with pytest.raises((socket.timeout, ConnectionError)):
>           assert_smtp_socket(cont)

aiosmtpd/tests/test_server.py:452: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

controller = <aiosmtpd.controller.UnixSocketUnthreadedController object at 0x7f9b02776db0>

    def assert_smtp_socket(controller: UnixSocketMixin) -> bool:
>       assert Path(controller.unix_socket).exists()
E       AssertionError: assert False
E        +  where False = <bound method PathBase.exists of PosixPath('/tmp/tmpmdp0502n/smtp')>()
E        +    where <bound method PathBase.exists of PosixPath('/tmp/tmpmdp0502n/smtp')> = PosixPath('/tmp/tmpmdp0502n/smtp').exists
E        +      where PosixPath('/tmp/tmpmdp0502n/smtp') = Path('/tmp/tmpmdp0502n/smtp')
E        +        where '/tmp/tmpmdp0502n/smtp' = <aiosmtpd.controller.UnixSocketUnthreadedController object at 0x7f9b02776db0>.unix_socket

aiosmtpd/tests/test_server.py:103: AssertionError
------------------------------ Captured log call -------------------------------
INFO     mail.log:smtp.py:407 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO     mail.log:smtp.py:519 Peer: ''
INFO     mail.log:smtp.py:601 '' handling connection
DEBUG    mail.log:smtp.py:587 '' << b'220 localhost.localdomain Python SMTP 1.4.4.post2'
DEBUG    mail.log:smtp.py:286 _handle_client readline: b'EHLO socket.test\r\n'
INFO     mail.log:smtp.py:286 '' >> b'EHLO socket.test'
DEBUG    mail.log:smtp.py:587 '' << b'250-localhost.localdomain'
DEBUG    mail.log:smtp.py:587 '' << b'250-SIZE 33554432'
DEBUG    mail.log:smtp.py:587 '' << b'250-8BITMIME'
DEBUG    mail.log:smtp.py:587 '' << b'250-SMTPUTF8'
DEBUG    mail.log:smtp.py:587 '' << b'250 HELP'
DEBUG    mail.log:smtp.py:286 _handle_client readline: b'QUIT\r\n'
INFO     mail.log:smtp.py:286 '' >> b'QUIT'
DEBUG    mail.log:smtp.py:587 '' << b'221 Bye'
INFO     mail.log:smtp.py:525 '' connection lost
INFO     mail.log:smtp.py:746 '' Connection lost during _handle_client()
=========================== short test summary info ============================
FAILED aiosmtpd/tests/test_server.py::TestUnthreaded::test_unixsocket - Asser...
====== 1 failed, 559 passed, 1 skipped, 4 deselected in 80.33s (0:01:20) =======


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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06989324-python-aiosmtpd/

For all our attempts to build python-aiosmtpd with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-aiosmtpd/

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.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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 Miro Hrončok 2024-02-06 16:41:28 UTC
I've reproduced this upstream and reported https://github.com/aio-libs/aiosmtpd/issues/403

Comment 2 Karolina Surma 2024-06-12 14:58:22 UTC
*** Bug 2291610 has been marked as a duplicate of this bug. ***

Comment 3 Fedora Fails To Install 2024-06-19 19:58:45 UTC
Hello,

Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py
If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/

This package fails to install and maintainers are advised to take one of the following actions:

 - Fix this bug and close this bugzilla once the update makes it to the repository.
   (The same script that posted this comment will eventually close this bugzilla
   when the fixed package reaches the repository, so you don't have to worry about it.)

or

 - Move this bug to ASSIGNED if you plan on fixing this, but simply haven't done so yet.

or

 - Orphan the package if you no longer plan to maintain it.


If you do not take one of these actions, the process at https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs will continue.
This package may be orphaned in 7+ weeks.
This is the first reminder (step 3) from the policy.

Don't hesitate to ask for help on https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ if you are unsure how to fix this bug.

Comment 4 Sandro Mani 2024-06-21 07:51:49 UTC
Proposed PR: https://src.fedoraproject.org/rpms/python-aiosmtpd/pull-request/2

Comment 5 Roman Inflianskas 2024-06-28 05:57:29 UTC
Upstream PR: https://github.com/aio-libs/aiosmtpd/pull/473

Comment 6 Sandro Mani 2024-06-28 23:09:10 UTC
Thanks, I've added the patch to python-aiosmtpd-1.4.4.post2-10.fc41.

Comment 7 Red Hat Bugzilla 2024-10-27 04:25:05 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


Note You need to log in before you can comment on or make changes to this bug.