Bug 2220180 - F39FailsToInstall: python3-daiquiri
Summary: F39FailsToInstall: python3-daiquiri
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: python-daiquiri
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Joel Capitao
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.12 F39FailsToInstall 2220002
TreeView+ depends on / blocked
 
Reported: 2023-07-05 19:10 UTC by Fedora Fails To Install
Modified: 2023-07-19 08:05 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-07-19 08:05:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Fedora Fails To Install 2023-07-05 19:10:15 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/

Your package (python-daiquiri) Fails To Install in Fedora 39:

can't install python3-daiquiri:
  - nothing provides python3.11dist(python-json-logger) needed by python3-daiquiri-3.2.1-1.fc39.noarch
  - nothing provides python(abi) = 3.11 needed by python3-daiquiri-3.2.1-1.fc39.noarch
  
If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.


If you don't react accordingly to the policy for FTBFS/FTI bugs (https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/), your package may be orphaned in 8+ weeks.


P.S. The data was generated solely from koji buildroot, so it might be newer than the latest compose or the content on mirrors. To reproduce, use the koji/local repo only, e.g. in mock:

    $ mock -r fedora-39-x86_64 --config-opts mirrored=False install python3-daiquiri


P.P.S. If this bug has been reported in the middle of upgrading multiple dependent packages, please consider using side tags: https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/#updating-inter-dependent-packages

Thanks!

Comment 1 Joel Capitao 2023-07-10 15:18:31 UTC
=================================== FAILURES ===================================
____________________ TestDaiquiri.test_setup_json_formatter ____________________
self = <daiquiri.tests.test_daiquiri.TestDaiquiri testMethod=test_setup_json_formatter>
    def test_setup_json_formatter(self) -> None:
        stream = io.StringIO()
        daiquiri.setup(
            outputs=(
                daiquiri.output.Stream(
                    stream, formatter=daiquiri.formatter.JSON_FORMATTER
                ),
            )
        )
        daiquiri.getLogger(__name__).warning("foobar")
>       self.assertEqual({"message": "foobar"}, json.loads(stream.getvalue()))
E       AssertionError: {'message': 'foobar'} != {'message': 'foobar', 'taskName': None}
E       - {'message': 'foobar'}
E       + {'message': 'foobar', 'taskName': None}
daiquiri/tests/test_daiquiri.py:42: AssertionError
______________ TestDaiquiri.test_setup_json_formatter_with_extras ______________
self = <daiquiri.tests.test_daiquiri.TestDaiquiri testMethod=test_setup_json_formatter_with_extras>
    def test_setup_json_formatter_with_extras(self) -> None:
        stream = io.StringIO()
        daiquiri.setup(
            outputs=(
                daiquiri.output.Stream(
                    stream, formatter=daiquiri.formatter.JSON_FORMATTER
                ),
            )
        )
        daiquiri.getLogger(__name__).warning("foobar", foo="bar")
>       self.assertEqual(
            {"message": "foobar", "foo": "bar"}, json.loads(stream.getvalue())
        )
E       AssertionError: {'message': 'foobar', 'foo': 'bar'} != {'message': 'foobar', 'taskName': None, 'foo': 'bar'}
E       - {'foo': 'bar', 'message': 'foobar'}
E       + {'foo': 'bar', 'message': 'foobar', 'taskName': None}
E       ?                                   ++++++++++++++++++
daiquiri/tests/test_daiquiri.py:54: AssertionError
___________________________ TestOutput.test_datadog ____________________________
self = <daiquiri.tests.test_output.TestOutput testMethod=test_datadog>
    def test_datadog(self) -> None:
        with mock.patch("socket.socket") as mock_socket:
            socket_instance = mock_socket.return_value
            daiquiri.setup(outputs=(daiquiri.output.Datadog(),), level=logging.DEBUG)
            logger = daiquiri.getLogger()
            logger.error("foo", bar=1)
            logger.info("bar")
            try:
                1 / 0
            except ZeroDivisionError:
                logger = daiquiri.getLogger("saymyname")
                logger.error("backtrace", exc_info=True)
            socket_instance.connect.assert_called_once_with(("127.0.0.1", 10518))
>           socket_instance.sendall.assert_has_calls(
                [
                    mock.call(
                        DatadogMatcher(
                            {
                                "status": "error",
                                "message": "foo",
                                "bar": 1,
                                "logger": {"name": "root"},
                                "timestamp": mock.ANY,
                            }
                        )
                    ),
                    mock.call(
                        DatadogMatcher(
                            {
                                "status": "info",
                                "message": "bar",
                                "logger": {"name": "root"},
                                "timestamp": mock.ANY,
                            }
                        )
                    ),
                    mock.call(
                        DatadogMatcher(
                            {
                                "status": "error",
                                "message": "backtrace",
                                "logger": {"name": "saymyname"},
                                "timestamp": mock.ANY,
                                "error": {
                                    "kind": "ZeroDivisionError",
                                    "stack": None,
                                    "message": mock.ANY,
                                },
                            }
                        )
                    ),
                ]
            )
