• Bug#1061754: python-json-log-formatter ftbfs with Python 3.12 as defaul

    From Colin Watson@21:1/5 to Matthias Klose on Tue Mar 5 19:20:01 2024
    Control: tag -1 moreinfo

    On Mon, Jan 29, 2024 at 01:10:20PM +0100, Matthias Klose wrote:
    With python3-defaults from experimental, the package fails to build:

    [...]
    ============================= test session starts ==============================
    platform linux -- Python 3.12.1, pytest-7.4.4, pluggy-1.4.0
    cachedir: .tox/py312/.pytest_cache
    rootdir: /<<PKGBUILDDIR>>
    collected 29 items

    tests.py ...FF........................

    =================================== FAILURES ===================================
    _ JSONFormatterTest.test_message_and_time_and_extra_are_in_json_record_when_extra_is_provided
    _

    self = <tests.JSONFormatterTest testMethod=test_message_and_time_and_extra_are_in_json_record_when_extra_is_provided>

    def test_message_and_time_and_extra_are_in_json_record_when_extra_is_provided(self):
    logger.info('Sign up', extra={'fizz': 'bazz'})
    json_record = json.loads(log_buffer.getvalue())
    expected_fields = set([
    'message',
    'time',
    'fizz',
    ])
    self.assertEqual(set(json_record), expected_fields)
    E AssertionError: Items in the first set but not the second:
    E 'taskName'

    While it looks like this was fixed upstream in https://github.com/marselester/json-log-formatter/commit/74f04ee4f6aa8e461fcb2d688459888b7279fc73
    and I guess we could cherry-pick that, I also can't reproduce this
    failure in current unstable with Python 3.12. Can you still reproduce
    this?

    Thanks,

    --
    Colin Watson (he/him) [cjwatson@debian.org]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Colin Watson@21:1/5 to Colin Watson on Thu Mar 7 21:00:01 2024
    On Tue, Mar 05, 2024 at 06:15:32PM +0000, Colin Watson wrote:
    While it looks like this was fixed upstream in https://github.com/marselester/json-log-formatter/commit/74f04ee4f6aa8e461fcb2d688459888b7279fc73
    and I guess we could cherry-pick that, I also can't reproduce this
    failure in current unstable with Python 3.12. Can you still reproduce
    this?

    I guess it doesn't hurt to apply this anyway, so I'm just going ahead.

    --
    Colin Watson (he/him) [cjwatson@debian.org]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)