Your message dated Thu, 16 Nov 2023 11:49:33 +0000
with message-id <e1r3ash-007lo1...@fasolo.debian.org>
and subject line Bug#1052794: fixed in django-oauth-toolkit 2.3.0-1
has caused the Debian Bug report #1052794,
regarding django-oauth-toolkit: FTBFS: dh_auto_test: error: pybuild --test 
--test-pytest -i python{version} -p 3.11 returned exit code 13
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1052794: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052794
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: django-oauth-toolkit
Version: 1.7.0-2
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20230925 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:291: python3.11 setup.py config 
> running config
>    dh_auto_build -O--buildsystem=pybuild
> I: pybuild base:291: /usr/bin/python3 setup.py build 
> running build
> running build_py
> creating 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/decorators.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/middleware.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/tasks.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/apps.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/oauth2_validators.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/oauth2_backends.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/exceptions.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/urls.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/admin.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/generators.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/backends.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/http.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/compat.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/models.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/settings.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/signals.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/scopes.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/forms.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> copying oauth2_provider/validators.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider
> creating 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/migrations
> copying oauth2_provider/migrations/0003_auto_20201211_1314.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/migrations
> copying oauth2_provider/migrations/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/migrations
> copying oauth2_provider/migrations/0005_auto_20211222_2352.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/migrations
> copying oauth2_provider/migrations/0001_initial.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/migrations
> copying oauth2_provider/migrations/0002_auto_20190406_1805.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/migrations
> copying oauth2_provider/migrations/0004_auto_20200902_2022.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/migrations
> creating 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/contrib
> copying oauth2_provider/contrib/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/contrib
> creating 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/views
> copying oauth2_provider/views/generic.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/views
> copying oauth2_provider/views/base.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/views
> copying oauth2_provider/views/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/views
> copying oauth2_provider/views/introspect.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/views
> copying oauth2_provider/views/application.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/views
> copying oauth2_provider/views/token.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/views
> copying oauth2_provider/views/mixins.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/views
> copying oauth2_provider/views/oidc.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/views
> creating 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/management
> copying oauth2_provider/management/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/management
> creating 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/contrib/rest_framework
> copying oauth2_provider/contrib/rest_framework/permissions.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/contrib/rest_framework
> copying oauth2_provider/contrib/rest_framework/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/contrib/rest_framework
> copying oauth2_provider/contrib/rest_framework/authentication.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/contrib/rest_framework
> creating 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/management/commands
> copying oauth2_provider/management/commands/createapplication.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/management/commands
> copying oauth2_provider/management/commands/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/management/commands
> copying oauth2_provider/management/commands/cleartokens.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/management/commands
> running egg_info
> creating django_oauth_toolkit.egg-info
> writing django_oauth_toolkit.egg-info/PKG-INFO
> writing dependency_links to django_oauth_toolkit.egg-info/dependency_links.txt
> writing requirements to django_oauth_toolkit.egg-info/requires.txt
> writing top-level names to django_oauth_toolkit.egg-info/top_level.txt
> writing manifest file 'django_oauth_toolkit.egg-info/SOURCES.txt'
> reading manifest file 'django_oauth_toolkit.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> adding license file 'LICENSE'
> adding license file 'AUTHORS'
> writing manifest file 'django_oauth_toolkit.egg-info/SOURCES.txt'
> /usr/lib/python3/dist-packages/setuptools/command/build_py.py:204: _Warning: 
> Package 'oauth2_provider.templates.oauth2_provider' is absent from the 
> `packages` configuration.
> !!
> 
>         
> ********************************************************************************
>         ############################
>         # Package would be ignored #
>         ############################
>         Python recognizes 'oauth2_provider.templates.oauth2_provider' as an 
> importable package[^1],
>         but it is absent from setuptools' `packages` configuration.
> 
>         This leads to an ambiguous overall configuration. If you want to 
> distribute this
>         package, please make sure that 
> 'oauth2_provider.templates.oauth2_provider' is explicitly added
>         to the `packages` configuration field.
> 
>         Alternatively, you can also rely on setuptools' discovery methods
>         (for example by using `find_namespace_packages(...)`/`find_namespace:`
>         instead of `find_packages(...)`/`find:`).
> 
>         You can read more about "package discovery" on setuptools 
> documentation page:
> 
>         - 
> https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
> 
>         If you don't want 'oauth2_provider.templates.oauth2_provider' to be 
> distributed and are
>         already explicitly excluding 
> 'oauth2_provider.templates.oauth2_provider' via
>         `find_namespace_packages(...)/find_namespace` or 
> `find_packages(...)/find`,
>         you can try to use `exclude_package_data`, or 
> `include-package-data=False` in
>         combination with a more fine grained `package-data` configuration.
> 
>         You can read more about "package data files" on setuptools 
> documentation page:
> 
>         - https://setuptools.pypa.io/en/latest/userguide/datafiles.html
> 
> 
>         [^1]: For Python, any directory (with suitable naming) can be 
> imported,
>               even if it does not contain any `.py` files.
>               On the other hand, currently there is no concept of package data
>               directory, all directories are treated like packages.
>         
> ********************************************************************************
> 
> !!
>   check.warn(importable)
> creating 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/templates
> creating 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/templates/oauth2_provider
> copying 
> oauth2_provider/templates/oauth2_provider/application_confirm_delete.html -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/templates/oauth2_provider
> copying oauth2_provider/templates/oauth2_provider/application_detail.html -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/templates/oauth2_provider
> copying oauth2_provider/templates/oauth2_provider/application_form.html -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/templates/oauth2_provider
> copying oauth2_provider/templates/oauth2_provider/application_list.html -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/templates/oauth2_provider
> copying 
> oauth2_provider/templates/oauth2_provider/application_registration_form.html 
> -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/templates/oauth2_provider
> copying oauth2_provider/templates/oauth2_provider/authorize.html -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/templates/oauth2_provider
> copying oauth2_provider/templates/oauth2_provider/authorized-oob.html -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/templates/oauth2_provider
> copying 
> oauth2_provider/templates/oauth2_provider/authorized-token-delete.html -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/templates/oauth2_provider
> copying oauth2_provider/templates/oauth2_provider/authorized-tokens.html -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/templates/oauth2_provider
> copying oauth2_provider/templates/oauth2_provider/base.html -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/oauth2_provider/templates/oauth2_provider
>    dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:291: cd 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build; 
> python3.11 -m pytest --ds tests.settings
> ============================= test session starts 
> ==============================
> platform linux -- Python 3.11.5, pytest-7.4.2, pluggy-1.3.0
> django: settings: tests.settings (from option)
> rootdir: /<<PKGBUILDDIR>>
> configfile: tox.ini
> plugins: mock-3.11.1, cov-4.1.0, xdist-3.3.1, django-4.5.2
> collected 378 items
> 
> tests/test_application_views.py .....
> tests/test_auth_backends.py ..........
> tests/test_authorization_code.py 
> ..................................................................
> tests/test_client_credential.py .......
> tests/test_commands.py New application created successfully
> .New application created successfully
> .New application created successfully
> .New application created successfully
> .New application created successfully
> ..New application created successfully
> ...
> tests/test_decorators.py ...
> tests/test_generator.py ...
> tests/test_hybrid.py ....................................................
> tests/test_implicit.py ..................
> tests/test_introspection_auth.py ......
> tests/test_introspection_view.py ..............
> tests/test_mixins.py ........
> tests/test_models.py ........................FFF...
> tests/test_oauth2_backends.py ......
> tests/test_oauth2_validators.py s...
> tests/test_oidc_views.py ...........
> tests/test_password.py ...
> tests/test_rest_framework.py ..............................
> tests/test_scopes.py ............
> tests/test_settings.py ...........
> tests/test_token_revocation.py .......
> tests/test_token_view.py ..........
> tests/test_validators.py ...
> tests/test_oauth2_validators.py ..........................
> tests/test_mixins.py ...
> tests/test_oauth2_backends.py .....
> tests/test_oauth2_validators.py ....
> tests/test_scopes_backend.py ..
> tests/test_settings.py ..........
> 
> =================================== FAILURES 
> ===================================
> __________________ TestClearExpired.test_clear_expired_tokens 
> __________________
> 
> self = <tests.test_models.TestClearExpired 
> testMethod=test_clear_expired_tokens>
> 
>     def setUp(self):
>         super().setUp()
>         # Insert many tokens, both expired and not, and grants.
>         self.num_tokens = 100
>         now = timezone.now()
>         earlier = now - timedelta(seconds=100)
>         later = now + timedelta(seconds=100)
>         app = Application.objects.create(
>             name="test_app",
>             redirect_uris="http://localhost http://example.com 
> http://example.org";,
>             user=self.user,
>             client_type=Application.CLIENT_CONFIDENTIAL,
>             authorization_grant_type=Application.GRANT_AUTHORIZATION_CODE,
>         )
>         # make 200 access tokens, half current and half expired.
>         expired_access_tokens = AccessToken.objects.bulk_create(
>             AccessToken(token="expired AccessToken {}".format(i), 
> expires=earlier)
>             for i in range(self.num_tokens)
>         )
>         current_access_tokens = AccessToken.objects.bulk_create(
>             AccessToken(token=f"current AccessToken {i}", expires=later) for 
> i in range(self.num_tokens)
>         )
>         # Give the first half of the access tokens a refresh token,
>         # alternating between current and expired ones.
> >       RefreshToken.objects.bulk_create(
>             RefreshToken(
>                 token=f"expired AT's refresh token {i}",
>                 application=app,
>                 access_token=expired_access_tokens[i].pk,
>                 user=self.user,
>             )
>             for i in range(0, len(expired_access_tokens) // 2, 2)
>         )
> 
> tests/test_models.py:321: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> /usr/lib/python3/dist-packages/django/db/models/manager.py:87: in 
> manager_method
>     return getattr(self.get_queryset(), name)(*args, **kwargs)
> /usr/lib/python3/dist-packages/django/db/models/query.py:781: in bulk_create
>     objs = list(objs)
> tests/test_models.py:322: in <genexpr>
>     RefreshToken(
> /usr/lib/python3/dist-packages/django/db/models/base.py:543: in __init__
>     _setattr(self, field.name, rel_obj)
> /usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py:369:
>  in __set__
>     super().__set__(instance, value)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <django.db.models.fields.related_descriptors.ForwardOneToOneDescriptor 
> object at 0x7ff41ca0df50>
> instance = <RefreshToken: expired AT's refresh token 0>, value = 1
> 
>     def __set__(self, instance, value):
>         """
>         Set the related instance through the forward relation.
>     
>         With the example above, when setting ``child.parent = parent``:
>     
>         - ``self`` is the descriptor managing the ``parent`` attribute
>         - ``instance`` is the ``child`` instance
>         - ``value`` is the ``parent`` instance on the right of the equal sign
>         """
>         # An object must be an instance of the related class.
>         if value is not None and not isinstance(
>             value, self.field.remote_field.model._meta.concrete_model
>         ):
> >           raise ValueError(
>                 'Cannot assign "%r": "%s.%s" must be a "%s" instance.'
>                 % (
>                     value,
>                     instance._meta.object_name,
>                     self.field.name,
>                     self.field.remote_field.model._meta.object_name,
>                 )
> E               ValueError: Cannot assign "1": "RefreshToken.access_token" 
> must be a "AccessToken" instance.
> 
> /usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py:266:
>  ValueError
> _________ TestClearExpired.test_clear_expired_tokens_incorect_timetype 
> _________
> 
> self = <tests.test_models.TestClearExpired 
> testMethod=test_clear_expired_tokens_incorect_timetype>
> 
>     def setUp(self):
>         super().setUp()
>         # Insert many tokens, both expired and not, and grants.
>         self.num_tokens = 100
>         now = timezone.now()
>         earlier = now - timedelta(seconds=100)
>         later = now + timedelta(seconds=100)
>         app = Application.objects.create(
>             name="test_app",
>             redirect_uris="http://localhost http://example.com 
> http://example.org";,
>             user=self.user,
>             client_type=Application.CLIENT_CONFIDENTIAL,
>             authorization_grant_type=Application.GRANT_AUTHORIZATION_CODE,
>         )
>         # make 200 access tokens, half current and half expired.
>         expired_access_tokens = AccessToken.objects.bulk_create(
>             AccessToken(token="expired AccessToken {}".format(i), 
> expires=earlier)
>             for i in range(self.num_tokens)
>         )
>         current_access_tokens = AccessToken.objects.bulk_create(
>             AccessToken(token=f"current AccessToken {i}", expires=later) for 
> i in range(self.num_tokens)
>         )
>         # Give the first half of the access tokens a refresh token,
>         # alternating between current and expired ones.
> >       RefreshToken.objects.bulk_create(
>             RefreshToken(
>                 token=f"expired AT's refresh token {i}",
>                 application=app,
>                 access_token=expired_access_tokens[i].pk,
>                 user=self.user,
>             )
>             for i in range(0, len(expired_access_tokens) // 2, 2)
>         )
> 
> tests/test_models.py:321: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> /usr/lib/python3/dist-packages/django/db/models/manager.py:87: in 
> manager_method
>     return getattr(self.get_queryset(), name)(*args, **kwargs)
> /usr/lib/python3/dist-packages/django/db/models/query.py:781: in bulk_create
>     objs = list(objs)
> tests/test_models.py:322: in <genexpr>
>     RefreshToken(
> /usr/lib/python3/dist-packages/django/db/models/base.py:543: in __init__
>     _setattr(self, field.name, rel_obj)
> /usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py:369:
>  in __set__
>     super().__set__(instance, value)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <django.db.models.fields.related_descriptors.ForwardOneToOneDescriptor 
> object at 0x7ff41ca0df50>
> instance = <RefreshToken: expired AT's refresh token 0>, value = 1
> 
>     def __set__(self, instance, value):
>         """
>         Set the related instance through the forward relation.
>     
>         With the example above, when setting ``child.parent = parent``:
>     
>         - ``self`` is the descriptor managing the ``parent`` attribute
>         - ``instance`` is the ``child`` instance
>         - ``value`` is the ``parent`` instance on the right of the equal sign
>         """
>         # An object must be an instance of the related class.
>         if value is not None and not isinstance(
>             value, self.field.remote_field.model._meta.concrete_model
>         ):
> >           raise ValueError(
>                 'Cannot assign "%r": "%s.%s" must be a "%s" instance.'
>                 % (
>                     value,
>                     instance._meta.object_name,
>                     self.field.name,
>                     self.field.remote_field.model._meta.object_name,
>                 )
> E               ValueError: Cannot assign "1": "RefreshToken.access_token" 
> must be a "AccessToken" instance.
> 
> /usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py:266:
>  ValueError
> ____________ TestClearExpired.test_clear_expired_tokens_with_tokens 
> ____________
> 
> self = <tests.test_models.TestClearExpired 
> testMethod=test_clear_expired_tokens_with_tokens>
> 
>     def setUp(self):
>         super().setUp()
>         # Insert many tokens, both expired and not, and grants.
>         self.num_tokens = 100
>         now = timezone.now()
>         earlier = now - timedelta(seconds=100)
>         later = now + timedelta(seconds=100)
>         app = Application.objects.create(
>             name="test_app",
>             redirect_uris="http://localhost http://example.com 
> http://example.org";,
>             user=self.user,
>             client_type=Application.CLIENT_CONFIDENTIAL,
>             authorization_grant_type=Application.GRANT_AUTHORIZATION_CODE,
>         )
>         # make 200 access tokens, half current and half expired.
>         expired_access_tokens = AccessToken.objects.bulk_create(
>             AccessToken(token="expired AccessToken {}".format(i), 
> expires=earlier)
>             for i in range(self.num_tokens)
>         )
>         current_access_tokens = AccessToken.objects.bulk_create(
>             AccessToken(token=f"current AccessToken {i}", expires=later) for 
> i in range(self.num_tokens)
>         )
>         # Give the first half of the access tokens a refresh token,
>         # alternating between current and expired ones.
> >       RefreshToken.objects.bulk_create(
>             RefreshToken(
>                 token=f"expired AT's refresh token {i}",
>                 application=app,
>                 access_token=expired_access_tokens[i].pk,
>                 user=self.user,
>             )
>             for i in range(0, len(expired_access_tokens) // 2, 2)
>         )
> 
> tests/test_models.py:321: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> /usr/lib/python3/dist-packages/django/db/models/manager.py:87: in 
> manager_method
>     return getattr(self.get_queryset(), name)(*args, **kwargs)
> /usr/lib/python3/dist-packages/django/db/models/query.py:781: in bulk_create
>     objs = list(objs)
> tests/test_models.py:322: in <genexpr>
>     RefreshToken(
> /usr/lib/python3/dist-packages/django/db/models/base.py:543: in __init__
>     _setattr(self, field.name, rel_obj)
> /usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py:369:
>  in __set__
>     super().__set__(instance, value)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <django.db.models.fields.related_descriptors.ForwardOneToOneDescriptor 
> object at 0x7ff41ca0df50>
> instance = <RefreshToken: expired AT's refresh token 0>, value = 1
> 
>     def __set__(self, instance, value):
>         """
>         Set the related instance through the forward relation.
>     
>         With the example above, when setting ``child.parent = parent``:
>     
>         - ``self`` is the descriptor managing the ``parent`` attribute
>         - ``instance`` is the ``child`` instance
>         - ``value`` is the ``parent`` instance on the right of the equal sign
>         """
>         # An object must be an instance of the related class.
>         if value is not None and not isinstance(
>             value, self.field.remote_field.model._meta.concrete_model
>         ):
> >           raise ValueError(
>                 'Cannot assign "%r": "%s.%s" must be a "%s" instance.'
>                 % (
>                     value,
>                     instance._meta.object_name,
>                     self.field.name,
>                     self.field.remote_field.model._meta.object_name,
>                 )
> E               ValueError: Cannot assign "1": "RefreshToken.access_token" 
> must be a "AccessToken" instance.
> 
> /usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py:266:
>  ValueError
> =============================== warnings summary 
> ===============================
> ../../../../../../usr/lib/python3/dist-packages/django/conf/__init__.py:267
>   /usr/lib/python3/dist-packages/django/conf/__init__.py:267: 
> 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)
> 
> tests/test_client_credential.py:106
>   
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/tests/test_client_credential.py:106:
>  PytestCollectionWarning: cannot collect test class 'TestView' because it has 
> a __init__ constructor (from: 
> .pybuild/cpython3_3.11_django-oauth-toolkit/build/tests/test_client_credential.py)
>     class TestView(OAuthLibMixin, View):
> 
> .pybuild/cpython3_3.11_django-oauth-toolkit/build/tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
>   
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/tests/test_authorization_code.py:1734:
>  DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
>     assert key.key_type == "oct"
> 
> .pybuild/cpython3_3.11_django-oauth-toolkit/build/tests/test_models.py::test_application_key
>   
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/tests/test_models.py:430:
>  DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
>     assert key.key_type == "RSA"
> 
> .pybuild/cpython3_3.11_django-oauth-toolkit/build/tests/test_models.py::test_application_key
>   
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build/tests/test_models.py:441:
>  DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
>     assert key.key_type == "oct"
> 
> -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
> =========================== short test summary info 
> ============================
> FAILED tests/test_models.py::TestClearExpired::test_clear_expired_tokens - 
> Va...
> FAILED 
> tests/test_models.py::TestClearExpired::test_clear_expired_tokens_incorect_timetype
> FAILED 
> tests/test_models.py::TestClearExpired::test_clear_expired_tokens_with_tokens
> ======= 3 failed, 374 passed, 1 skipped, 5 warnings in 306.51s (0:05:06) 
> =======
> E: pybuild pybuild:395: test: plugin distutils failed with: exit code=1: cd 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-oauth-toolkit/build; 
> python3.11 -m pytest --ds tests.settings
> 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/09/25/django-oauth-toolkit_1.7.0-2_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20230925;users=lu...@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20230925&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.

--- End Message ---
--- Begin Message ---
Source: django-oauth-toolkit
Source-Version: 2.3.0-1
Done: Michael Fladischer <fl...@debian.org>

We believe that the bug you reported is fixed in the latest version of
django-oauth-toolkit, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1052...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Fladischer <fl...@debian.org> (supplier of updated django-oauth-toolkit 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 16 Nov 2023 10:34:03 +0000
Source: django-oauth-toolkit
Architecture: source
Version: 2.3.0-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+pyt...@tracker.debian.org>
Changed-By: Michael Fladischer <fl...@debian.org>
Closes: 1052794
Changes:
 django-oauth-toolkit (2.3.0-1) unstable; urgency=medium
 .
   [ Lena Voytek ]
   * New upstream version 2.3.0 (Closes: #1052794).
   * Remove do not install test subpackage patch - fixed upstream
   * Update watch file to handle github file links
 .
   [ Michael Fladischer ]
   * Build using pybuild-plugin-pyproject.
   * Bump Standards-Version to 4.6.2.
   * Update year in d/copyright.
   * Install testfiles using d/pybuild.testfiles.
Checksums-Sha1:
 8a188ce9ffd14aa8370f823af618e752c0e9a122 2215 django-oauth-toolkit_2.3.0-1.dsc
 d54e9e82f955850a9f5a1528d91b0d7af1704c61 366642 
django-oauth-toolkit_2.3.0.orig.tar.gz
 c759ff18f7e9e4e263699961dea7c22d774babfd 5436 
django-oauth-toolkit_2.3.0-1.debian.tar.xz
 9b8618e704c4c58d67999a3262e9f185f3cbb024 8173 
django-oauth-toolkit_2.3.0-1_arm64.buildinfo
Checksums-Sha256:
 c66c613dfad469cf689b4f33e11b15b52ac51ab8f946842a5145287eada696d5 2215 
django-oauth-toolkit_2.3.0-1.dsc
 74713e6c3766cedd6a59fa844548cd9ce7e44f1d92827c63481359a1d5c3cd94 366642 
django-oauth-toolkit_2.3.0.orig.tar.gz
 8cae3dde8513df477fbd6fc114dd90f9d82fa18893e6b30044c5511009f3c1f5 5436 
django-oauth-toolkit_2.3.0-1.debian.tar.xz
 10aa0a5043b2b463ebcbf11a1c886ff0bc2e93aa4ffdb5c99fa0729afefc8206 8173 
django-oauth-toolkit_2.3.0-1_arm64.buildinfo
Files:
 5a0f896742d82353586b81162543e829 2215 python optional 
django-oauth-toolkit_2.3.0-1.dsc
 8b7af7c71b1c6d78e5cc4dee46f8270e 366642 python optional 
django-oauth-toolkit_2.3.0.orig.tar.gz
 786b1e5b762b981640a4f0f59adc4d74 5436 python optional 
django-oauth-toolkit_2.3.0-1.debian.tar.xz
 2908f19d9d637b5bf9b8f0ab27bb32ac 8173 python optional 
django-oauth-toolkit_2.3.0-1_arm64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEqVSlRXW87UkkCnJc/9PIi5l90WoFAmVV9QoACgkQ/9PIi5l9
0Wo6ngf/dFnSiAOMDihLibfXzGGKc102SYgJS2PzYLvxeR7IJtdAomBJW/kSOhnp
32VFQU7iODs0pLr0UZOc3EfntCxTS7M5ocAFCmVXArxqIinXGQ6Svi0iZu3ZnOFe
i/A87cGliU4/BohvSB+SZ7oP937agokxBs4sz9Q49qkw1XuySR268DGAQqG5e3p9
f87nuutxL2zAs2Ed3QelC3Gawg2rCiEc+Haz8pN0C7RES+vrS6E4HBBFfgt/rlQ5
FP19OaE5MVuKblvcHGOyBdTaM6vHePfqTKzXEgHxpqEs06aUxpFI1x5IdE+FKkgq
0QNj63NUL8n0Xq8XKkivfLrf8bwqTg==
=Pvq+
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to