Skip to content

Ac/django5.2#1

Open
andycookfr wants to merge 3 commits intomasterfrom
ac/django5.2
Open

Ac/django5.2#1
andycookfr wants to merge 3 commits intomasterfrom
ac/django5.2

Conversation

@andycookfr
Copy link
Copy Markdown
Collaborator

No description provided.

Andy Cook and others added 3 commits April 1, 2026 16:30
- Replace removed smart_unicode/force_text with smart_str/force_str
- Replace removed ugettext_lazy with gettext_lazy
- Fix ChoiceField._set_choices removed in Django 5.0; use
  forms.ChoiceField.choices.fset() instead

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Use list(attrs.items()) to avoid RuntimeError from mutating dict
  during iteration (attrs.pop() inside the comprehension)
- Remove fields.sort(lambda) call: cmp() doesn't exist in Python 3,
  and creation_counter was removed in Django 5.x. Python 3.7+ dicts
  preserve insertion order, making the sort unnecessary.
- Use list(base.base_fields.items()) for Python 3 compatibility
  (dict.items() returns a view, not a list, so + concatenation fails)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant