georgemarshall / django-cryptography

Easily encrypt data in Django
https://django-cryptography.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
371 stars 70 forks source link

Django 3.0 Compatibility #17

Closed mrname closed 4 years ago

mrname commented 5 years ago

Not that it is a rush or anything, but while running tests that require data migrations, the following warning is thrown:

usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py:995: RemovedInDjango30Warning: Remove the context parameter from EncryptedCharField.from_db_value(). Support for it will be removed in Django 3.0. RemovedInDjango30Warning

thismatters commented 5 years ago

I'm seeing a bunch of these as well. If you want to stop seeing them and you're using pytest then add this to your pytest.ini:

filterwarnings =
    ignore::PendingDeprecationWarning
thismatters commented 5 years ago

If you're using Django 2.2 you'll have to change that to

filterwarnings = 
    ignore::DeprecationWarning
nidshar commented 5 years ago

Is there any way to fix these warnings instead of ignoring?

thismatters commented 5 years ago

The fix is to roll back to a fully supported Django version (2.0 as indicated by the readme). Moreover, there isn't really a problem unless you migrate to Django 3.0 when it is released.

georgemarshall commented 4 years ago

Fixes for this have been merged