-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
Django 5.0 Tracking Issue #1493
Comments
I hope that if we have such a list we can run through them after 5.0 is released, rather than have small issues trickle in as users discover what has been missed. |
Agreed, this is helpful, thanks! I think it would be more urgent to compile such a list for Django 4.2 (and we also probably missed some stuff in 4.1 and older even) |
I did this one first because it's easier, since I didn't need to find related issues here... |
More changes since @adamchainz 's original message: (Collapsed original list that is now outdated)
I think I got everything, I'll try and tackle everything in the list I just made first since I can click the checkboxes. Question for maintainers, how big of a PR should I make? Should each line item here be its own commit in one massive PR? How should we handle the version bumps in a separate PR? |
I prefer small PRs that can be easily reviewed, each with a link to the relevant commit/source. Happy if they group some related features but not too large. I’m not sure when we’d aim to support 5.0. It would be more productive right now to whittle down the outstanding todo list per the contributing guide. |
I just put up my first PR against this issue: #1741 For anyone else working on this, I found the blame view of the release notes on GitHub to be really helpful in tracking down the exact commit for a change: https://github.com/django/django/blame/main/docs/releases/5.0.txt I'm about to go on a work trip for a few days so I won't be terribly responsive, but I wanted to get the first one of these going to make sure I'm doing everything right before I burn through more of the changes. Hopefully this PR isn't too far off base! |
Since 5.0 was officially released, I opened PR #1859 to update to it in our CI. (UPDATE: Merged now) Also generated a separate stubtest allowlist for Django 5.0: https://github.com/typeddjango/django-stubs/blob/master/scripts/stubtest/allowlist_todo_django50.txt |
Holy thing. Looks like giant work. (venv) ➜ backend git:(main) ✗ mypy server
server/apps/main/models.py:25: error: Unexpected keyword argument "db_default" for "CharField"; did you mean "default"? [call-arg]
Found 1 error in 1 file (checked 25 source files) |
Yep. To repeat just in case: if someone's interested in contributing, please keep PRs small and focused on one topic. |
If talk about class CharField(Field[_ST, _GT]):
def __init__(
self,
...
db_default: Any = ...,
...
) -> None: ... but I not understand how split |
Great! 🎉
Don't worry about that. When there are differences between Django versions, |
Do we have a sense for which of these TODOs are release blockers? Right now |
I will have some time this week to work on the 5.0 changes |
I wouldn't consider any of them release blockers. No reason to delay improvements that are ready now, because everything is not yet perfect. But of course additional updates would be great to have. But the priority for the release should be on getting open PRs reviewed and merged (ones that are close to being ready -- ignore the older messy ones). The real reason for the lack of releases is that nobody has stepped up to do the release. Usually I was the one handling releases and reviewing PRs that fell through the cracks. But I had a long vacation and after that haven't found the right combination of time and motivation to push the next release forward. In retrospect I should have been more explicit about communicating my absence. But I didn't expect it to take this long. If someone (preferably a current maintainer) is interested in handling the release, I'd be happy to instruct and help. But if not, I will get to it, but don't want to make promises yet.
Don't let that block your upgrade. django-stubs 4.2.7 works fine with Django 5.0 too, I've been using it myself. Any new or changed Django APIs may give type errors, but those can be solved with |
@sobolevn Could you give me permission to update the checklist temporarily? I need it because I got confused checking while I was working on it. |
@saJaeHyukc Feel free to copy & paste the whole checklist to a new comment, and I will edit the previous comment to collapse it. Here's the Markdown content of the last checklist: https://gist.github.com/intgr/126c9e366170e671e1bc6d12a2bc575a |
This is a list created by @sudosubin. This is the current list of tasks I have organized manually. It may be missing some from version 5.0, or include changes from version 4.2. I think Django 4.2.8 (compare, release notes)
Django 5.0 (compare, release notes)
django.conf
|
This is a tracking issue for changes that will be needed for Django 5.0, based on in-development release notes.
EDIT: Please see #1493 (comment) for an up to date progress list.
(Collapsed original list that is now outdated)
django.utils.deprecation
ModelAdmin.show_facets
,django.contrib.admin.ShowFacets
enumBoundField.as_field_group()
,django.forms.Field.template_name
,django.forms.renderers.BaseRenderer.field_template_name
db_default
arg and attr on modelField
django.contrib.admin.AdminSite.get_log_entries
django.http.HttpRequest.auser
fromAuthenticationMiddleware
django.contrib.gis.db.models.functions.ClosestPoint
django.contrib.postgres.constraints.ExclusionConstraint.violation_error_code
choices
args to formChoiceField
and modelField
supportChoices
classes directly.django.forms.URLField
newassume_scheme
argQuerySet.update_or_create
andaupdate_or_create
newcreate_defaults
argviolation_error_code
arg forBaseConstraint
,CheckConstraint
, andUniqueConstraint
error_messages
fordjango.core.paginator.Paginator.error_messages
Signal.asend()
andSignal.asend_robust()
methodsinstance
argument of the undocumentedBaseModelFormSet.save_existing()
method is renamed toobj
.django.contrib.admin.helpers.checkbox
is removed.Query.annotation_select_mask
attribute is changed from a set of strings to an ordered list of strings.BaseConstraint
is deprecated in favor of keyword-only arguments. (Let's make them keyword-only in the stubs in 5.0.)request
is added to the signature ofModelAdmin.lookup_allowed()
. Support for ModelAdmin subclasses that do not accept this argument is deprecated.get_joining_columns()
method ofForeignObject
andForeignObjectRel
is deprecated. Starting with Django 6.0,django.db.models.sql.datastructures.Join
will no longer fallback toget_joining_columns()
. Subclasses should implementget_joining_fields()
instead.django.utils.baseconv
module is removed.django.utils.datetime_safe
module is removed.extra_tests
argument forDiscoverRunner.build_suite()
andDiscoverRunner.run_tests()
is removed.USE_L10N
setting is removed.pytz
timezones is removed.is_dst
argument is removed from:QuerySet.datetimes()
django.utils.timezone.make_aware()
django.db.models.functions.Trunc()
django.db.models.functions.TruncSecond()
django.db.models.functions.TruncMinute()
django.db.models.functions.TruncHour()
django.db.models.functions.TruncDay()
django.db.models.functions.TruncWeek()
django.db.models.functions.TruncMonth()
django.db.models.functions.TruncQuarter()
django.db.models.functions.TruncYear()
django.contrib.gis.admin.GeoModelAdmin
andOSMGeoAdmin
classes are removed.BaseForm._html_output()
method is removed.str
, rather than aSafeString
, when rendering anErrorDict
andErrorList
is removed.SitemapIndexItem.__str__()
method is removed.name
argument ofdjango.utils.functional.cached_property()
is removed.opclasses
argument ofdjango.contrib.postgres.constraints.ExclusionConstraint
is removed.errors=None
toSimpleTestCase.assertFormError()
andassertFormsetError()
is removed.django.contrib.sessions.serializers.PickleSerializer
is removed.created=True
is required in the signature ofRemoteUserBackend.configure_user()
subclasses.django.contrib.auth.views.LogoutView
anddjango.contrib.auth.views.logout_then_login()
is removed.django.utils.timezone.utc
alias todatetime.timezone.utc
is removed.SimpleTestCase.assertFormError()
andassertFormSetError()
is no longer allowed.django.contrib.gis.admin.OpenLayersWidget
is removed.django.contrib.auth.hashers.CryptPasswordHasher
is removed.nulls_first=False
ornulls_last=False
toExpression.asc()
andExpression.desc()
methods, and theOrderBy
expression is no longer allowed.The text was updated successfully, but these errors were encountered: