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 Django 5.0 #1712

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Update Django 5.0 #1712

merged 1 commit into from
Nov 15, 2024

Conversation

pauloxnet
Copy link
Member

It seems that a test is failing after the upgrade

@pauloxnet pauloxnet requested a review from a team October 31, 2024 01:08
@pauloxnet pauloxnet added dependencies Pull requests that update a dependency file bug python Pull requests that update Python code help-needed Help needed labels Oct 31, 2024
@bmispelon
Copy link
Member

Ideally, we would also want to be running the same version of Django on both djangoproject.com and code.djangoproject.com (https://github.com/django/code.djangoproject.com).

That's because the two sites talk to the same database (Trac uses Django's user database for authentication), and that might break if for example a newer version of Django changes the user model.

@bmispelon
Copy link
Member

Looks like Django 5.0 changed the way that SimpleListFilter processes its params argument. I didn't look into it, but it seems it now expects a dict that behaves like request.GET (where values are lists and not strings).

I've pushed a commit to the PR's branch that should fix the test suite 🤞🏻

@pauloxnet pauloxnet marked this pull request as ready for review October 31, 2024 14:48
@pauloxnet
Copy link
Member Author

Looks like Django 5.0 changed the way that SimpleListFilter processes its params argument. I didn't look into it, but it seems it now expects a dict that behaves like request.GET (where values are lists and not strings).

I've pushed a commit to the PR's branch that should fix the test suite 🤞🏻

Thanks for the fix and the explanation. 🙏

@pauloxnet
Copy link
Member Author

Ideally, we would also want to be running the same version of Django on both djangoproject.com and code.djangoproject.com (https://github.com/django/code.djangoproject.com).

That's because the two sites talk to the same database (Trac uses Django's user database for authentication), and that might break if for example a newer version of Django changes the user model.

I didn't know that, so I opened an issue over there:
django/code.djangoproject.com#220

@pauloxnet
Copy link
Member Author

Looks like Django 5.0 changed the way that SimpleListFilter processes its params argument. I didn't look into it, but it seems it now expects a dict that behaves like request.GET (where values are lists and not strings).

I've pushed a commit to the PR's branch that should fix the test suite 🤞🏻

Sorry, I rebased to fix a requirements conflict and I dropped your commit, can you push it again?

@bmispelon
Copy link
Member

Sorry, I rebased to fix a requirements conflict and I dropped your commit, can you push it again?

Done (I think) 👍🏻

@pauloxnet pauloxnet force-pushed the updates/django-50 branch 2 times, most recently from 4b5001f to 6c811cd Compare November 4, 2024 16:02
@bmispelon
Copy link
Member

I think I'm ready to merge this (and django/code.djangoproject.com#222).

The question that remains for me is whether this would be disruptive for the translation work @marksweb has been doing. Is it better to wait until all the translation PRs have been merged, or can we update Django now and deal with the consequences in the PRs afterwards?

@pauloxnet
Copy link
Member Author

The question that remains for me is whether this would be disruptive for the translation work @marksweb has been doing. Is it better to wait until all the translation PRs have been merged, or can we update Django now and deal with the consequences in the PRs afterwards?

I don't see how upgrading to Django 5.0 could be disruptive for the great internationalization work made by Mark.

BTW, this PR is a blocker for #1650 which would solve #1703, so I would merge this ASAP.

@pauloxnet
Copy link
Member Author

I squashed the commits.

@pauloxnet pauloxnet requested a review from a team November 5, 2024 22:21
@marksweb
Copy link
Contributor

marksweb commented Nov 6, 2024

@bmispelon I'm happy for this to merge & then I'll rebase my PRs. I can't see any conflicts occurring from this.

@bmispelon
Copy link
Member

BTW, this PR is a blocker for #1650 which would solve #1703, so I would merge this ASAP.

I'll hope you allow me a bit of negativity here, but I find it frustrating seeing a comment like this. I've been doing my best reviewing PRs and fixing bugs in production on a site that has not effectively been maintained for years. Telling me something is urgent will not magically give me more free time, or more energy to work on this (quite the opposite in fact).

Plus the root causes of #1693 and #1703 have not been identified, so claiming that #1650 is going to fix them is wishful thinking at best.

I would find it more helpful if you explained what you did to make sure that this update would not break production for example. Did you run the test suite with the warnings on? Did you go through the removed features in the release notes and checked they didn't apply to us (what's the effect of dropping USE_L10N for example?).

@thibaudcolas
Copy link
Member

@pauloxnet @bmispelon ❤️ let’s chat some time? I’d assume Paulo meant well and that he does hope (rightly or not) those changes would go towards fixing further issues. Plus the Django 5.0 changes are so good we’re all definitely very anxious and excited to get them for djangoproject.com! 😉 I’m certainly looking forward to all the accessibility improvements

@bmispelon bmispelon merged commit 2d05221 into django:main Nov 15, 2024
4 checks passed
@bmispelon
Copy link
Member

Merged and deployed, the site is now running almost an up-to-date Django version, woohoo! 🎉

Thanks for everyone who made it possible!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file help-needed Help needed python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants