register api patches immediately and raise when too late (#8311)
New API patches can only be registered within an engine which is only read when booting. Before the patch, the actual registration took place on to_prepare. But the patching only takes place when the patched class is read. If the class is initialized, before the patch is registered, it is never applied. There was no warning given. With the change, the registration happens at once and an error is raised if a patch is registered after the class is already defined. [ci skip]pull/8318/head
parent
1bdce09aa0
commit
3c7bf61b55
Loading…
Reference in new issue