Package: src:python-inline-snapshot
Version: 0.31.0-1
Severity: serious
Tags: ftbfs forky sid

Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202512/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:python-inline-snapshot, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
   dh_autoreconf_clean -O--buildsystem=pybuild
   debian/rules override_dh_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
rm -rf html .mypy_cache .pytest_cache
dh_clean
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
 debian/rules binary
dh binary --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
   debian/rules override_dh_auto_build

[... snipped ...]

    ) -> Example:
        """Run pytest with the given args and environment variables in a 
separate
        process.
    
        It can be used to test the interaction between your code and pytest, 
but it is a bit slower than `run_inline`.
    
        Parameters:
            args: pytest arguments like "--inline-snapshot=fix"
            env: dict of environment variables
            changed_files: snapshot of files changed by this run.
            report: snapshot of the report at the end of the pytest run.
            stderr: pytest stderr output
            returncode: snapshot of the pytest return code.
    
        Returns:
            A new Example instance containing the changed files.
        """
        self.dump_files()
    
        with TemporaryDirectory() as dir:
            tmp_path = Path(dir)
    
            self._write_files(tmp_path)
    
            cmd = [sys.executable, "-m", "pytest", *args]
    
            command_env = dict(os.environ)
            command_env["TERM"] = "unknown"
            command_env["COLUMNS"] = str(
                term_columns + 1 if platform.system() == "Windows" else 
term_columns
            )
            command_env.pop("CI", None)
            command_env.pop("GITHUB_ACTIONS", None)
            command_env.pop("PYTEST_XDIST_WORKER", None)
    
            if stdin:
                # makes Console.is_terminal == True
                command_env["FORCE_COLOR"] = "true"
    
            command_env.update(env)
    
            with change_file(
                tmp_path / "conftest.py", lambda text: text + conftest_footer
            ):
                result = sp.run(
                    cmd, cwd=tmp_path, capture_output=True, env=command_env, 
input=stdin
                )
    
            result_stdout = result.stdout.decode("utf-8")
            result_stderr = result.stderr.decode("utf-8")
    
            result_returncode = result.returncode
    
            print("run>", *cmd)
            print("stdout:")
            print(result_stdout)
            print("stderr:")
            print(result_stderr)
    
