py38 unit test failures

Bug #1855914 reported by Corey Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.privsep
Fix Released
Undecided
Ben Nemec

Bug Description

The following tests are failing for tox -e py38:

==============================
Failed 2 tests - output below:
==============================

oslo_privsep.tests.test_daemon.LogTest.test_format_record
---------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    b'Traceback (most recent call last):'
    b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/.tox/py38/lib/python3.8/site-packages/fixtures/fixture.py", line 197, in setUp' b' self._setUp()'
    b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/.tox/py38/lib/python3.8/site-packages/fixtures/_fixtures/logger.py", line 112, in _setUp'
    b' handler.setFormatter(formatter(self._format, self._datefmt))'
    b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/oslo_privsep/tests/test_daemon.py", line 62, in __init__'
    b' super(LogRecorder, self).__init__(*args, **kwargs)'
    b' File "/usr/lib/python3.8/logging/__init__.py", line 576, in __init__' b' self._style.validate()'
    b' File "/usr/lib/python3.8/logging/__init__.py", line 429, in validate'
    b' raise ValueError("Invalid format \'%s\' for \'%s\' style" % (self._fmt, self.default_format[0]))' b"ValueError: Invalid format 'dummy' for '%' style"
    b''
                                                                                                                                                                                                                                                                                                                                                                               Captured traceback-1:
~~~~~~~~~~~~~~~~~~~~~ b'Traceback (most recent call last):'
    b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/.tox/py38/lib/python3.8/site-packages/fixtures/fixture.py", line 197, in setUp' b' self._setUp()' b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/.tox/py38/lib/python3.8/site-packages/fixtures/_fixtures/logger.py", line 112, in _setUp'
    b' handler.setFormatter(formatter(self._format, self._datefmt))'
    b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/oslo_privsep/tests/test_daemon.py", line 62, in __init__'
    b' super(LogRecorder, self).__init__(*args, **kwargs)'
    b' File "/usr/lib/python3.8/logging/__init__.py", line 576, in __init__'
    b' self._style.validate()'
    b' File "/usr/lib/python3.8/logging/__init__.py", line 429, in validate'
    b' raise ValueError("Invalid format \'%s\' for \'%s\' style" % (self._fmt, self.default_format[0]))'
    b"ValueError: Invalid format 'dummy' for '%' style"
    b''
    b'During handling of the above exception, another exception occurred:'
    b''
    b'Traceback (most recent call last):'
    b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/.tox/py38/lib/python3.8/site-packages/fixtures/fixture.py", line 208, in setUp'
    b' raise SetupError(details)'
    b'fixtures.fixture.SetupError: {"pythonlogging:\'\'": <Content type=text/plain; charset="utf8", value=b\'\'>}'
    b''

oslo_privsep.tests.test_daemon.LogTest.test_record_data
-------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    b'Traceback (most recent call last):'
    b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/.tox/py38/lib/python3.8/site-packages/fixtures/fixture.py", line 197, in setUp'
    b' self._setUp()'
    b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/.tox/py38/lib/python3.8/site-packages/fixtures/_fixtures/logger.py", line 112, in _setUp'
    b' handler.setFormatter(formatter(self._format, self._datefmt))'
    b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/oslo_privsep/tests/test_daemon.py", line 62, in __init__'
    b' super(LogRecorder, self).__init__(*args, **kwargs)'
    b' File "/usr/lib/python3.8/logging/__init__.py", line 576, in __init__'
    b' self._style.validate()'
    b' File "/usr/lib/python3.8/logging/__init__.py", line 429, in validate'
    b' raise ValueError("Invalid format \'%s\' for \'%s\' style" % (self._fmt, self.default_format[0]))'
    b"ValueError: Invalid format 'dummy' for '%' style"
    b''

