Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update requirements, in particular Django 4.0 #442

Closed
jochenklar opened this issue Apr 12, 2022 · 10 comments · Fixed by #693
Closed

Update requirements, in particular Django 4.0 #442

jochenklar opened this issue Apr 12, 2022 · 10 comments · Fixed by #693

Comments

@jochenklar
Copy link
Member

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

This comment was marked as resolved.

@afuetterer

This comment was marked as resolved.

@afuetterer afuetterer mentioned this issue Sep 4, 2023
@afuetterer

This comment was marked as outdated.

@MyPyDavid
Copy link
Member

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

@afuetterer
Copy link
Member

afuetterer commented Sep 4, 2023

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
Copy link
Member

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
Copy link
Member

@MyPyDavid, you can assign this issue to me.

@MyPyDavid MyPyDavid added this to the 2.1.0 milestone Sep 4, 2023
@afuetterer

This comment was marked as outdated.

@jochenklar
Copy link
Member Author

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
Copy link
Member

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?

@MyPyDavid MyPyDavid modified the milestones: 2.1.0, 2.0.0 Sep 13, 2023
@MyPyDavid MyPyDavid linked a pull request Sep 13, 2023 that will close this issue
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants