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

Refs #30947 -- Changed tuples to lists where appropriate. #16003

Merged
merged 1 commit into from Aug 30, 2022

Conversation

mgax
Copy link
Contributor

@mgax mgax commented Aug 26, 2022

The patch is split into 4 commits, hopefully making it easier to review.

Most of the tuples that got changed were found by searching the files with a regexp. Only the code in django/contrib/*/models* was searched because that's the scope defined in the ticket. TBH I'm not sure if the changes to the docs should have been part of the ticket, but here they are :)

docs/ref/contrib/admin/index.txt Outdated Show resolved Hide resolved
docs/ref/contrib/admin/index.txt Outdated Show resolved Hide resolved
@mgax
Copy link
Contributor Author

mgax commented Aug 29, 2022

@felixxm thanks!

@felixxm felixxm changed the title Fixed #30947 -- Convert tuples to lists Refs #30947 -- Changed tuples to lists where appropriate. Aug 30, 2022
Copy link
Member

@felixxm felixxm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgax Thanks 👍

docs/ref/forms/fields.txt Outdated Show resolved Hide resolved
@felixxm felixxm merged commit de6c9c7 into django:main Aug 30, 2022
@mgax mgax deleted the tuples-to-lists branch August 30, 2022 08:30
@akx

This comment was marked as resolved.

@felixxm
Copy link
Member

felixxm commented Sep 5, 2022

This will break (broke for me in CI) uses such as

How this could break your CI? 🤔 First of all it's almost a purely documentation change. Secondly, it was not backported to Django 4.1.

@akx
Copy link
Contributor

akx commented Sep 5, 2022

How this could break your CI? 🤔 [...] Secondly, it was not backported to Django 4.1.

Oops, sorry, I jumped the gun there looking at blame – it was actually #15270 that broke things. I couldn't use 4.1.0 at all due to #15906 :)

(I hid my earlier comment as it's incorrect.)

@felixxm
Copy link
Member

felixxm commented Sep 5, 2022

Oops, sorry, I jumped the gun there looking at blame – it was actually #15270 that broke things. I couldn't use 4.1.0 at all due to #15906 :)

It's documented as a small breaking change, see release notes:

"The ModelAdmin.actions and inlines attributes now default to an empty tuple rather than an empty list to discourage unintended mutation."

@akx
Copy link
Contributor

akx commented Sep 5, 2022

@felixxm Yep, thanks :) I swear I did read it there 😁 but as said, I had to skip 4.1.0 altogether due to the accidental GDAL dependency so this never cropped up then. All good now, a bit of refactoring and I have * splats everywhere :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants