#13879: method_decorator doesn't supports decorators with arguments
-------------------------------------+-------------------------------------
     Reporter:  Marinho Brandão      |                    Owner:  Wes P.
         Type:  New feature          |                   Status:  assigned
    Component:  Utilities            |                  Version:  1.2
     Severity:  Normal               |               Resolution:
     Keywords:  sprintnov13,         |             Triage Stage:  Accepted
  decorators                         |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Wes P.):

 * needs_better_patch:  1 => 0

Comment:

 After reviewing the ticket a few times, I also grudgingly agree that
 `method_decorator_with_args` could be an added feature. I also think that
 it depends a lot on the values of the current team making the decision to
 include a new features or not. If consistency of functions and features is
 really important than yes, include the function. If reducing code and
 complexity is more important, than I would say set this ticket to
 '''"design decision needed"''' and then close it without accepting the
 pull request.

 The feature has not come up again in a long time so it probably isn't that
 important. The feature doesn't add anything of real value to Django. The
 function `method_decorator` can do the work and the tests are designed to
 make sure that arguments can be passed in when needed. Keeping
 `method_decorator_with_args` adds more code that needs to be maintained.

 The pull request includes the original patch provided by Susan Tan. I
 copied and modified all the tests for `method_decorator` including the
 async tests. Some tests were not repeated, namely the tests for passing in
 a tuple of decorator factories since that is not part of the feature's
 design. I added documentation for the feature.

 https://github.com/django/django/pull/19333
-- 
Ticket URL: <https://code.djangoproject.com/ticket/13879#comment:20>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070195f9524743-a54098bc-a0e0-4429-9f54-850c33f0f1ea-000000%40eu-central-1.amazonses.com.

Reply via email to