Fellow Reports - March 2022
Week ending March 6, 2022 *Triaged:* https://code.djangoproject.com/ticket/33547 - Admin TabularInline with readonly field fail to render on validation error (accepted) https://code.djangoproject.com/ticket/33545 - Hint to default behavior (Deployment checklist > LOGGING) (wontfix) https://code.djangoproject.com/ticket/33543 - Depracate passing False to OrderBy's nulls_first and nulls_last. (accepted) https://code.djangoproject.com/ticket/33546 - Optimise creation of HttpResponseBase and ResponseHeaders objects (accepted) https://code.djangoproject.com/ticket/33548 - Use -> operator to implement KeyTransform on SQLite 3.38+ (accepted) https://code.djangoproject.com/ticket/33549 - Cannot use functools.partial when connecting to a signal handler when DEBUG=False (needsinfo) https://code.djangoproject.com/ticket/33551 - default db selected while deleting object even when different db is mentioned in the query. (needsinfo) https://code.djangoproject.com/ticket/33550 - Unexpected on_delete behavior in apps that have been removed from INSTALLED_APPS (invalid) https://code.djangoproject.com/ticket/33553 - Use built-in math functions in SQLite 3.35+. (accepted) https://code.djangoproject.com/ticket/33552 - has_key, has_keys, and has_any_keys JSONField() lookups don't handle numeric keys on SQLite, MySQL, and Oracle. (accepted) https://code.djangoproject.com/ticket/33555 - Enable Model Field choices to hold other Model objects as values of the iterable. (wontfix) https://code.djangoproject.com/ticket/33557 - Traversing a reverse Generic Foreign Key (needsinfo) https://code.djangoproject.com/ticket/33558 - Abstract model inheriting from typing.Generic[T] causes TypeError (duplicate) https://code.djangoproject.com/ticket/33559 - Django Admin Site - add filter for group's chosen permissions (duplicate) https://code.djangoproject.com/ticket/33169 - Migrations crashes with long identifiers on MySQL (8.0.26 ) (invalid) https://code.djangoproject.com/ticket/33561 - Synchronize user attributes on every authentication with RemoteUserBackend (wontfix) * **Reviewed/committed:* https://github.com/django/djangoproject.com/pull/1147 - Upgraded Trac dump to the version 41. https://github.com/django/django/pull/15467 - Fixed #33524 -- Allowed overriding empty_label for ForeignKey in ModelAdmin.radio_fields. https://github.com/django/djangoproject.com/pull/1149 - Changed footer hosting link to in-kind donors. https://github.com/django/django/pull/15473 - Fixed #33553 -- Used built-in math functions in SQLite 3.35+. https://github.com/django/django/pull/15466 - Fixed #33546 -- Optimized ResponseHeaders and HttpResponseBase. https://github.com/django/django/pull/15456 - Optimized lazy wrappers a bit. https://github.com/django/django/pull/15126 - Refs #27624 -- Optimized sql.Query creation by moving immutable/singleton attributes to class attributes. https://github.com/django/django/pull/15475 - Refs #33446 -- Allowed variable whitespace in CSS source map references. https://github.com/django/django/pull/14480 - Fixed #29865 -- Added logical XOR support for Q() and querysets. *Reviewed:* https://github.com/django/django/pull/15421 - Fixed #31169 -- Adapted the parallel test runner to use spawn. *Authored:* https://github.com/django/django/pull/15471 - Fixed #33547 -- Fixed error when rendering invalid inlines with readonly fields in admin. https://github.com/django/code.djangoproject.com/pull/124 - Fixed #123 -- Changed footer hosting link to in-kind donors. https://github.com/django/django/pull/15476 - Refs #11293 -- Added test for filtering aggregates with negated & operator. https://github.com/django/django/pull/15477 - Refs #31169 -- Prevented infinite loop in tests on failures. Week ending March 13, 2022 *Triaged:* https://code.djangoproject.com/ticket/33561 - Allow syncing user attributes on every authentication with RemoteUserBackend. (accepted) https://code.djangoproject.com/ticket/33563 - Unapplying ContentType migration 0002 does not populate legacy name field on non-default database (accepted) https://code.djangoproject.com/ticket/33564 - Confirm support for PROJ 9.X. (created) https://code.djangoproject.com/ticket/33566 - Issue with migrations after upgrading Django 2 to Django 3.2. (needsinfo) https://code.djangoproject.com/ticket/33568 - Random order doesn't work correctly with aggregation (duplicate) https://code.djangoproject.com/ticket/30923 - Out of date examples in docs that call render() with a Context instance instead of regular dict (fixed) https://code.djangoproject.com/ticket/33569 - Add support for multiple values for the x-forwarded-proto header (accepted) https://code.djangoproject.com/ticket/33570 - Admin panel typo - django HTML typo on Bookings (invalid) https://code.djangoproject.com/ticket/33571 - Fix handling empty string for If-Modified-Since header (accepted) https://code.djangoproject.com/ticket/33572 - Optimize CreateModel + AlterModelManage
Re: Making key_prefix callable for more flexible caching
Are there any plans to work on this? I can pick it up as I already implemented this functionality into own project. What is the process to working on the new features? On Sunday, 23 January 2022 at 12:37:52 UTC+2 Adam Johnson wrote: > Hi Tobias > > I think it's also worth mentioning your blog post, in which you explain > (to yourself) how to currently achieve dynamic keys: > https://rixx.de/blog/how-django-s-page-cache-works/ . It's a lot of work. > > The closure of #11269 does seem like an oversight, since the > CACHE_MIDDLEWARE_KEY_PREFIX setting doesn't support dynamic prefixes. > > I am in favour of allowing callable prefixes. It seems like a small > feature with great utility. > > Thanks, > > Adam > > On Sat, 22 Jan 2022 at 15:37, Tobias Kunze wrote: > >> Hi all, >> >> after mostly caching via external tools or manually for years, I've been >> trying out Django's built-in caching recently, and have ran into an issue >> that >> I believe could improve the use cases of `cache_page` a lot: >> >> `cache_page`/`CacheMiddleware` take an optional `key_prefix` argument as a >> string, falling back to `settings.CACHE_MIDDLEWARE_KEY_PREFIX`. >> >> If this argument could be a callable (getting the current request as >> argument), it would be much easier to cache different versions of the >> page, >> for example for users with different access rights, or to make sure newer >> changes are reflected by including a version or timestamp in the cache >> key. >> >> This change was proposed, uhm, 13 years ago, and was closed when the >> key_prefix became a site-wide setting. Any arguments for/against >> re-opening? >> >> https://code.djangoproject.com/ticket/11269 >> >> Additionally, for several of my use cases it would have been very neat to >> be >> able to determine the cache key myself, which is currently generated >> fairly >> deep into the caching stack based on the prefix, the request and so on. >> While >> that's a good default, it makes it harder to interact with the cache from >> outside the request-response cycle for the view being cached. >> (But that's a bigger ask, because there's less existing infrastructure to >> pass >> down a changed key function – I'd be pretty happy with just a dynamic >> prefix.) >> >> Best, >> Tobias >> -- >> Tobias Kunze / rixx (er/he) >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django developers (Contributions to Django itself)" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-develop...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-developers/20220122153731.4beyiyepuahiprgu%40cordelia.localdomain >> . >> > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/0ffd5069-a3bb-4312-a2ef-787813c48fd9n%40googlegroups.com.