Source: djangorestframework Version: 3.12.4-2.2 Severity: serious Justification: FTBFS Tags: bookworm sid ftbfs User: lu...@debian.org Usertags: ftbfs-20220624 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="{interpreter} /<<PKGBUILDDIR>>/runtests.py --nolint -k > 'not test_markdown'" \ > dh_auto_test > I: pybuild base:239: python3.9 /<<PKGBUILDDIR>>/runtests.py --nolint -k 'not > test_markdown' > /usr/lib/python3/dist-packages/django/conf/__init__.py:264: > RemovedInDjango50Warning: The USE_L10N setting is deprecated. Starting with > Django 5.0, localized formatting of data will always be enabled. For example > Django will display numbers and dates using the format of the current locale. > warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning) > ============================= test session starts > ============================== > platform linux -- Python 3.9.13, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 > rootdir: /<<PKGBUILDDIR>>, configfile: setup.cfg > plugins: django-3.5.1, cov-3.0.0 > collected 1403 items / 1 deselected / 1402 selected > > tests/test_api_client.py .................... [ > 1%] > tests/test_atomic_requests.py ..... [ > 1%] > tests/test_authtoken.py ........... [ > 2%] > tests/test_bound_fields.py ........... [ > 3%] > tests/test_decorators.py .................. [ > 4%] > tests/test_description.py .......... [ > 5%] > tests/test_encoders.py .......... [ > 6%] > tests/test_exceptions.py .......... [ > 6%] > tests/test_fields.py ................................................... [ > 10%] > ........................................................................ [ > 15%] > .................................................FF..................... [ > 20%] > ........................................................................ [ > 25%] > .......................... [ > 27%] > tests/test_filters.py ................................. [ > 30%] > tests/test_generics.py ....................................... [ > 32%] > tests/test_htmlrenderer.py ........ [ > 33%] > tests/test_lazy_hyperlinks.py . [ > 33%] > tests/test_metadata.py ............. [ > 34%] > tests/test_middleware.py .. [ > 34%] > tests/test_model_serializer.py ................sss...................... [ > 37%] > ............... [ > 38%] > tests/test_multitable_inheritance.py ... [ > 38%] > tests/test_negotiation.py ........... [ > 39%] > tests/test_one_to_one_with_inheritance.py . [ > 39%] > tests/test_pagination.py ............................................... [ > 42%] > .. [ > 43%] > tests/test_parsers.py ............ [ > 43%] > tests/test_permissions.py .......................................... [ > 46%] > tests/test_prefetch_related.py .. [ > 47%] > tests/test_relations.py ....................................... [ > 49%] > tests/test_relations_hyperlink.py ...................... [ > 51%] > tests/test_relations_pk.py .................................... [ > 53%] > tests/test_relations_slug.py ............... [ > 55%] > tests/test_renderers.py ................................................ [ > 58%] > ...... [ > 58%] > tests/test_request.py ........................ [ > 60%] > tests/test_requests_client.py .......... [ > 61%] > tests/test_response.py .................. [ > 62%] > tests/test_reverse.py ... [ > 62%] > tests/test_routers.py ........................... [ > 64%] > tests/test_serializer.py ............................................... [ > 68%] > ..... [ > 68%] > tests/test_serializer_bulk_update.py ..... [ > 68%] > tests/test_serializer_lists.py .............................. [ > 70%] > tests/test_serializer_nested.py ................ss [ > 72%] > tests/test_settings.py .... [ > 72%] > tests/test_status.py . [ > 72%] > tests/test_templates.py FF [ > 72%] > tests/test_templatetags.py ........................... [ > 74%] > tests/test_testing.py ...................F [ > 76%] > tests/test_throttling.py ............................. [ > 78%] > tests/test_urlpatterns.py ........... [ > 78%] > tests/test_utils.py ....................... [ > 80%] > tests/test_validation.py .............. [ > 81%] > tests/test_validation_error.py ..... [ > 81%] > tests/test_validators.py ...................................... [ > 84%] > tests/test_versioning.py .......................... [ > 86%] > tests/test_views.py ..... [ > 86%] > tests/test_viewsets.py ................. [ > 88%] > tests/test_write_only_fields.py .. [ > 88%] > tests/authentication/test_authentication.py ............F............... [ > 90%] > .............................. [ > 92%] > tests/browsable_api/test_browsable_api.py ...... [ > 92%] > tests/browsable_api/test_browsable_nested_api.py . [ > 92%] > tests/browsable_api/test_form_rendering.py F.F [ > 93%] > tests/generic_relations/test_generic_relations.py .. [ > 93%] > tests/importable/test_installed.py ... [ > 93%] > tests/schemas/test_coreapi.py ..............................F. [ > 95%] > tests/schemas/test_get_schema_view.py .. [ > 95%] > tests/schemas/test_managementcommand.py ........ [ > 96%] > tests/schemas/test_openapi.py .......................................... [ > 99%] > ........ > [100%] > > =================================== FAILURES > =================================== > _______________ TestDefaultTZDateTimeField.test_current_timezone > _______________ > tests/test_fields.py:1447: in test_current_timezone > assert self.field.default_timezone() == utc > E AssertionError: assert zoneinfo.ZoneInfo(key='UTC') == > datetime.timezone.utc > E + where zoneinfo.ZoneInfo(key='UTC') = <bound method > DateTimeField.default_timezone of DateTimeField()>() > E + where <bound method DateTimeField.default_timezone of > DateTimeField()> = DateTimeField().default_timezone > E + where DateTimeField() = > <tests.test_fields.TestDefaultTZDateTimeField > testMethod=test_current_timezone>.field > _______________ TestDefaultTZDateTimeField.test_default_timezone > _______________ > tests/test_fields.py:1444: in test_default_timezone > assert self.field.default_timezone() == utc > E AssertionError: assert zoneinfo.ZoneInfo(key='UTC') == > datetime.timezone.utc > E + where zoneinfo.ZoneInfo(key='UTC') = <bound method > DateTimeField.default_timezone of DateTimeField()>() > E + where <bound method DateTimeField.default_timezone of > DateTimeField()> = DateTimeField().default_timezone > E + where DateTimeField() = > <tests.test_fields.TestDefaultTZDateTimeField > testMethod=test_default_timezone>.field > _______________________ test_base_template_with_context > ________________________ > /usr/lib/python3/dist-packages/django/urls/resolvers.py:698: in url_patterns > iter(patterns) > E TypeError: 'module' object is not iterable > > The above exception was the direct cause of the following exception: > tests/test_templates.py:8: in test_base_template_with_context > result = render({}, 'rest_framework/base.html', context=context) > /usr/lib/python3/dist-packages/django/shortcuts.py:24: in render > content = loader.render_to_string(template_name, context, request, > using=using) > /usr/lib/python3/dist-packages/django/template/loader.py:62: in > render_to_string > return template.render(context, request) > /usr/lib/python3/dist-packages/django/template/backends/django.py:62: in > render > return self.template.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:175: in render > return self._render(context) > /usr/lib/python3/dist-packages/django/test/utils.py:111: in > instrumented_test_render > return self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:54: in render > result = self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:54: in render > result = self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:54: in render > result = self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/defaulttags.py:322: in render > return nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/library.py:239: in render > output = self.func(*resolved_args, **resolved_kwargs) > rest_framework/templatetags/rest_framework.py:96: in optional_login > login_url = reverse('rest_framework:login') > /usr/lib/python3/dist-packages/django/urls/base.py:54: in reverse > app_list = resolver.app_dict[ns] > /usr/lib/python3/dist-packages/django/urls/resolvers.py:619: in app_dict > self._populate() > /usr/lib/python3/dist-packages/django/urls/resolvers.py:529: in _populate > for url_pattern in reversed(self.url_patterns): > /usr/lib/python3/dist-packages/django/utils/functional.py:49: in __get__ > res = instance.__dict__[self.name] = self.func(instance) > /usr/lib/python3/dist-packages/django/urls/resolvers.py:706: in url_patterns > raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e > E django.core.exceptions.ImproperlyConfigured: The included URLconf > 'tests.test_routers' does not appear to have any patterns in it. If you see > the 'urlpatterns' variable with valid patterns in the file then the issue is > probably caused by a circular import. > ______________________ test_base_template_with_no_context > ______________________ > /usr/lib/python3/dist-packages/django/urls/resolvers.py:698: in url_patterns > iter(patterns) > E TypeError: 'module' object is not iterable > > The above exception was the direct cause of the following exception: > tests/test_templates.py:15: in test_base_template_with_no_context > result = render({}, 'rest_framework/base.html') > /usr/lib/python3/dist-packages/django/shortcuts.py:24: in render > content = loader.render_to_string(template_name, context, request, > using=using) > /usr/lib/python3/dist-packages/django/template/loader.py:62: in > render_to_string > return template.render(context, request) > /usr/lib/python3/dist-packages/django/template/backends/django.py:62: in > render > return self.template.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:175: in render > return self._render(context) > /usr/lib/python3/dist-packages/django/test/utils.py:111: in > instrumented_test_render > return self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:54: in render > result = self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:54: in render > result = self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:54: in render > result = self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/defaulttags.py:322: in render > return nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/library.py:239: in render > output = self.func(*resolved_args, **resolved_kwargs) > rest_framework/templatetags/rest_framework.py:96: in optional_login > login_url = reverse('rest_framework:login') > /usr/lib/python3/dist-packages/django/urls/base.py:54: in reverse > app_list = resolver.app_dict[ns] > /usr/lib/python3/dist-packages/django/urls/resolvers.py:619: in app_dict > self._populate() > /usr/lib/python3/dist-packages/django/urls/resolvers.py:529: in _populate > for url_pattern in reversed(self.url_patterns): > /usr/lib/python3/dist-packages/django/utils/functional.py:49: in __get__ > res = instance.__dict__[self.name] = self.func(instance) > /usr/lib/python3/dist-packages/django/urls/resolvers.py:706: in url_patterns > raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e > E django.core.exceptions.ImproperlyConfigured: The included URLconf > 'tests.test_routers' does not appear to have any patterns in it. If you see > the 'urlpatterns' variable with valid patterns in the file then the issue is > probably caused by a circular import. > ____________________ TestExistingPatterns.test_urlpatterns > _____________________ > /usr/lib/python3/dist-packages/django/urls/resolvers.py:698: in url_patterns > iter(patterns) > E TypeError: 'module' object is not iterable > > The above exception was the direct cause of the following exception: > tests/test_testing.py:309: in test_urlpatterns > assert self.client.get('/').status_code == 404 > /usr/lib/python3/dist-packages/django/test/client.py:836: in get > response = super().get(path, data=data, secure=secure, **extra) > /usr/lib/python3/dist-packages/django/test/client.py:424: in get > return self.generic( > /usr/lib/python3/dist-packages/django/test/client.py:541: in generic > return self.request(**r) > /usr/lib/python3/dist-packages/django/test/client.py:805: in request > response = self.handler(environ) > /usr/lib/python3/dist-packages/django/test/client.py:153: in __call__ > response = self.get_response(request) > /usr/lib/python3/dist-packages/django/core/handlers/base.py:140: in > get_response > response = self._middleware_chain(request) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:57: in inner > response = response_for_exception(request, exc) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:139: in > response_for_exception > response = handle_uncaught_exception( > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:55: in inner > response = get_response(request) > /usr/lib/python3/dist-packages/django/utils/deprecation.py:134: in __call__ > response = response or self.get_response(request) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:57: in inner > response = response_for_exception(request, exc) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:139: in > response_for_exception > response = handle_uncaught_exception( > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:55: in inner > response = get_response(request) > /usr/lib/python3/dist-packages/django/utils/deprecation.py:134: in __call__ > response = response or self.get_response(request) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:57: in inner > response = response_for_exception(request, exc) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:139: in > response_for_exception > response = handle_uncaught_exception( > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:55: in inner > response = get_response(request) > /usr/lib/python3/dist-packages/django/utils/deprecation.py:134: in __call__ > response = response or self.get_response(request) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:57: in inner > response = response_for_exception(request, exc) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:139: in > response_for_exception > response = handle_uncaught_exception( > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:55: in inner > response = get_response(request) > /usr/lib/python3/dist-packages/django/utils/deprecation.py:134: in __call__ > response = response or self.get_response(request) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:57: in inner > response = response_for_exception(request, exc) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:139: in > response_for_exception > response = handle_uncaught_exception( > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:55: in inner > response = get_response(request) > /usr/lib/python3/dist-packages/django/core/handlers/base.py:181: in > _get_response > callback, callback_args, callback_kwargs = self.resolve_request(request) > /usr/lib/python3/dist-packages/django/core/handlers/base.py:313: in > resolve_request > resolver_match = resolver.resolve(request.path_info) > /usr/lib/python3/dist-packages/django/urls/resolvers.py:649: in resolve > for pattern in self.url_patterns: > /usr/lib/python3/dist-packages/django/utils/functional.py:49: in __get__ > res = instance.__dict__[self.name] = self.func(instance) > /usr/lib/python3/dist-packages/django/urls/resolvers.py:706: in url_patterns > raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e > E django.core.exceptions.ImproperlyConfigured: The included URLconf > 'tests.test_routers' does not appear to have any patterns in it. If you see > the 'urlpatterns' variable with valid patterns in the file then the issue is > probably caused by a circular import. > __________ SessionAuthTests.test_post_form_session_auth_passing_csrf > ___________ > tests/authentication/test_authentication.py:221: in > test_post_form_session_auth_passing_csrf > from django.middleware.csrf import _get_new_csrf_token > E ImportError: cannot import name '_get_new_csrf_token' from > 'django.middleware.csrf' > (/usr/lib/python3/dist-packages/django/middleware/csrf.py) > ____________________ TestPostingListData.test_browsable_api > ____________________ > /usr/lib/python3/dist-packages/django/urls/resolvers.py:698: in url_patterns > iter(patterns) > E TypeError: 'module' object is not iterable > > The above exception was the direct cause of the following exception: > tests/browsable_api/test_form_rendering.py:51: in test_browsable_api > response = view(request).render() > /usr/lib/python3/dist-packages/django/template/response.py:114: in render > self.content = self.rendered_content > rest_framework/response.py:70: in rendered_content > ret = renderer.render(self.data, accepted_media_type, context) > rest_framework/renderers.py:725: in render > ret = template.render(context, request=renderer_context['request']) > /usr/lib/python3/dist-packages/django/template/backends/django.py:62: in > render > return self.template.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:175: in render > return self._render(context) > /usr/lib/python3/dist-packages/django/test/utils.py:111: in > instrumented_test_render > return self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:157: in render > return compiled_parent._render(context) > /usr/lib/python3/dist-packages/django/test/utils.py:111: in > instrumented_test_render > return self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:63: in render > result = block.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:63: in render > result = block.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:63: in render > result = block.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/defaulttags.py:322: in render > return nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/library.py:239: in render > output = self.func(*resolved_args, **resolved_kwargs) > rest_framework/templatetags/rest_framework.py:96: in optional_login > login_url = reverse('rest_framework:login') > /usr/lib/python3/dist-packages/django/urls/base.py:54: in reverse > app_list = resolver.app_dict[ns] > /usr/lib/python3/dist-packages/django/urls/resolvers.py:619: in app_dict > self._populate() > /usr/lib/python3/dist-packages/django/urls/resolvers.py:529: in _populate > for url_pattern in reversed(self.url_patterns): > /usr/lib/python3/dist-packages/django/utils/functional.py:49: in __get__ > res = instance.__dict__[self.name] = self.func(instance) > /usr/lib/python3/dist-packages/django/urls/resolvers.py:706: in url_patterns > raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e > E django.core.exceptions.ImproperlyConfigured: The included URLconf > 'tests.test_routers' does not appear to have any patterns in it. If you see > the 'urlpatterns' variable with valid patterns in the file then the issue is > probably caused by a circular import. > __________________ TestManyPostView.test_post_many_post_view > ___________________ > /usr/lib/python3/dist-packages/django/urls/resolvers.py:698: in url_patterns > iter(patterns) > E TypeError: 'module' object is not iterable > > The above exception was the direct cause of the following exception: > tests/browsable_api/test_form_rendering.py:82: in test_post_many_post_view > response = self.view(request).render() > /usr/lib/python3/dist-packages/django/template/response.py:114: in render > self.content = self.rendered_content > rest_framework/response.py:70: in rendered_content > ret = renderer.render(self.data, accepted_media_type, context) > rest_framework/renderers.py:725: in render > ret = template.render(context, request=renderer_context['request']) > /usr/lib/python3/dist-packages/django/template/backends/django.py:62: in > render > return self.template.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:175: in render > return self._render(context) > /usr/lib/python3/dist-packages/django/test/utils.py:111: in > instrumented_test_render > return self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:157: in render > return compiled_parent._render(context) > /usr/lib/python3/dist-packages/django/test/utils.py:111: in > instrumented_test_render > return self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:63: in render > result = block.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:63: in render > result = block.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:63: in render > result = block.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/defaulttags.py:322: in render > return nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/library.py:239: in render > output = self.func(*resolved_args, **resolved_kwargs) > rest_framework/templatetags/rest_framework.py:96: in optional_login > login_url = reverse('rest_framework:login') > /usr/lib/python3/dist-packages/django/urls/base.py:54: in reverse > app_list = resolver.app_dict[ns] > /usr/lib/python3/dist-packages/django/urls/resolvers.py:619: in app_dict > self._populate() > /usr/lib/python3/dist-packages/django/urls/resolvers.py:529: in _populate > for url_pattern in reversed(self.url_patterns): > /usr/lib/python3/dist-packages/django/utils/functional.py:49: in __get__ > res = instance.__dict__[self.name] = self.func(instance) > /usr/lib/python3/dist-packages/django/urls/resolvers.py:706: in url_patterns > raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e > E django.core.exceptions.ImproperlyConfigured: The included URLconf > 'tests.test_routers' does not appear to have any patterns in it. If you see > the 'urlpatterns' variable with valid patterns in the file then the issue is > probably caused by a circular import. > __________________ test_head_and_options_methods_are_excluded > __________________ > tests/schemas/test_coreapi.py:1284: in > test_head_and_options_methods_are_excluded > inspector = EndpointEnumerator() > rest_framework/schemas/generators.py:68: in __init__ > patterns = urls.urlpatterns > E AttributeError: module 'tests.test_routers' has no attribute 'urlpatterns' > =============================== warnings summary > =============================== > ../../../usr/lib/python3/dist-packages/_pytest/config/__init__.py:1183 > /usr/lib/python3/dist-packages/_pytest/config/__init__.py:1183: > PytestDeprecationWarning: The --strict option is deprecated, use > --strict-markers instead. > self.issue_config_time_warning( > > ../../../usr/lib/python3/dist-packages/_pytest/config/__init__.py:1233 > /usr/lib/python3/dist-packages/_pytest/config/__init__.py:1233: > PytestConfigWarning: Unknown config option: testspath > > self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") > > tests/test_authtoken.py::AuthTokenTests::test_authtoken_can_be_imported_when_not_included_in_installed_apps > /usr/lib/python3/dist-packages/django/db/models/base.py:364: > RuntimeWarning: Model 'authtoken.token' was already registered. Reloading > models is not advised as it can lead to inconsistencies, most notably with > related models. > new_class._meta.apps.register_model(new_class._meta.app_label, new_class) > > tests/test_authtoken.py::AuthTokenTests::test_authtoken_can_be_imported_when_not_included_in_installed_apps > /usr/lib/python3/dist-packages/django/db/models/base.py:364: > RuntimeWarning: Model 'authtoken.tokenproxy' was already registered. > Reloading models is not advised as it can lead to inconsistencies, most > notably with related models. > new_class._meta.apps.register_model(new_class._meta.app_label, new_class) > > tests/test_fields.py::TestLocalizedDecimalField::test_to_internal_value > tests/test_fields.py::TestLocalizedDecimalField::test_to_representation > /usr/lib/python3/dist-packages/django/conf/__init__.py:264: > RemovedInDjango50Warning: The USE_L10N setting is deprecated. Starting with > Django 5.0, localized formatting of data will always be enabled. For example > Django will display numbers and dates using the format of the current locale. > warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning) > > -- Docs: https://docs.pytest.org/en/stable/warnings.html > =========================== short test summary info > ============================ > SKIPPED [1] tests/test_model_serializer.py:445: condition: not postgres_fields > SKIPPED [1] tests/test_model_serializer.py:430: condition: not postgres_fields > SKIPPED [1] tests/test_model_serializer.py:462: has models.JSONField > SKIPPED [1] tests/test_serializer_nested.py:325: psycopg2 is not installed > SKIPPED [1] tests/test_serializer_nested.py:343: psycopg2 is not installed > FAILED tests/test_fields.py::TestDefaultTZDateTimeField::test_current_timezone > FAILED tests/test_fields.py::TestDefaultTZDateTimeField::test_default_timezone > FAILED tests/test_templates.py::test_base_template_with_context - > django.core... > FAILED tests/test_templates.py::test_base_template_with_no_context - > django.c... > FAILED tests/test_testing.py::TestExistingPatterns::test_urlpatterns - > django... > FAILED > tests/authentication/test_authentication.py::SessionAuthTests::test_post_form_session_auth_passing_csrf > FAILED > tests/browsable_api/test_form_rendering.py::TestPostingListData::test_browsable_api > FAILED > tests/browsable_api/test_form_rendering.py::TestManyPostView::test_post_many_post_view > FAILED > tests/schemas/test_coreapi.py::test_head_and_options_methods_are_excluded > ===== 9 failed, 1388 passed, 5 skipped, 1 deselected, 6 warnings in 19.77s > ===== > E: pybuild pybuild:369: test: plugin custom failed with: exit code=1: > python3.9 /<<PKGBUILDDIR>>/runtests.py --nolint -k 'not test_markdown' > I: pybuild base:239: python3.10 /<<PKGBUILDDIR>>/runtests.py --nolint -k 'not > test_markdown' > /usr/lib/python3/dist-packages/django/conf/__init__.py:264: > RemovedInDjango50Warning: The USE_L10N setting is deprecated. Starting with > Django 5.0, localized formatting of data will always be enabled. For example > Django will display numbers and dates using the format of the current locale. > warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning) > ============================= test session starts > ============================== > platform linux -- Python 3.10.5, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 > rootdir: /<<PKGBUILDDIR>>, configfile: setup.cfg > plugins: django-3.5.1, cov-3.0.0 > collected 1403 items / 1 deselected / 1402 selected > > tests/test_api_client.py .................... [ > 1%] > tests/test_atomic_requests.py ..... [ > 1%] > tests/test_authtoken.py ........... [ > 2%] > tests/test_bound_fields.py ........... [ > 3%] > tests/test_decorators.py .................. [ > 4%] > tests/test_description.py .......... [ > 5%] > tests/test_encoders.py .......... [ > 6%] > tests/test_exceptions.py .......... [ > 6%] > tests/test_fields.py ................................................... [ > 10%] > ........................................................................ [ > 15%] > .................................................FF..................... [ > 20%] > ........................................................................ [ > 25%] > .......................... [ > 27%] > tests/test_filters.py ................................. [ > 30%] > tests/test_generics.py ....................................... [ > 32%] > tests/test_htmlrenderer.py ........ [ > 33%] > tests/test_lazy_hyperlinks.py . [ > 33%] > tests/test_metadata.py ............. [ > 34%] > tests/test_middleware.py .. [ > 34%] > tests/test_model_serializer.py ................sss...................... [ > 37%] > ............... [ > 38%] > tests/test_multitable_inheritance.py ... [ > 38%] > tests/test_negotiation.py ........... [ > 39%] > tests/test_one_to_one_with_inheritance.py . [ > 39%] > tests/test_pagination.py ............................................... [ > 42%] > .. [ > 43%] > tests/test_parsers.py ............ [ > 43%] > tests/test_permissions.py .......................................... [ > 46%] > tests/test_prefetch_related.py .. [ > 47%] > tests/test_relations.py ....................................... [ > 49%] > tests/test_relations_hyperlink.py ...................... [ > 51%] > tests/test_relations_pk.py .................................... [ > 53%] > tests/test_relations_slug.py ............... [ > 55%] > tests/test_renderers.py ................................................ [ > 58%] > ...... [ > 58%] > tests/test_request.py ........................ [ > 60%] > tests/test_requests_client.py .......... [ > 61%] > tests/test_response.py .................. [ > 62%] > tests/test_reverse.py ... [ > 62%] > tests/test_routers.py ........................... [ > 64%] > tests/test_serializer.py ............................................... [ > 68%] > ..... [ > 68%] > tests/test_serializer_bulk_update.py ..... [ > 68%] > tests/test_serializer_lists.py .............................. [ > 70%] > tests/test_serializer_nested.py ................ss [ > 72%] > tests/test_settings.py .... [ > 72%] > tests/test_status.py . [ > 72%] > tests/test_templates.py FF [ > 72%] > tests/test_templatetags.py ........................... [ > 74%] > tests/test_testing.py ...................F [ > 76%] > tests/test_throttling.py ............................. [ > 78%] > tests/test_urlpatterns.py ........... [ > 78%] > tests/test_utils.py ....................... [ > 80%] > tests/test_validation.py .............. [ > 81%] > tests/test_validation_error.py ..... [ > 81%] > tests/test_validators.py ...................................... [ > 84%] > tests/test_versioning.py .......................... [ > 86%] > tests/test_views.py ..... [ > 86%] > tests/test_viewsets.py ................. [ > 88%] > tests/test_write_only_fields.py .. [ > 88%] > tests/authentication/test_authentication.py ............F............... [ > 90%] > .............................. [ > 92%] > tests/browsable_api/test_browsable_api.py ...... [ > 92%] > tests/browsable_api/test_browsable_nested_api.py . [ > 92%] > tests/browsable_api/test_form_rendering.py F.F [ > 93%] > tests/generic_relations/test_generic_relations.py .. [ > 93%] > tests/importable/test_installed.py ... [ > 93%] > tests/schemas/test_coreapi.py ..............................F. [ > 95%] > tests/schemas/test_get_schema_view.py .. [ > 95%] > tests/schemas/test_managementcommand.py ........ [ > 96%] > tests/schemas/test_openapi.py .......................................... [ > 99%] > ........ > [100%] > > =================================== FAILURES > =================================== > _______________ TestDefaultTZDateTimeField.test_current_timezone > _______________ > tests/test_fields.py:1447: in test_current_timezone > assert self.field.default_timezone() == utc > E AssertionError: assert zoneinfo.ZoneInfo(key='UTC') == > datetime.timezone.utc > E + where zoneinfo.ZoneInfo(key='UTC') = <bound method > DateTimeField.default_timezone of DateTimeField()>() > E + where <bound method DateTimeField.default_timezone of > DateTimeField()> = DateTimeField().default_timezone > E + where DateTimeField() = > <tests.test_fields.TestDefaultTZDateTimeField > testMethod=test_current_timezone>.field > _______________ TestDefaultTZDateTimeField.test_default_timezone > _______________ > tests/test_fields.py:1444: in test_default_timezone > assert self.field.default_timezone() == utc > E AssertionError: assert zoneinfo.ZoneInfo(key='UTC') == > datetime.timezone.utc > E + where zoneinfo.ZoneInfo(key='UTC') = <bound method > DateTimeField.default_timezone of DateTimeField()>() > E + where <bound method DateTimeField.default_timezone of > DateTimeField()> = DateTimeField().default_timezone > E + where DateTimeField() = > <tests.test_fields.TestDefaultTZDateTimeField > testMethod=test_default_timezone>.field > _______________________ test_base_template_with_context > ________________________ > /usr/lib/python3/dist-packages/django/urls/resolvers.py:698: in url_patterns > iter(patterns) > E TypeError: 'module' object is not iterable > > The above exception was the direct cause of the following exception: > tests/test_templates.py:8: in test_base_template_with_context > result = render({}, 'rest_framework/base.html', context=context) > /usr/lib/python3/dist-packages/django/shortcuts.py:24: in render > content = loader.render_to_string(template_name, context, request, > using=using) > /usr/lib/python3/dist-packages/django/template/loader.py:62: in > render_to_string > return template.render(context, request) > /usr/lib/python3/dist-packages/django/template/backends/django.py:62: in > render > return self.template.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:175: in render > return self._render(context) > /usr/lib/python3/dist-packages/django/test/utils.py:111: in > instrumented_test_render > return self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:54: in render > result = self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:54: in render > result = self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:54: in render > result = self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/defaulttags.py:322: in render > return nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/library.py:239: in render > output = self.func(*resolved_args, **resolved_kwargs) > rest_framework/templatetags/rest_framework.py:96: in optional_login > login_url = reverse('rest_framework:login') > /usr/lib/python3/dist-packages/django/urls/base.py:54: in reverse > app_list = resolver.app_dict[ns] > /usr/lib/python3/dist-packages/django/urls/resolvers.py:619: in app_dict > self._populate() > /usr/lib/python3/dist-packages/django/urls/resolvers.py:529: in _populate > for url_pattern in reversed(self.url_patterns): > /usr/lib/python3/dist-packages/django/utils/functional.py:49: in __get__ > res = instance.__dict__[self.name] = self.func(instance) > /usr/lib/python3/dist-packages/django/urls/resolvers.py:706: in url_patterns > raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e > E django.core.exceptions.ImproperlyConfigured: The included URLconf > 'tests.test_routers' does not appear to have any patterns in it. If you see > the 'urlpatterns' variable with valid patterns in the file then the issue is > probably caused by a circular import. > ______________________ test_base_template_with_no_context > ______________________ > /usr/lib/python3/dist-packages/django/urls/resolvers.py:698: in url_patterns > iter(patterns) > E TypeError: 'module' object is not iterable > > The above exception was the direct cause of the following exception: > tests/test_templates.py:15: in test_base_template_with_no_context > result = render({}, 'rest_framework/base.html') > /usr/lib/python3/dist-packages/django/shortcuts.py:24: in render > content = loader.render_to_string(template_name, context, request, > using=using) > /usr/lib/python3/dist-packages/django/template/loader.py:62: in > render_to_string > return template.render(context, request) > /usr/lib/python3/dist-packages/django/template/backends/django.py:62: in > render > return self.template.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:175: in render > return self._render(context) > /usr/lib/python3/dist-packages/django/test/utils.py:111: in > instrumented_test_render > return self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:54: in render > result = self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:54: in render > result = self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:54: in render > result = self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/defaulttags.py:322: in render > return nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/library.py:239: in render > output = self.func(*resolved_args, **resolved_kwargs) > rest_framework/templatetags/rest_framework.py:96: in optional_login > login_url = reverse('rest_framework:login') > /usr/lib/python3/dist-packages/django/urls/base.py:54: in reverse > app_list = resolver.app_dict[ns] > /usr/lib/python3/dist-packages/django/urls/resolvers.py:619: in app_dict > self._populate() > /usr/lib/python3/dist-packages/django/urls/resolvers.py:529: in _populate > for url_pattern in reversed(self.url_patterns): > /usr/lib/python3/dist-packages/django/utils/functional.py:49: in __get__ > res = instance.__dict__[self.name] = self.func(instance) > /usr/lib/python3/dist-packages/django/urls/resolvers.py:706: in url_patterns > raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e > E django.core.exceptions.ImproperlyConfigured: The included URLconf > 'tests.test_routers' does not appear to have any patterns in it. If you see > the 'urlpatterns' variable with valid patterns in the file then the issue is > probably caused by a circular import. > ____________________ TestExistingPatterns.test_urlpatterns > _____________________ > /usr/lib/python3/dist-packages/django/urls/resolvers.py:698: in url_patterns > iter(patterns) > E TypeError: 'module' object is not iterable > > The above exception was the direct cause of the following exception: > tests/test_testing.py:309: in test_urlpatterns > assert self.client.get('/').status_code == 404 > /usr/lib/python3/dist-packages/django/test/client.py:836: in get > response = super().get(path, data=data, secure=secure, **extra) > /usr/lib/python3/dist-packages/django/test/client.py:424: in get > return self.generic( > /usr/lib/python3/dist-packages/django/test/client.py:541: in generic > return self.request(**r) > /usr/lib/python3/dist-packages/django/test/client.py:805: in request > response = self.handler(environ) > /usr/lib/python3/dist-packages/django/test/client.py:153: in __call__ > response = self.get_response(request) > /usr/lib/python3/dist-packages/django/core/handlers/base.py:140: in > get_response > response = self._middleware_chain(request) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:57: in inner > response = response_for_exception(request, exc) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:139: in > response_for_exception > response = handle_uncaught_exception( > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:55: in inner > response = get_response(request) > /usr/lib/python3/dist-packages/django/utils/deprecation.py:134: in __call__ > response = response or self.get_response(request) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:57: in inner > response = response_for_exception(request, exc) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:139: in > response_for_exception > response = handle_uncaught_exception( > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:55: in inner > response = get_response(request) > /usr/lib/python3/dist-packages/django/utils/deprecation.py:134: in __call__ > response = response or self.get_response(request) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:57: in inner > response = response_for_exception(request, exc) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:139: in > response_for_exception > response = handle_uncaught_exception( > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:55: in inner > response = get_response(request) > /usr/lib/python3/dist-packages/django/utils/deprecation.py:134: in __call__ > response = response or self.get_response(request) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:57: in inner > response = response_for_exception(request, exc) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:139: in > response_for_exception > response = handle_uncaught_exception( > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:55: in inner > response = get_response(request) > /usr/lib/python3/dist-packages/django/utils/deprecation.py:134: in __call__ > response = response or self.get_response(request) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:57: in inner > response = response_for_exception(request, exc) > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:139: in > response_for_exception > response = handle_uncaught_exception( > /usr/lib/python3/dist-packages/django/core/handlers/exception.py:55: in inner > response = get_response(request) > /usr/lib/python3/dist-packages/django/core/handlers/base.py:181: in > _get_response > callback, callback_args, callback_kwargs = self.resolve_request(request) > /usr/lib/python3/dist-packages/django/core/handlers/base.py:313: in > resolve_request > resolver_match = resolver.resolve(request.path_info) > /usr/lib/python3/dist-packages/django/urls/resolvers.py:649: in resolve > for pattern in self.url_patterns: > /usr/lib/python3/dist-packages/django/utils/functional.py:49: in __get__ > res = instance.__dict__[self.name] = self.func(instance) > /usr/lib/python3/dist-packages/django/urls/resolvers.py:706: in url_patterns > raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e > E django.core.exceptions.ImproperlyConfigured: The included URLconf > 'tests.test_routers' does not appear to have any patterns in it. If you see > the 'urlpatterns' variable with valid patterns in the file then the issue is > probably caused by a circular import. > __________ SessionAuthTests.test_post_form_session_auth_passing_csrf > ___________ > tests/authentication/test_authentication.py:221: in > test_post_form_session_auth_passing_csrf > from django.middleware.csrf import _get_new_csrf_token > E ImportError: cannot import name '_get_new_csrf_token' from > 'django.middleware.csrf' > (/usr/lib/python3/dist-packages/django/middleware/csrf.py) > ____________________ TestPostingListData.test_browsable_api > ____________________ > /usr/lib/python3/dist-packages/django/urls/resolvers.py:698: in url_patterns > iter(patterns) > E TypeError: 'module' object is not iterable > > The above exception was the direct cause of the following exception: > tests/browsable_api/test_form_rendering.py:51: in test_browsable_api > response = view(request).render() > /usr/lib/python3/dist-packages/django/template/response.py:114: in render > self.content = self.rendered_content > rest_framework/response.py:70: in rendered_content > ret = renderer.render(self.data, accepted_media_type, context) > rest_framework/renderers.py:725: in render > ret = template.render(context, request=renderer_context['request']) > /usr/lib/python3/dist-packages/django/template/backends/django.py:62: in > render > return self.template.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:175: in render > return self._render(context) > /usr/lib/python3/dist-packages/django/test/utils.py:111: in > instrumented_test_render > return self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:157: in render > return compiled_parent._render(context) > /usr/lib/python3/dist-packages/django/test/utils.py:111: in > instrumented_test_render > return self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:63: in render > result = block.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:63: in render > result = block.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:63: in render > result = block.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/defaulttags.py:322: in render > return nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/library.py:239: in render > output = self.func(*resolved_args, **resolved_kwargs) > rest_framework/templatetags/rest_framework.py:96: in optional_login > login_url = reverse('rest_framework:login') > /usr/lib/python3/dist-packages/django/urls/base.py:54: in reverse > app_list = resolver.app_dict[ns] > /usr/lib/python3/dist-packages/django/urls/resolvers.py:619: in app_dict > self._populate() > /usr/lib/python3/dist-packages/django/urls/resolvers.py:529: in _populate > for url_pattern in reversed(self.url_patterns): > /usr/lib/python3/dist-packages/django/utils/functional.py:49: in __get__ > res = instance.__dict__[self.name] = self.func(instance) > /usr/lib/python3/dist-packages/django/urls/resolvers.py:706: in url_patterns > raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e > E django.core.exceptions.ImproperlyConfigured: The included URLconf > 'tests.test_routers' does not appear to have any patterns in it. If you see > the 'urlpatterns' variable with valid patterns in the file then the issue is > probably caused by a circular import. > __________________ TestManyPostView.test_post_many_post_view > ___________________ > /usr/lib/python3/dist-packages/django/urls/resolvers.py:698: in url_patterns > iter(patterns) > E TypeError: 'module' object is not iterable > > The above exception was the direct cause of the following exception: > tests/browsable_api/test_form_rendering.py:82: in test_post_many_post_view > response = self.view(request).render() > /usr/lib/python3/dist-packages/django/template/response.py:114: in render > self.content = self.rendered_content > rest_framework/response.py:70: in rendered_content > ret = renderer.render(self.data, accepted_media_type, context) > rest_framework/renderers.py:725: in render > ret = template.render(context, request=renderer_context['request']) > /usr/lib/python3/dist-packages/django/template/backends/django.py:62: in > render > return self.template.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:175: in render > return self._render(context) > /usr/lib/python3/dist-packages/django/test/utils.py:111: in > instrumented_test_render > return self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:157: in render > return compiled_parent._render(context) > /usr/lib/python3/dist-packages/django/test/utils.py:111: in > instrumented_test_render > return self.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:63: in render > result = block.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:63: in render > result = block.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/loader_tags.py:63: in render > result = block.nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/defaulttags.py:322: in render > return nodelist.render(context) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in render > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:1000: in <listcomp> > return SafeString("".join([node.render_annotated(context) for node in > self])) > /usr/lib/python3/dist-packages/django/template/base.py:958: in > render_annotated > return self.render(context) > /usr/lib/python3/dist-packages/django/template/library.py:239: in render > output = self.func(*resolved_args, **resolved_kwargs) > rest_framework/templatetags/rest_framework.py:96: in optional_login > login_url = reverse('rest_framework:login') > /usr/lib/python3/dist-packages/django/urls/base.py:54: in reverse > app_list = resolver.app_dict[ns] > /usr/lib/python3/dist-packages/django/urls/resolvers.py:619: in app_dict > self._populate() > /usr/lib/python3/dist-packages/django/urls/resolvers.py:529: in _populate > for url_pattern in reversed(self.url_patterns): > /usr/lib/python3/dist-packages/django/utils/functional.py:49: in __get__ > res = instance.__dict__[self.name] = self.func(instance) > /usr/lib/python3/dist-packages/django/urls/resolvers.py:706: in url_patterns > raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e > E django.core.exceptions.ImproperlyConfigured: The included URLconf > 'tests.test_routers' does not appear to have any patterns in it. If you see > the 'urlpatterns' variable with valid patterns in the file then the issue is > probably caused by a circular import. > __________________ test_head_and_options_methods_are_excluded > __________________ > tests/schemas/test_coreapi.py:1284: in > test_head_and_options_methods_are_excluded > inspector = EndpointEnumerator() > rest_framework/schemas/generators.py:68: in __init__ > patterns = urls.urlpatterns > E AttributeError: module 'tests.test_routers' has no attribute 'urlpatterns' > =============================== warnings summary > =============================== > ../../../usr/lib/python3/dist-packages/_pytest/config/__init__.py:1183 > /usr/lib/python3/dist-packages/_pytest/config/__init__.py:1183: > PytestDeprecationWarning: The --strict option is deprecated, use > --strict-markers instead. > self.issue_config_time_warning( > > ../../../usr/lib/python3/dist-packages/_pytest/config/__init__.py:1233 > /usr/lib/python3/dist-packages/_pytest/config/__init__.py:1233: > PytestConfigWarning: Unknown config option: testspath > > self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") > > tests/test_authtoken.py::AuthTokenTests::test_authtoken_can_be_imported_when_not_included_in_installed_apps > /usr/lib/python3/dist-packages/django/db/models/base.py:364: > RuntimeWarning: Model 'authtoken.token' was already registered. Reloading > models is not advised as it can lead to inconsistencies, most notably with > related models. > new_class._meta.apps.register_model(new_class._meta.app_label, new_class) > > tests/test_authtoken.py::AuthTokenTests::test_authtoken_can_be_imported_when_not_included_in_installed_apps > /usr/lib/python3/dist-packages/django/db/models/base.py:364: > RuntimeWarning: Model 'authtoken.tokenproxy' was already registered. > Reloading models is not advised as it can lead to inconsistencies, most > notably with related models. > new_class._meta.apps.register_model(new_class._meta.app_label, new_class) > > tests/test_fields.py::TestLocalizedDecimalField::test_to_internal_value > tests/test_fields.py::TestLocalizedDecimalField::test_to_representation > /usr/lib/python3/dist-packages/django/conf/__init__.py:264: > RemovedInDjango50Warning: The USE_L10N setting is deprecated. Starting with > Django 5.0, localized formatting of data will always be enabled. For example > Django will display numbers and dates using the format of the current locale. > warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning) > > -- Docs: https://docs.pytest.org/en/stable/warnings.html > =========================== short test summary info > ============================ > SKIPPED [1] tests/test_model_serializer.py:445: condition: not postgres_fields > SKIPPED [1] tests/test_model_serializer.py:430: condition: not postgres_fields > SKIPPED [1] tests/test_model_serializer.py:462: has models.JSONField > SKIPPED [1] tests/test_serializer_nested.py:325: psycopg2 is not installed > SKIPPED [1] tests/test_serializer_nested.py:343: psycopg2 is not installed > FAILED tests/test_fields.py::TestDefaultTZDateTimeField::test_current_timezone > FAILED tests/test_fields.py::TestDefaultTZDateTimeField::test_default_timezone > FAILED tests/test_templates.py::test_base_template_with_context - > django.core... > FAILED tests/test_templates.py::test_base_template_with_no_context - > django.c... > FAILED tests/test_testing.py::TestExistingPatterns::test_urlpatterns - > django... > FAILED > tests/authentication/test_authentication.py::SessionAuthTests::test_post_form_session_auth_passing_csrf > FAILED > tests/browsable_api/test_form_rendering.py::TestPostingListData::test_browsable_api > FAILED > tests/browsable_api/test_form_rendering.py::TestManyPostView::test_post_many_post_view > FAILED > tests/schemas/test_coreapi.py::test_head_and_options_methods_are_excluded > ===== 9 failed, 1388 passed, 5 skipped, 1 deselected, 6 warnings in 20.17s > ===== > E: pybuild pybuild:369: test: plugin custom failed with: exit code=1: > python3.10 /<<PKGBUILDDIR>>/runtests.py --nolint -k 'not test_markdown' > dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.9 > 3.10" returned exit code 13 The full build log is available from: http://qa-logs.debian.net/2022/06/24/djangorestframework_3.12.4-2.2_unstable.log All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20220624;users=lu...@debian.org or: https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20220624&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 marking 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.