rdmorganiser / rdmo

A tool to support the planning, implementation, and organization of research data management.
https://rdmorganiser.github.io
Apache License 2.0
104 stars 49 forks source link

Update requirements, in particular Django 4.0 #442

Closed jochenklar closed 1 year ago

jochenklar commented 2 years ago

Rationale / Begründung

Django 4.0 is out, we need to upgrade eventually. We should use this to review all other entries in requirements.txt.

jochenklar commented 2 years ago

Some code needs to be changed for django restframework 3.13: like here: https://github.com/django-daiquiri/daiquiri/pull/97/commits/3f3b56974423b6d2d6902ad243f50bb4a6e36854

afuetterer commented 1 year ago

I updated a few requirements in #664 already.

Once that is merged, the dependabot will start generating PRs again.

If you like, I can take over this issue in September.

afuetterer commented 1 year ago

I will submit a PR this week.

MyPyDavid commented 1 year ago

are you gonna use this tool https://github.com/adamchainz/django-upgrade? ;)

afuetterer commented 1 year ago

Yes, I will give it try. But thanks for pointing it out.

The author also points out https://django-codemod.readthedocs.io. He says codemod is slower. But I think, this does need to be run once and not be part of the pre-commit hooks.

I will upgrade these with priority: django and drf.

Do you know, if all the other requirements are stil needed? I pointed out the issue with jsonfield in #692. Also there is still this open issue about mptt #368.

Some of the dependencies have not received updates in a long time, e.g. https://github.com/chibisov/drf-extensions.

I will research the dependencies and report in the corresponding PR.

afuetterer commented 1 year ago

Could we also broaden some of the version constraints?

For example "Django~=3.2.20" will only allow Django >= 3.2.20 and < 3.3

I would suggest using this form instead "Django~=3.2", allowing Django >= 3.2 and < 4.0

See: https://peps.python.org/pep-0440/#compatible-release

afuetterer commented 1 year ago

@MyPyDavid, you can assign this issue to me.

afuetterer commented 1 year ago

Refs:

jochenklar commented 1 year ago

Thanks for picking this up. I would not use a tool though. I did the migration once for a different project and it was pretty easy. I would just run the tests and fix the problems.

Are there particular problems with mptt and jsonfield and 4.2?

afuetterer commented 1 year ago

I will test the tool just to get to know it. But yes, the way you propose with fixing breaking tests makes sense.

No, there are no problems so far to my knowledge.

It was just an observation, that there is still an open issue regarding mptt. What to do with it?