cookiecutter-django icon indicating copy to clipboard operation
cookiecutter-django copied to clipboard

[Update Django] Django 4.0

Open github-actions[bot] opened this issue 3 years ago • 13 comments

4.0 requirements tables

base.txt

Name Version in Master 4.0 Compatible Version OK
pytz 2022.2.1 n/a
python-slugify 6.1.2 n/a
Pillow 9.2.0 n/a
rcssmin 1.1.0 n/a
argon2-cffi 21.3.0 n/a
whitenoise 6.2.0 6.0.0
redis 4.3.4 n/a
hiredis 2.0.0 n/a
celery 5.2.7 n/a
django-celery-beat 2.3.0
flower 1.2.0 n/a
uvicorn 0.18.3 n/a
django 3.2.15
django-environ 0.9.0
django-model-utils 4.2.0 4.2.0
django-allauth 0.51.0 0.47.0
django-crispy-forms 1.14.0 1.13.0
crispy-bootstrap5 0.6 0.6
django-compressor 4.1 n/a
django-redis 5.2.0 5.2.0
djangorestframework 3.13.1 3.13.0
django-cors-headers 3.13.0 3.10.1
drf-spectacular 0.24.0 0.22.0

local.txt

Name Version in Master 4.0 Compatible Version OK
Werkzeug 2.2.2 n/a
ipdb 0.13.9 n/a
psycopg2 2.9.3 n/a
psycopg2-binary 2.9.3 n/a
watchfiles 0.17.0 n/a
mypy 0.971 n/a
django-stubs 1.12.0 1.12.0
pytest 7.1.3 n/a
pytest-sugar 0.9.5 n/a
djangorestframework-stubs 1.7.0 n/a
sphinx 5.1.1 n/a
sphinx-autobuild 2021.3.14 n/a
flake8 5.0.4 n/a
flake8-isort 4.2.0 n/a
coverage 6.4.4 n/a
black 22.8.0 n/a
pylint-django 2.5.3
pylint-celery 0.3 n/a
pre-commit 2.20.0 n/a
factory-boy 3.2.1
django-debug-toolbar 3.6.0 3.2.4
django-extensions 3.2.0 3.2.0
django-coverage-plugin 2.0.3
pytest-django 4.5.2 4.5.2

production.txt

Name Version in Master 4.0 Compatible Version OK
gunicorn 20.1.0 n/a
psycopg2 2.9.3 n/a
Collectfast 2.2.0 n/a
sentry-sdk 1.9.8 n/a
hiredis 2.0.0 n/a
django-storages 1.13.1 1.13
django-anymail 8.6 8.5

github-actions[bot] avatar Dec 09 '21 05:12 github-actions[bot]

Hello Bruno @browniebroke , I'm a student, currently completing my Undergraduate course in Computer Engineering. I have some experience in Django and python. I think I can help you out in the issue you are facing, so i would request you to assign this issue to me and give me a bit detailed information about the issue.

CodeOnnnn avatar Jan 09 '22 14:01 CodeOnnnn

@CodeOnnnn this is an automated script that checks if the packages support the specified Django version. Nothing needs to be done here, but feel free to visit other issues or check out the repositories above and help contribute to their efforts! Help is needed in Django's asgiref specifically asgiref.sync contextvars refactoring if you'd like to help there!

Andrew-Chen-Wang avatar Jan 09 '22 14:01 Andrew-Chen-Wang

@browniebroke there seems to be a bug in base.txt? X mark underneath drf spectacular. Are we adding an unnecessary vertical bar?

Andrew-Chen-Wang avatar Feb 16 '22 19:02 Andrew-Chen-Wang

There is a bug in the script when we introduce a new dependency, it crashes in the middle because it cannot find the existing version.

It started breaking when DRF-spectacular was introduced, so I've added it manually and might have misformatted something.

Ideally we should have new deps handled automatically by the django updater script. I'd be keen to get a few unit tests for the various functions to make it more maintainable.

browniebroke avatar Feb 16 '22 21:02 browniebroke

Hey guys, thanks for the awesome effort.

Not sure if my question is in the right place, but:

Is there a recommendation to use the current build with Django 4.0, or it's just go vanilla django until this is closed?

I'm manually disabling the packages not supporting Django 4 (If they really don't/causes conflicts) from requirements.txt -- would that be enough?

Jihad avatar Apr 30 '22 21:04 Jihad

I mean you can look at the current requirements above. So for example in production.txt django storages is not supporting django 4.0 yet but if you don't need django storages then you could update django so it's up to you

Andrew-Chen-Wang avatar Apr 30 '22 23:04 Andrew-Chen-Wang

Looks like the main blocker are actually https://github.com/django-extensions/django-extensions/pull/1698 and django-stubs.

As far as I can tell, the others which are marked as incompatible have a PR open without any application code change.

browniebroke avatar May 01 '22 14:05 browniebroke

I mean you can look at the current requirements above. So for example in production.txt django storages is not supporting django 4.0 yet but if you don't need django storages then you could update django so it's up to you

Yes, they only didn't update tests or adding support version only in readthedocs - but it works normally, tested it with GCP. I was concerned if Cookiecutter Django it self might have core changes.

Looks like the main blocker are actually django-extensions/django-extensions#1698 and django-stubs.

As far as I can tell, the others which are marked as incompatible have a PR open without any application code change.

Awesome! Thanks a lot.

Jihad avatar May 01 '22 17:05 Jihad

Looks like https://github.com/django-extensions/django-extensions/pull/1698 has been merged but has not been released, and some users report https://github.com/typeddjango/django-stubs/issues/808 working with 4.0.

django-storages has added 4.0 to tests, but no idea on compatibility at this stage https://github.com/jschneier/django-storages/issues/1092

marcolussetti avatar Jul 11 '22 19:07 marcolussetti

Storages has released 4.0 and 4.1 support

jzmiller1 avatar Aug 07 '22 03:08 jzmiller1

I think it's party time. Let's upgrade to 4.0 pleaseeeee

huydbui avatar Aug 15 '22 15:08 huydbui

cc @browniebroke

Andrew-Chen-Wang avatar Aug 15 '22 17:08 Andrew-Chen-Wang

Finally got around to do some smoke tests with django-storages. Anyone up to do the upgrade and send a pull request?

browniebroke avatar Aug 24 '22 21:08 browniebroke