netzkolchose / django-computedfields

Provides autogenerated autoupdated database fields for model methods.
MIT License
94 stars 14 forks source link

Add Django 5.0 And Python 3.12 Compatibility #140

Closed ckarli closed 10 months ago

ckarli commented 11 months ago

Removed Python 3.7 as it's deprecated

jerch commented 11 months ago

@ckarli Does not work yet with django 5. The tests fail at Model.objects.create ending up at:

ValueError: Model instances passed to related filters must be saved.

Had no time yet to look into django 5 changes. On a sidenote - I remember seeing something similar for backrelations starting to require a pk around 4.1 or 4.2, which was not the case before.

jerch commented 11 months ago

Btw you can also remove the django 3.2 tests, I am not keen to cover more than one LTS version in the long run.

martinlehoux commented 10 months ago

Looks like a deprecation https://github.com/django/django/commit/4d78d7338cc5cfaa0afcfc9d240d753328bbf399

martinlehoux commented 10 months ago

Looks like it was in Django 4.1 https://docs.djangoproject.com/en/5.0/releases/4.1/

Anyway, this is an error in the example project, I suggest to update the exampleapp

martinlehoux commented 10 months ago

I made a PR on your PR https://github.com/ckarli/django-computedfields/pull/1

With this all tests succeed, all tests pass, except the psycopg3 matrix

jerch commented 10 months ago

Trying to fix the docs madness in #141 - once thats merged into master, plz apply it here as well.

martinlehoux commented 10 months ago

Yes I saw that, I ignored it but thanks for the fix ;)

jerch commented 10 months ago

Guess thats the downside of rolling software package releases :sweat_smile: I simply tagged it with the last working version for now and re-ordered the test execution to see at least, whether the unit tests pass.