oslo.log: test failures with Python 3.13.0b2

Bug #2069084 reported by Michał Górny
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.log
In Progress
Undecided
Unassigned

Bug Description

When running the test suite on Python 3.13.0b2, I'm getting the following test failures (note that I had to remove the test requiring eventlet, as greenlet doesn't build on py3.13):

```
oslo_log.tests.unit.test_log.ContextFormatterTestCase.test_rfc5424_isotime_format_no_microseconds
-------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/usr/lib/python3.13/unittest/mock.py", line 1420, in patched
    return func(*newargs, **newkeywargs)

      File "/tmp/oslo.log/oslo_log/tests/unit/test_log.py", line 1003, in test_rfc5424_isotime_format_no_microseconds
    self.assertEqual(expected, self.stream.getvalue())
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

      File "/tmp/oslo.log/.tox/py313/lib/python3.13/site-packages/testtools/testcase.py", line 419, in assertEqual
    self.assertThat(observed, matcher, message)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^

      File "/tmp/oslo.log/.tox/py313/lib/python3.13/site-packages/testtools/testcase.py", line 509, in assertThat
    raise mismatch_error

    testtools.matchers._impl.MismatchError: !=:
reference = '''\
2015-12-16T13:54:26.000000+00:00 test
'''
actual = '''\
2015-12-16T13:54:26+00:00 test
'''

oslo_log.tests.unit.test_log.MutateTestCase.test_remove_logger
--------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/tmp/oslo.log/oslo_log/tests/unit/test_log.py", line 1593, in test_remove_logger
    log.warn("warn")
    ^^^^^^^^

    AttributeError: 'Logger' object has no attribute 'warn'
```

I'm going to try to submit a fix for these.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.log (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/oslo.log/+/921797

Changed in oslo.log:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/oslo.log/+/921798

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on oslo.log (master)

Change abandoned by "Michał Górny <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/oslo.log/+/921798
Reason: Incorrect solution.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.log (master)

Reviewed: https://review.opendev.org/c/openstack/oslo.log/+/921797
Committed: https://opendev.org/openstack/oslo.log/commit/60c39a3b874f027f690b49c987daa31c37bfb0e6
Submitter: "Zuul (22348)"
Branch: master

commit 60c39a3b874f027f690b49c987daa31c37bfb0e6
Author: Michał Górny <email address hidden>
Date: Tue Jun 11 21:35:58 2024 +0200

    Replace deprecated logging.warn() calls with logging.warning()

    Replace the deprecated logging.warn() calls with logging.warning().
    The former were undocumented, deprecated since Python 3.3 and eventually
    removed in Python 3.13.

    See: https://docs.python.org/3.13/whatsnew/3.13.html#logging
    Partial-Bug: 2069084
    Change-Id: I6d1ee13409fe84cd54b7a3aa3ed862bc6e33f1c3
    Signed-off-by: Michał Górny <email address hidden>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.