django-cms / djangocms-text-ckeditor

Text Plugin for django CMS using CKEditor 4
https://www.django-cms.org/en/repositories-plugins/
BSD 3-Clause "New" or "Revised" License
164 stars 186 forks source link

Update test matrix to include Django 5 #662

Closed protoroto closed 7 months ago

protoroto commented 7 months ago

Update test matrix to include Django 5

Refs: #661

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (05f9b27) 81.79% compared to head (531b0c2) 81.79%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #662 +/- ## ======================================= Coverage 81.79% 81.79% ======================================= Files 20 20 Lines 912 912 Branches 122 122 ======================================= Hits 746 746 Misses 138 138 Partials 28 28 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

marksweb commented 7 months ago

Django 5 doesn't support python 3.7

And it's worth dropping 3.7, though I'm happy to go that in a separate PR if you want to just exclude it from Django 5 in this one.

https://endoflife.date/python

protoroto commented 7 months ago

Django 5 doesn't support python 3.7

And it's worth dropping 3.7, though I'm happy to go that in a separate PR if you want to just exclude it from Django 5 in this one.

https://endoflife.date/python

@marksweb Yep, I missed that in the exclude: anyway, Django 5.0 tests fails for something quite strange, maybe related to djangocms-picture...? I'll mark this pr as draft until I can wrap my head around this

protoroto commented 7 months ago

@marksweb I'm trying to understand this: I can replicate this issue also on djangocms-picture, if I add Django 5 and CMS 4.1 to the test matrix I get the same error, django.db.utils.OperationalError: no such table: django_site. I can only find very old issues on django-cms about this, and I don't know where to start to fix this: it looks like something is trying to access sites framework before the actual db is setup or migrated.

fsbraun commented 7 months ago

@protoroto I think it's an issue with Django CMS' LazyChoiceField. The parent's class implementation has changed in Django 5.0 and LazyChoiceField in the current implementation seems not so lazy after all.

As a result djangocms-picture tries to access the DB before the Django initialisation is finished.

I will look at it later today.

protoroto commented 7 months ago

@fsbraun I've seen the fix merged on djangoCMS, tryed locally and now Django5 tests are passing... but I'm not able to trigger the CI here to re-run failed tasks, so whenever you can, let's see if they're passing here too :)

fsbraun commented 7 months ago

@protoroto Looks good! 👍