daiquiri/tests/test_output.py:109:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='socket().sendall' id='140706521580896'>
calls = [call(b'{"status": "error", "message": "foo", "bar": 1, "logger": {"name": "root"}, "timestamp": "unserializable"}\n')..."timestamp": "unserializable", "error": {"kind": "ZeroDivisionError", "stack": null, "message": "unserializable"}}\n')]
any_order = False
    def assert_has_calls(self, calls, any_order=False):
        """assert the mock has been called with the specified calls.
        The `mock_calls` list is checked for the calls.

        If `any_order` is False (the default) then the calls must be
        sequential. There can be extra calls before or after the
        specified calls.

        If `any_order` is True then the calls can be in any order, but
        they must all appear in `mock_calls`."""
        expected = [self._call_matcher(c) for c in calls]
        cause = next((e for e in expected if isinstance(e, Exception)), None)
        all_calls = _CallList(self._call_matcher(c) for c in self.mock_calls)
        if not any_order:
            if expected not in all_calls:
                if cause is None:
                    problem = 'Calls not found.'
                else:
                    problem = ('Error processing expected calls.\n'
                               'Errors: {}').format(
                                   [e if isinstance(e, Exception) else None
                                    for e in expected])
>               raise AssertionError(
                    f'{problem}\n'
                    f'Expected: {_CallList(calls)}'
                    f'{self._calls_repr(prefix="Actual").rstrip(".")}'
                ) from cause
E               AssertionError: Calls not found.
E               Expected: [call(b'{"status": "error", "message": "foo", "bar": 1, "logger": {"name": "root"}, "timestamp": "unserializable"}\n'),
E                call(b'{"status": "info", "message": "bar", "logger": {"name": "root"}, "timestamp": "unserializable"}\n'),
E                call(b'{"status": "error", "message": "backtrace", "logger": {"name": "saymyname"}, "timestamp": "unserializable", "error": {"kind": "ZeroDivisionError", "stack": null, "message": "unserializable"}}\n')]
E               Actual: [call(b'{"message": "foo", "taskName": null, "bar": 1, "timestamp": "2023-07-10T14:54:54.024694+00:00", "status": "error", "logger": {"name": "root"}}\n'),
E                call(b'{"message": "bar", "taskName": null, "timestamp": "2023-07-10T14:54:54.027714+00:00", "status": "info", "logger": {"name": "root"}}\n'),
E                call(b'{"message": "backtrace", "taskName": null, "timestamp": "2023-07-10T14:54:54.027859+00:00", "status": "error", "logger": {"name": "saymyname"}, "error": {"kind": "ZeroDivisionError", "stack": null, "message": "Traceback (most recent call last):\\n  File \\"/builddir/build/BUILD/daiquiri-3.2.1/daiquiri/tests/test_output.py\\", line 104, in test_datadog\\n    1 / 0\\n    ~~^~~\\nZeroDivisionError: division by zero"}}\n')]
/usr/lib64/python3.12/unittest/mock.py:981: AssertionError

=========================== short test summary info ============================
FAILED daiquiri/tests/test_daiquiri.py::TestDaiquiri::test_setup_json_formatter
FAILED daiquiri/tests/test_daiquiri.py::TestDaiquiri::test_setup_json_formatter_with_extras
FAILED daiquiri/tests/test_output.py::TestOutput::test_datadog - AssertionErr...
=================== 3 failed, 17 passed, 1 warning in 0.21s ====================

Comment 2 Joel Capitao 2023-07-18 08:03:05 UTC
I proposed a patch upstream https://github.com/Mergifyio/daiquiri/pull/74 which only works with python3.12
I will apply it at distgit level to unblock.

Comment 3 Joel Capitao 2023-07-18 13:16:17 UTC
(In reply to Joel Capitao from comment #2)
> I proposed a patch upstream https://github.com/Mergifyio/daiquiri/pull/74
> which only works with python3.12
> I will apply it at distgit level to unblock.

It's now backward compatible with older Python releases.
I'll wait a little bit for the patch to be merged upstream.

Comment 4 Joel Capitao 2023-07-19 08:05:23 UTC
I don't want to put pressure on upstream folks.
So, in order to unblock the situation, I disabled the tests failing as it's test issue only.
https://src.fedoraproject.org/rpms/python-daiquiri/c/9bc76401eff44940ff79aaefac890c30022f2921?branch=rawhide
https://koji.fedoraproject.org/koji/taskinfo?taskID=103546216

I'll follow my patch upstream https://github.com/Mergifyio/daiquiri/pull/74, and will
propose an update once the patch is merged and contained in a new release.


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