[Freedombox-pkg-team] Bug#1031461: django-axes: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.11 returned exit code 13
Lucas Nussbaum
lucas at debian.org
Fri Feb 17 07:03:04 GMT 2023
Source: django-axes
Version: 5.39.0-1
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20230216 ftbfs-bookworm
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> make[1]: Entering directory '/<<PKGBUILDDIR>>'
> PYBUILD_SYSTEM=custom \
> PYBUILD_TEST_ARGS="py.test-3" \
> PYTHONPATH=. dh_auto_test
> pybuild --test --test-pytest -i python{version} -p 3.11
> I: pybuild base:240: py.test-3
> ============================= test session starts ==============================
> platform linux -- Python 3.11.2, pytest-7.2.1, pluggy-1.0.0+repack
> django: settings: tests.settings (from ini)
> rootdir: /<<PKGBUILDDIR>>, configfile: pyproject.toml, testpaths: tests
> plugins: django-4.5.2, cov-4.0.0
> collected 293 items
>
> tests/test_admin.py .. [ 0%]
> tests/test_attempts.py ..................... [ 7%]
> tests/test_backends.py .. [ 8%]
> tests/test_checks.py ......... [ 11%]
> tests/test_decorators.py .... [ 12%]
> tests/test_failures.py .. [ 13%]
> tests/test_handlers.py ................................................. [ 30%]
> ..... [ 32%]
> tests/test_helpers.py .................................................. [ 49%]
> ...................... [ 56%]
> tests/test_logging.py .......F.... [ 60%]
> tests/test_login.py .................................................... [ 78%]
> ........................................... [ 93%]
> tests/test_management.py ........... [ 96%]
> tests/test_middleware.py .... [ 98%]
> tests/test_models.py .... [ 99%]
> tests/test_signals.py . [100%]
>
> =================================== FAILURES ===================================
> __________________ AccessLogTestCase.test_log_data_truncated ___________________
>
> self = <tests.test_logging.AccessLogTestCase testMethod=test_log_data_truncated>
>
> def test_log_data_truncated(self):
> """
> Test that get_query_str properly truncates data to the max_length (default 1024).
> """
>
> # An impossibly large post dict
> extra_data = {"a" * x: x for x in range(1024)}
> self.login(**extra_data)
> > self.assertEqual(len(AccessAttempt.objects.latest("id").post_data), 1024)
>
> tests/test_logging.py:80:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> /usr/lib/python3/dist-packages/django/db/models/manager.py:85: in manager_method
> return getattr(self.get_queryset(), name)(*args, **kwargs)
> /usr/lib/python3/dist-packages/django/db/models/query.py:670: in latest
> return self.reverse()._earliest(*fields)
> /usr/lib/python3/dist-packages/django/db/models/query.py:664: in _earliest
> return obj.get()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> self = <QuerySet []>, args = (), kwargs = {}, clone = <QuerySet []>, limit = 21
> num = 0
>
> def get(self, *args, **kwargs):
> """
> Perform the query and return a single object matching the given
> keyword arguments.
> """
> if self.query.combinator and (args or kwargs):
> raise NotSupportedError(
> 'Calling QuerySet.get(...) with filters after %s() is not '
> 'supported.' % self.query.combinator
> )
> clone = self._chain() if self.query.combinator else self.filter(*args, **kwargs)
> if self.query.can_filter() and not self.query.distinct_fields:
> clone = clone.order_by()
> limit = None
> if not clone.query.select_for_update or connections[clone.db].features.supports_select_for_update_with_limit:
> limit = MAX_GET_RESULTS
> clone.query.set_limits(high=limit)
> num = len(clone)
> if num == 1:
> return clone._result_cache[0]
> if not num:
> > raise self.model.DoesNotExist(
> "%s matching query does not exist." %
> self.model._meta.object_name
> )
> E axes.models.AccessAttempt.DoesNotExist: AccessAttempt matching query does not exist.
>
> /usr/lib/python3/dist-packages/django/db/models/query.py:435: DoesNotExist
> ------------------------------ Captured log call -------------------------------
> ERROR django.security.TooManyFieldsSent:exception.py:99 The number of GET/POST parameters exceeded settings.DATA_UPLOAD_MAX_NUMBER_FIELDS.
> WARNING django.request:log.py:224 Bad Request: /admin/login/
> =============================== warnings summary ===============================
> ../../../usr/lib/python3/dist-packages/django/http/request.py:1
> /usr/lib/python3/dist-packages/django/http/request.py:1: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
> import cgi
>
> ../../../usr/lib/python3/dist-packages/django/utils/encoding.py:266
> /usr/lib/python3/dist-packages/django/utils/encoding.py:266: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
> encoding = locale.getdefaultlocale()[1] or 'ascii'
>
> -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
>
> ---------- coverage: platform linux, python 3.11.2-final-0 -----------
> Name Stmts Miss Branch BrPart Cover Missing
> ---------------------------------------------------------------------------------------------------------
> axes/__init__.py 2 0 0 0 100%
> axes/admin.py 36 0 2 0 100%
> axes/apps.py 26 0 12 0 100%
> axes/attempts.py 45 0 14 0 100%
> axes/backends.py 22 0 8 0 100%
> axes/checks.py 65 0 24 0 100%
> axes/conf.py 41 0 0 0 100%
> axes/decorators.py 17 0 8 0 100%
> axes/exceptions.py 3 0 0 0 100%
> axes/handlers/__init__.py 0 0 0 0 100%
> axes/handlers/base.py 72 13 28 1 86% 28, 35, 42, 52, 114, 165, 176, 187, 201, 210, 213, 216, 219
> axes/handlers/cache.py 73 1 26 1 98% 42
> axes/handlers/database.py 117 0 40 0 100%
> axes/handlers/dummy.py 13 1 0 0 92% 20
> axes/handlers/proxy.py 78 2 56 0 99% 102-103
> axes/handlers/test.py 11 0 0 0 100%
> axes/helpers.py 215 3 108 3 98% 268, 275, 328
> axes/management/__init__.py 0 0 0 0 100%
> axes/management/commands/__init__.py 0 0 0 0 100%
> axes/management/commands/axes_list_attempts.py 7 0 2 0 100%
> axes/management/commands/axes_reset.py 9 0 2 0 100%
> axes/management/commands/axes_reset_failure_logs.py 11 11 2 0 0% 1-22
> axes/management/commands/axes_reset_ip.py 13 0 4 0 100%
> axes/management/commands/axes_reset_logs.py 11 0 2 0 100%
> axes/management/commands/axes_reset_username.py 13 0 4 0 100%
> axes/middleware.py 14 0 4 0 100%
> axes/migrations/0001_initial.py 4 0 0 0 100%
> axes/migrations/0002_auto_20151217_2044.py 4 0 0 0 100%
> axes/migrations/0003_auto_20160322_0929.py 4 0 0 0 100%
> axes/migrations/0004_auto_20181024_1538.py 4 0 0 0 100%
> axes/migrations/0005_remove_accessattempt_trusted.py 4 0 0 0 100%
> axes/migrations/0006_remove_accesslog_trusted.py 4 0 0 0 100%
> axes/migrations/0007_alter_accessattempt_unique_together.py 12 3 4 1 62% 17-23
> axes/migrations/0008_accessfailurelog.py 4 0 0 0 100%
> axes/migrations/__init__.py 0 0 0 0 100%
> axes/models.py 38 0 0 0 100%
> axes/signals.py 29 0 14 0 100%
> axes/utils.py 20 0 6 0 100%
> ---------------------------------------------------------------------------------------------------------
> TOTAL 1041 34 370 6 97%
> Coverage XML written to file coverage.xml
>
> =========================== short test summary info ============================
> FAILED tests/test_logging.py::AccessLogTestCase::test_log_data_truncated - ax...
> ================== 1 failed, 292 passed, 2 warnings in 32.13s ==================
> E: pybuild pybuild:388: test: plugin custom failed with: exit code=1: py.test-3
> rm -fr -- /tmp/dh-xdg-rundir-EJ5qdXv9
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.11 returned exit code 13
The full build log is available from:
http://qa-logs.debian.net/2023/02/16/django-axes_5.39.0-1_unstable.log
All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20230216;users=lucas@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20230216&fusertaguser=lucas@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.
More information about the Freedombox-pkg-team
mailing list