• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pennersr / django-allauth / 5967431319
96%

Build:
DEFAULT BRANCH: main
Ran 24 Aug 2023 06:19PM UTC
Jobs 20
Files 730
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Aug 2023 06:16PM UTC coverage: 91.314% (-0.003%) from 91.317%
5967431319

push

github

pennersr
fix(providers): Avoid loading Django user models before apps are ready

To register a custom Provider, users subclass
`allauth.socialaccount.providers.base.ProviderAccount`. Their subclass
is then registered using
`allauth.socialaccount.providers.registry.register(MyProvider)`.

The registration must happen before the `allauth.socialaccount` app
models are ready, as the `SocialApp.provider` choices come from the
registry. Otherwise, a Django migration is created because at the time
of the import of `allauth.socialaccount.models`, the registry was empty,
but when the models are ready (and Django can check migrations) the
registry contains the custom provider.

Below is an example stack trace to illustrate the issue:
```
  File "/home/freitafr/dev/itou/itou/allauth_adapters/peamu/provider.py", line 1, in <module>
    from allauth.socialaccount.providers.base import ProviderAccount
  File "/home/freitafr/dev/django-allauth/allauth/socialaccount/providers/base/__init__.py", line 2, in <module>
    from .provider import Provider, ProviderAccount, ProviderException  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/freitafr/dev/django-allauth/allauth/socialaccount/providers/base/provider.py", line 3, in <module>
    from allauth.account.models import EmailAddress
  File "/home/freitafr/dev/django-allauth/allauth/account/models.py", line 12, in <module>
    from .adapter import get_adapter
  File "/home/freitafr/dev/django-allauth/allauth/account/adapter.py", line 16, in <module>
    from django.contrib.auth.models import AbstractUser
  File "/home/freitafr/dev/itou/.venv/lib/python3.11/site-packages/django/contrib/auth/models.py", line 3, in <module>
    from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
  File "/home/freitafr/dev/itou/.venv/lib/python3.11/site-packages/django/contrib/auth/base_user.py", line 57, in <module>
    class AbstractBaseUser(models.Model):
  File "/home/freitafr/de... (continued)

2 of 2 new or added lines in 1 file covered. (100.0%)

12909 of 14137 relevant lines covered (91.31%)

18.23 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5967431319.1 24 Aug 2023 06:19PM UTC 0
91.27
2 5967431319.2 24 Aug 2023 06:19PM UTC 0
91.27
3 5967431319.3 24 Aug 2023 06:19PM UTC 0
91.27
4 5967431319.4 24 Aug 2023 06:19PM UTC 0
91.11
5 5967431319.5 24 Aug 2023 06:19PM UTC 0
91.27
6 5967431319.6 24 Aug 2023 06:19PM UTC 0
91.26
7 5967431319.7 24 Aug 2023 06:20PM UTC 0
91.26
8 5967431319.8 24 Aug 2023 06:20PM UTC 0
91.11
9 5967431319.9 24 Aug 2023 06:20PM UTC 0
91.26
10 5967431319.10 24 Aug 2023 06:20PM UTC 0
91.26
11 5967431319.11 24 Aug 2023 06:20PM UTC 0
91.26
12 5967431319.12 24 Aug 2023 06:20PM UTC 0
91.26
13 5967431319.13 24 Aug 2023 06:20PM UTC 0
91.27
14 5967431319.14 24 Aug 2023 06:20PM UTC 0
91.26
15 5967431319.15 24 Aug 2023 06:20PM UTC 0
91.27
16 5967431319.16 24 Aug 2023 06:20PM UTC 0
91.26
17 5967431319.17 24 Aug 2023 06:20PM UTC 0
91.26
18 5967431319.18 24 Aug 2023 06:20PM UTC 0
91.27
19 5967431319.19 24 Aug 2023 06:20PM UTC 0
91.26
20 5967431319.20 24 Aug 2023 06:20PM UTC 0
91.27
Source Files on build 5967431319
Detailed source file information is not available for this build.
  • Back to Repo
  • 6a9b248c on github
  • Prev Build on main (#5967422579)
  • Next Build on main (#5973486267)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc