--- Begin Message ---
Source: magicgui
Version: 0.7.2-4
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: [email protected]
Usertags: ftbfs-20240702 ftbfs-trixie
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> debian/rules binary
> dh binary --with=python3 --with=numpy3 --buildsystem=pybuild
> dh_update_autotools_config -O--buildsystem=pybuild
> dh_autoreconf -O--buildsystem=pybuild
> dh_auto_configure -O--buildsystem=pybuild
> dh_auto_build -O--buildsystem=pybuild
> I: pybuild plugin_pyproject:129: Building wheel for python3.11 with "build"
> module
> I: pybuild base:311: python3.11 -m build --skip-dependency-check
> --no-isolation --wheel --outdir
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_magicgui
> * Building wheel...
> Successfully built magicgui-0.7.2-py3-none-any.whl
> I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.11 with
> "installer" module
> I: pybuild plugin_pyproject:129: Building wheel for python3.12 with "build"
> module
> I: pybuild base:311: python3.12 -m build --skip-dependency-check
> --no-isolation --wheel --outdir
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_magicgui
> * Building wheel...
> Successfully built magicgui-0.7.2-py3-none-any.whl
> I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.12 with
> "installer" module
> dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:311: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_magicgui/build; python3.11 -m pytest
> tests
> ============================= test session starts
> ==============================
> platform linux -- Python 3.11.9, pytest-8.2.2, pluggy-1.5.0
> PyQt5 5.15.10 -- Qt runtime 5.15.13 -- Qt compiled 5.15.13
> rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_magicgui/build
> configfile: pyproject.toml
> plugins: xvfb-3.0.0, qt-4.3.1
> collected 313 items / 3 skipped
>
> tests/test_application.py . [
> 0%]
> tests/test_backends.py s......... [
> 3%]
> tests/test_container.py .............. [
> 7%]
> tests/test_docs.py ss. [
> 8%]
> tests/test_factory.py .......... [
> 12%]
> tests/test_gui_class.py F.FFF [
> 13%]
> tests/test_magicgui.py ...................x............................. [
> 29%]
> [
> 29%]
> tests/test_persistence.py ... [
> 30%]
> tests/test_signature.py .... [
> 31%]
> tests/test_table.py ............................sss......... [
> 44%]
> tests/test_types.py ............... [
> 49%]
> tests/test_ui_field.py s.ss....ss. [
> 52%]
> tests/test_widgets.py ......s.s..ss..s.ss..ss.sss.s..s.........s......s. [
> 68%]
> s.......s..s............................................................ [
> 91%]
> ..........................
> [100%]
>
> =================================== FAILURES
> ===================================
> ________________________________ test_guiclass
> _________________________________
>
> def test_guiclass():
> """Test that the guiclass decorator works as expected."""
> mock = Mock()
>
> @guiclass
> class Foo:
> a: int = 1
> b: str = "bar"
>
> @button
> def func(self):
> mock(asdict(self))
>
> # example recommended for type checking
> if TYPE_CHECKING:
> gui: ClassVar[Container]
> events: ClassVar[psygnal.SignalGroup]
>
> foo = Foo()
>
> assert foo.a == 1
> assert foo.b == "bar"
>
> > assert isinstance(foo.gui, Container)
>
> tests/test_gui_class.py:43:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> magicgui/schema/_guiclass.py:233: in __get__
> bind_gui_to_instance(wdg, instance)
> magicgui/schema/_guiclass.py:274: in bind_gui_to_instance
> widget.changed.connect_setattr(
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <SignalInstance 'changed' on SpinBox(value=1, annotation=<class
> 'int'>, name='a')>
> obj = test_guiclass.<locals>.Foo(a=1, b='bar'), attr = 'a'
> maxargs = <object object at 0x7f0102bf5c70>
>
> def connect_setattr(
> self,
> obj: object,
> attr: str,
> maxargs: int | None | object = _NULL,
> *,
> on_ref_error: RefErrorChoice = "warn",
> priority: int = 0,
> ) -> WeakCallback[None]:
> """Bind an object attribute to the emitted value of this signal.
>
> Equivalent to calling `self.connect(functools.partial(setattr, obj,
> attr))`,
> but with additional weakref safety (i.e. a strong reference to `obj`
> will not
> be retained). The return object can be used to
> [`disconnect()`][psygnal.SignalInstance.disconnect], (or you can use
> [`disconnect_setattr()`][psygnal.SignalInstance.disconnect_setattr]).
>
> Parameters
> ----------
> obj : object
> An object.
> attr : str
> The name of an attribute on `obj` that should be set to the value
> of this
> signal when emitted.
> maxargs : Optional[int]
> max number of positional args to accept
> on_ref_error: {'raise', 'warn', 'ignore'}, optional
> What to do if a weak reference cannot be created. If 'raise', a
> ReferenceError will be raised. If 'warn' (default), a warning
> will be
> issued and a strong-reference will be used. If 'ignore' a
> strong-reference
> will be used (silently).
> priority : int
> The priority of the callback. This is used to determine the order
> in which
> callbacks are called when multiple are connected to the same
> signal.
> Higher priority callbacks are called first. Negative values are
> allowed.
> The default is 0.
>
> Returns
> -------
> Tuple
> (weakref.ref, name, callable). Reference to the object, name of
> the
> attribute, and setattr closure. Can be used to disconnect the
> slot.
>
> Raises
> ------
> ValueError
> If this is not a single-value signal
> AttributeError
> If `obj` has no attribute `attr`.
>
> Examples
> --------
> >>> class T:
> ... sig = Signal(int)
> >>> class SomeObj:
> ... x = 1
> >>> t = T()
> >>> my_obj = SomeObj()
> >>> t.sig.connect_setattr(my_obj, "x")
> >>> t.sig.emit(5)
> >>> assert my_obj.x == 5
> """
> if maxargs is _NULL:
> > warnings.warn(
> "The default value of maxargs will change from `None` to `1`
> in "
> "version 0.11. To silence this warning, provide an explicit
> value for "
> "maxargs (`None` for current behavior, `1` for future
> behavior).",
> FutureWarning,
> stacklevel=2,
> )
> E FutureWarning: The default value of maxargs will change from
> `None` to `1` in version 0.11. To silence this warning, provide an explicit
> value for maxargs (`None` for current behavior, `1` for future behavior).
>
> /usr/lib/python3/dist-packages/psygnal/_signal.py:858: FutureWarning
> __________________________ test_on_existing_dataclass
> __________________________
>
> def test_on_existing_dataclass():
> """Test that the guiclass decorator works on pre-existing
> dataclasses."""
>
> @guiclass
> @dataclass
> class Foo:
> a: int = 1
> b: str = "bar"
>
> foo = Foo()
> assert foo.a == 1
> assert foo.b == "bar"
> > assert isinstance(foo.gui, Container)
>
> tests/test_gui_class.py:83:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> magicgui/schema/_guiclass.py:233: in __get__
> bind_gui_to_instance(wdg, instance)
> magicgui/schema/_guiclass.py:274: in bind_gui_to_instance
> widget.changed.connect_setattr(
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <SignalInstance 'changed' on SpinBox(value=1, annotation=<class
> 'int'>, name='a')>
> obj = test_on_existing_dataclass.<locals>.Foo(a=1, b='bar'), attr = 'a'
> maxargs = <object object at 0x7f0102bf5c70>
>
> def connect_setattr(
> self,
> obj: object,
> attr: str,
> maxargs: int | None | object = _NULL,
> *,
> on_ref_error: RefErrorChoice = "warn",
> priority: int = 0,
> ) -> WeakCallback[None]:
> """Bind an object attribute to the emitted value of this signal.
>
> Equivalent to calling `self.connect(functools.partial(setattr, obj,
> attr))`,
> but with additional weakref safety (i.e. a strong reference to `obj`
> will not
> be retained). The return object can be used to
> [`disconnect()`][psygnal.SignalInstance.disconnect], (or you can use
> [`disconnect_setattr()`][psygnal.SignalInstance.disconnect_setattr]).
>
> Parameters
> ----------
> obj : object
> An object.
> attr : str
> The name of an attribute on `obj` that should be set to the value
> of this
> signal when emitted.
> maxargs : Optional[int]
> max number of positional args to accept
> on_ref_error: {'raise', 'warn', 'ignore'}, optional
> What to do if a weak reference cannot be created. If 'raise', a
> ReferenceError will be raised. If 'warn' (default), a warning
> will be
> issued and a strong-reference will be used. If 'ignore' a
> strong-reference
> will be used (silently).
> priority : int
> The priority of the callback. This is used to determine the order
> in which
> callbacks are called when multiple are connected to the same
> signal.
> Higher priority callbacks are called first. Negative values are
> allowed.
> The default is 0.
>
> Returns
> -------
> Tuple
> (weakref.ref, name, callable). Reference to the object, name of
> the
> attribute, and setattr closure. Can be used to disconnect the
> slot.
>
> Raises
> ------
> ValueError
> If this is not a single-value signal
> AttributeError
> If `obj` has no attribute `attr`.
>
> Examples
> --------
> >>> class T:
> ... sig = Signal(int)
> >>> class SomeObj:
> ... x = 1
> >>> t = T()
> >>> my_obj = SomeObj()
> >>> t.sig.connect_setattr(my_obj, "x")
> >>> t.sig.emit(5)
> >>> assert my_obj.x == 5
> """
> if maxargs is _NULL:
> > warnings.warn(
> "The default value of maxargs will change from `None` to `1`
> in "
> "version 0.11. To silence this warning, provide an explicit
> value for "
> "maxargs (`None` for current behavior, `1` for future
> behavior).",
> FutureWarning,
> stacklevel=2,
> )
> E FutureWarning: The default value of maxargs will change from
> `None` to `1` in version 0.11. To silence this warning, provide an explicit
> value for maxargs (`None` for current behavior, `1` for future behavior).
>
> /usr/lib/python3/dist-packages/psygnal/_signal.py:858: FutureWarning
> _____________________________ test_slots_guiclass
> ______________________________
>
> @pytest.mark.skipif(sys.version_info < (3, 10), reason="slots are
> python3.10 or higher")
> def test_slots_guiclass():
> """Test that the guiclass decorator works as expected."""
>
> psyg_v = tuple(int(x.split("r")[0]) for x in
> psygnal.__version__.split(".")[:3])
> old_psygnal = psyg_v < (0, 6, 1)
>
> @guiclass(slots=True)
> class Foo:
> a: int = 1
> b: str = "bar"
>
> foo = Foo()
>
> with (
> pytest.warns(UserWarning, match="Please update psygnal")
> if old_psygnal
> else contextlib.nullcontext()
> ):
> > gui = foo.gui
>
> tests/test_gui_class.py:105:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> magicgui/schema/_guiclass.py:233: in __get__
> bind_gui_to_instance(wdg, instance)
> magicgui/schema/_guiclass.py:274: in bind_gui_to_instance
> widget.changed.connect_setattr(
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <SignalInstance 'changed' on SpinBox(value=1, annotation=<class
> 'int'>, name='a')>
> obj = test_slots_guiclass.<locals>.Foo(a=1, b='bar'), attr = 'a'
> maxargs = <object object at 0x7f0102bf5c70>
>
> def connect_setattr(
> self,
> obj: object,
> attr: str,
> maxargs: int | None | object = _NULL,
> *,
> on_ref_error: RefErrorChoice = "warn",
> priority: int = 0,
> ) -> WeakCallback[None]:
> """Bind an object attribute to the emitted value of this signal.
>
> Equivalent to calling `self.connect(functools.partial(setattr, obj,
> attr))`,
> but with additional weakref safety (i.e. a strong reference to `obj`
> will not
> be retained). The return object can be used to
> [`disconnect()`][psygnal.SignalInstance.disconnect], (or you can use
> [`disconnect_setattr()`][psygnal.SignalInstance.disconnect_setattr]).
>
> Parameters
> ----------
> obj : object
> An object.
> attr : str
> The name of an attribute on `obj` that should be set to the value
> of this
> signal when emitted.
> maxargs : Optional[int]
> max number of positional args to accept
> on_ref_error: {'raise', 'warn', 'ignore'}, optional
> What to do if a weak reference cannot be created. If 'raise', a
> ReferenceError will be raised. If 'warn' (default), a warning
> will be
> issued and a strong-reference will be used. If 'ignore' a
> strong-reference
> will be used (silently).
> priority : int
> The priority of the callback. This is used to determine the order
> in which
> callbacks are called when multiple are connected to the same
> signal.
> Higher priority callbacks are called first. Negative values are
> allowed.
> The default is 0.
>
> Returns
> -------
> Tuple
> (weakref.ref, name, callable). Reference to the object, name of
> the
> attribute, and setattr closure. Can be used to disconnect the
> slot.
>
> Raises
> ------
> ValueError
> If this is not a single-value signal
> AttributeError
> If `obj` has no attribute `attr`.
>
> Examples
> --------
> >>> class T:
> ... sig = Signal(int)
> >>> class SomeObj:
> ... x = 1
> >>> t = T()
> >>> my_obj = SomeObj()
> >>> t.sig.connect_setattr(my_obj, "x")
> >>> t.sig.emit(5)
> >>> assert my_obj.x == 5
> """
> if maxargs is _NULL:
> > warnings.warn(
> "The default value of maxargs will change from `None` to `1`
> in "
> "version 0.11. To silence this warning, provide an explicit
> value for "
> "maxargs (`None` for current behavior, `1` for future
> behavior).",
> FutureWarning,
> stacklevel=2,
> )
> E FutureWarning: The default value of maxargs will change from
> `None` to `1` in version 0.11. To silence this warning, provide an explicit
> value for maxargs (`None` for current behavior, `1` for future behavior).
>
> /usr/lib/python3/dist-packages/psygnal/_signal.py:858: FutureWarning
> ____________________________ test_guiclass_as_class
> ____________________________
>
> def test_guiclass_as_class():
> # variant on @guiclass, using class instead of decorator
> class T2(GuiClass):
> x: int
> y: str = "hi"
>
> @button
> def foo(self):
> return asdict(self)
>
> t2 = T2(1)
> assert t2.x == 1
> assert t2.y == "hi"
> > assert t2.gui.x.value == 1
>
> tests/test_gui_class.py:141:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> magicgui/schema/_guiclass.py:233: in __get__
> bind_gui_to_instance(wdg, instance)
> magicgui/schema/_guiclass.py:274: in bind_gui_to_instance
> widget.changed.connect_setattr(
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <SignalInstance 'changed' on SpinBox(value=1, annotation=<class
> 'int'>, name='x')>
> obj = test_guiclass_as_class.<locals>.T2(x=1, y='hi'), attr = 'x'
> maxargs = <object object at 0x7f0102bf5c70>
>
> def connect_setattr(
> self,
> obj: object,
> attr: str,
> maxargs: int | None | object = _NULL,
> *,
> on_ref_error: RefErrorChoice = "warn",
> priority: int = 0,
> ) -> WeakCallback[None]:
> """Bind an object attribute to the emitted value of this signal.
>
> Equivalent to calling `self.connect(functools.partial(setattr, obj,
> attr))`,
> but with additional weakref safety (i.e. a strong reference to `obj`
> will not
> be retained). The return object can be used to
> [`disconnect()`][psygnal.SignalInstance.disconnect], (or you can use
> [`disconnect_setattr()`][psygnal.SignalInstance.disconnect_setattr]).
>
> Parameters
> ----------
> obj : object
> An object.
> attr : str
> The name of an attribute on `obj` that should be set to the value
> of this
> signal when emitted.
> maxargs : Optional[int]
> max number of positional args to accept
> on_ref_error: {'raise', 'warn', 'ignore'}, optional
> What to do if a weak reference cannot be created. If 'raise', a
> ReferenceError will be raised. If 'warn' (default), a warning
> will be
> issued and a strong-reference will be used. If 'ignore' a
> strong-reference
> will be used (silently).
> priority : int
> The priority of the callback. This is used to determine the order
> in which
> callbacks are called when multiple are connected to the same
> signal.
> Higher priority callbacks are called first. Negative values are
> allowed.
> The default is 0.
>
> Returns
> -------
> Tuple
> (weakref.ref, name, callable). Reference to the object, name of
> the
> attribute, and setattr closure. Can be used to disconnect the
> slot.
>
> Raises
> ------
> ValueError
> If this is not a single-value signal
> AttributeError
> If `obj` has no attribute `attr`.
>
> Examples
> --------
> >>> class T:
> ... sig = Signal(int)
> >>> class SomeObj:
> ... x = 1
> >>> t = T()
> >>> my_obj = SomeObj()
> >>> t.sig.connect_setattr(my_obj, "x")
> >>> t.sig.emit(5)
> >>> assert my_obj.x == 5
> """
> if maxargs is _NULL:
> > warnings.warn(
> "The default value of maxargs will change from `None` to `1`
> in "
> "version 0.11. To silence this warning, provide an explicit
> value for "
> "maxargs (`None` for current behavior, `1` for future
> behavior).",
> FutureWarning,
> stacklevel=2,
> )
> E FutureWarning: The default value of maxargs will change from
> `None` to `1` in version 0.11. To silence this warning, provide an explicit
> value for maxargs (`None` for current behavior, `1` for future behavior).
>
> /usr/lib/python3/dist-packages/psygnal/_signal.py:858: FutureWarning
> =========================== short test summary info
> ============================
> FAILED tests/test_gui_class.py::test_guiclass - FutureWarning: The default
> va...
> FAILED tests/test_gui_class.py::test_on_existing_dataclass - FutureWarning:
> T...
> FAILED tests/test_gui_class.py::test_slots_guiclass - FutureWarning: The
> defa...
> FAILED tests/test_gui_class.py::test_guiclass_as_class - FutureWarning: The
> d...
> ============= 4 failed, 278 passed, 33 skipped, 1 xfailed in 7.02s
> =============
> E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_magicgui/build; python3.11 -m pytest
> tests
> I: pybuild base:311: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_magicgui/build; python3.12 -m pytest
> tests
> ============================= test session starts
> ==============================
> platform linux -- Python 3.12.4, pytest-8.2.2, pluggy-1.5.0
> PyQt5 5.15.10 -- Qt runtime 5.15.13 -- Qt compiled 5.15.13
> rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_magicgui/build
> configfile: pyproject.toml
> plugins: xvfb-3.0.0, qt-4.3.1
> collected 313 items / 3 skipped
>
> tests/test_application.py . [
> 0%]
> tests/test_backends.py s......... [
> 3%]
> tests/test_container.py .............. [
> 7%]
> tests/test_docs.py ss. [
> 8%]
> tests/test_factory.py .......... [
> 12%]
> tests/test_gui_class.py F.FFF [
> 13%]
> tests/test_magicgui.py ...................x............................. [
> 29%]
> [
> 29%]
> tests/test_persistence.py ... [
> 30%]
> tests/test_signature.py .... [
> 31%]
> tests/test_table.py ............................sss......... [
> 44%]
> tests/test_types.py ............... [
> 49%]
> tests/test_ui_field.py s.ss....ss. [
> 52%]
> tests/test_widgets.py ......s.s..ss..s.ss..ss.sss.s..s.........s......s. [
> 68%]
> s.......s..s............................................................ [
> 91%]
> ..........................
> [100%]
>
> =================================== FAILURES
> ===================================
> ________________________________ test_guiclass
> _________________________________
>
> def test_guiclass():
> """Test that the guiclass decorator works as expected."""
> mock = Mock()
>
> @guiclass
> class Foo:
> a: int = 1
> b: str = "bar"
>
> @button
> def func(self):
> mock(asdict(self))
>
> # example recommended for type checking
> if TYPE_CHECKING:
> gui: ClassVar[Container]
> events: ClassVar[psygnal.SignalGroup]
>
> foo = Foo()
>
> assert foo.a == 1
> assert foo.b == "bar"
>
> > assert isinstance(foo.gui, Container)
>
> tests/test_gui_class.py:43:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> magicgui/schema/_guiclass.py:233: in __get__
> bind_gui_to_instance(wdg, instance)
> magicgui/schema/_guiclass.py:274: in bind_gui_to_instance
> widget.changed.connect_setattr(
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <SignalInstance 'changed' on SpinBox(value=1, annotation=<class
> 'int'>, name='a')>
> obj = test_guiclass.<locals>.Foo(a=1, b='bar'), attr = 'a'
> maxargs = <object object at 0x7f93cda75e80>
>
> def connect_setattr(
> self,
> obj: object,
> attr: str,
> maxargs: int | None | object = _NULL,
> *,
> on_ref_error: RefErrorChoice = "warn",
> priority: int = 0,
> ) -> WeakCallback[None]:
> """Bind an object attribute to the emitted value of this signal.
>
> Equivalent to calling `self.connect(functools.partial(setattr, obj,
> attr))`,
> but with additional weakref safety (i.e. a strong reference to `obj`
> will not
> be retained). The return object can be used to
> [`disconnect()`][psygnal.SignalInstance.disconnect], (or you can use
> [`disconnect_setattr()`][psygnal.SignalInstance.disconnect_setattr]).
>
> Parameters
> ----------
> obj : object
> An object.
> attr : str
> The name of an attribute on `obj` that should be set to the value
> of this
> signal when emitted.
> maxargs : Optional[int]
> max number of positional args to accept
> on_ref_error: {'raise', 'warn', 'ignore'}, optional
> What to do if a weak reference cannot be created. If 'raise', a
> ReferenceError will be raised. If 'warn' (default), a warning
> will be
> issued and a strong-reference will be used. If 'ignore' a
> strong-reference
> will be used (silently).
> priority : int
> The priority of the callback. This is used to determine the order
> in which
> callbacks are called when multiple are connected to the same
> signal.
> Higher priority callbacks are called first. Negative values are
> allowed.
> The default is 0.
>
> Returns
> -------
> Tuple
> (weakref.ref, name, callable). Reference to the object, name of
> the
> attribute, and setattr closure. Can be used to disconnect the
> slot.
>
> Raises
> ------
> ValueError
> If this is not a single-value signal
> AttributeError
> If `obj` has no attribute `attr`.
>
> Examples
> --------
> >>> class T:
> ... sig = Signal(int)
> >>> class SomeObj:
> ... x = 1
> >>> t = T()
> >>> my_obj = SomeObj()
> >>> t.sig.connect_setattr(my_obj, "x")
> >>> t.sig.emit(5)
> >>> assert my_obj.x == 5
> """
> if maxargs is _NULL:
> > warnings.warn(
> "The default value of maxargs will change from `None` to `1`
> in "
> "version 0.11. To silence this warning, provide an explicit
> value for "
> "maxargs (`None` for current behavior, `1` for future
> behavior).",
> FutureWarning,
> stacklevel=2,
> )
> E FutureWarning: The default value of maxargs will change from
> `None` to `1` in version 0.11. To silence this warning, provide an explicit
> value for maxargs (`None` for current behavior, `1` for future behavior).
>
> /usr/lib/python3/dist-packages/psygnal/_signal.py:858: FutureWarning
> __________________________ test_on_existing_dataclass
> __________________________
>
> def test_on_existing_dataclass():
> """Test that the guiclass decorator works on pre-existing
> dataclasses."""
>
> @guiclass
> @dataclass
> class Foo:
> a: int = 1
> b: str = "bar"
>
> foo = Foo()
> assert foo.a == 1
> assert foo.b == "bar"
> > assert isinstance(foo.gui, Container)
>
> tests/test_gui_class.py:83:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> magicgui/schema/_guiclass.py:233: in __get__
> bind_gui_to_instance(wdg, instance)
> magicgui/schema/_guiclass.py:274: in bind_gui_to_instance
> widget.changed.connect_setattr(
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <SignalInstance 'changed' on SpinBox(value=1, annotation=<class
> 'int'>, name='a')>
> obj = test_on_existing_dataclass.<locals>.Foo(a=1, b='bar'), attr = 'a'
> maxargs = <object object at 0x7f93cda75e80>
>
> def connect_setattr(
> self,
> obj: object,
> attr: str,
> maxargs: int | None | object = _NULL,
> *,
> on_ref_error: RefErrorChoice = "warn",
> priority: int = 0,
> ) -> WeakCallback[None]:
> """Bind an object attribute to the emitted value of this signal.
>
> Equivalent to calling `self.connect(functools.partial(setattr, obj,
> attr))`,
> but with additional weakref safety (i.e. a strong reference to `obj`
> will not
> be retained). The return object can be used to
> [`disconnect()`][psygnal.SignalInstance.disconnect], (or you can use
> [`disconnect_setattr()`][psygnal.SignalInstance.disconnect_setattr]).
>
> Parameters
> ----------
> obj : object
> An object.
> attr : str
> The name of an attribute on `obj` that should be set to the value
> of this
> signal when emitted.
> maxargs : Optional[int]
> max number of positional args to accept
> on_ref_error: {'raise', 'warn', 'ignore'}, optional
> What to do if a weak reference cannot be created. If 'raise', a
> ReferenceError will be raised. If 'warn' (default), a warning
> will be
> issued and a strong-reference will be used. If 'ignore' a
> strong-reference
> will be used (silently).
> priority : int
> The priority of the callback. This is used to determine the order
> in which
> callbacks are called when multiple are connected to the same
> signal.
> Higher priority callbacks are called first. Negative values are
> allowed.
> The default is 0.
>
> Returns
> -------
> Tuple
> (weakref.ref, name, callable). Reference to the object, name of
> the
> attribute, and setattr closure. Can be used to disconnect the
> slot.
>
> Raises
> ------
> ValueError
> If this is not a single-value signal
> AttributeError
> If `obj` has no attribute `attr`.
>
> Examples
> --------
> >>> class T:
> ... sig = Signal(int)
> >>> class SomeObj:
> ... x = 1
> >>> t = T()
> >>> my_obj = SomeObj()
> >>> t.sig.connect_setattr(my_obj, "x")
> >>> t.sig.emit(5)
> >>> assert my_obj.x == 5
> """
> if maxargs is _NULL:
> > warnings.warn(
> "The default value of maxargs will change from `None` to `1`
> in "
> "version 0.11. To silence this warning, provide an explicit
> value for "
> "maxargs (`None` for current behavior, `1` for future
> behavior).",
> FutureWarning,
> stacklevel=2,
> )
> E FutureWarning: The default value of maxargs will change from
> `None` to `1` in version 0.11. To silence this warning, provide an explicit
> value for maxargs (`None` for current behavior, `1` for future behavior).
>
> /usr/lib/python3/dist-packages/psygnal/_signal.py:858: FutureWarning
> _____________________________ test_slots_guiclass
> ______________________________
>
> @pytest.mark.skipif(sys.version_info < (3, 10), reason="slots are
> python3.10 or higher")
> def test_slots_guiclass():
> """Test that the guiclass decorator works as expected."""
>
> psyg_v = tuple(int(x.split("r")[0]) for x in
> psygnal.__version__.split(".")[:3])
> old_psygnal = psyg_v < (0, 6, 1)
>
> @guiclass(slots=True)
> class Foo:
> a: int = 1
> b: str = "bar"
>
> foo = Foo()
>
> with (
> pytest.warns(UserWarning, match="Please update psygnal")
> if old_psygnal
> else contextlib.nullcontext()
> ):
> > gui = foo.gui
>
> tests/test_gui_class.py:105:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> magicgui/schema/_guiclass.py:233: in __get__
> bind_gui_to_instance(wdg, instance)
> magicgui/schema/_guiclass.py:274: in bind_gui_to_instance
> widget.changed.connect_setattr(
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <SignalInstance 'changed' on SpinBox(value=1, annotation=<class
> 'int'>, name='a')>
> obj = test_slots_guiclass.<locals>.Foo(a=1, b='bar'), attr = 'a'
> maxargs = <object object at 0x7f93cda75e80>
>
> def connect_setattr(
> self,
> obj: object,
> attr: str,
> maxargs: int | None | object = _NULL,
> *,
> on_ref_error: RefErrorChoice = "warn",
> priority: int = 0,
> ) -> WeakCallback[None]:
> """Bind an object attribute to the emitted value of this signal.
>
> Equivalent to calling `self.connect(functools.partial(setattr, obj,
> attr))`,
> but with additional weakref safety (i.e. a strong reference to `obj`
> will not
> be retained). The return object can be used to
> [`disconnect()`][psygnal.SignalInstance.disconnect], (or you can use
> [`disconnect_setattr()`][psygnal.SignalInstance.disconnect_setattr]).
>
> Parameters
> ----------
> obj : object
> An object.
> attr : str
> The name of an attribute on `obj` that should be set to the value
> of this
> signal when emitted.
> maxargs : Optional[int]
> max number of positional args to accept
> on_ref_error: {'raise', 'warn', 'ignore'}, optional
> What to do if a weak reference cannot be created. If 'raise', a
> ReferenceError will be raised. If 'warn' (default), a warning
> will be
> issued and a strong-reference will be used. If 'ignore' a
> strong-reference
> will be used (silently).
> priority : int
> The priority of the callback. This is used to determine the order
> in which
> callbacks are called when multiple are connected to the same
> signal.
> Higher priority callbacks are called first. Negative values are
> allowed.
> The default is 0.
>
> Returns
> -------
> Tuple
> (weakref.ref, name, callable). Reference to the object, name of
> the
> attribute, and setattr closure. Can be used to disconnect the
> slot.
>
> Raises
> ------
> ValueError
> If this is not a single-value signal
> AttributeError
> If `obj` has no attribute `attr`.
>
> Examples
> --------
> >>> class T:
> ... sig = Signal(int)
> >>> class SomeObj:
> ... x = 1
> >>> t = T()
> >>> my_obj = SomeObj()
> >>> t.sig.connect_setattr(my_obj, "x")
> >>> t.sig.emit(5)
> >>> assert my_obj.x == 5
> """
> if maxargs is _NULL:
> > warnings.warn(
> "The default value of maxargs will change from `None` to `1`
> in "
> "version 0.11. To silence this warning, provide an explicit
> value for "
> "maxargs (`None` for current behavior, `1` for future
> behavior).",
> FutureWarning,
> stacklevel=2,
> )
> E FutureWarning: The default value of maxargs will change from
> `None` to `1` in version 0.11. To silence this warning, provide an explicit
> value for maxargs (`None` for current behavior, `1` for future behavior).
>
> /usr/lib/python3/dist-packages/psygnal/_signal.py:858: FutureWarning
> ____________________________ test_guiclass_as_class
> ____________________________
>
> def test_guiclass_as_class():
> # variant on @guiclass, using class instead of decorator
> class T2(GuiClass):
> x: int
> y: str = "hi"
>
> @button
> def foo(self):
> return asdict(self)
>
> t2 = T2(1)
> assert t2.x == 1
> assert t2.y == "hi"
> > assert t2.gui.x.value == 1
>
> tests/test_gui_class.py:141:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> magicgui/schema/_guiclass.py:233: in __get__
> bind_gui_to_instance(wdg, instance)
> magicgui/schema/_guiclass.py:274: in bind_gui_to_instance
> widget.changed.connect_setattr(
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <SignalInstance 'changed' on SpinBox(value=1, annotation=<class
> 'int'>, name='x')>
> obj = test_guiclass_as_class.<locals>.T2(x=1, y='hi'), attr = 'x'
> maxargs = <object object at 0x7f93cda75e80>
>
> def connect_setattr(
> self,
> obj: object,
> attr: str,
> maxargs: int | None | object = _NULL,
> *,
> on_ref_error: RefErrorChoice = "warn",
> priority: int = 0,
> ) -> WeakCallback[None]:
> """Bind an object attribute to the emitted value of this signal.
>
> Equivalent to calling `self.connect(functools.partial(setattr, obj,
> attr))`,
> but with additional weakref safety (i.e. a strong reference to `obj`
> will not
> be retained). The return object can be used to
> [`disconnect()`][psygnal.SignalInstance.disconnect], (or you can use
> [`disconnect_setattr()`][psygnal.SignalInstance.disconnect_setattr]).
>
> Parameters
> ----------
> obj : object
> An object.
> attr : str
> The name of an attribute on `obj` that should be set to the value
> of this
> signal when emitted.
> maxargs : Optional[int]
> max number of positional args to accept
> on_ref_error: {'raise', 'warn', 'ignore'}, optional
> What to do if a weak reference cannot be created. If 'raise', a
> ReferenceError will be raised. If 'warn' (default), a warning
> will be
> issued and a strong-reference will be used. If 'ignore' a
> strong-reference
> will be used (silently).
> priority : int
> The priority of the callback. This is used to determine the order
> in which
> callbacks are called when multiple are connected to the same
> signal.
> Higher priority callbacks are called first. Negative values are
> allowed.
> The default is 0.
>
> Returns
> -------
> Tuple
> (weakref.ref, name, callable). Reference to the object, name of
> the
> attribute, and setattr closure. Can be used to disconnect the
> slot.
>
> Raises
> ------
> ValueError
> If this is not a single-value signal
> AttributeError
> If `obj` has no attribute `attr`.
>
> Examples
> --------
> >>> class T:
> ... sig = Signal(int)
> >>> class SomeObj:
> ... x = 1
> >>> t = T()
> >>> my_obj = SomeObj()
> >>> t.sig.connect_setattr(my_obj, "x")
> >>> t.sig.emit(5)
> >>> assert my_obj.x == 5
> """
> if maxargs is _NULL:
> > warnings.warn(
> "The default value of maxargs will change from `None` to `1`
> in "
> "version 0.11. To silence this warning, provide an explicit
> value for "
> "maxargs (`None` for current behavior, `1` for future
> behavior).",
> FutureWarning,
> stacklevel=2,
> )
> E FutureWarning: The default value of maxargs will change from
> `None` to `1` in version 0.11. To silence this warning, provide an explicit
> value for maxargs (`None` for current behavior, `1` for future behavior).
>
> /usr/lib/python3/dist-packages/psygnal/_signal.py:858: FutureWarning
> =========================== short test summary info
> ============================
> FAILED tests/test_gui_class.py::test_guiclass - FutureWarning: The default
> va...
> FAILED tests/test_gui_class.py::test_on_existing_dataclass - FutureWarning:
> T...
> FAILED tests/test_gui_class.py::test_slots_guiclass - FutureWarning: The
> defa...
> FAILED tests/test_gui_class.py::test_guiclass_as_class - FutureWarning: The
> d...
> ============= 4 failed, 278 passed, 33 skipped, 1 xfailed in 7.59s
> =============
> E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_magicgui/build; python3.12 -m pytest
> tests
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.11
> 3.12" returned exit code 13
The full build log is available from:
http://qa-logs.debian.net/2024/07/02/magicgui_0.7.2-4_unstable.log
All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240702;[email protected]
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240702&[email protected]&allbugs=1&cseverity=1&ctags=1&caffected=1#results
A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!
If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects
If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.
--- End Message ---