[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1001373: python-attrs: (autopkgtest) needs update for python3.10: error text changed



Source: python-attrs
Version: 20.3.0-1
Severity: serious
X-Debbugs-CC: debian-ci@lists.debian.org
Tags: sid bookworm
User: debian-ci@lists.debian.org
Usertags: needs-update
Control: affects -1 src:python3-defaults

Dear maintainer(s),

We are in the transition of adding python2.10 to the supported Python versions [0]. With a recent upload of python3-defaults the autopkgtest of python-attrs fails in testing when that autopkgtest is run with the binary packages of python3-defaults from unstable. It passes when run with only packages from testing. In tabular form:

                       pass            fail
python3-defaults       from testing    3.9.8-1
python-attrs           from testing    20.3.0-1
all others             from testing    from testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of python3-defaults to testing [1]. https://docs.python.org/3/whatsnew/3.10.html lists what's new in Python2.10, it may help to identify what needs to be updated.

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=python3-defaults

https://ci.debian.net/data/autopkgtest/testing/amd64/p/python-attrs/17393460/log.gz


=================================== FAILURES =================================== ____________________________ TestAddInit.test_init _____________________________

self = <tests.test_dunders.TestAddInit object at 0x7f0b4100bb50>

    @given(booleans(), booleans())
  def test_init(self, slots, frozen):

tests/test_dunders.py:612: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <tests.test_dunders.TestAddInit object at 0x7f0b4100bb50>, slots = False
frozen = False

    @given(booleans(), booleans())
    def test_init(self, slots, frozen):
        """
        If `init` is False, ignore that attribute.
        """
        C = make_class(
            "C",
            {"a": attr.ib(init=False), "b": attr.ib()},
            slots=slots,
            frozen=frozen,
        )
        with pytest.raises(TypeError) as e:
            C(a=1, b=2)
    >       assert (
            "__init__() got an unexpected keyword argument 'a'"
            == e.value.args[0]
        )
E assert "__init__() g... argument 'a'" == "C.__init__()... argument 'a'"
E         - C.__init__() got an unexpected keyword argument 'a'
E         ? --
E         + __init__() got an unexpected keyword argument 'a'

tests/test_dunders.py:625: AssertionError
---------------------------------- Hypothesis ----------------------------------
Falsifying example: test_init(
    self=<tests.test_dunders.TestAddInit at 0x7f0b4100bb50>,
    slots=False,
    frozen=False,
)
___________________________ TestEvolve.test_unknown ____________________________

self = <tests.test_funcs.TestEvolve object at 0x7f0b40726590>

    @given(simple_classes())
  def test_unknown(self, C):

tests/test_funcs.py:539: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.test_funcs.TestEvolve object at 0x7f0b40726590>
C = <class 'tests.strategies.HypClass'>

    @given(simple_classes())
    def test_unknown(self, C):
        """
        Wanting to change an unknown attribute raises an
        AttrsAttributeNotFoundError.
        """
        # No generated class will have a four letter attribute.
        with pytest.raises(TypeError) as e:
            evolve(C(), aaaa=2)
        expected = "__init__() got an unexpected keyword argument 'aaaa'"
      assert (expected,) == e.value.args
E assert ("__init__() ...ment 'aaaa'",) == ("HypClass.__...ment 'aaaa'",) E At index 0 diff: "__init__() got an unexpected keyword argument 'aaaa'" != "HypClass.__init__() got an unexpected keyword argument 'aaaa'"
E         Use -v to get the full diff

tests/test_funcs.py:548: AssertionError
---------------------------------- Hypothesis ----------------------------------
Falsifying example: test_unknown(
    self=<tests.test_funcs.TestEvolve at 0x7f0b40726590>,
    C=tests.strategies.HypClass,
)

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: