This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients VA, gvanrossum, ncoghlan, serhiy.storchaka
Date 2018-02-05.14:00:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1517839206.29.0.467229070634.issue32768@psf.upfronthosting.co.za>
In-reply-to
Content
I've added Guido to the thread, as my initial reaction is to propose deprecating writable __bases__ rather than trying to support it properly.

However, if we do decide to fix it, then the potential path to resolution I would suggest is:

1. Factor out all of the slot derivation code from its current location into a separate helper function
2. Adjust the descriptor for __bases__ to rerun all of that code when the bases are changed

That still wouldn't be guaranteed to work entirely reliably (since there are some actions taken in the first initialisation that make it hard for us to tell whether a method came from the class definition or was added implicitly by the class machinery, and any class decorators wouldn't be executed again, and we wouldn't be running __init_subclass__ for any of the new base classes either).
History
Date User Action Args
2018-02-05 14:00:06ncoghlansetrecipients: + ncoghlan, gvanrossum, serhiy.storchaka, VA
2018-02-05 14:00:06ncoghlansetmessageid: <1517839206.29.0.467229070634.issue32768@psf.upfronthosting.co.za>
2018-02-05 14:00:06ncoghlanlinkissue32768 messages
2018-02-05 14:00:06ncoghlancreate