Captured traceback-1:
~~~~~~~~~~~~~~~~~~~~~
    b'Traceback (most recent call last):'
    b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/.tox/py38/lib/python3.8/site-packages/fixtures/fixture.py", line 197, in setUp'
    b' self._setUp()'
    b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/.tox/py38/lib/python3.8/site-packages/fixtures/_fixtures/logger.py", line 112, in _setUp'
    b' handler.setFormatter(formatter(self._format, self._datefmt))'
    b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/oslo_privsep/tests/test_daemon.py", line 62, in __init__'
    b' super(LogRecorder, self).__init__(*args, **kwargs)'
    b' File "/usr/lib/python3.8/logging/__init__.py", line 576, in __init__'
    b' self._style.validate()'
    b' File "/usr/lib/python3.8/logging/__init__.py", line 429, in validate'
    b' raise ValueError("Invalid format \'%s\' for \'%s\' style" % (self._fmt, self.default_format[0]))'
    b"ValueError: Invalid format 'dummy' for '%' style"
    b''
    b'During handling of the above exception, another exception occurred:'
    b''
    b'Traceback (most recent call last):'
    b' File "/home/corey/pkg/ussuri/upstream/oslo.privsep/.tox/py38/lib/python3.8/site-packages/fixtures/fixture.py", line 208, in setUp'
    b' raise SetupError(details)'
    b'fixtures.fixture.SetupError: {"pythonlogging:\'\'": <Content type=text/plain; charset="utf8", value=b\'\'>}'
    b''

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

Fix proposed to branch: master
Review: https://review.opendev.org/713496

Changed in oslo.privsep:
assignee: nobody → Ben Nemec (bnemec)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.privsep (master)

Reviewed: https://review.opendev.org/713496
Committed: https://git.openstack.org/cgit/openstack/oslo.privsep/commit/?id=f19765c683ce847f8d0ae0499d9e67c41114c0b7
Submitter: Zuul
Branch: master

commit f19765c683ce847f8d0ae0499d9e67c41114c0b7
Author: Ben Nemec <email address hidden>
Date: Tue Mar 17 17:28:58 2020 +0000

    Make compatible with msgpack 1.0.0

    There are a couple of things that changed in msgpack 1.0.0 that were
    breaking oslo.privsep:

    1) The encoding parameter to Unpacker was removed. This has been
       deprecated for a while in favor of the `raw` parameter[0], so this
       change switches to using raw.

    2) The strict_map_key parameter default was changed from False to
       True.[1] I haven't found an explanation of why this was done, but
       we can explicitly set it False to maintain the previous behavior.

    Change-Id: Ia97ecf965d807f12524d5b6602446934b5813ce6
    Closes-Bug: 1855914
    Closes-Bug: 1864811
    0: https://msgpack-python.readthedocs.io/en/latest/api.html#msgpack.Unpacker
    1: https://github.com/msgpack/msgpack-python/pull/392/commits/6e1d12c0a2072572890cbb124b94cb08b582dd2d

Changed in oslo.privsep:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.privsep 2.1.0

This issue was fixed in the openstack/oslo.privsep 2.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.privsep (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/757033

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.privsep (stable/train)

Reviewed: https://review.opendev.org/757033
Committed: https://git.openstack.org/cgit/openstack/oslo.privsep/commit/?id=ced0e7b33b617fbfd9137cf2917ab279092dbd7f
Submitter: Zuul
Branch: stable/train

commit ced0e7b33b617fbfd9137cf2917ab279092dbd7f
Author: Ben Nemec <email address hidden>
Date: Tue Mar 17 17:28:58 2020 +0000

    Make compatible with msgpack 1.0.0

    There are a couple of things that changed in msgpack 1.0.0 that were
    breaking oslo.privsep:

    1) The encoding parameter to Unpacker was removed. This has been
       deprecated for a while in favor of the `raw` parameter[0], so this
       change switches to using raw.

    2) The strict_map_key parameter default was changed from False to
       True.[1] I haven't found an explanation of why this was done, but
       we can explicitly set it False to maintain the previous behavior.

    Closes-Bug: 1855914
    Closes-Bug: 1864811
    0: https://msgpack-python.readthedocs.io/en/latest/api.html#msgpack.Unpacker
    1: https://github.com/msgpack/msgpack-python/pull/392/commits/6e1d12c0a2072572890cbb124b94cb08b582dd2d

    Change-Id: Ia97ecf965d807f12524d5b6602446934b5813ce6
    Closes-Bug: 1899140
    (cherry picked from commit f19765c683ce847f8d0ae0499d9e67c41114c0b7)

tags: added: in-stable-train
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.