django-oidc-provider icon indicating copy to clipboard operation
django-oidc-provider copied to clipboard

Pytest warning: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0

Open pzelnip opened this issue 5 years ago • 0 comments

With my Django 1.11 project based on django-oidc-provider, I have a number of unit tests that I run via Pytest (https://pytest.org/en/latest/). Upon running those tests I see a number of warnings:

  /Users/pzelnip/.virtualenvs/auth37/lib/python3.7/site-packages/oidc_provider/migrations/0001_initial.py:37: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
    ('client', models.ForeignKey(to='oidc_provider.Client')),

There are many such warnings, that appear to stem from the migrations within django-oidc-provider. Given I'm planning on upgrading this project to Django 2.2 as 1.11 leaves LTS in April, these are concerning. Will these be addressed in a future version of django-oidc-provider?

I'm using django-oidc-provider==0.7.0.

pzelnip avatar Dec 17 '19 21:12 pzelnip