>           assert result.returncode == returncode
E           assert 2 == 1
E            +  where 2 = CompletedProcess(args=['/usr/bin/python3.13', '-m', 
'pytest', '--inline-snapshot=create'], returncode=2, stdout=b"====... 
!!!!!!!!!!!!!!!!!!!!\n=============================== 1 error in 0.12s 
===============================\n", stderr=b'').returncode

inline_snapshot/testing/_example.py:490: AssertionError
----------------------------- Captured stdout call -----------------------------
╭──────────────────────────
 tests/test_something.py 
───────────────────────────╮
│ from inline_snapshot import snapshot                                        
 │
│ import attrs                                                                
 │
│                                                                             
 │
│ @attrs.define                                                               
 │
│ class container:                                                            
 │
│     a: int                                                                  
 │
│     b: int = attrs.field(default=5,repr=False)                              
 │
│                                                                             
 │
│ def test():                                                                 
 │
│     assert container(a=1,b=5) == snapshot()                                 
 │
│                                                                             
 │
╰──────────────────────────────────────────────────────────────────────────────╯
run> /usr/bin/python3.13 -m pytest --inline-snapshot=create
stdout:
============================= test session starts ==============================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /tmp/tmpyd0wf8hl
plugins: inline-snapshot-0.31.0, time-machine-2.19.0, hypothesis-6.148.2, 
mock-3.15.1, pytest_freezer-0.4.9
collected 0 items / 1 error

==================================== ERRORS ====================================
___________________ ERROR collecting tests/test_something.py ___________________
ImportError while importing test module 
'/tmp/tmpyd0wf8hl/tests/test_something.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_something.py:2: in <module>
    import attrs
E   ModuleNotFoundError: No module named 'attrs'
=========================== short test summary info ============================
ERROR tests/test_something.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.12s ===============================

stderr:

_____________________________ test_attrs_unmanaged _____________________________

    def test_attrs_unmanaged():
        Example(
            """\
    import datetime as dt
    import uuid
    
    import attrs
    
    from dirty_equals import IsDatetime
    from inline_snapshot import Is, snapshot
    
    
    @attrs.define
    class Attrs:
        ts: dt.datetime
        id: uuid.UUID
    
    def test():
        id = uuid.uuid4()
    
        assert snapshot(Attrs(ts=IsDatetime(), id=Is(id))) == Attrs(
            dt.datetime.now(), id
        )
    """
>       ).run_pytest(
            ["--inline-snapshot=create,fix"],
            changed_files=snapshot({}),
        ).run_pytest()

tests/adapter/test_dataclass.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <inline_snapshot.testing._example.Example object at 0x7f24f95b1770>
args = ['--inline-snapshot=create,fix']

    def run_pytest(
        self,
        args: list[str] = [],
        *,
        term_columns=80,
        env: dict[str, str] = {},
        changed_files: Snapshot[dict[str, str]] | None = None,
        report: Snapshot[str] | None = None,
        error: Snapshot[str] | None = None,
        stderr: Snapshot[str] | None = None,
        returncode: Snapshot[int] = 0,
        stdin: bytes = b"",
        outcomes: Snapshot[dict[str, int]] | None = None,
    ) -> Example:
        """Run pytest with the given args and environment variables in a 
separate
        process.
    
        It can be used to test the interaction between your code and pytest, 
but it is a bit slower than `run_inline`.
    
        Parameters:
            args: pytest arguments like "--inline-snapshot=fix"
            env: dict of environment variables
            changed_files: snapshot of files changed by this run.
            report: snapshot of the report at the end of the pytest run.
            stderr: pytest stderr output
            returncode: snapshot of the pytest return code.
    
        Returns:
            A new Example instance containing the changed files.
        """
        self.dump_files()
    
        with TemporaryDirectory() as dir:
            tmp_path = Path(dir)
    
            self._write_files(tmp_path)
    
            cmd = [sys.executable, "-m", "pytest", *args]
    
            command_env = dict(os.environ)
            command_env["TERM"] = "unknown"
            command_env["COLUMNS"] = str(
                term_columns + 1 if platform.system() == "Windows" else 
term_columns
            )
            command_env.pop("CI", None)
            command_env.pop("GITHUB_ACTIONS", None)
            command_env.pop("PYTEST_XDIST_WORKER", None)
    
            if stdin:
                # makes Console.is_terminal == True
                command_env["FORCE_COLOR"] = "true"
    
            command_env.update(env)
    
            with change_file(
                tmp_path / "conftest.py", lambda text: text + conftest_footer
            ):
                result = sp.run(
                    cmd, cwd=tmp_path, capture_output=True, env=command_env, 
input=stdin
                )
    
            result_stdout = result.stdout.decode("utf-8")
            result_stderr = result.stderr.decode("utf-8")
    
            result_returncode = result.returncode
    
            print("run>", *cmd)
            print("stdout:")
            print(result_stdout)
            print("stderr:")
            print(result_stderr)
    
>           assert result.returncode == returncode
E           assert 2 == 0
E            +  where 2 = CompletedProcess(args=['/usr/bin/python3.13', '-m', 
'pytest', '--inline-snapshot=create,fix'], returncode=2, stdout=b"... 
!!!!!!!!!!!!!!!!!!!!\n=============================== 1 error in 0.12s 
===============================\n", stderr=b'').returncode

inline_snapshot/testing/_example.py:490: AssertionError
----------------------------- Captured stdout call -----------------------------
╭──────────────────────────
 tests/test_something.py 
───────────────────────────╮
│ import datetime as dt                                                       
 │
│ import uuid                                                                 
 │
│                                                                             
 │
│ import attrs                                                                
 │
│                                                                             
 │
│ from dirty_equals import IsDatetime                                         
 │
│ from inline_snapshot import Is, snapshot                                    
 │
│                                                                             
 │
│                                                                             
 │
│ @attrs.define                                                               
 │
│ class Attrs:                                                                
 │
│     ts: dt.datetime                                                         
 │
│     id: uuid.UUID                                                           
 │
│                                                                             
 │
│ def test():                                                                 
 │
│     id = uuid.uuid4()                                                       
 │
│                                                                             
 │
│     assert snapshot(Attrs(ts=IsDatetime(), id=Is(id))) == Attrs(            
 │
│         dt.datetime.now(), id                                               
 │
│     )                                                                       
 │
│                                                                             
 │
╰──────────────────────────────────────────────────────────────────────────────╯
run> /usr/bin/python3.13 -m pytest --inline-snapshot=create,fix
stdout:
============================= test session starts ==============================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /tmp/tmp_ikkmlxp
plugins: inline-snapshot-0.31.0, time-machine-2.19.0, hypothesis-6.148.2, 
mock-3.15.1, pytest_freezer-0.4.9
collected 0 items / 1 error

==================================== ERRORS ====================================
___________________ ERROR collecting tests/test_something.py ___________________
ImportError while importing test module 
'/tmp/tmp_ikkmlxp/tests/test_something.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_something.py:4: in <module>
    import attrs
E   ModuleNotFoundError: No module named 'attrs'
=========================== short test summary info ============================
ERROR tests/test_something.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.12s ===============================

stderr:

=========================== short test summary info ============================
FAILED tests/adapter/test_dataclass.py::test_attrs_default_value - assert 2 == 1
FAILED tests/adapter/test_dataclass.py::test_attrs_fix_default_value - assert...
FAILED tests/adapter/test_dataclass.py::test_attrs_field_repr - assert 2 == 1
FAILED tests/adapter/test_dataclass.py::test_attrs_unmanaged - assert 2 == 0
===== 4 failed, 244 passed, 1 skipped, 11 deselected, 1 xfailed in 53.40s ======
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_inline-snapshot/build; python3.13 -m 
pytest --ignore tests/test_file.py --ignore tests/test_get_snapshot_value.py 
--ignore tests/test_inline_snapshot.py --ignore tests/test_pytest_plugin.py -k 
'not test_diskstorage and not test_empty_sub_snapshot and not 
test_format_command_fail and not test_outsource and not test_sub_snapshot and 
not test_typing and not test_xdist and not test_xdist_and_disable and not 
test_xdist_disabled '
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.14 
3.13" returned exit code 13
make: *** [debian/rules:24: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

Reply via email to