#28269: Fix Model._meta._property_names to work with attributes raise AttributeError -------------------------------------+------------------------------------- Reporter: Adam | Owner: nobody (Chainz) Johnson | Type: Bug | Status: new Component: Database | Version: 1.11 layer (models, ORM) | Severity: Normal | Keywords: Triage Stage: | Has patch: 0 Unreviewed | Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------------------+------------------------------------- As reported on the mailing list at https://groups.google.com/forum/#!msg /django-developers/ClQ0mCJ-a6Y/FOYTz98yBgAJ , the optimization I did in model __init__ in commit d2a26c1a90e837777dabdf3d67ceec4d2a70fb86 did not copy in a try/except AttributeError. This fails because some third party apps install "class only" descriptors that raise AttributeError when not accessed in an instance, for example: https://github.com/kmmbvnr/django- fsm/blob/2d2eaee/django_fsm/__init__.py#L225
_property_names should be changed to try/except AttributeError when accessing the attributes on the class, and we should add a test to prevent regression. -- Ticket URL: <https://code.djangoproject.com/ticket/28269> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/053.f3941f19bb7b0f64efb0bac0a7480646%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.