[deprecation] simplify class_deprecated code

I don't know why it has been choosen to move to a metaclass but it actually
brings more problems and a more complex code that it brings benefits.
5 jobs for topic/default/fix-class-deprecated-metaclass-conflict in 5 minutes and 30 seconds (queued for 13 seconds)
Name Stage Failure
black Test
No job log