Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Fixed #36262 -- Made GeneratedField.db_persist a required key-word argument.#19281

Merged
sarahboyce merged 1 commit intodjango:mainfromJasonLovesDoggo:db-persist
Mar 25, 2025

Conversation

JasonLovesDoggo
Copy link
Contributor

@JasonLovesDoggoJasonLovesDoggo commentedMar 17, 2025
edited
Loading

Trac ticket number

ticket-36262

Branch description

GeneratedField.db_persist attribute is set to None=True, which implies that the value can be None. However, just 4 lines lower in the code, it is required to be either True or False. This inconsistency leads a developer to believe that it can be left blank but it cannot.

Checklist

  • This PR targets themain branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.
  • I have added or updated relevant docs, including release notes if applicable.
  • I have attached screenshots in both light and dark modes for any UI changes.

@sarahboyce
Copy link
Contributor

This requires a docs update for GeneratedField and a test tweak 👍

JasonLovesDoggo reacted with thumbs up emoji

@JasonLovesDoggoJasonLovesDoggo marked this pull request as ready for reviewMarch 17, 2025 16:29
@JasonLovesDoggo
Copy link
ContributorAuthor

Not sure if this mandates a release note as in the current version you need to include db_persist and it has to be a bool. This PR just changes the typing of it.

@sarahboycesarahboyce changed the titleFixed #36262 -- Set GeneratedField.db_persist to be required in the type hintFixed #36262 -- Made GeneratedField.db_persist to be a required key-word argument.Mar 25, 2025
Copy link
Contributor

@sarahboycesarahboyce left a comment

Choose a reason for hiding this comment

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

Thank you - I pushed minor tweaks 👍

I know normally a signature change would require a deprecation/release notes but as this would raise an error anyway, I don't feel that's necessary.@nessita@felixxm what do you think?

JasonLovesDoggo reacted with thumbs up emoji
Copy link
Member

@felixxmfelixxm left a comment

Choose a reason for hiding this comment

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

Agreed.

@sarahboycesarahboyce changed the titleFixed #36262 -- Made GeneratedField.db_persist to be a required key-word argument.Fixed #36262 -- Made GeneratedField.db_persist a required key-word argument.Mar 25, 2025
@sarahboycesarahboyce merged commit9608678 intodjango:mainMar 25, 2025
33 checks passed
@JasonLovesDoggoJasonLovesDoggo deleted the db-persist branchMarch 25, 2025 12:25
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@felixxmfelixxmfelixxm approved these changes

@sarahboycesarahboycesarahboyce approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@JasonLovesDoggo@sarahboyce@felixxm

[8]ページ先頭

©2009-2025 Movatter.jp