Opened 11 months ago

Last modified 11 months ago

#27620 assigned New feature

Add a TransactionMiddleware

Reported by: Tim Graham Owned by: luojiebin
Component: Core (Other) Version: master
Severity: Normal Keywords:
Cc: Florian Apolloner Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

With new-style middleware, it should be feasible to write a TransactionMiddleware that works properly (as opposed to the version in Django 1.7 and older).

Change History (5)

comment:1 Changed 11 months ago by luojiebin

Owner: changed from nobody to luojiebin
Status: newassigned
Last edited 11 months ago by luojiebin (previous) (diff)

comment:2 in reply to:  description Changed 11 months ago by luojiebin

Do this middleware want to do the same thing as the one in Django 1.7 except that it applies only to view functions, not including those middleware modules coming after it? Can you explain it in more detail? Thanks.

to Tim Graham:

With new-style middleware, it should be feasible to write a TransactionMiddleware that works properly (as opposed to the version in Django 1.7 and older).

comment:3 Changed 11 months ago by Tim Graham

Cc: Florian Apolloner added

Florian (apollo13) mentioned this idea in #django-dev IRC but later indicated there may be some problems with it.

comment:4 Changed 11 months ago by Florian Apolloner

@luojiebin That is to be decided, the main issue here - as you noted - is supporting non_atomic_requests. Any ideas welcome :D

comment:5 in reply to:  4 Changed 11 months ago by luojiebin

But why the previous TransactionMiddleware was deprecated? Only because ATOMIC_REQUESTS can do the same thing as it? But it can not noly apply to views, but also other middleware, which ATOMIC_REQUESTS can't do. So, does the previous TransactionMiddleware cause any problem so that we have to deprecate it? With the new-style middleware, we can handle the previous problem, or we can add new feature to TransactionMiddlware with it?

to Florian Apolloner:

@luojiebin That is to be decided, the main issue here - as you noted - is supporting non_atomic_requests. Any ideas welcome :D

Note: See TracTickets for help on using tickets.
Back to Top