Source: python-pytest-toolbox Version: 0.4-4 Severity: serious Justification: FTBFS Tags: trixie sid ftbfs User: lu...@debian.org Usertags: ftbfs-20240728 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 --buildsystem=pybuild > dh_update_autotools_config -O--buildsystem=pybuild > dh_autoreconf -O--buildsystem=pybuild > dh_auto_configure -O--buildsystem=pybuild > I: pybuild base:311: python3.12 setup.py config > /usr/lib/python3/dist-packages/setuptools/dist.py:476: > SetuptoolsDeprecationWarning: Invalid dash-separated options > !! > > > ******************************************************************************** > Usage of dash-separated 'python-tag' will not be supported in future > versions. Please use the underscore name 'python_tag' instead. > > By 2024-Sep-26, you need to update your project and remove deprecated > calls > or your builds will no longer be supported. > > See > https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for > details. > > ******************************************************************************** > > !! > opt = self.warn_dash_deprecation(opt, section) > running config > dh_auto_build -O--buildsystem=pybuild > I: pybuild base:311: /usr/bin/python3 setup.py build > /usr/lib/python3/dist-packages/setuptools/dist.py:476: > SetuptoolsDeprecationWarning: Invalid dash-separated options > !! > > > ******************************************************************************** > Usage of dash-separated 'python-tag' will not be supported in future > versions. Please use the underscore name 'python_tag' instead. > > By 2024-Sep-26, you need to update your project and remove deprecated > calls > or your builds will no longer be supported. > > See > https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for > details. > > ******************************************************************************** > > !! > opt = self.warn_dash_deprecation(opt, section) > running build > running build_py > creating > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pytest-toolbox/build/pytest_toolbox > copying pytest_toolbox/version.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pytest-toolbox/build/pytest_toolbox > copying pytest_toolbox/comparison.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pytest-toolbox/build/pytest_toolbox > copying pytest_toolbox/__init__.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pytest-toolbox/build/pytest_toolbox > copying pytest_toolbox/main.py -> > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pytest-toolbox/build/pytest_toolbox > running egg_info > creating pytest_toolbox.egg-info > writing pytest_toolbox.egg-info/PKG-INFO > writing dependency_links to pytest_toolbox.egg-info/dependency_links.txt > writing entry points to pytest_toolbox.egg-info/entry_points.txt > writing requirements to pytest_toolbox.egg-info/requires.txt > writing top-level names to pytest_toolbox.egg-info/top_level.txt > writing manifest file 'pytest_toolbox.egg-info/SOURCES.txt' > reading manifest file 'pytest_toolbox.egg-info/SOURCES.txt' > adding license file 'LICENSE' > writing manifest file 'pytest_toolbox.egg-info/SOURCES.txt' > dh_auto_test -O--buildsystem=pybuild > I: pybuild base:311: cd > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pytest-toolbox/build; python3.12 -m > pytest tests > ============================= test session starts > ============================== > platform linux -- Python 3.12.4, pytest-8.3.1, pluggy-1.5.0 > rootdir: /<<PKGBUILDDIR>> > configfile: setup.cfg > plugins: timeout-2.3.1 > timeout: 10.0s > timeout method: signal > timeout func_only: False > collected 20 items > > tests/test_comparison.py F.F....... [ > 50%] > tests/test_methods.py .......... > [100%] > > =================================== FAILURES > =================================== > ____________________________ test_close_to_now_true > ____________________________ > > self = <CloseToNow(delta=2, now=2024-07-28T18:10:37)> > other = '2024-07-28T18:10:37' > > def __eq__(self, other): > self.other = other > if not isinstance(other, datetime): > try: > > from pydantic.datetime_parse import parse_datetime > > pytest_toolbox/comparison.py:19: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > name = 'parse_datetime' > > def wrapper(name: str) -> object: > """Raise an error if the object is not found, or warn if it was moved. > > In case it was moved, it still returns the object. > > Args: > name: The object name. > > Returns: > The object. > """ > if name == '__path__': > raise AttributeError(f'module {__name__!r} has no attribute > {name!r}') > > import_path = f'{module}:{name}' > if import_path in MOVED_IN_V2.keys(): > new_location = MOVED_IN_V2[import_path] > warnings.warn(f'`{import_path}` has been moved to > `{new_location}`.') > return import_string(MOVED_IN_V2[import_path]) > if import_path in DEPRECATED_MOVED_IN_V2: > # skip the warning here because a deprecation warning will be > raised elsewhere > return import_string(DEPRECATED_MOVED_IN_V2[import_path]) > if import_path in REDIRECT_TO_V1: > new_location = REDIRECT_TO_V1[import_path] > warnings.warn( > f'`{import_path}` has been removed. We are importing from > `{new_location}` instead.' > 'See the migration guide for more details: > https://docs.pydantic.dev/latest/migration/' > ) > return import_string(REDIRECT_TO_V1[import_path]) > if import_path == 'pydantic:BaseSettings': > raise PydanticImportError( > '`BaseSettings` has been moved to the `pydantic-settings` > package. ' > f'See > https://docs.pydantic.dev/{version_short()}/migration/#basesettings-has-moved-to-pydantic-settings > ' > 'for more details.' > ) > if import_path in REMOVED_IN_V2: > > raise PydanticImportError(f'`{import_path}` has been removed in > > V2.') > E pydantic.errors.PydanticImportError: > `pydantic.datetime_parse:parse_datetime` has been removed in V2. > E > E For further information visit > https://errors.pydantic.dev/2.4/u/import-error > > /usr/lib/python3/dist-packages/pydantic/_migration.py:300: PydanticImportError > > During handling of the above exception, another exception occurred: > > def test_close_to_now_true(): > c2n = CloseToNow() > dt = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S') > > assert dt == c2n > > tests/test_comparison.py:12: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <CloseToNow(delta=2, now=2024-07-28T18:10:37)> > other = '2024-07-28T18:10:37' > > def __eq__(self, other): > self.other = other > if not isinstance(other, datetime): > try: > from pydantic.datetime_parse import parse_datetime > except ImportError: # pragma: no cover > > raise ImportError('pydantic is required to use CloseToNow, > > please run `pip install pydantic`') > E ImportError: pydantic is required to use CloseToNow, please > run `pip install pydantic` > > pytest_toolbox/comparison.py:21: ImportError > ___________________________ test_close_to_now_false > ____________________________ > > self = <CloseToNow(delta=2, now=2024-07-28T18:10:37)> > other = '2000-01-01T00:00:00' > > def __eq__(self, other): > self.other = other > if not isinstance(other, datetime): > try: > > from pydantic.datetime_parse import parse_datetime > > pytest_toolbox/comparison.py:19: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > name = 'parse_datetime' > > def wrapper(name: str) -> object: > """Raise an error if the object is not found, or warn if it was moved. > > In case it was moved, it still returns the object. > > Args: > name: The object name. > > Returns: > The object. > """ > if name == '__path__': > raise AttributeError(f'module {__name__!r} has no attribute > {name!r}') > > import_path = f'{module}:{name}' > if import_path in MOVED_IN_V2.keys(): > new_location = MOVED_IN_V2[import_path] > warnings.warn(f'`{import_path}` has been moved to > `{new_location}`.') > return import_string(MOVED_IN_V2[import_path]) > if import_path in DEPRECATED_MOVED_IN_V2: > # skip the warning here because a deprecation warning will be > raised elsewhere > return import_string(DEPRECATED_MOVED_IN_V2[import_path]) > if import_path in REDIRECT_TO_V1: > new_location = REDIRECT_TO_V1[import_path] > warnings.warn( > f'`{import_path}` has been removed. We are importing from > `{new_location}` instead.' > 'See the migration guide for more details: > https://docs.pydantic.dev/latest/migration/' > ) > return import_string(REDIRECT_TO_V1[import_path]) > if import_path == 'pydantic:BaseSettings': > raise PydanticImportError( > '`BaseSettings` has been moved to the `pydantic-settings` > package. ' > f'See > https://docs.pydantic.dev/{version_short()}/migration/#basesettings-has-moved-to-pydantic-settings > ' > 'for more details.' > ) > if import_path in REMOVED_IN_V2: > > raise PydanticImportError(f'`{import_path}` has been removed in > > V2.') > E pydantic.errors.PydanticImportError: > `pydantic.datetime_parse:parse_datetime` has been removed in V2. > E > E For further information visit > https://errors.pydantic.dev/2.4/u/import-error > > /usr/lib/python3/dist-packages/pydantic/_migration.py:300: PydanticImportError > > During handling of the above exception, another exception occurred: > > def test_close_to_now_false(): > c2n = CloseToNow() > with pytest.raises(AssertionError): > > assert datetime(2000, 1, 1).strftime('%Y-%m-%dT%H:%M:%S') == c2n > > tests/test_comparison.py:23: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <CloseToNow(delta=2, now=2024-07-28T18:10:37)> > other = '2000-01-01T00:00:00' > > def __eq__(self, other): > self.other = other > if not isinstance(other, datetime): > try: > from pydantic.datetime_parse import parse_datetime > except ImportError: # pragma: no cover > > raise ImportError('pydantic is required to use CloseToNow, > > please run `pip install pydantic`') > E ImportError: pydantic is required to use CloseToNow, please > run `pip install pydantic` > > pytest_toolbox/comparison.py:21: ImportError > =============================== warnings summary > =============================== > .pybuild/cpython3_3.12_pytest-toolbox/build/tests/test_comparison.py::test_close_to_now_true > .pybuild/cpython3_3.12_pytest-toolbox/build/tests/test_comparison.py::test_close_to_now_true_dt > .pybuild/cpython3_3.12_pytest-toolbox/build/tests/test_comparison.py::test_close_to_now_false > .pybuild/cpython3_3.12_pytest-toolbox/build/tests/test_comparison.py::test_clow_to_now_tz > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pytest-toolbox/build/pytest_toolbox/comparison.py:11: > DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled > for removal in a future version. Use timezone-aware objects to represent > datetimes in UTC: datetime.datetime.now(datetime.UTC). > self.now = datetime.utcnow() > > .pybuild/cpython3_3.12_pytest-toolbox/build/tests/test_comparison.py::test_close_to_now_true > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pytest-toolbox/build/tests/test_comparison.py:11: > DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled > for removal in a future version. Use timezone-aware objects to represent > datetimes in UTC: datetime.datetime.now(datetime.UTC). > dt = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S') > > .pybuild/cpython3_3.12_pytest-toolbox/build/tests/test_comparison.py::test_close_to_now_true_dt > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pytest-toolbox/build/tests/test_comparison.py:17: > DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled > for removal in a future version. Use timezone-aware objects to represent > datetimes in UTC: datetime.datetime.now(datetime.UTC). > assert datetime.utcnow() == CloseToNow() > > .pybuild/cpython3_3.12_pytest-toolbox/build/tests/test_comparison.py::test_clow_to_now_tz > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pytest-toolbox/build/tests/test_comparison.py:29: > DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled > for removal in a future version. Use timezone-aware objects to represent > datetimes in UTC: datetime.datetime.now(datetime.UTC). > dt = datetime.utcnow().replace(tzinfo=timezone(offset=diff)) + diff > > -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html > =========================== short test summary info > ============================ > FAILED tests/test_comparison.py::test_close_to_now_true - ImportError: > pydant... > FAILED tests/test_comparison.py::test_close_to_now_false - ImportError: > pydan... > =================== 2 failed, 18 passed, 7 warnings in 0.23s > =================== > E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pytest-toolbox/build; python3.12 -m > pytest tests > dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.12 > returned exit code 13 The full build log is available from: http://qa-logs.debian.net/2024/07/28/python-pytest-toolbox_0.4-4_unstable.log All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240728;users=lu...@debian.org or: https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240728&fusertaguser=lu...@debian.org&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.