eldarion / django-gapc-storage

a Django storage backend using GCS JSON API
10 stars 9 forks source link

make app compatible with django 3 changes #24

Open nKandel opened 3 years ago

nKandel commented 3 years ago

need to update six import location in order to make it compatible with django 3.

replace from django.utils.six.moves.urllib import parse as urlparse with from six.moves.urllib import parse as urlparse at storage file

line from django 3 release page:

django.utils.six - Remove usage of this vendored library or switch to six.
nKandel commented 4 months ago

Additional changes required for Django 4 in the storage file.

from django.utils.encoding import force_str as force_text 
from urllib.parse import quote as urlquote
from six.moves.urllib import parse as urlparse
jacobwegner commented 4 months ago

Thanks @nKandel.

I think this repo is overdue to be marked as read-only.

I'll see if I can write a small migration document from this library to django-storages, which has received ongoing maintenance.

The biggest change between django-gapc-storage and django-storages with the GoogleCloudStorage backend is that the GS_FILE_OVERWRITE setting defaults to True, where the allow_overwrite setting on this project defaults to False:

https://github.com/eldarion/django-gapc-storage/blob/master/gapc_storage/storage.py#L69

I would recommend using GS_FILE_OVERWRITE=False if migrating to django-storages.

nKandel commented 4 months ago

Hi @jacobwegner. Thank you very much for the prompt reply. A migration guideline would be a huge help. For someone who isn't familiar with the django-storages and django-gpac-storage internal codebases, it would provide the needed clarity.