This may hide hard-to-track errors. It's also inconsistent (arguments
which are not non-settable properties give an error like ".... is an
invalid keyword argument for this function")
This seems to have been introduced in ancient history:
https://github.com/django/django/commit/1fc3b3229a9b137f05a0a49bdc726f8c91317174
However, looking at the tests that were introduced as a part of that
particular commit I don't actually see a reason why the try/except block
would be necessary in the first place (the included tests actually refer
the opposite scenario, the one were a setter _is_ available). In fact,
looking at the original test, this particular bug could simply be revealed
by putting something like
{{{
a = Person(full_name = 'Paul McCartney')
}}}
In an assertRaises.
(As of the status quo, this silently does nothing with the value "Paul
McCartney")
I would have loved to do the work-proper to reveal the bug with tests; but
I don't have the time for that now - sorry about that.
--
Ticket URL: <https://code.djangoproject.com/ticket/26027>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_better_patch: => 0
* resolution: => duplicate
* needs_tests: => 0
* needs_docs: => 0
Comment:
Duplicate of #25910.
--
Ticket URL: <https://code.djangoproject.com/ticket/26027#comment:1>